#include<pthread.h>
编译加 gcc -o test test.c -lpthread
1.创建线程 int pthread_create(pthread_t *thread,const pthread_attr_t *attr,void *(*routine)(void *),void *arg);
成功时返回0,失败时返回错误码
2.线程回收 int pthread_join(pthread_t thread,void **retval);
成功返回0,失败返回错误码
3.结束线程 void pthread_exit(void *retval);