Commit 8cb64c66 authored by gejun's avatar gejun

add bthread_cond_* declarations in bthread/condition_variable.h

parent 455eab9f
...@@ -22,6 +22,20 @@ ...@@ -22,6 +22,20 @@
#include "butil/time.h" #include "butil/time.h"
#include "bthread/mutex.h" #include "bthread/mutex.h"
__BEGIN_DECLS
extern int bthread_cond_init(bthread_cond_t* __restrict cond,
const bthread_condattr_t* __restrict cond_attr);
extern int bthread_cond_destroy(bthread_cond_t* cond);
extern int bthread_cond_signal(bthread_cond_t* cond);
extern int bthread_cond_broadcast(bthread_cond_t* cond);
extern int bthread_cond_wait(bthread_cond_t* __restrict cond,
bthread_mutex_t* __restrict mutex);
extern int bthread_cond_timedwait(
bthread_cond_t* __restrict cond,
bthread_mutex_t* __restrict mutex,
const struct timespec* __restrict abstime);
__END_DECLS
namespace bthread { namespace bthread {
class ConditionVariable { class ConditionVariable {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment