Subversion Repositories HelenOS-historic

Rev

Rev 167 | Rev 501 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 167 Rev 184
Line 28... Line 28...
28
 
28
 
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
#include <arch/context.h>   /* SP_DELTA */
33
 
34
 
34
void before_thread_runs_arch(void)
35
void before_thread_runs_arch(void)
35
{
36
{
36
    CPU->arch.tss->esp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-8];
37
    CPU->arch.tss->esp0 = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
37
    CPU->arch.tss->ss0 = selector(KDATA_DES);
38
    CPU->arch.tss->ss0 = selector(KDATA_DES);
38
}
39
}