Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset a7dbd49 in mainline


Ignore:
Timestamp:
2011-04-17T20:40:51Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
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.
Message:

Merge from lp:~jakub/helenos/mm.

Location:
kernel/generic/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/backend_anon.c

    re5a015b ra7dbd49  
    5757static void anon_destroy(as_area_t *);
    5858
    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);
     59static int anon_page_fault(as_area_t *, uintptr_t, pf_access_t);
     60static void anon_frame_free(as_area_t *, uintptr_t, uintptr_t);
    6161
    6262mem_backend_t anon_backend = {
  • kernel/generic/src/mm/backend_elf.c

    re5a015b ra7dbd49  
    5757static void elf_destroy(as_area_t *);
    5858
    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);
     59static int elf_page_fault(as_area_t *, uintptr_t, pf_access_t);
     60static void elf_frame_free(as_area_t *, uintptr_t, uintptr_t);
    6161
    6262mem_backend_t elf_backend = {
     
    7070};
    7171
     72static 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
    7288bool elf_create(as_area_t *area)
    7389{
    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);
    7691
    7792        if (area->pages <= nonanon_pages)
     
    8398bool elf_resize(as_area_t *area, size_t new_pages)
    8499{
    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);
    87101
    88102        if (new_pages > area->pages) {
     
    193207void elf_destroy(as_area_t *area)
    194208{
    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);
    197210
    198211        if (area->pages > nonanon_pages)
  • kernel/generic/src/mm/backend_phys.c

    re5a015b ra7dbd49  
    5252static void phys_destroy(as_area_t *);
    5353
    54 static int phys_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
     54static int phys_page_fault(as_area_t *, uintptr_t, pf_access_t);
    5555
    5656mem_backend_t phys_backend = {
  • kernel/generic/src/proc/scheduler.c

    re5a015b ra7dbd49  
    354354       
    355355        /*
    356          * Through the 'THE' structure, we keep track of THREAD, TASK, CPU, VM
     356         * Through the 'THE' structure, we keep track of THREAD, TASK, CPU, AS
    357357         * and preemption counter. At this point THE could be coming either
    358358         * from THREAD's or CPU's stack.
Note: See TracChangeset for help on using the changeset viewer.