git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added debug to Proc_Clone
[tpg/acess2.git]
/
Kernel
/
arch
/
x86
/
proc.c
diff --git
a/Kernel/arch/x86/proc.c
b/Kernel/arch/x86/proc.c
index
2413a6e
..
d468d11
100644
(file)
--- a/
Kernel/arch/x86/proc.c
+++ b/
Kernel/arch/x86/proc.c
@@
-29,6
+29,7
@@
extern tThread *gActiveThreads;
extern tThread *gSleepingThreads;
extern tThread *gDeleteThreads;
extern tThread *Threads_GetNextToRun(int CPU);
extern tThread *gSleepingThreads;
extern tThread *gDeleteThreads;
extern tThread *Threads_GetNextToRun(int CPU);
+extern void Threads_Dump();
// === PROTOTYPES ===
void ArchThreads_Init();
// === PROTOTYPES ===
void ArchThreads_Init();
@@
-131,6
+132,14
@@
void ArchThreads_Init()
gCurrentThread = &gThreadZero;
#endif
gCurrentThread = &gThreadZero;
#endif
+ #if USE_PAE
+ gThreadZero.MemState.PDP[0] = 0;
+ gThreadZero.MemState.PDP[1] = 0;
+ gThreadZero.MemState.PDP[2] = 0;
+ #else
+ gThreadZero.MemState.CR3 = (Uint)gaInitPageDir - KERNEL_BASE;
+ #endif
+
// Set timer frequency
outb(0x43, 0x34); // Set Channel 0, Low/High, Rate Generator
outb(0x40, TIMER_DIVISOR&0xFF); // Low Byte of Divisor
// Set timer frequency
outb(0x43, 0x34); // Set Channel 0, Low/High, Rate Generator
outb(0x40, TIMER_DIVISOR&0xFF); // Low Byte of Divisor
@@
-304,6
+313,8
@@
int Proc_Clone(Uint *Err, Uint Flags)
giTotalTickets += newThread->NumTickets;
RELEASE( &giThreadListLock );
giTotalTickets += newThread->NumTickets;
RELEASE( &giThreadListLock );
+ Threads_Dump();
+
return newThread->TID;
}
return newThread->TID;
}
@@
-456,7
+467,7
@@
void Proc_Scheduler(int CPU)
// Check if there is any tasks running
if(giNumActiveThreads == 0) {
// Check if there is any tasks running
if(giNumActiveThreads == 0) {
- Log("No Active threads, sleeping
\n
");
+ Log("No Active threads, sleeping");
__asm__ __volatile__ ("hlt");
return;
}
__asm__ __volatile__ ("hlt");
return;
}
UCC
git Repository :: git.ucc.asn.au