Changed user stack to be at 8M
authorJohn Hodge <[email protected]>
Sun, 27 Sep 2009 06:06:02 +0000 (14:06 +0800)
committerJohn Hodge <[email protected]>
Sun, 27 Sep 2009 06:06:02 +0000 (14:06 +0800)
Kernel/arch/x86/include/arch.h
Kernel/lib.c
Kernel/threads.c

index dd459c2..6a7ab45 100644 (file)
@@ -9,7 +9,7 @@
 // - Memory Layout
 #define        MM_USER_MIN     0x00200000
 #define        USER_STACK_SZ   0x00010000
-#define        USER_STACK_TOP  0x00200000
+#define        USER_STACK_TOP  0x00800000
 #define        MM_USER_MAX     0xBC000000
 #define        MM_PPD_MIN      0xBC000000      // Per-Process Data
 #define        MM_PPD_VFS      0xBC000000      // 
index 88dc90c..c106351 100644 (file)
@@ -319,21 +319,12 @@ Sint64 timestamp(int sec, int mins, int hrs, int day, int month, int year)
  */
 Uint rand()
 {
-       #if 0
-       Uint    ret = giRandomState;
-        int    roll = randomState & 31;
-       randomState = (randomState << roll) | (randomState >> (32-roll));
-       randomState ^= 0x9A3C5E78;
-       return ret;
-       #else
        Uint    old = giRandomState;
+       // Get the next state value
        giRandomState = (RANDOM_A*giRandomState + RANDOM_C) & 0xFFFFFFFF;
-       if(giRandomState == old) {
-               giRandomState += RANDOM_SPRUCE;
-       }
-       Log("giRandomState = 0x%x", giRandomState);
+       // Check if it has changed, and if it hasn't, change it
+       if(giRandomState == old)        giRandomState += RANDOM_SPRUCE;
        return giRandomState;
-       #endif
 }
 
 EXPORT(timestamp);
index 708c2ba..3e98e44 100644 (file)
@@ -552,12 +552,12 @@ tThread *Threads_GetNextToRun(int CPU)
                return gActiveThreads;
        }
        
-       Log(" Threads_GetNextToRun: giNumActiveThreads=%i,giTotalTickets=%i",
-               giNumActiveThreads, giTotalTickets);
+       //Log(" Threads_GetNextToRun: giNumActiveThreads=%i,giTotalTickets=%i",
+       //      giNumActiveThreads, giTotalTickets);
        // Get the ticket number
        ticket = number = rand() % giTotalTickets;
        
-       Log(" Threads_GetNextToRun: ticket = %i", ticket);
+       //Log(" Threads_GetNextToRun: ticket = %i", ticket);
        
        // Find the next thread
        for(thread=gActiveThreads;thread;thread=thread->Next)

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