小菜

导航

2019年8月5日 #

进程同步

摘要: 生产者消费问题 信号量 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 阅读(106) 评论(0) 推荐(0) 编辑