void CheckSemaphoreCount(NFastSemaphore* aS, TInt aExpected) { TInt w = 0; TInt r; do { r = WaitWithTimeout(aS, KMinTimeout); TEST_RESULT1(r==KErrNone || r==KErrTimedOut, "Invalid return code %d", r); if (r == KErrNone) ++w; } while(r == KErrNone); TEST_RESULT2(w==aExpected, "Signalled %d, Waited %d", aExpected, w); }
NFastMutexX::~NFastMutexX() { TEST_RESULT2(iRefCount==0, "Bad mutex ref count %d %08x", iRefCount, this); memset(this, 0xbf, sizeof(*this)); }