摘要: /*..Onesolutiontothereleasing-requestproblem*///thisisa'non-releasing'routinerequestingreleasing routine_a(){mutex_lock(mutex); // ...mutex_lock(mutex_r); flag=1;request();// notify the releasorcond_wait(cond_r,mutex_r);flag=0; mutex_unlock(mutex_r); // ...mutex_unlock(mutex);}//thisisthe 阅读全文
posted @ 2008-12-15 11:41 quanben 阅读(175) 评论(0) 推荐(0) 编辑