Example #1
0
        public void Wait(KMessageBox box, int pmessage, int timeout, bool canHandleCallbacks)
        {
            this.State = KThreadState.Waiting;
            this.RemoveFromSchedule();

            this.CanHandleCallbacks = canHandleCallbacks;

            box.WaitingThreads.Enqueue(this);

            this.WaitingOn = KThreadWait.Mbx;
            this.WaitTimeoutSetup(( uint )timeout);
            this.WaitHandle  = box;
            this.WaitAddress = ( uint )pmessage;

            if (canHandleCallbacks == true)
            {
                this.Kernel.CheckCallbacks();
            }

            this.Kernel.Schedule();
        }
Example #2
0
        public void Wait( KMessageBox box, int pmessage, int timeout, bool canHandleCallbacks )
        {
            this.State = KThreadState.Waiting;
            this.RemoveFromSchedule();

            this.CanHandleCallbacks = canHandleCallbacks;

            box.WaitingThreads.Enqueue( this );

            this.WaitingOn = KThreadWait.Mbx;
            this.WaitTimeoutSetup( ( uint )timeout );
            this.WaitHandle = box;
            this.WaitAddress = ( uint )pmessage;

            if( canHandleCallbacks == true )
            {
                this.Kernel.CheckCallbacks();
            }

            this.Kernel.Schedule();
        }