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

Method locked

src/common/classes/locks.h:249–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247
248#ifdef DEV_BUILD
249 bool locked()
250 {
251 // first of all try to enter the mutex
252 // this will help to make sure it's not locked by other thread
253 if (!tryEnter(FB_FUNCTION))
254 {
255 return false;
256 }
257 // make sure mutex was already locked
258 bool rc = lockCount > 1;
259 // leave to release lock, done by us in tryEnter
260 leave();
261
262 return rc;
263 }
264#endif
265
266public:

Callers 1

~SharedFileInfoFunction · 0.45

Calls 2

tryEnterFunction · 0.70
leaveFunction · 0.70

Tested by

no test coverage detected