Subversion Repositories HelenOS-historic

Rev

Rev 1266 | Rev 1636 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1266 Rev 1380
Line 55... Line 55...
55
#include <mm/asid.h>
55
#include <mm/asid.h>
56
#include <mm/as.h>
56
#include <mm/as.h>
57
#include <mm/tlb.h>
57
#include <mm/tlb.h>
58
#include <arch/mm/asid.h>
58
#include <arch/mm/asid.h>
59
#include <synch/spinlock.h>
59
#include <synch/spinlock.h>
-
 
60
#include <synch/mutex.h>
60
#include <arch.h>
61
#include <arch.h>
61
#include <adt/list.h>
62
#include <adt/list.h>
62
#include <debug.h>
63
#include <debug.h>
63
 
64
 
64
/**
65
/**
Line 101... Line 102...
101
        ASSERT(!list_empty(&inactive_as_with_asid_head));
102
        ASSERT(!list_empty(&inactive_as_with_asid_head));
102
        tmp = inactive_as_with_asid_head.next;
103
        tmp = inactive_as_with_asid_head.next;
103
        list_remove(tmp);
104
        list_remove(tmp);
104
       
105
       
105
        as = list_get_instance(tmp, as_t, inactive_as_with_asid_link);
106
        as = list_get_instance(tmp, as_t, inactive_as_with_asid_link);
106
        spinlock_lock(&as->lock);
107
        mutex_lock_active(&as->lock);
107
 
108
 
108
        /*
109
        /*
109
         * Steal the ASID.
110
         * Steal the ASID.
110
         * Note that the stolen ASID is not active.
111
         * Note that the stolen ASID is not active.
111
         */
112
         */
Line 115... Line 116...
115
        /*
116
        /*
116
         * Notify the address space from wich the ASID
117
         * Notify the address space from wich the ASID
117
         * was stolen by invalidating its asid member.
118
         * was stolen by invalidating its asid member.
118
         */
119
         */
119
        as->asid = ASID_INVALID;
120
        as->asid = ASID_INVALID;
120
        spinlock_unlock(&as->lock);
121
        mutex_unlock(&as->lock);
121
 
122
 
122
        /*
123
        /*
123
         * Get the system rid of the stolen ASID.
124
         * Get the system rid of the stolen ASID.
124
         */
125
         */
125
        tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0);
126
        tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0);