64,683
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
void clean1(void* argv)
{
}
void* mythread1(void* argv)
{
pthread_cleanup_push(clean1,NULL);
pthread_cleanup_push(clean1,NULL);
pthread_clanup_pop(0);
pthread_clanup_pop(0);
}
int main(int argc, char* argv[])
{
pthread_t newthreadid1;
pthread_create(&newthreadid1, NULL, mythread1,NULL);
sleep(10);
return 0;
}