摘要: #include <stdio.h>#include <pthread.h>#define MAX 10 //需要生产的数量pthread_mutex_t the_mutex;pthread_cond_t condc, condp;int buffer = 0;//生产者、消费者使用的缓冲区void *producer(void *ptr){ int i; for(i=1; i<=MA... 阅读全文
posted @ 2011-12-21 21:08 justinzhang 阅读(10327) 评论(0) 推荐(0) 编辑