示例#1
0
	/// @brief Performs upkeep on the chosen widget if available, choosing a replacement if
	///		   called for; also, updates input state
	void State::ResolveSignal (void)
	{
		// Indicate that the system is issuing events
		mMode = eIssuingEvents;

		// There may have been a press while no widget was entered. If there is still a
		// press, there is then no meaningful way to interact with the interface.
		if (!mStatus.test(eWasPressed) || mChoice != 0)
		{
			// If there is a choice, perform upkeep on it.
			if (mChoice != 0) mChoice->Upkeep(mStatus.test(eIsPressed));

			// If there is a valid signal but no choice, choose it.
			if (mSignaled != 0 && 0 == mChoice)
			{
				mChoice = mSignaled->GetOwner();

				mChoice->Choose(mStatus.test(eIsPressed));
			}
		}

		// Prepare for the next propagation.
		mStatus.set(eWasPressed, mStatus.test(eIsPressed));

		mMode = eNormal;

		Unsignal();
	}
示例#2
0
文件: Lock.cpp 项目: FFalcon/jbushOS
void Mutex::ThreadWoken()
{
	Unsignal();
}
示例#3
0
void Semaphore::ThreadWoken()
{
	if (--fCount == 0)
		Unsignal();
}