MCPcopy Create free account
hub / github.com/apache/brpc / bthread_cond_init

Function bthread_cond_init

src/bthread/condition_variable.cpp:47–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45extern int bthread_mutex_lock_contended(bthread_mutex_t*);
46
47int bthread_cond_init(bthread_cond_t* __restrict c,
48 const bthread_condattr_t*) {
49 c->m = NULL;
50 c->seq = bthread::butex_create_checked<int>();
51 *c->seq = 0;
52 return 0;
53}
54
55int bthread_cond_destroy(bthread_cond_t* c) {
56 bthread::butex_destroy(c->seq);

Callers 4

TESTFunction · 0.85
BthreadCondMethod · 0.85
TESTFunction · 0.85
ConditionVariableMethod · 0.85

Calls

no outgoing calls

Tested by 3

TESTFunction · 0.68
BthreadCondMethod · 0.68
TESTFunction · 0.68