libwallaby  v24
The wallaby standard library
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_ */
mutex_trylock
VF EXPORT_SYM int mutex_trylock(mutex m)
mutex_destroy
VF EXPORT_SYM void mutex_destroy(mutex m)
vtable.h
mutex_lock
VF EXPORT_SYM void mutex_lock(mutex m)
thread
Definition: thread.h:32
thread::data
void * data
Definition: thread.h:34
thread_function
void(* thread_function)()
Definition: thread.h:37
mutex::data
void * data
Definition: thread.h:29
mutex
Definition: thread.h:27
VFL
#define VFL
Definition: vtable.h:20
thread_destroy
VF EXPORT_SYM void thread_destroy(thread id)
thread_create
VF EXPORT_SYM thread thread_create(thread_function func)
mutex_create
VF EXPORT_SYM mutex mutex_create()
EXPORT_SYM
#define EXPORT_SYM
Definition: export.h:14
thread_wait
VF EXPORT_SYM void thread_wait(thread id)
mutex_unlock
VF EXPORT_SYM void mutex_unlock(mutex m)
thread_start
VF EXPORT_SYM void thread_start(thread id)
VF
#define VF
Definition: vtable.h:19
export.h