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

Method ioBegin

src/jrd/CryptoManager.h:148–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146 };
147
148 void ioBegin(Jrd::thread_db* tdbb)
149 {
150 Firebird::MutexLockGuard g(mutex, FB_FUNCTION);
151
152 if (counter < 0)
153 {
154 if (!(flagWriteLock && (thread == getThreadId())))
155 {
156 if ((counter % BIG_VALUE == 0) && (!flagWriteLock))
157 {
158 if (lockMode)
159 {
160 // Someone is waiting for write lock
161 lockCond.notifyOne();
162 barCond.wait(mutex);
163 }
164 else
165 {
166 // Ast done
167 callWriteLockHandler(tdbb);
168 counter = 0;
169 }
170 }
171 else
172 barCond.wait(mutex);
173 }
174 }
175 ++counter;
176 }
177
178 void ioEnd(Jrd::thread_db* tdbb)
179 {

Callers 1

IoGuardMethod · 0.80

Calls 3

getThreadIdFunction · 0.85
notifyOneMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected