diff options
Diffstat (limited to 'src/rt/sync/condition_variable.h')
| -rw-r--r-- | src/rt/sync/condition_variable.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/rt/sync/condition_variable.h b/src/rt/sync/condition_variable.h new file mode 100644 index 00000000..f847ef99 --- /dev/null +++ b/src/rt/sync/condition_variable.h @@ -0,0 +1,19 @@ +#ifndef CONDITION_VARIABLE_H +#define CONDITION_VARIABLE_H + +class condition_variable { +#if defined(__WIN32__) + HANDLE _event; +#else + pthread_cond_t _cond; + pthread_mutex_t _mutex; +#endif +public: + condition_variable(); + virtual ~condition_variable(); + + void wait(); + void signal(); +}; + +#endif /* CONDITION_VARIABLE_H */ |