public void DelayThread(uint threadId, uint delayMs) { Kernel kernel = this.Bios._kernel; KThread thread = kernel.GetHandleOrNull <KThread>(( int )threadId); if (thread == null) { return; } thread.Delay(delayMs * 1000, false); }
public void KillThread(uint threadId) { Kernel kernel = this.Bios._kernel; KThread thread = kernel.GetHandleOrNull <KThread>(( int )threadId); if (thread == null) { return; } thread.Exit(-1); }
public void ResumeThread(uint threadId) { Kernel kernel = this.Bios._kernel; KThread thread = kernel.GetHandleOrNull <KThread>(( int )threadId); if (thread == null) { return; } thread.Resume(); }
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); } }