Rev 1077 | Rev 1112 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1077 | Rev 1104 | ||
|---|---|---|---|
| Line 31... | Line 31... | ||
| 31 | #include <proc/thread.h> |
31 | #include <proc/thread.h> |
| 32 | #include <arch.h> |
32 | #include <arch.h> |
| 33 | #include <arch/context.h> /* SP_DELTA */ |
33 | #include <arch/context.h> /* SP_DELTA */ |
| 34 | #include <arch/asm.h> |
34 | #include <arch/asm.h> |
| 35 | #include <arch/debugger.h> |
35 | #include <arch/debugger.h> |
| 36 | - | ||
| 37 | #include <print.h> |
36 | #include <print.h> |
| - | 37 | ||
| 38 | void before_thread_runs_arch(void) |
38 | void before_thread_runs_arch(void) |
| 39 | { |
39 | { |
| 40 | CPU->arch.tss->rsp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; |
40 | CPU->arch.tss->rsp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; |
| 41 | 41 | ||
| 42 | /* Syscall support - write thread stack address to hidden part of gs */ |
42 | /* Syscall support - write thread stack address to hidden part of gs */ |