摘要: 1: /* 生产者方法 */ 2: void *product(){ 3: sem_wait(&empty_sem); 4: pthread_mutex_lock(&mutex); 5: /*生产*/ 6: pthread_mutex_unlock(&mutex); 7: sem_post(&full_sem); ... 阅读全文
posted @ 2012-09-26 11:16 jiejnan 阅读(286) 评论(0) 推荐(0) 编辑