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

Function wait_op

test/bthread_semaphore_unittest.cpp:134–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132bool g_stopped = false;
133
134void wait_op(bthread_sem_t* sem, int64_t sleep_us) {
135 ASSERT_EQ(0, bthread_sem_wait(sem));
136 if (0 != sleep_us) {
137 bthread_usleep(sleep_us);
138 }
139}
140
141void post_op(bthread_sem_t* rw, int64_t sleep_us) {
142 ASSERT_EQ(0, bthread_sem_post(rw));

Callers

nothing calls this directly

Calls 2

bthread_sem_waitFunction · 0.85
bthread_usleepFunction · 0.85

Tested by

no test coverage detected