yet another fix for #1018, which has at this point blossomed into a reorg of how AP cpus are initialized.

the new cpuid stuff was apparently exacerbating an existing problem where various bits of low level
cpu code (specifically get_current_cpu) weren't really initialized before being used. Changed the
order to set up a fake set of threads to point each cpu at really early in boot to make sure that at
all points in code it can get the current 'thread' and thus the current cpu.
A probably better solution would be to have dr3 point to the current cpu which would then point to the 
current thread, but that has a race condition that would require an int disable, etc.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20160 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Travis Geiselbrecht
2007-02-19 00:11:24 +00:00
parent b2562a8d64
commit badc7b674e
11 changed files with 120 additions and 109 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ void thread_at_kernel_entry(void);
void thread_at_kernel_exit(void);
status_t thread_init(struct kernel_args *args);
status_t thread_per_cpu_init(int32 cpuNum);
status_t thread_preboot_init_percpu(struct kernel_args *args, int32 cpuNum);
void thread_yield(void);
void thread_exit(void);