예제 #1
0
파일: sync.c 프로젝트: ahimelman/project3
/* TODO: Release lock m and block the thread (enqueued on c).  When unblocked,
   re-acquire m */
void condition_wait(lock_t * m, condition_t * c){
    enter_critical();
    lock_release_helper(m);
    block(&c->wait_queue);
    lock_acquire_helper(m);
    leave_critical();
}
예제 #2
0
파일: sync.c 프로젝트: robertsami/COS318
void lock_release(lock_t * l){
    enter_critical();
    lock_release_helper(l);
    leave_critical();
}