Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpthread commit the right file.



details:   https://anonhg.NetBSD.org/src/rev/05ef4638cce4
branches:  trunk
changeset: 344847:05ef4638cce4
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 24 00:05:28 2016 +0000

description:
commit the right file.

diffstat:

 lib/libpthread/pthread_getcpuclockid.3 |  77 ++++++++-------------------------
 1 files changed, 20 insertions(+), 57 deletions(-)

diffs (121 lines):

diff -r 8a6518f631db -r 05ef4638cce4 lib/libpthread/pthread_getcpuclockid.3
--- a/lib/libpthread/pthread_getcpuclockid.3    Sat Apr 23 23:28:13 2016 +0000
+++ b/lib/libpthread/pthread_getcpuclockid.3    Sun Apr 24 00:05:28 2016 +0000
@@ -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
+.Fa thread .
 .Pp
-The
-.Fn clock_getcpuclockid
-function is equivalent to calling
-.Fn clock_getcpuclockid2
-with
-.Fa idtype
-.Dv P_PID
-and
-.Fa id
-.Fa pid .
-.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 @@
 .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 .



Home | Main Index | Thread Index | Old Index