diff --git a/pthread.h b/pthread.h new file mode 100644 index 0000000..862012a --- /dev/null +++ b/pthread.h @@ -0,0 +1,20 @@ +#define __LIBRARY__ +#include + +#ifndef _PTHREAD_H_ +#define _PTHREAD_H_ + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +/*声明线程API函数*/ + +_syscall1(int,pthread_attr_init,pthread_attr_t *,attr); +_syscall3(int,thread_fork,const pthread_attr_t *,attr,void *,start_routine,void *,arg); +_syscall2(int,thread_join,pthread_t,thread,void **,value_ptr); +_syscall1(int,thread_exit,void *,value_ptr); + +#endif + +