Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/thread.c

    rcd3b380 r8cbf1c3  
    192192        kmflags &= ~FRAME_HIGHMEM;
    193193       
    194         uintptr_t stack_phys =
    195             frame_alloc(STACK_FRAMES, kmflags, STACK_SIZE - 1);
    196         if (!stack_phys) {
     194        thread->kstack = (uint8_t *)
     195            PA2KA(frame_alloc(STACK_FRAMES, kmflags, 0));
     196        if (!thread->kstack) {
    197197#ifdef CONFIG_FPU
    198198                if (thread->saved_fpu_context)
     
    202202        }
    203203       
    204         thread->kstack = (uint8_t *) PA2KA(stack_phys);
    205        
    206204#ifdef CONFIG_UDEBUG
    207205        mutex_initialize(&thread->udebug.lock, MUTEX_PASSIVE);
     
    219217        thr_destructor_arch(thread);
    220218       
    221         frame_free(KA2PA(thread->kstack), STACK_FRAMES);
     219        frame_free(KA2PA(thread->kstack));
    222220       
    223221#ifdef CONFIG_FPU
Note: See TracChangeset for help on using the changeset viewer.