1221
来源:互联网 发布:listview怎么绑定数据 编辑:程序博客网 时间:2024/05/06 00:45
#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
- 1221
- 1221
- POJ 1221
- ural 1221
- POJ 1221
- poj-1221
- ZOJ-1221
- zoj(1221
- HDU 1221
- zoj 1221
- fjnu 1221 Rails
- 20091214-1221周计划
- 1221 Additional Via
- pku 1221 单峰回文
- ZOJ 1221 Risk
- POJ 1221 dp
- sicily 1221 背包
- Poj 1221 动态规划
- linux 64位系统调用
- 浅谈LTE--数据的可靠传输。
- poj 3270 Cow Sort(置换群的分解)
- .NET Framework 4 Client Profile HRESULT 0xC8000222解决办法
- 回车 换行
- 1221
- 蔬菜营养a
- 1222
- nginx安装
- Linux学习笔记--计划任务at-crontab命令
- 在终端安装字典--SDCV
- 配置树莓派支持中文
- char的取值为什么是-128~127
- ios8之后Xcode手动添加pch文件