Lines Matching defs:benaphore
25 // semaphore. If the style is benaphore, it is initialized to 0 and
27 // is released. By setting the benaphore count to 1 when the style is
28 // semaphore, the benaphore effectively becomes a semaphore. I was able
34 // the lock regardless of the lock style (semaphore or benaphore).
137 // Decrement the benaphore count and store the undecremented
143 // benaphore.
146 // be released. Note, the old benaphore count will always be
193 BLocker::InitLocker(const char *name, bool benaphore)
198 if (benaphore && !BLOCKER_ALWAYS_SEMAPHORE_STYLE) {
199 // Because this is a benaphore, initialize the benaphore count and
200 // create the semaphore. Because this is a benaphore, the semaphore
205 // Because this is a semaphore, initialize the benaphore count to -1
229 // Increment the benaphore count and test to see if it was already
231 // the benaphore or the style is a semaphore. Either way, we need to
240 // Note, if the lock here does time out, the benaphore count
241 // is not decremented. By doing this, the benaphore count will
243 // changes to semaphore style if this was a benaphore.
245 // Doing the decrement of the benaphore count when the acquisition
247 // the same time the thread which holds the benaphore does an
253 // able to acquire the benaphore at the same time! The first will
274 // the benaphore count will wrap to a negative number. This