コード例 #1
0
 public static void SwitchTast(ref INTs.IRQContext aContext)
 {
     if (!usingMultitasking || allThreads.Count == 0)
     {
         return;
     }
     if (allThreads.Count > 0)
     {
         allThreads[currentThread].ESP = INTs.old_esp;
         currentThread++;
         if (currentThread >= allThreads.Count)
         {
             currentThread = 0;
         }
         INTs.old_esp = allThreads[currentThread].ESP;
     }
 }
コード例 #2
0
ファイル: Scheduler.cs プロジェクト: ChrisJamesSadler/IL2CPU
 private static void SwitchTast(ref INTs.IRQContext aContext)
 {
     //if(!usingMultitasking)
     //{
     //    return;
     //}
     if (allThreads.Count > 0)
     {
         allThreads[currentThread].ESP = INTs.old_esp;
         currentThread++;
         if (currentThread >= allThreads.Count)
         {
             currentThread = 0;
         }
         INTs.old_esp = allThreads[currentThread].ESP;
     }
 }