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

Function do_trywrlock

test/bthread_rwlock_unittest.cpp:134–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void* do_trywrlock(void *arg) {
135 auto trylock_args = (TrylockArgs*)arg;
136 EXPECT_EQ(trylock_args->rc, bthread_rwlock_trywrlock(trylock_args->rw));
137 if (0 != trylock_args->rc) {
138 return NULL;
139 }
140 EXPECT_EQ(trylock_args->rc, bthread_rwlock_unlock(trylock_args->rw));
141 return NULL;
142}
143
144TEST(RWLockTest, trylock) {
145 bthread_rwlock_t rw;

Callers

nothing calls this directly

Calls 2

bthread_rwlock_trywrlockFunction · 0.85
bthread_rwlock_unlockFunction · 0.85

Tested by

no test coverage detected