summaryrefslogtreecommitdiff
path: root/linux/src
diff options
context:
space:
mode:
Diffstat (limited to 'linux/src')
-rw-r--r--linux/src/drivers/scsi/scsi.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/linux/src/drivers/scsi/scsi.h b/linux/src/drivers/scsi/scsi.h
index c3dfcd4..13052ba 100644
--- a/linux/src/drivers/scsi/scsi.h
+++ b/linux/src/drivers/scsi/scsi.h
@@ -591,6 +591,24 @@ static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors
}
#endif
+#ifdef MACH
+#define SCSI_SLEEP(QUEUE, CONDITION) { \
+ if (CONDITION) { \
+ struct wait_queue wait = { NULL, NULL}; \
+ add_wait_queue(QUEUE, &wait); \
+ for(;;) { \
+ if (CONDITION) { \
+ if (intr_count) \
+ panic("scsi: trying to call schedule() in interrupt" \
+ ", file %s, line %d.\n", __FILE__, __LINE__); \
+ schedule(); \
+ } \
+ else \
+ break; \
+ } \
+ remove_wait_queue(QUEUE, &wait);\
+ }; }
+#else /* !MACH */
#define SCSI_SLEEP(QUEUE, CONDITION) { \
if (CONDITION) { \
struct wait_queue wait = { current, NULL}; \
@@ -609,7 +627,7 @@ static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors
remove_wait_queue(QUEUE, &wait);\
current->state = TASK_RUNNING; \
}; }
-
+#endif /* !MACH */
#endif
/*