390  11.     

//  11.9.   rw_mutex, 

//                  pthread_rwlock_ t

//                pthread_rwlockattr_t

class rw_mutex : public mutex{
protected:

struct pthread_rwlock_t *RwLock;

struct pthread_rwlockattr_t *RwLockAttr;

public:

//. . .

int read_lock(void);

'int write_lock(void);

int try_readlock(void) ;

int try_writelock(void) ;

//. . .
};

 rw_mutex   mutex.  . 11.3   
 rw_mutex, mutex, synchronization__variable  runtime_error.

runtime
error

synchronization
variable

mutex

   "" .       -
     ,   -
   mutex        -
 Pthread.    ""  
 mutex       
"" . ""   -
   ,   -
. "" ,  ,   ,
  ,   .  
       
,    , 
  .   
    .
         
,        
      , 
     .  
  "" .     
(,   rw_mutex)    -
  ,   "" .  -
  ""    ,
       ,  -
  ,    ,
   , ,  -
      "".  
       
,  MPI  PVM  POSIX- .
 MPI-, PVM-  POSIX-   

rw mutex

. 11.3.    rw_mutex, mutex,
synchronization_variable  runtime_error

