多线程:pthread_exit,pthread_join,pthread_self
来源:互联网 发布:怎样在淘宝上发布宝贝 编辑:程序博客网 时间:2024/06/05 06:16
/*exit_join_id.c*/#include<pthread.h>#include<stdio.h>void* eji(void* agr){ printf("here is eji\n"); printf("PID= %u",(unsigned int)pthread_self()); pthread_exit("here all done!\n");}int main(int argc, char** argv){ pthread_t pid; int ret; void* j_ret; ret=pthread_create(&pid,NULL,eji,NULL); if(ret) { printf("pthread_create failed\n");return -1; } ret=pthread_join(pid,&j_ret); if(ret) { printf("pthread_join failed \n");return -1; } printf("the return value is %s",(char*)j_ret); return 0;}
0 0
- 多线程:pthread_exit,pthread_join,pthread_self
- 多线程函数系列pthread_create(), pthread_join(), pthread_self(),pthread_exit(), pthread_detach()实例详解
- 2线程原语:pthread_create(),pthread_self(),pthread_exit(),pthread_join(),pthread_cancel(),pthread_detach(
- 线程原语:pthread_create(),pthread_self(),pthread_exit(),pthread_join(),pthread_cancel(),pthread_detach(
- pthread_self 、pthread_exit
- Linux下多线程编程__线程的创建pthread_create与退出pthread_exit,等待当前线程退出pthread_join,获取线程ID pthread_self
- pthread_join/pthread_exit
- pthread_join/pthread_exit
- POSIX线程,线程的客户/服务通信(pthread_join,pthread_exit,pthread_detach,pthread_self)
- linux多线程问题:pthread_join 和 pthread_exit 的区别
- pthread_join pthread_exit pthread_detach
- pthread_join/pthread_exit用法实例
- pthread_join/pthread_exit用法实例
- pthread_join/pthread_exit用法实例
- pthread_join/pthread_exit用法实例
- pthread_join/pthread_exit用法实例
- pthread_join/pthread_exit用法实例
- pthread_join/pthread_exit函数
- java1.5高新特性之枚举(1)
- GCD 深入理解(一)
- Python 格式化字符
- 8.12
- GCD 深入理解(二)
- 多线程:pthread_exit,pthread_join,pthread_self
- 网络编程入门1
- HDU1385 Minimum Transport Cost 【Floyd】+【路径记录】
- iOS多线程编程技术之NSThread、Cocoa NSOperation、GCD
- 使用多线程的好处
- 你不必这么着急
- 总结一下这几天学的《JavaScript DOM编程艺术 第2版》(2)
- httpClient的一些学习心得
- hdu--1757