  567

while (( = ?ind_elt (1, k) ! = NULL) && ep->busy)
pthread_cond_wait (&ep->notbusy, &lp->lm) ;

if (ep != NULL)
ep->busy = 1;

pthread_mutexunlock (&lp->lm) ;

return (ep) ;

}

delete_elt (struct list *lp, struct eit *ep)

{

pthread_mutex_lock (&lp->lm) ;

assert (ep->busy) ;

...   ep   ...

ep->busy = 0; /* Paranoid. */

(A) pthread_cond_broadcast (&ep->notbusy) ;

pthread_mutex_unlock (&lp->lm) ;

(B) pthread_cond_destroy (&rp->notbusy) ;

free (ep) ;

}

          
( )   ,   ,   
 ,  "" ( ),     
,          .

  

.

 

.  " "    pthread_mutex_init ().

 

.

 

pthread_cond_broadcast (), pthread_cond_signal (), pthread_cond_timedwait (),
 Base Definitions  IEEE Std 1003.1-2001, <pthread.h>.

  

     Issue 5.   
  POSIX Threads Extension.

Issue 6

 pthread_cond_destroy()  pthread_cond_init()  
  Threads.

 ""      IEEE
PASC Interpretation 1003.1 #34.

     ISO/IEC 9899: 1999   
pthread_cond_init ()     restrict.