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

Function sem_waiter

test/bthread_semaphore_unittest.cpp:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23const size_t SEM_COUNT = 10000;
24
25void* sem_waiter(void* arg) {
26 bthread_usleep(10 * 1000);
27 auto sem = (bthread_sem_t*)arg;
28 for (size_t i = 0; i < SEM_COUNT; ++i) {
29 bthread_sem_wait(sem);
30 }
31 return NULL;
32}
33
34void* sem_poster(void* arg) {
35 bthread_usleep(10 * 1000);

Callers

nothing calls this directly

Calls 2

bthread_usleepFunction · 0.85
bthread_sem_waitFunction · 0.85

Tested by

no test coverage detected