pthread_condattr_init(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

pthread_condattr_init(3c)

pthread_...attr_init(3C) Standard C Library Functions pthread_...attr_init(3C)

NAME
       pthread_condattr_init, pthread_condattr_destroy - initialize or destroy
       condition variable attributes object

SYNOPSIS
       #include <pthread.h>

       int pthread_condattr_init(pthread_condattr_t *attr);


       int pthread_condattr_destroy(pthread_condattr_t *attr);

DESCRIPTION
       The  pthread_condattr_init()  function initializes a condition variable
       attributes object attr with the default value for all of the attributes
       defined by the implementation.


       At present, the only attribute available  is  the  scope  of  condition
       variables.  The  default scope of the attribute is PTHREAD_PROCESS_PRI‐
       VATE.


       Attempts to initialize previously initialized  condition  variable  at‐
       tributes  object  will leave the storage allocated by the previous ini‐
       tialization unallocated.


       After a condition variable attributes object has been used to  initial‐
       ize one or more condition variables, any function affecting the attrib‐
       utes object (including destruction) does not affect any previously ini‐
       tialized condition variables.


       The  pthread_condattr_destroy()  function destroys a condition variable
       attributes object; the object becomes, in effect, uninitialized. An im‐
       plementation may cause pthread_condattr_destroy()  to  set  the  object
       referenced  by attr to an invalid value. A destroyed condition variable
       attributes object can be re-initialized using  pthread_condattr_init();
       the  results  of otherwise referencing the object after it has been de‐
       stroyed are undefined.


       Additional attributes, their default values, and the names of the asso‐
       ciated functions to get and set those attribute values are  implementa‐
       tion-dependent.

RETURN VALUES
       If  successful,  the  pthread_condattr_init()  and pthread_condattr_de‐
       stroy() functions return 0. Otherwise, an error number is  returned  to
       indicate the error.

ERRORS
       The pthread_condattr_init() function will fail if:

       ENOMEM    Insufficient  memory exists to initialize the condition vari‐
                 able attributes object.



       The pthread_condattr_destroy() function may fail if:

       EINVAL    The value specified by 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_condattr_setpshared(3C),  pthread_cond_init(3C),   pthread_con‐
       dattr_getpshared(3C),  pthread_create(3C),  pthread_mutex_init(3C), at‐
       tributes(7), standards(7)

Oracle Solaris 11.4               16 May 2014         pthread_...attr_init(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3