2.23
来源:互联网 发布:编发软件 编辑:程序博客网 时间:2024/06/05 20:21
#include <stdio.h>
#include <pthread.h>
#include <unistd.h> /*getpid()*/
void *create(void *arg)
{
printf("New thread .... \n");
printf("This thread's id is %u \n", (unsigned int)pthread_self());
printf("The process pid is %d \n",getpid());
return (void *)0;
}
int main(int argc,char *argv[])
{
pthread_t tid;
int error;
printf("Main thread is starting ... \n");
error = pthread_create(&tid, NULL, create, NULL);
if(error)
{
printf("thread is not created ... \n");
return -1;
}
printf("The main process's pid is %d \n",getpid());
sleep(1);
return 0;
}
#include <pthread.h>
#include <unistd.h> /*getpid()*/
void *create(void *arg)
{
printf("New thread .... \n");
printf("This thread's id is %u \n", (unsigned int)pthread_self());
printf("The process pid is %d \n",getpid());
return (void *)0;
}
int main(int argc,char *argv[])
{
pthread_t tid;
int error;
printf("Main thread is starting ... \n");
error = pthread_create(&tid, NULL, create, NULL);
if(error)
{
printf("thread is not created ... \n");
return -1;
}
printf("The main process's pid is %d \n",getpid());
sleep(1);
return 0;
}
0 0
- 2.23
- 2.23
- 黄迪明2.23
- ./glibc-2.23
- 2005/2.23/sunny
- OSEK 2.23的中文版
- 2013年2.23 周六
- sicp 习题 2.23
- Binutils-2.23.2
- 入门HTML之2.23
- 入门HTML之2.23
- IOS审核 2.23问题
- 安装binutils 2.23.2
- hisiv400+glibc-2.23编译
- 练习2.21 2.23
- iis5+tomcat5+jk1.2.23整合
- webalizer-2.23-05 for squid
- SICP习题解答2.17-2.23
- Check failed: error == cudaSuccess (8 vs. 0) invalid device function
- 连接MySQL Connector(.net)
- 用yum安装database disk image is malformed 的错误
- springMVC maven的pom.xml配置文件参考
- Porting:uboot简介、移植、代码阅读、uboot添加启动logo
- 2.23
- HDU5248:序列变换(二分)
- 发票统计(C程序设计进阶 第2周)
- 多个数组合并为一个数组的方法与性能
- 9
- Win XP iso映像文件(附序列号)
- 面向切面编程(AOP)的理解
- web前端一道很“坑”的js面试题
- 头文件