libkovan  1
The kovan standard library
thread.h
Go to the documentation of this file.
1 #ifndef _THREAD_H_
2 #define _THREAD_H_
3 
12 #include "export.h"
13 #include "vtable.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 typedef struct
20 {
21  void *data;
22 } mutex;
23 
24 typedef struct
25 {
26  void *data;
27 } thread;
28 
29 typedef void (*thread_function)();
30 
35 
40 
45 
50 
55 
60 
65 
70 
75 
76 VFL
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif
VF EXPORT_SYM void thread_destroy(thread id)
VF EXPORT_SYM void thread_wait(thread id)
VF EXPORT_SYM void mutex_destroy(mutex m)
VF EXPORT_SYM void mutex_lock(mutex m)
Definition: thread.h:24
void(* thread_function)()
Definition: thread.h:29
VF EXPORT_SYM mutex mutex_create()
VF EXPORT_SYM void mutex_unlock(mutex m)
VF EXPORT_SYM thread thread_create(thread_function func)
void * data
Definition: thread.h:26
#define VF
Definition: vtable.h:10
VF EXPORT_SYM void thread_start(thread id)
#define VFL
Definition: vtable.h:11
VF EXPORT_SYM int mutex_trylock(mutex m)
#define EXPORT_SYM
Definition: export.h:7
void * data
Definition: thread.h:21
Definition: thread.h:19