public void Sleep(uint sleep) { var handle = SleepTimer.Register(sleep); DeviceReadQueue.Enqueue(handle, CurrentProcess); CurrentProcess = null; }
public void Input(DeviceId deviceId, OpCodeFlag flag, uint rX) { if (Enum.IsDefined(typeof(DeviceId), deviceId)) { DeviceReadQueue.Enqueue(deviceId, CurrentProcess, flag, rX); CurrentProcess = null; } else { CurrentProcess.Zf = true; } }
public void WaitEvent(uint eventNo) { if (eventNo == 0 || eventNo > EventCount) { return; } var ev = Events[eventNo - 1]; DeviceReadQueue.Enqueue(ev.Handle, CurrentProcess); CurrentProcess = null; }
public void AcquireLock(uint lockNo) { if (lockNo == 0 || lockNo > LockCount) { return; } var @lock = Locks[lockNo - 1]; if (@lock.Owner == CurrentProcess.Id || @lock.Owner == 0) { AcquireLock(CurrentProcess, @lock); return; } DeviceReadQueue.Enqueue(@lock.Handle, CurrentProcess); CurrentProcess = null; }