summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2019-02-04 17:18:08 +0000
committertedu <tedu@openbsd.org>2019-02-04 17:18:08 +0000
commit295117693e3a1d8af9cc3004578ce352f938d83a (patch)
tree45ad9597c832761839daf4ac99c0cc8dff531c35 /lib/libpthread
parentsync (diff)
downloadwireguard-openbsd-295117693e3a1d8af9cc3004578ce352f938d83a.tar.xz
wireguard-openbsd-295117693e3a1d8af9cc3004578ce352f938d83a.zip
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.311
-rw-r--r--lib/libpthread/man/pthreads.37
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 ,