libwallaby  v23
The wallaby standard library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
thread.h
Go to the documentation of this file.
1 /*
2  * thread.h
3  *
4  * Created on: Nov 13, 2015
5  * Author: Joshua Southerland
6  */
7 
8 #ifndef INCLUDE_WALLABY_THREAD_H_
9 #define INCLUDE_WALLABY_THREAD_H_
10 
11 
20 #include "export.h"
21 #include "vtable.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 typedef struct
28 {
29  void *data;
30 } mutex;
31 
32 typedef struct
33 {
34  void *data;
35 } thread;
36 
37 typedef void (*thread_function)();
38 
43 
48 
53 
58 
63 
68 
73 
78 
83 
84 VFL
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 
91 
92 #endif /* INCLUDE_WALLABY_THREAD_H_ */
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:32
void(* thread_function)()
Definition: thread.h:37
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:34
#define VF
Definition: vtable.h:19
VF EXPORT_SYM void thread_start(thread id)
#define VFL
Definition: vtable.h:20
VF EXPORT_SYM int mutex_trylock(mutex m)
#define EXPORT_SYM
Definition: export.h:14
void * data
Definition: thread.h:29
Definition: thread.h:27