MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / unblockWaiting

Method unblockWaiting

src/common/classes/rwlock.h:95–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 return lock.value();
94 }
95 void unblockWaiting()
96 {
97 if (blockedWriters.value())
98 {
99 if (!SetEvent(writers_event))
100 system_call_failed::raise("SetEvent");
101 }
102 else if (blockedReaders)
103 {
104 MutexLockGuard guard(blockedReadersLock, "RWLock::unblockWaiting");
105 if (blockedReaders && !ReleaseSemaphore(readers_semaphore, blockedReaders, NULL))
106 {
107 system_call_failed::raise("ReleaseSemaphore");
108 }
109 }
110 }
111 bool tryBeginRead(const char* aReason)
112 {
113 if (lock.value() < 0)

Callers

nothing calls this directly

Calls 2

raiseFunction · 0.85
valueMethod · 0.45

Tested by

no test coverage detected