pthread_t描述说明

在posix线程api中,通过pthread_self(void) 函数获取当前线程的id

线程id的类型为pthread_t

pthread.h 第267行声明了pthread_self (void)的函数,格式如下

extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__));

在pthreadtypes.h第50行定义了:

typedef unsigned long int pthread_t;//声明为无符号长整型

黑洞@heidsoft
Github:https://github.com/heidsoft
微博:http://weibo.com/liuganbin
热衷云计算和大数据
关注CloudStack,OpenStack,Linux c/c++/python/java
关注研究新技术
原文地址:https://www.cnblogs.com/heidsoft/p/3420452.html