MCPcopy Create free account
hub / github.com/Tencent/phxsql / RWLockManager

Method RWLockManager

include/phxcomm/lock_manager.h:35–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 WRITE = 2,
34 };
35 RWLockManager(pthread_rwlock_t *mutex, const Type &flag) {
36 mutex_ = mutex;
37 if (flag == READ) {
38 pthread_rwlock_rdlock(mutex_);
39 } else if (flag == WRITE) {
40 pthread_rwlock_wrlock(mutex_);
41 }
42 }
43 ~RWLockManager() {
44 pthread_rwlock_unlock(mutex_);
45 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected