- int producerId = (int) inProducerId;
- TestDeviceAction command;
- int i;
-
- semaphore_wait(completeSema);
-
- if (producerId & 1)
- command = (TestDeviceAction) sDevice->producer1Action;
- else
- command = (TestDeviceAction) sDevice->producer2Action;
-
- for (i = 0; i < 5 * (producerId << 1); i++) {
- sDevice->enqueueCommand
- (true, command, i, (void *) (i % (producerId + 1)));
- if ( !(i % (producerId + 1)) )
- /* cthread_yield() */;
- logPrintf(("TestDevice(%d): %d\n", producerId, i));
- }
-
- logPrintf(("TestDevice: producer %d exiting\n", producerId));
- semaphore_signal(completeSema);
-
- IOExitThread(producerId);
+ int producerId = (int) inProducerId;
+ TestDeviceAction command;
+ int i;
+
+ semaphore_wait(completeSema);
+
+ if (producerId & 1) {
+ command = (TestDeviceAction) sDevice->producer1Action;
+ } else {
+ command = (TestDeviceAction) sDevice->producer2Action;
+ }
+
+ for (i = 0; i < 5 * (producerId << 1); i++) {
+ sDevice->enqueueCommand
+ (true, command, i, (void *) (i % (producerId + 1)));
+ if (!(i % (producerId + 1))) {
+ /* cthread_yield() */;
+ }
+ logPrintf(("TestDevice(%d): %d\n", producerId, i));
+ }
+
+ logPrintf(("TestDevice: producer %d exiting\n", producerId));
+ semaphore_signal(completeSema);
+
+ IOExitThread(producerId);