头文件#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);