Changeset a7dbd49 in mainline
- Timestamp:
- 2011-04-17T20:40:51Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fde2982c
- Parents:
- e5a015b (diff), 8f6c6264 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- kernel/generic/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/backend_anon.c
re5a015b ra7dbd49 57 57 static void anon_destroy(as_area_t *); 58 58 59 static int anon_page_fault(as_area_t * area, uintptr_t addr, pf_access_t access);60 static void anon_frame_free(as_area_t * area, uintptr_t page, uintptr_t frame);59 static int anon_page_fault(as_area_t *, uintptr_t, pf_access_t); 60 static void anon_frame_free(as_area_t *, uintptr_t, uintptr_t); 61 61 62 62 mem_backend_t anon_backend = { -
kernel/generic/src/mm/backend_elf.c
re5a015b ra7dbd49 57 57 static void elf_destroy(as_area_t *); 58 58 59 static int elf_page_fault(as_area_t * area, uintptr_t addr, pf_access_t access);60 static void elf_frame_free(as_area_t * area, uintptr_t page, uintptr_t frame);59 static int elf_page_fault(as_area_t *, uintptr_t, pf_access_t); 60 static void elf_frame_free(as_area_t *, uintptr_t, uintptr_t); 61 61 62 62 mem_backend_t elf_backend = { … … 70 70 }; 71 71 72 static size_t elf_nonanon_pages_get(as_area_t *area) 73 { 74 elf_segment_header_t *entry = area->backend_data.segment; 75 uintptr_t first = ALIGN_UP(entry->p_vaddr, PAGE_SIZE); 76 uintptr_t last = ALIGN_DOWN(entry->p_vaddr + entry->p_filesz, 77 PAGE_SIZE); 78 79 if (entry->p_flags & PF_W) 80 return 0; 81 82 if (last < first) 83 return 0; 84 85 return last - first; 86 } 87 72 88 bool elf_create(as_area_t *area) 73 89 { 74 elf_segment_header_t *entry = area->backend_data.segment; 75 size_t nonanon_pages = ALIGN_DOWN(entry->p_filesz, PAGE_SIZE); 90 size_t nonanon_pages = elf_nonanon_pages_get(area); 76 91 77 92 if (area->pages <= nonanon_pages) … … 83 98 bool elf_resize(as_area_t *area, size_t new_pages) 84 99 { 85 elf_segment_header_t *entry = area->backend_data.segment; 86 size_t nonanon_pages = ALIGN_DOWN(entry->p_filesz, PAGE_SIZE); 100 size_t nonanon_pages = elf_nonanon_pages_get(area); 87 101 88 102 if (new_pages > area->pages) { … … 193 207 void elf_destroy(as_area_t *area) 194 208 { 195 elf_segment_header_t *entry = area->backend_data.segment; 196 size_t nonanon_pages = ALIGN_DOWN(entry->p_filesz, PAGE_SIZE); 209 size_t nonanon_pages = elf_nonanon_pages_get(area); 197 210 198 211 if (area->pages > nonanon_pages) -
kernel/generic/src/mm/backend_phys.c
re5a015b ra7dbd49 52 52 static void phys_destroy(as_area_t *); 53 53 54 static int phys_page_fault(as_area_t * area, uintptr_t addr, pf_access_t access);54 static int phys_page_fault(as_area_t *, uintptr_t, pf_access_t); 55 55 56 56 mem_backend_t phys_backend = { -
kernel/generic/src/proc/scheduler.c
re5a015b ra7dbd49 354 354 355 355 /* 356 * Through the 'THE' structure, we keep track of THREAD, TASK, CPU, VM356 * Through the 'THE' structure, we keep track of THREAD, TASK, CPU, AS 357 357 * and preemption counter. At this point THE could be coming either 358 358 * from THREAD's or CPU's stack.
Note:
See TracChangeset
for help on using the changeset viewer.