2012年6月26日

linux 多线程(一)条件变量

摘要: #include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <errno.h> int gnum = 0; int gsub = 100;pthread_mutex_t mutex; pthread_cond_t cond; //条件变量 void pthread_func_1 (void); void pthread_func_2 (void); int main (void) { pthread_t pt_1 = 0; pthread_t pt_2 = 0; int 阅读全文

posted @ 2012-06-26 18:21 龙沙宝石 阅读(224) 评论(0) 推荐(0) 编辑

导航