Changeset 22f7769 in mainline for src/mm/vm.c


Ignore:
Timestamp:
2005-10-17T23:31:41Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4b2c872d
Parents:
75eacab
Message:

Rename cpu_priority_{high|low|restore|read} functions to interrupts_{disable|enable|restore|read}.
Rename pri_t to ipl_t (Interrupt Priority Level).
Rename thread_t::pri to thread_t::priority.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mm/vm.c

    r75eacab r22f7769  
    9090vm_area_t *vm_area_create(vm_t *m, vm_type_t type, size_t size, __address addr)
    9191{
    92         pri_t pri;
     92        ipl_t ipl;
    9393        vm_area_t *a;
    9494       
     
    9696                panic("addr not aligned to a page boundary");
    9797       
    98         pri = cpu_priority_high();
     98        ipl = interrupts_disable();
    9999        spinlock_lock(&m->lock);
    100100       
     
    111111                        free(a);
    112112                        spinlock_unlock(&m->lock);
    113                         cpu_priority_restore(pri);
     113                        interrupts_restore(ipl);
    114114                        return NULL;
    115115                }
     
    130130
    131131        spinlock_unlock(&m->lock);
    132         cpu_priority_restore(pri);
     132        interrupts_restore(ipl);
    133133       
    134134        return a;
     
    142142{
    143143        int i, flags;
    144         pri_t pri;
    145        
    146         pri = cpu_priority_high();
     144        ipl_t ipl;
     145       
     146        ipl = interrupts_disable();
    147147        spinlock_lock(&m->lock);
    148148        spinlock_lock(&a->lock);
     
    166166        spinlock_unlock(&a->lock);
    167167        spinlock_unlock(&m->lock);
    168         cpu_priority_restore(pri);
     168        interrupts_restore(ipl);
    169169}
    170170
     
    172172{
    173173        int i;
    174         pri_t pri;
    175        
    176         pri = cpu_priority_high();
     174        ipl_t ipl;
     175       
     176        ipl = interrupts_disable();
    177177        spinlock_lock(&m->lock);
    178178        spinlock_lock(&a->lock);
     
    184184        spinlock_unlock(&a->lock);
    185185        spinlock_unlock(&m->lock);
    186         cpu_priority_restore(pri);
     186        interrupts_restore(ipl);
    187187}
    188188
     
    190190{
    191191        link_t *l;
    192         pri_t pri;
    193        
    194         pri = cpu_priority_high();
     192        ipl_t ipl;
     193       
     194        ipl = interrupts_disable();
    195195
    196196        tlb_shootdown_start();
     
    203203        tlb_shootdown_finalize();
    204204
    205         cpu_priority_restore(pri);
     205        interrupts_restore(ipl);
    206206
    207207        vm_install_arch(m);
Note: See TracChangeset for help on using the changeset viewer.