lisp/c/mthread_posix.c
int rwlock_init(rwlock_t *rwlp, int type, void *arg)
{
    pthread_mutex_init(&(rwlp->lock), NULL);
    pthread_cond_init(&(rwlp->r_cond), NULL);
    pthread_cond_init(&(rwlp->w_cond), NULL);

    rwlp->readers = 0;

    return 0;
}
/* readers/writer lock functions for PISIX Thread */
readers/writer lock functions for PISIX Thread
readers / writer lock functions for PISIX Thread
int rwlock_init(rwlock_t *rwlp, int type, void *arg)
{
    pthread_mutex_init(&(rwlp->lock), NULL);
    pthread_cond_init(&(rwlp->r_cond), NULL);
    pthread_cond_init(&(rwlp->w_cond), NULL);
    rwlp->readers = 0;
    return 0;
}
int rwlock_init ( rwlock_t * rwlp , int type , void * arg ) { pthread_mutex_init ( & ( rwlp -> lock ) , NULL ) ; pthread_cond_init ( & ( rwlp -> r_cond ) , NULL ) ; pthread_cond_init ( & ( rwlp -> w_cond ) , NULL ) ; rwlp -> readers = 0 ; return 0 ; }
readers/writer lock functions for PISIX Thread
readers / writer lock functions for PISIX Thread