Lines Matching refs:vector

63 	IOInterruptVector *vector;  in registerInterrupt()  local
77 vector = &vectors[vectorNumber]; in registerInterrupt()
80 IOLockLock(vector->interruptLock); in registerInterrupt()
83 canBeShared = vectorCanBeShared(vectorNumber, vector); in registerInterrupt()
94 wasAlreadyRegisterd = vector->interruptRegistered; in registerInterrupt()
98 IOLockUnlock(vector->interruptLock); in registerInterrupt()
107 if (vector->sharedController == NULL) { in registerInterrupt()
109 vector->sharedController = new IOSharedInterruptController; in registerInterrupt()
110 if (vector->sharedController == NULL) { in registerInterrupt()
111 IOLockUnlock(vector->interruptLock); in registerInterrupt()
117 originalNub = vector->nub; in registerInterrupt()
118 originalSource = vector->source; in registerInterrupt()
122 disableVectorHard(vectorNumber, vector); in registerInterrupt()
123 vector->interruptDisabledHard = 0; in registerInterrupt()
127 error = vector->sharedController->initInterruptController(this, vectorData); in registerInterrupt()
135 vector->sharedController->release(); in registerInterrupt()
136 vector->sharedController = NULL; in registerInterrupt()
137 IOLockUnlock(vector->interruptLock); in registerInterrupt()
143 error = vector->sharedController->registerInterrupt(originalNub, in registerInterrupt()
145 vector->target, in registerInterrupt()
146 vector->handler, in registerInterrupt()
147 vector->refCon); in registerInterrupt()
153 wasDisabledSoft = vector->interruptDisabledSoft; in registerInterrupt()
156 vector->interruptDisabledSoft = 1; in registerInterrupt()
157 vector->interruptDisabledHard = 1; in registerInterrupt()
165 vector->sharedController->release(); in registerInterrupt()
166 vector->sharedController = NULL; in registerInterrupt()
167 IOLockUnlock(vector->interruptLock); in registerInterrupt()
173 vector->handler = (IOInterruptHandler)vector->sharedController->getInterruptHandlerAddress(); in registerInterrupt()
174 vector->nub = vector->sharedController; in registerInterrupt()
175 vector->source = 0; in registerInterrupt()
176 vector->target = vector->sharedController; in registerInterrupt()
177 vector->refCon = NULL; in registerInterrupt()
182 wasDisabledSoft = vector->interruptDisabledSoft; in registerInterrupt()
189 initVector(vectorNumber, vector); in registerInterrupt()
193 vector->interruptDisabledSoft = 1; in registerInterrupt()
194 vector->interruptDisabledHard = 1; in registerInterrupt()
195 vector->interruptRegistered = 1; in registerInterrupt()
204 error = vector->sharedController->registerInterrupt(nub, source, target, in registerInterrupt()
206 IOLockUnlock(vector->interruptLock); in registerInterrupt()
211 vector->handler = handler; in registerInterrupt()
212 vector->nub = nub; in registerInterrupt()
213 vector->source = source; in registerInterrupt()
214 vector->target = target; in registerInterrupt()
215 vector->refCon = refCon; in registerInterrupt()
218 initVector(vectorNumber, vector); in registerInterrupt()
221 vector->interruptDisabledHard = 1; in registerInterrupt()
222 vector->interruptDisabledSoft = 1; in registerInterrupt()
223 vector->interruptRegistered = 1; in registerInterrupt()
225 IOLockUnlock(vector->interruptLock); in registerInterrupt()
234 IOInterruptVector *vector; in unregisterInterrupt() local
240 vector = &vectors[vectorNumber]; in unregisterInterrupt()
243 IOLockLock(vector->interruptLock); in unregisterInterrupt()
246 if (!vector->interruptRegistered) { in unregisterInterrupt()
247 IOLockUnlock(vector->interruptLock); in unregisterInterrupt()
255 disableVectorHard(vectorNumber, vector); in unregisterInterrupt()
258 vector->interruptActive = 0; in unregisterInterrupt()
259 vector->interruptDisabledSoft = 0; in unregisterInterrupt()
260 vector->interruptDisabledHard = 0; in unregisterInterrupt()
261 vector->interruptRegistered = 0; in unregisterInterrupt()
262 vector->nub = NULL; in unregisterInterrupt()
263 vector->source = 0; in unregisterInterrupt()
264 vector->handler = NULL; in unregisterInterrupt()
265 vector->target = NULL; in unregisterInterrupt()
266 vector->refCon = NULL; in unregisterInterrupt()
268 IOLockUnlock(vector->interruptLock); in unregisterInterrupt()
278 IOInterruptVector *vector; in getInterruptType() local
288 vector = &vectors[vectorNumber]; in getInterruptType()
290 *interruptType = getVectorType(vectorNumber, vector); in getInterruptType()
300 IOInterruptVector *vector; in enableInterrupt() local
306 vector = &vectors[vectorNumber]; in enableInterrupt()
308 if (vector->interruptDisabledSoft) { in enableInterrupt()
309 vector->interruptDisabledSoft = 0; in enableInterrupt()
315 while (vector->interruptActive) { in enableInterrupt()
318 if (vector->interruptDisabledHard) { in enableInterrupt()
319 vector->interruptDisabledHard = 0; in enableInterrupt()
329 enableVector(vectorNumber, vector); in enableInterrupt()
341 IOInterruptVector *vector; in disableInterrupt() local
347 vector = &vectors[vectorNumber]; in disableInterrupt()
349 vector->interruptDisabledSoft = 1; in disableInterrupt()
355 while (vector->interruptActive) { in disableInterrupt()
367 IOInterruptVector *vector; in causeInterrupt() local
373 vector = &vectors[vectorNumber]; in causeInterrupt()
375 causeVector(vectorNumber, vector); in causeInterrupt()
463 …rruptHandlerInternal(bool isStart, IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector) in timeStampInterruptHandlerInternal() argument
475 if (vector) { in timeStampInterruptHandlerInternal()
476 unslidHandler = VM_KERNEL_UNSLIDE((vm_offset_t)vector->handler); in timeStampInterruptHandlerInternal()
477 unslidTarget = VM_KERNEL_UNSLIDE_OR_PERM((vm_offset_t)vector->target); in timeStampInterruptHandlerInternal()
483 ml_irq_debug_start((uintptr_t)vector->handler, (uintptr_t)vector); in timeStampInterruptHandlerInternal()
497 …er::timeStampInterruptHandlerStart(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector) in timeStampInterruptHandlerStart() argument
499 timeStampInterruptHandlerInternal(true, vectorNumber, vector); in timeStampInterruptHandlerStart()
503 …ller::timeStampInterruptHandlerEnd(IOInterruptVectorNumber vectorNumber, IOInterruptVector *vector) in timeStampInterruptHandlerEnd() argument
505 timeStampInterruptHandlerInternal(false, vectorNumber, vector); in timeStampInterruptHandlerEnd()
602 IOInterruptVector *vector = NULL; in registerInterrupt() local
612 vector = &vectors[vectorNumber]; in registerInterrupt()
615 IOLockLock(vector->interruptLock); in registerInterrupt()
618 if (!vector->interruptRegistered) { in registerInterrupt()
623 IOLockUnlock(vector->interruptLock); in registerInterrupt()
639 IOLockUnlock(vector->interruptLock); in registerInterrupt()
648 vector->handler = handler; in registerInterrupt()
649 vector->nub = nub; in registerInterrupt()
650 vector->source = source; in registerInterrupt()
651 vector->target = target; in registerInterrupt()
652 vector->refCon = refCon; in registerInterrupt()
655 vector->interruptDisabledSoft = 1; in registerInterrupt()
656 vector->interruptRegistered = 1; in registerInterrupt()
665 IOLockUnlock(vector->interruptLock); in registerInterrupt()
674 IOInterruptVector *vector; in unregisterInterrupt() local
678 vector = &vectors[vectorNumber]; in unregisterInterrupt()
681 IOLockLock(vector->interruptLock); in unregisterInterrupt()
684 if (!vector->interruptRegistered in unregisterInterrupt()
685 || (vector->nub != nub) || (vector->source != source)) { in unregisterInterrupt()
686 IOLockUnlock(vector->interruptLock); in unregisterInterrupt()
698 vector->interruptActive = 0; in unregisterInterrupt()
699 vector->interruptDisabledSoft = 0; in unregisterInterrupt()
700 vector->interruptDisabledHard = 0; in unregisterInterrupt()
701 vector->interruptRegistered = 0; in unregisterInterrupt()
702 vector->nub = NULL; in unregisterInterrupt()
703 vector->source = 0; in unregisterInterrupt()
704 vector->handler = NULL; in unregisterInterrupt()
705 vector->target = NULL; in unregisterInterrupt()
706 vector->refCon = NULL; in unregisterInterrupt()
713 IOLockUnlock(vector->interruptLock); in unregisterInterrupt()
739 IOInterruptVector *vector; in enableInterrupt() local
746 vector = &vectors[vectorNumber]; in enableInterrupt()
749 if (!vector->interruptDisabledSoft) { in enableInterrupt()
754 vector->interruptDisabledSoft = 0; in enableInterrupt()
772 IOInterruptVector *vector; in disableInterrupt() local
779 vector = &vectors[vectorNumber]; in disableInterrupt()
782 if (!vector->interruptDisabledSoft) { in disableInterrupt()
783 vector->interruptDisabledSoft = 1; in disableInterrupt()
793 while (vector->interruptActive) { in disableInterrupt()
813 IOInterruptVector *vector; in handleInterrupt() local
816 vector = &vectors[vectorNumber]; in handleInterrupt()
818 vector->interruptActive = 1; in handleInterrupt()
823 if (!vector->interruptDisabledSoft) { in handleInterrupt()
825 if (vector->interruptRegistered) { in handleInterrupt()
829 timeStampInterruptHandlerStart(vectorNumber, vector); in handleInterrupt()
833 vector->handler(vector->target, vector->refCon, vector->nub, vector->source); in handleInterrupt()
836 timeStampInterruptHandlerEnd(vectorNumber, vector); in handleInterrupt()
841 vector->interruptActive = 0; in handleInterrupt()