Ignore:
File:
1 edited

Legend:

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

    r18baf9c0 r2277e03  
    5454void before_thread_runs_arch(void)
    5555{
    56         if ((THREAD->flags & THREAD_FLAG_USPACE)) {
    57                 uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE -
    58                     (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT));
     56        if (THREAD->uspace) {
     57                uint64_t sp;
     58
     59                sp = (uintptr_t) THREAD->kstack + STACK_SIZE - STACK_BIAS;
    5960                asi_u64_write(ASI_SCRATCHPAD, SCRATCHPAD_KSTACK, sp);
    6061                asi_u64_write(ASI_SCRATCHPAD, SCRATCHPAD_WBUF,
     
    6667void after_thread_ran_arch(void)
    6768{
    68         if ((THREAD->flags & THREAD_FLAG_USPACE)) {
    69                 /* sample the state of the userspace window buffer */   
     69        if (THREAD->uspace) {
     70                /* sample the state of the userspace window buffer */
    7071                THREAD->arch.uspace_window_buffer =
    7172                    (uint8_t *) asi_u64_read(ASI_SCRATCHPAD, SCRATCHPAD_WBUF);
Note: See TracChangeset for help on using the changeset viewer.