Module Name: src
Committed By: christos
Date: Sun Apr 24 00:05:28 UTC 2016
Modified Files:
src/lib/libpthread: pthread_getcpuclockid.3
Log Message:
commit the right file.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libpthread/pthread_getcpuclockid.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libpthread/pthread_getcpuclockid.3
diff -u src/lib/libpthread/pthread_getcpuclockid.3:1.1 src/lib/libpthread/pthread_getcpuclockid.3:1.2
--- src/lib/libpthread/pthread_getcpuclockid.3:1.1 Sat Apr 23 19:12:19 2016
+++ src/lib/libpthread/pthread_getcpuclockid.3 Sat Apr 23 20:05:28 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_getcpuclockid.3,v 1.1 2016/04/23 23:12:19 christos Exp $
+.\" $NetBSD: pthread_getcpuclockid.3,v 1.2 2016/04/24 00:05:28 christos Exp $
.\"
.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -28,64 +28,34 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd April 23, 2016
-.Dt clock_getcpuclockid2 2
+.Dt pthread_getcpuclockid 3
.Os
.Sh NAME
-.Nm clock_getcpuclockid2
-.Nd retrieve the clock id of a process or lwp
+.Nm pthread_getcpuclockid
+.Nd retrieve the clockid of the give thread
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.In time.h
+.In pthread.h
.Ft int
-.Fn clock_getcpuclockid2 "idtype_t idtype" "id_t id" "clockid_t *clock_id"
-.Ft int
-.Fn clock_getcpuclockid "pid_t pid" "clockid_t *clock_id"
+.Fn pthread_getcpuclockid "pthread_t thread" "clockid_t *clock_id"
.Sh DESCRIPTION
The
-.Fn cpu_getcpuclockid2
+.Fn pthread_getcpuclockid
function retrieves the
.Fa clock_id
for the specified
-.Fa id
-and
-.Fa idtype.
-Supported
-.Fa idtypes
-are:
-.Bl -tag -width P_LWPID
-.It Dv P_PID
-The specified process id or
-.Dv 0
-for the current process.
-.It Dv P_LWPID
-The specified LWP id or
-.Dv 0
-for the current LWP.
-.El
-.Pp
-The
-.Fn clock_getcpuclockid
-function is equivalent to calling
-.Fn clock_getcpuclockid2
-with
-.Fa idtype
-.Dv P_PID
-and
-.Fa id
-.Fa pid .
+.Fa thread .
.Pp
-The
+The
.Xr clock_gettime 2
function can be used with the returned
.Fa clock_id
-to retrieve process and LWP times.
+to retrieve LWP times.
.Sh RETURN VALUES
-The
-.Fn clock_getcpuclockid
-and
-.Fn clock_getcpuclockid2
-functions succeed and return 0, placing the requested
+On success the
+.Fn pthread_getcpuclockid
+function returns 0, placing the requested
.Fa clock_id
in the argument.
On error, the value \-1 is returned
@@ -95,27 +65,20 @@ is set to reflect what went wrong.
.Sh ERRORS
These functions fail if:
.Bl -tag -width Er
-.It Bq Er EINVAL
-An unsuppored
-.Fa idtype
-was supplied.
+.It Bq Er ESRCH
+No thread with this id was found.
.El
.Sh SEE ALSO
-.Xr clock_gettime 2
+.Xr clock_getcpuclockid2 2 ,
+.Xr clock_gettime 2 ,
.Sh STANDARDS
The
-.Fn clock_getcpuclockid
+.Fn pthread_getcpuclockid
function conforms to
.St -p1003.1-2001 .
-The
-.Fn clock_getcpuclockid2
-is a
-.Nx
extension.
.Sh HISTORY
The
-.Fn clock_getcpuclockid
-and
-.Fn clock_getcpuclockid2
-functions appeared in
+.Fn pthread_getcpuclockid
+function appeared in
.Nx 8 .