Rev 22 | Rev 125 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 22 | Rev 52 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | #include <proc/scheduler.h> |
29 | #include <proc/scheduler.h> |
30 | #include <cpu.h> |
30 | #include <cpu.h> |
31 | #include <proc/thread.h> |
31 | #include <proc/thread.h> |
32 | #include <arch.h> |
32 | #include <arch.h> |
33 | 33 | ||
34 | void before_thread_runs(void) |
34 | void before_thread_runs_arch(void) |
35 | { |
35 | { |
36 | CPU->arch.tss->esp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-8]; |
36 | CPU->arch.tss->esp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-8]; |
37 | CPU->arch.tss->ss0 = selector(KDATA_DES); |
37 | CPU->arch.tss->ss0 = selector(KDATA_DES); |
38 | } |
38 | } |