Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/proc/scheduler.c

    ra759467 r687c3cd  
    3838#include <proc/thread.h>
    3939#include <arch.h>
     40#include <arch/context.h>       /* SP_DELTA */
    4041#include <arch/asm.h>
    4142#include <print.h>
     
    5657{
    5758        CPU->arch.tss->rsp0 =
    58             (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE];
    59        
     59            (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA];
     60
    6061        /*
    6162         * Syscall support.
    6263         */
    6364        swapgs();
    64         write_msr(AMD_MSR_GS, (uintptr_t) THREAD->arch.syscall_rsp);
     65        write_msr(AMD_MSR_GS, (uintptr_t)THREAD->arch.syscall_rsp);
    6566        swapgs();
    66        
     67
    6768        /* TLS support - set FS to thread local storage */
    6869        write_msr(AMD_MSR_FS, THREAD->arch.tls);
Note: See TracChangeset for help on using the changeset viewer.