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

Function read_op

test/bthread_rwlock_unittest.cpp:212–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210bool g_stopped = false;
211
212void read_op(bthread_rwlock_t* rw, int64_t sleep_us) {
213 ASSERT_EQ(0, bthread_rwlock_rdlock(rw));
214 if (0 != sleep_us) {
215 bthread_usleep(sleep_us);
216 }
217 ASSERT_EQ(0, bthread_rwlock_unlock(rw));
218}
219
220void write_op(bthread_rwlock_t* rw, int64_t sleep_us) {
221 ASSERT_EQ(0, bthread_rwlock_wrlock(rw));

Callers

nothing calls this directly

Calls 3

bthread_rwlock_rdlockFunction · 0.85
bthread_usleepFunction · 0.85
bthread_rwlock_unlockFunction · 0.85

Tested by

no test coverage detected