2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2018 Joyent, Inc.
15 .Dt PTHREAD_ATTR_GETNAME_NP 3C
18 .Nm pthread_attr_getname_np ,
19 .Nm pthread_attr_setname_np
20 .Nd get or set thread name attribute
25 .Fo pthread_attr_getname_np
26 .Fa "pthread_attr_t *restrict attr"
32 .Fo pthread_attr_setname_np
33 .Fa "pthread_attr_t *restrict attr"
34 .Fa "const char *name"
39 .Fn pthread_attr_setname_np
41 .Fn pthread_attr_getname_np
42 functions, respectively, set and get the thread name attribute in
47 .Fn pthread_attr_getname_np ,
51 Any threads created with
55 will have their name set to
59 Thread names are limited to
60 .Dv PTHREAD_MAX_NAMELEN_NP
61 including the terminating NUL.
62 They may only contain printable ASCII characters.
64 Upon successful completion, the
65 .Fn pthread_attr_getname_np
67 .Fn pthread_attr_setname_np
70 Otherwise, an error number is returned to indicate the error.
73 .Fn pthread_attr_getname_np
74 function may fail with:
86 is too small to contain the thread name.
87 The buffer may be over-written with partial contents of the thread name.
91 .Fn pthread_attr_setname_np
92 function may fail with:
95 The length of name given in
97 exceeds the maximum size allowed.
99 .Sh INTERFACE STABILITY
104 .Xr pthread_create 3c ,
105 .Xr pthread_getname_np 3c