// SDK location: /user/pspthreadman.h:255
        // SDK declaration: int sceKernelSleepThreadCB();
        public int sceKernelSleepThreadCB()
        {
            KThread thread = _kernel.ActiveThread;

            if (thread == null)
            {
                return(-1);
            }

            thread.Sleep(true);

            return(0);
        }
示例#2
0
        private void SleepThread(long timeout)
        {
            KThread currentThread = _system.Scheduler.GetCurrentThread();

            if (timeout < 1)
            {
                switch (timeout)
                {
                case  0: currentThread.Yield();                        break;

                case -1: currentThread.YieldWithLoadBalancing();       break;

                case -2: currentThread.YieldAndWaitForLoadBalancing(); break;
                }
            }
            else
            {
                currentThread.Sleep(timeout);
            }
        }