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

Function locked

src/common/classes/locks.h:128–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127#ifdef DEV_BUILD
128 bool locked()
129 {
130 // first of all try to enter the mutex
131 // this will help to make sure it's not locked by other thread
132 if (!tryEnter(FB_FUNCTION))
133 {
134 return false;
135 }
136 // make sure mutex was already locked
137 bool rc = lockCount > 1;
138 // leave to release lock, done by us in tryEnter
139 leave();
140
141 return rc;
142 }
143#endif
144
145public:

Callers

nothing calls this directly

Calls 2

tryEnterFunction · 0.70
leaveFunction · 0.70

Tested by

no test coverage detected