摘要: 最近六级考完,没啥事。刚好有门操作系统课程设计,于是就打开了阔别已久的虚拟机。。。。#include #include #include #include int number=0; //馆内的人数;int buffer[5]={-1,-1,-1,-1,-1}; //-1代表空座位sem_t sem; //信号量pthread_mutex_t mutex;void *thr_fn(void * pth_id){ int chair_id, reader_id; int time; reader_id = *(... 阅读全文
posted @ 2011-12-21 22:02 xupengzhuo 阅读(700) 评论(0) 推荐(0)