Lines Matching defs:vector
70 IOInterruptVector *vector;
82 vector = &vectors[vectorNumber];
84 // Get the lock for this vector.
85 IOTakeLock(vector->interruptLock);
88 canBeShared = vectorCanBeShared(vectorNumber, vector);
100 wasAlreadyRegisterd = vector->interruptRegistered;
102 // If the vector is registered and can not be shared return error.
104 IOUnlock(vector->interruptLock);
108 // If this vector is already in use, and can be shared (implied),
112 // If this vector is not already shared, break it out.
113 if (vector->sharedController == 0) {
115 vector->sharedController = new IOSharedInterruptController;
116 if (vector->sharedController == 0) {
117 IOUnlock(vector->interruptLock);
123 originalNub = vector->nub;
124 originalSource = vector->source;
128 disableVectorHard(vectorNumber, vector);
129 vector->interruptDisabledHard = 0;
133 error = vector->sharedController->initInterruptController(this, vectorData);
139 vector->sharedController->release();
140 vector->sharedController = 0;
141 IOUnlock(vector->interruptLock);
147 error = vector->sharedController->registerInterrupt(originalNub,
149 vector->target,
150 vector->handler,
151 vector->refCon);
157 wasDisabledSoft = vector->interruptDisabledSoft;
160 vector->interruptDisabledSoft = 1;
161 vector->interruptDisabledHard = 1;
167 vector->sharedController->release();
168 vector->sharedController = 0;
169 IOUnlock(vector->interruptLock);
174 // Fill in vector with the shared controller's info.
175 vector->handler = (IOInterruptHandler)vector->sharedController->getInterruptHandlerAddress();
176 vector->nub = vector->sharedController;
177 vector->source = 0;
178 vector->target = vector->sharedController;
179 vector->refCon = 0;
183 if (wasAlreadyRegisterd) wasDisabledSoft = vector->interruptDisabledSoft;
186 // Do any specific initalization for this vector if it has not yet been used.
187 if (!wasAlreadyRegisterd) initVector(vectorNumber, vector);
190 vector->interruptDisabledSoft = 1;
191 vector->interruptDisabledHard = 1;
192 vector->interruptRegistered = 1;
198 error = vector->sharedController->registerInterrupt(nub, source, target,
200 IOUnlock(vector->interruptLock);
204 // Fill in vector with the client's info.
205 vector->handler = handler;
206 vector->nub = nub;
207 vector->source = source;
208 vector->target = target;
209 vector->refCon = refCon;
211 // Do any specific initalization for this vector.
212 initVector(vectorNumber, vector);
214 // Get the vector ready. It starts hard disabled.
215 vector->interruptDisabledHard = 1;
216 vector->interruptDisabledSoft = 1;
217 vector->interruptRegistered = 1;
219 IOUnlock(vector->interruptLock);
227 IOInterruptVector *vector;
233 vector = &vectors[vectorNumber];
235 // Get the lock for this vector.
236 IOTakeLock(vector->interruptLock);
239 if (!vector->interruptRegistered) {
240 IOUnlock(vector->interruptLock);
248 disableVectorHard(vectorNumber, vector);
250 // Clear all the storage for the vector except for interruptLock.
251 vector->interruptActive = 0;
252 vector->interruptDisabledSoft = 0;
253 vector->interruptDisabledHard = 0;
254 vector->interruptRegistered = 0;
255 vector->nub = 0;
256 vector->source = 0;
257 vector->handler = 0;
258 vector->target = 0;
259 vector->refCon = 0;
261 IOUnlock(vector->interruptLock);
270 IOInterruptVector *vector;
278 vector = &vectors[vectorNumber];
280 *interruptType = getVectorType(vectorNumber, vector);
289 IOInterruptVector *vector;
295 vector = &vectors[vectorNumber];
297 if (vector->interruptDisabledSoft) {
298 vector->interruptDisabledSoft = 0;
305 while (vector->interruptActive);
310 if (vector->interruptDisabledHard) {
311 vector->interruptDisabledHard = 0;
313 enableVector(vectorNumber, vector);
324 IOInterruptVector *vector;
330 vector = &vectors[vectorNumber];
332 vector->interruptDisabledSoft = 1;
339 while (vector->interruptActive);
352 IOInterruptVector *vector;
358 vector = &vectors[vectorNumber];
360 causeVector(vectorNumber, vector);
380 IOInterruptVector */*vector*/)
386 IOInterruptVector */*vector*/)
391 IOInterruptVector */*vector*/)
397 IOInterruptVector */*vector*/)
402 IOInterruptVector */*vector*/)
407 IOInterruptVector */*vector*/)
498 IOInterruptVector *vector = 0;
504 // Find a free vector.
508 vector = &vectors[vectorNumber];
510 // Get the lock for this vector.
511 IOTakeLock(vector->interruptLock);
514 if (!vector->interruptRegistered) break;
517 IOUnlock(vector->interruptLock);
538 // Fill in vector with the client's info.
539 vector->handler = handler;
540 vector->nub = nub;
541 vector->source = source;
542 vector->target = target;
543 vector->refCon = refCon;
545 // Get the vector ready. It starts off soft disabled.
546 vector->interruptDisabledSoft = 1;
547 vector->interruptRegistered = 1;
554 IOUnlock(vector->interruptLock);
563 IOInterruptVector *vector;
570 vector = &vectors[vectorNumber];
572 // Get the lock for this vector.
573 IOTakeLock(vector->interruptLock);
576 if (!vector->interruptRegistered) {
577 IOUnlock(vector->interruptLock);
584 // Clear all the storage for the vector except for interruptLock.
585 vector->interruptActive = 0;
586 vector->interruptDisabledSoft = 0;
587 vector->interruptDisabledHard = 0;
588 vector->interruptRegistered = 0;
589 vector->nub = 0;
590 vector->source = 0;
591 vector->handler = 0;
592 vector->target = 0;
593 vector->refCon = 0;
599 IOUnlock(vector->interruptLock);
622 IOInterruptVector *vector;
629 vector = &vectors[vectorNumber];
632 if (!vector->interruptDisabledSoft) {
637 vector->interruptDisabledSoft = 0;
654 IOInterruptVector *vector;
661 vector = &vectors[vectorNumber];
664 if (!vector->interruptDisabledSoft) {
665 vector->interruptDisabledSoft = 1;
675 while (vector->interruptActive);
695 IOInterruptVector *vector;
698 vector = &vectors[vectorNumber];
700 vector->interruptActive = 1;
705 if (!vector->interruptDisabledSoft) {
711 if (vector->interruptRegistered) {
712 vector->handler(vector->target, vector->refCon,
713 vector->nub, vector->source);
717 vector->interruptActive = 0;