| 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected