linux下C语言多线程编程
摘要:
#include <pthread.h>#include <stdio.h>#include <sys/time.h>#include <string.h>#define MAX 10pthread_t thread[2];pthread_mutex_t mut;int number=0, i;void *thread1(){ printf ("thread1 : I'm thread 1\n"); for (i = 0; i < MAX; i++) { printf("thread1 : number 阅读全文
posted @ 2012-07-25 20:46 南瓜饼 阅读(17699) 评论(2) 推荐(1) 编辑