diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2019-02-04 17:18:09 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2019-02-04 17:18:09 +0000 |
commit | dd1a8be070d4c1f2430e774aefef9c7341301e14 (patch) | |
tree | 17a9b69786dd37c5a4134d69d2e2eecea4ba7276 /lib/libpthread | |
parent | b17bc6f5e6877c15c56d4cd13c97a2f4b7905ba6 (diff) |
add a pthread_get_name_np to match pthread_set_name_np.
could be useful in ports.
initial diff by David Carlier some time ago.
ok jca
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/man/pthread_set_name_np.3 | 11 | ||||
-rw-r--r-- | lib/libpthread/man/pthreads.3 | 7 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lib/libpthread/man/pthread_set_name_np.3 b/lib/libpthread/man/pthread_set_name_np.3 index cb92f49f791..5c797b05ac3 100644 --- a/lib/libpthread/man/pthread_set_name_np.3 +++ b/lib/libpthread/man/pthread_set_name_np.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: pthread_set_name_np.3,v 1.6 2014/03/06 17:42:25 jmc Exp $ +.\" $OpenBSD: pthread_set_name_np.3,v 1.7 2019/02/04 17:18:08 tedu Exp $ .\" David Leonard <d@openbsd.org>, 1999. Public domain. -.Dd $Mdocdate: March 6 2014 $ +.Dd $Mdocdate: February 4 2019 $ .Dt PTHREAD_SET_NAME_NP 3 .Os .Sh NAME @@ -11,6 +11,8 @@ .In pthread_np.h .Ft void .Fn pthread_set_name_np "pthread_t thread" "const char *name" +.Ft void +.Fn pthread_get_name_np "pthread_t thread" "char *name" "size_t len" .Sh DESCRIPTION The .Fn pthread_set_name_np @@ -26,6 +28,11 @@ signal. The string pointed to by .Fa name is copied, and so need not be valid for the life of the thread. +.Fn pthread_get_name_np +function retrieves +.Fa name +associated with +.Fa thread . .Sh SEE ALSO .Xr pthreads 3 .Sh STANDARDS diff --git a/lib/libpthread/man/pthreads.3 b/lib/libpthread/man/pthreads.3 index b3ad565c4e8..000ddd3ca22 100644 --- a/lib/libpthread/man/pthreads.3 +++ b/lib/libpthread/man/pthreads.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: pthreads.3,v 1.41 2013/07/16 15:21:11 schwarze Exp $ +.\" $OpenBSD: pthreads.3,v 1.42 2019/02/04 17:18:08 tedu Exp $ .\" David Leonard <d@openbsd.org>, 1998. Public domain. -.Dd $Mdocdate: July 16 2013 $ +.Dd $Mdocdate: February 4 2019 $ .Dt PTHREADS 3 .Os .Sh NAME @@ -169,6 +169,8 @@ The functions available are as follows: Identify the main thread. .It Fn pthread_set_name_np Set the name of a thread. +.It Fn pthread_get_name_np +Get the name of a thread .It Fn pthread_stackseg_np Return stack size and location. .It Fn pthread_yield @@ -421,6 +423,7 @@ with larger numbers generating more verbose output. .Xr pthread_detach 3 , .Xr pthread_equal 3 , .Xr pthread_exit 3 , +.Xr pthread_get_name_np 3 , .Xr pthread_getcpuclockid 3 , .Xr pthread_getspecific 3 , .Xr pthread_join 3 , |