(1) 比较两个线程ID
#include <pthread.h>
int pthread_equal(pthread_t tid1, pthread_t tid2);
ret-若相等则返回非0值,否则返回0值
(2) 获取线程自身ID
#include <pthread.h>
pthread_t pthread_self(void);
ret-调用线程的线程ID
(1) 比较两个线程ID
#include <pthread.h>
int pthread_equal(pthread_t tid1, pthread_t tid2);
ret-若相等则返回非0值,否则返回0值
(2) 获取线程自身ID
#include <pthread.h>
pthread_t pthread_self(void);
ret-调用线程的线程ID