linux下线程的同步示例
/*thread_example.c : c multiple thread programming in linux */ #include #include #include #include #define MAX1 10 #define MAX2 30 pthread_t thread[2]; pthread_mutex_t mut; int number=0, i; void *thread1() { printf ("thread1 : I/'m thread 1//n"
原创
2011-05-02 12:36:00 ·
500 阅读 ·
0 评论