29 #ifndef THREAD_DUMMY_H 30 #define THREAD_DUMMY_H 34 #include "semaphore.h" 38 static Thread* create(ThreadCreateCallback p_callback,
void * p_user,
const Settings& p_settings=
Settings());
41 virtual ID get_ID()
const {
return 0; };
43 static void make_default();
48 static Mutex* create(
bool p_recursive);
56 static void make_default();
64 virtual Error
wait() {
return OK; };
65 virtual Error
post() {
return OK; };
66 virtual int get()
const {
return 0; };
68 static void make_default();
virtual Error post()
unlock the semaphore, incrementing the value
Definition: thread_dummy.h:65
Definition: thread_dummy.h:46
virtual void unlock()
Unlock the mutex, let other threads continue.
Definition: thread_dummy.h:53
Definition: thread_dummy.h:36
Definition: thread_dummy.h:59
virtual Error wait()
wait until semaphore has positive value, then decrement and pass
Definition: thread_dummy.h:64
virtual Error try_lock()
Attempt to lock the mutex, OK on success, ERROR means it can't lock.
Definition: thread_dummy.h:54
Definition: semaphore.h:37
virtual void lock()
Lock the mutex, block if locked by someone else.
Definition: thread_dummy.h:52