4b2b615f61f9b1c0bcd0f64311e1edacd05824e1
[c11tester.git] / include / mypthread.h
1 /**
2  * @file pthread.h
3  * @brief C11 pthread.h interface header
4  */
5 #ifndef PTHREAD_H
6 #define PTHREAD_H
7
8 #include <threads.h>
9 #include <sched.h>
10 #include <pthread.h>
11
12 typedef void *(*pthread_start_t)(void *);
13
14 struct pthread_params {
15         pthread_start_t func;
16         void *arg;
17 };
18
19 struct pthread_attr
20 {
21         /* Scheduler parameters and priority.  */
22         struct sched_param schedparam;
23         int schedpolicy;
24         /* Various flags like detachstate, scope, etc.  */
25         int flags;
26         /* Size of guard area.  */
27         size_t guardsize;
28         /* Stack handling.  */
29         void *stackaddr;
30         size_t stacksize;
31         /* Affinity map.  */
32         cpu_set_t *cpuset;
33         size_t cpusetsize;
34 };
35
36 extern "C" {
37 int user_main(int, char**);
38 }
39
40 #endif