Changeset dad5951 in mainline


Ignore:
Timestamp:
2007-01-29T17:28:20Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3802fcd
Parents:
8be8cfa
Message:

avoid conflict with potential keyword

Location:
kernel/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/mm/as.h

    r8be8cfa rdad5951  
    147147extern as_t *as_create(int flags);
    148148extern void as_destroy(as_t *as);
    149 extern void as_switch(as_t *old, as_t *new);
     149extern void as_switch(as_t *old, as_t *replace);
    150150extern int as_page_fault(uintptr_t page, pf_access_t access, istate_t *istate);
    151151
  • kernel/generic/src/mm/as.c

    r8be8cfa rdad5951  
    864864 * @param new New address space.
    865865 */
    866 void as_switch(as_t *old, as_t *new)
     866void as_switch(as_t *old, as_t *replace)
    867867{
    868868        ipl_t ipl;
     
    901901         * Second, prepare the new address space.
    902902         */
    903         mutex_lock_active(&new->lock);
    904         if ((new->cpu_refcount++ == 0) && (new != AS_KERNEL)) {
    905                 if (new->asid != ASID_INVALID) {
    906                         list_remove(&new->inactive_as_with_asid_link);
     903        mutex_lock_active(&replace->lock);
     904        if ((replace->cpu_refcount++ == 0) && (replace != AS_KERNEL)) {
     905                if (replace->asid != ASID_INVALID) {
     906                        list_remove(&replace->inactive_as_with_asid_link);
    907907                } else {
    908908                        /*
    909                          * Defer call to asid_get() until new->lock is released.
     909                         * Defer call to asid_get() until replace->lock is released.
    910910                         */
    911911                        needs_asid = true;
    912912                }
    913913        }
    914         SET_PTL0_ADDRESS(new->page_table);
    915         mutex_unlock(&new->lock);
     914        SET_PTL0_ADDRESS(replace->page_table);
     915        mutex_unlock(&replace->lock);
    916916
    917917        if (needs_asid) {
     
    923923               
    924924                asid = asid_get();
    925                 mutex_lock_active(&new->lock);
    926                 new->asid = asid;
    927                 mutex_unlock(&new->lock);
     925                mutex_lock_active(&replace->lock);
     926                replace->asid = asid;
     927                mutex_unlock(&replace->lock);
    928928        }
    929929        spinlock_unlock(&inactive_as_with_asid_lock);
     
    934934         * (e.g. write ASID to hardware register etc.)
    935935         */
    936         as_install_arch(new);
    937        
    938         AS = new;
     936        as_install_arch(replace);
     937       
     938        AS = replace;
    939939}
    940940
Note: See TracChangeset for help on using the changeset viewer.