MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions           pthreadmutexattrinit(3C)



NAME
     pthreadmutexattrinit, pthreadmutexattrdestroy - initial-
     ize or destroy mutex attributes object

SYNOPSIS
     cc -mt [ flag... ] file... -lpthread [ library... ]
     #include 

     int pthreadmutexattrinit(pthreadmutexattrt *attr);


     int pthreadmutexattrdestroy(pthreadmutexattrt *attr);


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


     The effect of  initializing  an  already  initialized  mutex
     attributes object is undefined.


     After a mutex attributes object has been used to  initialize
     one  or  more mutexes, any function affecting the attributes
     object (including destruction) does not  affect  any  previ-
     ously initialized mutexes.


     The pthreadmutexattrdestroy() function  destroys  a  mutex
     attributes object; the object becomes, in effect, uninitial-
     ized.       An        implementation        may        cause
     pthreadmutexattrdestroy()  to set the object referenced by
     attr to an  invalid  value.  A  destroyed  mutex  attributes
     object can be re-initialized using pthreadmutexattrinit();
     the results of otherwise referencing the object after it has
     been  destroyed are undefined.

RETURN VALUES
     Upon  successful  completion,  pthreadmutexattrinit()  and
     pthreadmutexattrdestroy()  return  0.  Otherwise, an error
     number is returned to indicate the error.

ERORS
     The pthreadmutexattrinit() function may fail if:

     ENOMEM    Insufficient memory exists to initialize the mutex
               attributes object.






SunOS 5.11          Last change: 23 Mar 2005                    1






Standard C Library Functions           pthreadmutexattrinit(3C)



     The pthreadmutexattrdestroy() function may fail if:

     EINVAL    The value specified by attr is invalid.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Standard                    
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     pthreadcondinit(3C),                   pthreadcreate(3C),
     pthreadmutexinit(3C),       pthreadmutexattrsettype(3C),
     attributes(5), standards(5)































SunOS 5.11          Last change: 23 Mar 2005                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™