linux 线程常用函数
2013-09-07 16:39
169 查看
头文件#include <pthread.h>
线程的创建
Int pthread_create(pthread_t *tid,constpthread_attr_t *attr,void *(*func)(void*),void *arg);
一个进程中每个线程都有一个线程ID,其数据类型是pthread_t
//等待一个线程的终止,相当于waitpid的作用 阻塞
Int pthread_join(pthread_t tid,void**status);
//每个线程都有一个ID以在自己的线程内标识自己
Pthread_t pthread_self();
//终止线程的一种方式
Void pthread_exit(void);
线程的创建
Int pthread_create(pthread_t *tid,constpthread_attr_t *attr,void *(*func)(void*),void *arg);
一个进程中每个线程都有一个线程ID,其数据类型是pthread_t
//等待一个线程的终止,相当于waitpid的作用 阻塞
Int pthread_join(pthread_t tid,void**status);
//每个线程都有一个ID以在自己的线程内标识自己
Pthread_t pthread_self();
//终止线程的一种方式
Void pthread_exit(void);
相关文章推荐
- Linux进程、线程中的常用函数
- Linux编程常用的函数(二) 线程
- Linux下程序设计常用函数
- Linux 线程操作函数技能总结
- Linux下常用函数-字符串函数
- linux下常用函数及命令
- linux线程相关函数
- LINUX中使用PTHREAD_KILL函数测试线程是否存活的例子
- C 语言 linux socket网络编程常用函数
- linux中通过thread_create()函数成功后是不是线程就起来了呢?
- Linux系统常用目录操作函数
- linux线程函数总结
- linux 线程函数大全
- Linux编程常用的函数(十) 标准I/O
- Linux进程、线程、内核操作函数
- Linux编程常用的函数[转]
- Linux 线程操作函数总结
- Linux常用系统函数
- Thread、Runnable、线程状态转换、线程调度、常用函数说明.md
- Linux 常用函数——memcpy函数