Example #1
0
        public void ResumeThread(uint threadId)
        {
            Kernel  kernel = this.Bios._kernel;
            KThread thread = kernel.GetHandleOrNull <KThread>(( int )threadId);

            if (thread == null)
            {
                return;
            }
            thread.Resume();
        }
Example #2
0
        public void WakeThread(uint threadId)
        {
            Kernel  kernel = this.Bios._kernel;
            KThread thread = kernel.GetHandleOrNull <KThread>(( int )threadId);

            if (thread == null)
            {
                return;
            }
            if ((thread.State == KThreadState.Suspended) ||
                (thread.State == KThreadState.WaitSuspended))
            {
                thread.Resume();
            }
            if (thread.State == KThreadState.Waiting)
            {
                thread.ReleaseWait(false);
            }
        }