小菜

导航

随笔分类 -  408复习

进程同步
摘要:生产者消费问题 信号量 semaphore full=0,empty=n; semaphore mutex = 1; item buf[n]; int in=0,out=0; produce(){ whiel(1){ wait(empty); wait(mutex); buf[in]=nextp; 阅读全文

posted @ 2019-08-05 22:06 penbol 阅读(124) 评论(0) 推荐(0)