README.md: add detail for benchmarks
[model-checker.git] / include / threads.h
1 /** @file threads.h
2  *  @brief C11 Thread Library Functionality
3  */
4
5 #ifndef __THREADS_H__
6 #define __THREADS_H__
7
8 /* Forward declaration */
9 #ifdef __cplusplus
10 typedef class Thread *__thread_identifier;
11 #else
12 /* For C, we just need an opaque pointer */
13 typedef void *__thread_identifier;
14 #endif
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20         typedef void (*thrd_start_t)(void *);
21
22         typedef struct {
23                 __thread_identifier priv;
24         } thrd_t;
25
26         int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
27         int thrd_join(thrd_t);
28         void thrd_yield(void);
29         thrd_t thrd_current(void);
30
31         int user_main(int, char**);
32
33 #ifdef __cplusplus
34 }
35 #endif
36
37 #endif /* __THREADS_H__ */