Multiple IPStack Related changes (and other bugfixes)
[tpg/acess2.git] / Kernel / arch / x86 / proc.c
index 7596212..ad83c99 100644 (file)
@@ -14,6 +14,7 @@
 
 // === FLAGS ===
 #define DEBUG_TRACE_SWITCH     0
+#define DEBUG_DISABLE_DOUBLEFAULT      1
 
 // === CONSTANTS ===
 #define        SWITCH_MAGIC    0xFF5317C8      // FF SWITCH - There is no code in this area
@@ -286,7 +287,7 @@ void ArchThreads_Init(void)
        MM_FinishVirtualInit();
        #endif
        
-       #if 0
+       #if !DEBUG_DISABLE_DOUBLEFAULT
        // Initialise Double Fault TSS
        gGDT[5].BaseLow = (Uint)&gDoubleFault_TSS & 0xFFFF;
        gGDT[5].BaseMid = (Uint)&gDoubleFault_TSS >> 16;
@@ -445,7 +446,7 @@ void Proc_Start(void)
                }
                gaCPUs[i].IdleThread = Threads_GetThread(tid);
                gaCPUs[i].IdleThread->ThreadName = "Idle Thread";
-               Threads_SetTickets( gaCPUs[i].IdleThread, 0 );  // Never called randomly
+               Threads_SetPriority( gaCPUs[i].IdleThread, -1 );        // Never called randomly
                gaCPUs[i].IdleThread->Quantum = 1;      // 1 slice quantum
                
                
@@ -468,7 +469,7 @@ void Proc_Start(void)
        {
                gpIdleThread = Proc_GetCurThread();
                gpIdleThread->ThreadName = "Idle Thread";
-               gpIdleThread->NumTickets = 0;   // Never called randomly
+               Threads_SetPriority( gpIdleThread, -1 );        // Never called randomly
                gpIdleThread->Quantum = 1;      // 1 slice quantum
                for(;;) HALT(); // Just yeilds
        }
@@ -678,7 +679,6 @@ int Proc_SpawnWorker(void)
        // Set EIP as parent
        new->SavedState.EIP = eip;
        // Mark as active
-       new->Status = THREAD_STAT_ACTIVE;
        Threads_AddActive( new );
        
        return new->TID;

UCC git Repository :: git.ucc.asn.au