Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }