198  5.    

 . 5.3
                         

int                                  
pthread_mutexattr_settype      type   , -
(pthread_mutexattr_t * attr,   attr.  
in    ,                    type  ,   
1!                               , 
pthread_mutexattr_gettype        ..  type  -
.(const pthread_mutexattr_t *   :

restrict attr,
int "-restrict type) ;         PTHREAD_MUTEX_DEFAULT

PTHREAD_MUTEX_RECURSIVE

PTHREAD_MUTEX_ERRORCHECK

PTHREAD_MUTEX_NORMAL

     ,   , 
  :   .   
   .     , 
    .   -
 ,    ,     .
      .   -
      . 5.5.    -
   ,     , 
    .   POSIX  
,        
       .   -
      ,   -
  , ,     .

5.3.2.2.     
 

        -
,     "".  
  "",      -
.    5.1.      .
       .

//  5.1.    
//                

// . . .
pthread_t ThreadA,ThreadB;

pthread_mutex_t Mutex;

pthread_mutexattr_t MutexAttr;

void *taskl(void *X)
{

pthread_mutex_lock(&Mutex) ;

//   .

pthread_mutex__unlock(&Mutex);