.\" $NetBSD: pthread_getcpuclockid.3,v 1.5 2017/03/05 18:42:51 njoly Exp $ .\" .\" Copyright (c) 2016 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Christos Zoulas. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd March 5, 2017 .Dt PTHREAD_GETCPUCLOCKID 3 .Os .Sh NAME .Nm pthread_getcpuclockid .Nd retrieve the clockid of the given thread .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In pthread.h .Ft int .Fn pthread_getcpuclockid "pthread_t thread" "clockid_t *clock_id" .Sh DESCRIPTION The .Fn pthread_getcpuclockid function retrieves the .Fa clock_id for the specified .Fa thread . .Pp The .Xr clock_gettime 2 function can be used with the returned .Fa clock_id to retrieve LWP times. .Sh RETURN VALUES On success the .Fn pthread_getcpuclockid function returns 0, placing the requested .Fa clock_id in the argument. Otherwise an error number will be returned. .Sh ERRORS These functions fail if: .Bl -tag -width Er .It Bq Er EFAULT .Fa clock_id points outside the process's allocated address space. .El .Sh SEE ALSO .Xr clock_getcpuclockid2 2 , .Xr clock_gettime 2 .Sh STANDARDS The .Fn pthread_getcpuclockid function conforms to .St -p1003.1-2001 . extension. .Sh HISTORY The .Fn pthread_getcpuclockid function appeared in .Nx 8 . in/expr/expr.y?id=da2bc00a8b2cf7d4e2cc38fcdfd1b22ff1518ccf&showmsg=1'>Expand)Author 2020-06-11Fix typokamil 2018-06-27Add a missing check to handle correctly 0 * 0 in expr(1)kamil 2018-06-27Improve the * operator handling in expr(1)kamil 2018-06-14remove notreachedchristos 2018-06-14return to caller instead of exit(2)christos 2018-06-13Detect properly overflow in expr(1) for 0 + INTkamil 2018-06-12Rework perform_arith_op() in expr(1) to omit Undefined Behaviorkamil 2016-09-05Drop main() prototype.sevan 2012-03-15Add __printflike attribution to use vprintf and friends with an argumentjoerg 2011-08-25Mark yyerror as dead.joerg 2009-01-20Revert for now, pending discussion of how expr should behave in the casejoerg 2009-01-20SUS says that expr must support "--" to prevent interpretation ofjoerg 2008-04-30Normalize TNF license, move to 2 clause.martin 2006-03-17Handle asprintf failing to allocate.rumble 2005-06-01appease gcc -Wuninitializedlukem 2004-04-20add support for 'length' keyword, for compatibility with GNU exprjdolecek 2004-03-20explicitly use REG_BASIC when calling regcomp(3), instead of 0jdolecek 2003-02-14'NetBSD.org'grant 2001-09-16Use {g,s}etprogname, and some other KNF stuff. Patch by Petri Koistinen.wiz 2001-05-06Various cleanups/fixes.jmc 2001-05-05Various changes to fix bugs in PR bin/12838.jmc