Ignore:
File:
1 edited

Legend:

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

    r687c3cd ra759467  
    3838#include <proc/thread.h>
    3939#include <arch.h>
    40 #include <arch/context.h>       /* SP_DELTA */
    4140#include <arch/asm.h>
    4241#include <print.h>
     
    5756{
    5857        CPU->arch.tss->rsp0 =
    59             (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA];
    60 
     58            (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE];
     59       
    6160        /*
    6261         * Syscall support.
    6362         */
    6463        swapgs();
    65         write_msr(AMD_MSR_GS, (uintptr_t)THREAD->arch.syscall_rsp);
     64        write_msr(AMD_MSR_GS, (uintptr_t) THREAD->arch.syscall_rsp);
    6665        swapgs();
    67 
     66       
    6867        /* TLS support - set FS to thread local storage */
    6968        write_msr(AMD_MSR_FS, THREAD->arch.tls);
Note: See TracChangeset for help on using the changeset viewer.