摘要: int readcount=0,writecount=0;semaphore x=1,y=1,z=1;//x用来对readcount进行互斥访问,y用来对writecount进行互斥访问,z用来对使用读锁进行互斥访问semaphore rmutex=1;wmutex=1;//读锁,写锁 由于写者优先 阅读全文
posted @ 2022-11-24 19:24 rothsch 阅读(269) 评论(0) 推荐(0)