From f9002a0d39b6eb095a515287aac1b7b5f9f32951 Mon Sep 17 00:00:00 2001 From: p9ya4sf57 <2573478641@qq.com> Date: Mon, 4 Jul 2022 10:00:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=BA=BF=E7=A8=8B=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pthread.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pthread.h diff --git a/pthread.h b/pthread.h new file mode 100644 index 0000000..658895c --- /dev/null +++ b/pthread.h @@ -0,0 +1,38 @@ +#define __LIBRARY__ +#include +#include +#include +#include +#include + +#ifndef PTHREAD_H +#define PTHREAD_H + +struct pthread_attr +{ + size_t stacksize; + int state; + int sched_priority; +}; + +typedef struct pthread_attr pthread_attr_t; +typedef unsigned int pthread_t; + + +#ifdef __cplusplus +extern "C" { +#endif + + void pthread_exit(void* value_ptr); + int pthread_attr_init(pthread_attr_t* attr); + int pthread_create(pthread_t* thread, const pthread_attr_t* attr, void* (*start)(void*), void* arg); + void pthread_exit(void* value_ptr); + int pthread_join(pthread_t thread, void** value_ptr); + +#ifdef __cplusplus +} +#endif + +#endif + +