5.10
来源:互联网 发布:java中的enum用法总结 编辑:程序博客网 时间:2024/06/06 21:39
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
void *create(void *arg)
{
printf("new thread is created ... \n");
return (void *)8;
}
int main(int argc,char *argv[])
{
pthread_t tid;
int error;
void *temp;
error = pthread_create(&tid, NULL, create, NULL);
printf("main thread!\n");
if( error )
{
printf("thread is not created ... \n");
return -1;
}
error = pthread_join(tid, &temp);
if( error )
{
printf("thread is not exit ... \n");
return -2;
}
printf("thread is exit code %d \n", (int )temp);
return 0;
}
#include <pthread.h>
#include <unistd.h>
void *create(void *arg)
{
printf("new thread is created ... \n");
return (void *)8;
}
int main(int argc,char *argv[])
{
pthread_t tid;
int error;
void *temp;
error = pthread_create(&tid, NULL, create, NULL);
printf("main thread!\n");
if( error )
{
printf("thread is not created ... \n");
return -1;
}
error = pthread_join(tid, &temp);
if( error )
{
printf("thread is not exit ... \n");
return -2;
}
printf("thread is exit code %d \n", (int )temp);
return 0;
}
0 0
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10
- 5.10 练习
- day60(5.10)
- SunOS 5.10
- install ubuntu 5.10
- tensorflow 框架学些(二) 之 Constant Op
- 单实例迁移时发生报错:ORA-00214控制文件版本不一致的处理方法
- 框架如何学习(一)
- ApplicationContext的初始化和BeanFactory的初始化之间的区别
- 学会如何读一个JavaWeb项目源代码
- 5.10
- python爬虫
- HDOJ--1718 Rank(水题用了点小技巧)
- js中序列化与反序列化
- git与github的基本操作
- 第四讲 李群与李代数
- (复习)Struts2配置和简单案例(一)
- TCP与 UDP区别及使用场景总结
- 调用webService学习小结