Changeset ee454eb in mainline for kernel/arch/sparc64/src/proc/thread.c
- Timestamp:
- 2006-08-30T15:50:29Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- beb3926a
- Parents:
- e11ae91
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/proc/thread.c
re11ae91 ree454eb 36 36 #include <arch/proc/thread.h> 37 37 #include <mm/frame.h> 38 #include <mm/page.h> 39 #include <arch/mm/page.h> 40 #include <align.h> 38 41 39 42 void thr_constructor_arch(thread_t *t) … … 47 50 void thr_destructor_arch(thread_t *t) 48 51 { 49 if (t->arch.uspace_window_buffer) 50 frame_free((uintptr_t) t->arch.uspace_window_buffer); 52 if (t->arch.uspace_window_buffer) { 53 /* 54 * Mind the possible alignment of the userspace window buffer 55 * belonging to a killed thread. 56 */ 57 frame_free(ALIGN_DOWN((uintptr_t) t->arch.uspace_window_buffer, PAGE_SIZE)); 58 } 51 59 } 52 60 … … 59 67 */ 60 68 t->arch.uspace_window_buffer = frame_alloc(ONE_FRAME, 0); 69 } else { 70 uintptr_t uw_buf = (uintptr_t) t->arch.uspace_window_buffer; 71 72 /* 73 * Mind the possible alignment of the userspace window buffer 74 * belonging to a killed thread. 75 */ 76 t->arch.uspace_window_buffer = (uint8_t *) ALIGN_DOWN(uw_buf, PAGE_SIZE); 61 77 } 62 78 }
Note:
See TracChangeset
for help on using the changeset viewer.