Changes in kernel/generic/src/proc/thread.c [8cbf1c3:cd3b380] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r8cbf1c3 rcd3b380 192 192 kmflags &= ~FRAME_HIGHMEM; 193 193 194 thread->kstack = (uint8_t *)195 PA2KA(frame_alloc(STACK_FRAMES, kmflags, 0));196 if (! thread->kstack) {194 uintptr_t stack_phys = 195 frame_alloc(STACK_FRAMES, kmflags, STACK_SIZE - 1); 196 if (!stack_phys) { 197 197 #ifdef CONFIG_FPU 198 198 if (thread->saved_fpu_context) … … 202 202 } 203 203 204 thread->kstack = (uint8_t *) PA2KA(stack_phys); 205 204 206 #ifdef CONFIG_UDEBUG 205 207 mutex_initialize(&thread->udebug.lock, MUTEX_PASSIVE); … … 217 219 thr_destructor_arch(thread); 218 220 219 frame_free(KA2PA(thread->kstack) );221 frame_free(KA2PA(thread->kstack), STACK_FRAMES); 220 222 221 223 #ifdef CONFIG_FPU
Note:
See TracChangeset
for help on using the changeset viewer.