摘要:
#include <stdio.h> #include <stdlib.h> #include <pthread.h> int sharedi = 0; void increse_num(void); pthread_mutex_t mutex;//互斥锁定义 int main(){ int ret 阅读全文
posted @ 2022-03-15 20:12
down^to^earth
阅读(87)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <thread> #include <unistd.h>//slleep头文件 using namespace std; void * mythread(void *) { cout<<"子线程运行成功"<<endl; return 0; / 阅读全文

posted @ 2022-03-15 19:54
down^to^earth
阅读(20)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <pthread.h> #include <errno.h>//错误信息的头文件 #include <sys/types.h> #include <unistd.h> using namespace std; void * mypthread 阅读全文

posted @ 2022-03-15 19:46
down^to^earth
阅读(26)
评论(0)
推荐(0)