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

Function wrlocker

test/bthread_rwlock_unittest.cpp:37–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void* wrlocker(void* arg) {
38 auto rw = (bthread_rwlock_t*)arg;
39 bthread_rwlock_wrlock(rw);
40 LOG(INFO) << butil::string_printf("[%" PRIu64 "] I'm wrlocker, %d, %" PRId64 "ms\n",
41 pthread_numeric_id(), ++c,
42 butil::cpuwide_time_ms() - start_time);
43 bthread_usleep(10000);
44 bthread_rwlock_unlock(rw);
45 return NULL;
46}
47
48TEST(RWLockTest, sanity) {
49 bthread_rwlock_t rw;

Callers

nothing calls this directly

Calls 6

bthread_rwlock_wrlockFunction · 0.85
string_printfFunction · 0.85
pthread_numeric_idFunction · 0.85
cpuwide_time_msFunction · 0.85
bthread_usleepFunction · 0.85
bthread_rwlock_unlockFunction · 0.85

Tested by

no test coverage detected