public void Wait(KPool pool, uint pdata, uint timeoutUs, bool canHandleCallbacks) { State = KThreadState.Waiting; this.RemoveFromSchedule(); CanHandleCallbacks = canHandleCallbacks; pool.WaitingThreads.Enqueue(this); if (pool is KVariablePool) { WaitingOn = KThreadWait.Vpl; } else { WaitingOn = KThreadWait.Fpl; } this.WaitTimeoutSetup(timeoutUs); WaitHandle = pool; WaitAddress = pdata; if (canHandleCallbacks == true) { this.Kernel.CheckCallbacks(); } this.Kernel.Schedule(); }
public void Wait( KPool pool, uint pdata, uint timeoutUs, bool canHandleCallbacks ) { State = KThreadState.Waiting; this.RemoveFromSchedule(); CanHandleCallbacks = canHandleCallbacks; pool.WaitingThreads.Enqueue( this ); if( pool is KVariablePool ) WaitingOn = KThreadWait.Vpl; else WaitingOn = KThreadWait.Fpl; this.WaitTimeoutSetup( timeoutUs ); WaitHandle = pool; WaitAddress = pdata; if( canHandleCallbacks == true ) this.Kernel.CheckCallbacks(); this.Kernel.Schedule(); }