Lines Matching refs:mmu_context_queue
43 extern struct mmu_context_queue_t mmu_context_queue;
74 spin_lock_irqsave(&mmu_context_queue.lock, flags); in init_new_context()
76 if ( (size = mmu_context_queue.size) <= 0 ) { in init_new_context()
77 spin_unlock_irqrestore(&mmu_context_queue.lock, flags); in init_new_context()
81 head = mmu_context_queue.head; in init_new_context()
82 mm->context = mmu_context_queue.elements[head]; in init_new_context()
85 mmu_context_queue.head = head; in init_new_context()
86 mmu_context_queue.size = size-1; in init_new_context()
88 spin_unlock_irqrestore(&mmu_context_queue.lock, flags); in init_new_context()
99 long index, size = mmu_context_queue.size; in destroy_context()
102 spin_lock_irqsave(&mmu_context_queue.lock, flags); in destroy_context()
104 if ( (size = mmu_context_queue.size) >= NUM_USER_CONTEXT ) { in destroy_context()
105 spin_unlock_irqrestore(&mmu_context_queue.lock, flags); in destroy_context()
110 index = mmu_context_queue.head; in destroy_context()
112 mmu_context_queue.head = index; in destroy_context()
114 index = mmu_context_queue.tail; in destroy_context()
116 mmu_context_queue.tail = index; in destroy_context()
119 mmu_context_queue.size = size+1; in destroy_context()
120 mmu_context_queue.elements[index] = mm->context; in destroy_context()
122 spin_unlock_irqrestore(&mmu_context_queue.lock, flags); in destroy_context()