Changeset d364e94 in mainline for kernel/arch/sparc64/src/proc/thread.c
- Timestamp:
- 2008-10-02T20:24:01Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1d132ae
- Parents:
- c2ad500
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/proc/thread.c
rc2ad500 rd364e94 35 35 #include <proc/thread.h> 36 36 #include <arch/proc/thread.h> 37 #include <mm/frame.h> 38 #include <mm/page.h> 39 #include <arch/mm/page.h> 37 #include <mm/slab.h> 38 #include <arch/trap/regwin.h> 40 39 #include <align.h> 41 40 … … 51 50 { 52 51 if (t->arch.uspace_window_buffer) { 52 uintptr_t uw_buf = (uintptr_t) t->arch.uspace_window_buffer; 53 53 /* 54 54 * Mind the possible alignment of the userspace window buffer 55 55 * belonging to a killed thread. 56 56 */ 57 frame_free(KA2PA(ALIGN_DOWN((uintptr_t) 58 t->arch.uspace_window_buffer, PAGE_SIZE))); 57 free((uint8_t *) ALIGN_DOWN(uw_buf, UWB_ALIGNMENT)); 59 58 } 60 59 } … … 68 67 * returned from the slab allocator doesn't have any. 69 68 */ 70 t->arch.uspace_window_buffer = frame_alloc(ONE_FRAME, FRAME_KA);69 t->arch.uspace_window_buffer = malloc(UWB_ASIZE, 0); 71 70 } else { 72 71 uintptr_t uw_buf = (uintptr_t) t->arch.uspace_window_buffer; … … 77 76 */ 78 77 t->arch.uspace_window_buffer = (uint8_t *) ALIGN_DOWN(uw_buf, 79 PAGE_SIZE);78 UWB_ASIZE); 80 79 } 81 80 }
Note:
See TracChangeset
for help on using the changeset viewer.