summaryrefslogtreecommitdiff
path: root/linux/src/drivers
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-10-08 14:02:12 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:43 +0200
commit951e32daa473b62acd8774a27cab3e09fa4db6ae (patch)
tree4bd3cfdca1732c0a8cedb96a7a0878a69916280d /linux/src/drivers
parent28a9a30f1be07f5262957d879a6a9b311605fae8 (diff)
2006-10-08 Thomas Schwinge <tschwinge@gnu.org>
* linux/dev/drivers/scsi/scsi.h: Move file... * linux/src/drivers/scsi/scsi.h: ... here.
Diffstat (limited to 'linux/src/drivers')
-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
/*