- IOInterruptVector *vector;
- int vectorNumber;
-
- while (1) {
- // Get vectorNumber from hardware some how and clear the event.
-
- // Break if there are no more vectors to handle.
- if (vectorNumber == 0/*kNoVector*/) break;
-
- // Get the vector's date from the controller's array.
- vector = &vectors[vectorNumber];
-
- // Set the vector as active. This store must compleat before
- // moving on to prevent the disableInterrupt fuction from
- // geting out of sync.
- vector->interruptActive = 1;
- //sync();
- //isync();
-
- // If the vector is not disabled soft, handle it.
- if (!vector->interruptDisabledSoft) {
- // Prevent speculative exacution as needed on your processor.
- //isync();
-
- // Call the handler if it exists.
- if (vector->interruptRegistered) {
- vector->handler(vector->target, vector->refCon,
- vector->nub, vector->source);
- }
- } else {
- // Hard disable the vector if is was only soft disabled.
- vector->interruptDisabledHard = 1;
- disableVectorHard(vectorNumber, vector);
- }
-
- // Done with this vector so, set it back to inactive.
- vector->interruptActive = 0;
- }
-
- return kIOReturnSuccess;
+ IOInterruptVector *vector;
+ int vectorNumber;
+
+ while (1) {
+ // Get vectorNumber from hardware some how and clear the event.
+
+ // Break if there are no more vectors to handle.
+ if (vectorNumber == 0 /*kNoVector*/) {
+ break;
+ }
+
+ // Get the vector's date from the controller's array.
+ vector = &vectors[vectorNumber];
+
+ // Set the vector as active. This store must compleat before
+ // moving on to prevent the disableInterrupt fuction from
+ // geting out of sync.
+ vector->interruptActive = 1;
+ //sync();
+ //isync();
+
+ // If the vector is not disabled soft, handle it.
+ if (!vector->interruptDisabledSoft) {
+ // Prevent speculative exacution as needed on your processor.
+ //isync();
+
+ // Call the handler if it exists.
+ if (vector->interruptRegistered) {
+ vector->handler(vector->target, vector->refCon,
+ vector->nub, vector->source);
+ }
+ } else {
+ // Hard disable the vector if is was only soft disabled.
+ vector->interruptDisabledHard = 1;
+ disableVectorHard(vectorNumber, vector);
+ }
+
+ // Done with this vector so, set it back to inactive.
+ vector->interruptActive = 0;
+ }
+
+ return kIOReturnSuccess;