线程标识、线程创建、线程终止

一、pthread_self函数 功能:获取线程ID。 pthread_t pthread_self(void); 返回值:调用线程的线程ID 线程ID:pthread_t类型,本质:在Linux为无符号整数(%lu),其他系统可能是结构体实现 线程ID是进程内部识别标志。(两个进程间,线程ID允许相同) 注意:不应使用全局变量pthre
相关文章
相关标签/搜索