svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
pthread_attr_init(3c)
Standard C Library Functions pthread_attr_init(3C)
NAME
pthread_attr_init, pthread_attr_destroy - initialize or destroy threads
attribute object
SYNOPSIS
#include <pthread.h>
int pthread_attr_init(pthread_attr_t *attr);
int pthread_attr_destroy(pthread_attr_t *attr);
DESCRIPTION
The function pthread_attr_init() initializes a thread attributes object
attr with the default value for all of the individual attributes used
by a given implementation.
The resulting attribute object (possibly modified by setting individual
attribute values), when used by pthread_create(), defines the
attributes of the thread created. A single attributes object can be
used in multiple simultaneous calls to pthread_create().
The pthread_attr_init() function initializes a thread attributes object
( attr) with the default value for each attribute as follows:
tab(); lw(1.83i) lw(1.83i) lw(1.83i) lw(1.83i) lw(1.83i) lw(1.83i)
AttributeDefault ValueMeaning of Default _ contention‐
scopePTHREAD_SCOPE_PROCESSresource competition within process detach‐
statePTHREAD_CREATE_JOINABLEjoinable by other threads stackaddrNULL‐
stack allocated by system stacksize01 or 2 megabyte priority0priority
of the thread policySCHED_OTHERtraditional time-sharing policy inher‐
itschedPTHREAD_INHERIT_SCHEDT{ scheduling policy and parameters are
inherited from the creating thread T} guardsizePAGESIZET{ size of guard
area for a thread's created stack T} threadnameNULLstring to be associ‐
ated with this thread
The pthread_attr_destroy() function destroys a thread attributes object
( attr), which cannot be reused until it is reinitialized. An implemen‐
tation may cause pthread_attr_destroy() to set attr to an implementa‐
tion-dependent invalid value. The behavior of using the attribute after
it has been destroyed is undefined.
RETURN VALUES
Upon successful completion, pthread_attr_init() and
pthread_attr_destroy() return a value of 0. Otherwise, an error number
is returned to indicate the error.
ERRORS
The pthread_attr_init() function will fail if:
ENOMEM Insufficient memory exists to initialize the thread
attributes object.
The pthread_attr_destroy() function may fail if:
EINVAL attr is invalid.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe _ Stan‐
dardSee standards(7).
SEE ALSO
pthread_attr_getdetachstate(3C), pthread_attr_getguardsize(3C),
pthread_attr_getinheritsched(3C), pthread_getattr_np(3C), pthread_get‐
name_np(3C), pthread_attr_getschedparam(3C), pthread_attr_getschedpol‐
icy(3C), pthread_attr_getscope(3C), pthread_attr_getstackaddr(3C),
pthread_attr_getstacksize(3C), pthread_attr_setdetachstate(3C),
pthread_attr_setguardsize(3C), pthread_attr_setinheritsched(3C),
pthread_attr_setname_np(3C), pthread_attr_setschedparam(3C),
pthread_attr_setschedpolicy(3C), pthread_attr_setscope(3C),
pthread_attr_setstackaddr(3C), pthread_attr_setstacksize(3C),
pthread_create(3C), sysconf(3C), attributes(7), standards(7)
Oracle Solaris 11.4 14 May 2018 pthread_attr_init(3C)