From 73b66076ccc0e2b2cfaeb1812856dd09deae8dc4 Mon Sep 17 00:00:00 2001 From: ph649mxes <1347377011@qq.com> Date: Sat, 2 Jul 2022 11:46:10 +0800 Subject: [PATCH] ADD file via upload --- pthread.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pthread.h 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 + +