예제 #1
0
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);
	}
예제 #2
0
NFastMutexX::~NFastMutexX()
	{
	TEST_RESULT2(iRefCount==0, "Bad mutex ref count %d %08x", iRefCount, this);
	memset(this, 0xbf, sizeof(*this));
	}