Changeset 20d50a1 in mainline for generic/src/proc/scheduler.c


Ignore:
Timestamp:
2006-01-13T13:02:45Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f9425006
Parents:
0369911
Message:

Memory management work.

  • vm.* → as.* (as like address space is, imho, more fitting)
  • Don't do TLB shootdown on vm_install(). Some architectures only need to call tlb_invalidate_asid().
  • Don't allocate all frames for as_area in as_area_create(), but let them be allocated on-demand by as_page_fault().
  • Add high-level page fault handler as_page_fault().
  • Add as_area_load_mapping().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/proc/scheduler.c

    r0369911 r20d50a1  
    3333#include <mm/frame.h>
    3434#include <mm/page.h>
    35 #include <mm/vm.h>
     35#include <mm/as.h>
    3636#include <arch/asm.h>
    3737#include <arch/faddr.h>
     
    353353         */
    354354        if (TASK != THREAD->task) {
    355                 vm_t *m1 = NULL;
    356                 vm_t *m2;
     355                as_t *as1 = NULL;
     356                as_t *as2;
    357357
    358358                if (TASK) {
    359359                        spinlock_lock(&TASK->lock);
    360                         m1 = TASK->vm;
     360                        as1 = TASK->as;
    361361                        spinlock_unlock(&TASK->lock);
    362362                }
    363363
    364364                spinlock_lock(&THREAD->task->lock);
    365                 m2 = THREAD->task->vm;
     365                as2 = THREAD->task->as;
    366366                spinlock_unlock(&THREAD->task->lock);
    367367               
    368368                /*
    369                  * Note that it is possible for two tasks to share one vm mapping.
    370                  */
    371                 if (m1 != m2) {
    372                         /*
    373                          * Both tasks and vm mappings are different.
     369                 * Note that it is possible for two tasks to share one address space.
     370                 */
     371                if (as1 != as2) {
     372                        /*
     373                         * Both tasks and address spaces are different.
    374374                         * Replace the old one with the new one.
    375375                         */
    376                         vm_install(m2);
     376                        as_install(as2);
    377377                }
    378378                TASK = THREAD->task;   
Note: See TracChangeset for help on using the changeset viewer.