libkipr  1.0.0
thread.h
Go to the documentation of this file.
1 
9 #ifndef _KIPR_THREAD_THREAD_H_
10 #define _KIPR_THREAD_THREAD_H_
11 
12 #include "kipr/export/export.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
25 typedef struct
26 {
27  void *data;
28 } mutex;
29 
37 typedef struct
38 {
39  void *data;
40 } thread;
41 
50 typedef void (*thread_function)();
51 
58 
66 
74 
82 
89 
96 
103 
110 
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif
#define EXPORT_SYM
Definition: export.h:7
EXPORT_SYM int mutex_trylock(mutex m)
EXPORT_SYM void mutex_destroy(mutex m)
void(* thread_function)()
thread_function is a wrapper for functions of all return types.
Definition: thread.h:50
EXPORT_SYM void mutex_lock(mutex m)
EXPORT_SYM void thread_destroy(thread id)
EXPORT_SYM void thread_wait(thread id)
EXPORT_SYM void thread_start(thread id)
EXPORT_SYM mutex mutex_create()
EXPORT_SYM thread thread_create(thread_function func)
EXPORT_SYM void mutex_unlock(mutex m)
A mutex, or lock.
Definition: thread.h:26
void * data
a C++ Mutex object cast to a void*. Not intended to be accessed.
Definition: thread.h:27
A thread, or separate process.
Definition: thread.h:38
void * data
a C++ Thread object cast to a void*. Not intended to be accessed.
Definition: thread.h:39