diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-12 02:21:00 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-12 02:21:00 -0700 |
| commit | 0d61fc5ea78015def4d2fcf9b598ecfe25210cdd (patch) | |
| tree | a45aa0f67c6bbd200dc2a328e560042810307b1b /include/linux/raid/md_k.h | |
| parent | f2eb250f07ba4695c2474cb8b6edbf64b5457d65 (diff) | |
| parent | eb880e5457f8b4a61ff7fd36d47dd14fe51cb030 (diff) | |
Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'include/linux/raid/md_k.h')
| -rw-r--r-- | include/linux/raid/md_k.h | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index bea64b0fb6c1..0b6b5e6f34eb 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -315,7 +315,7 @@ typedef struct mdk_thread_s { #define THREAD_WAKEUP 0 -#define __wait_event_lock_irq(wq, condition, lock) \ +#define __wait_event_lock_irq(wq, condition, lock, cmd) \ do { \ wait_queue_t __wait; \ init_waitqueue_entry(&__wait, current); \ @@ -326,7 +326,7 @@ do { \ if (condition) \ break; \ spin_unlock_irq(&lock); \ - blk_run_queues(); \ + cmd; \ schedule(); \ spin_lock_irq(&lock); \ } \ @@ -334,36 +334,11 @@ do { \ remove_wait_queue(&wq, &__wait); \ } while (0) -#define wait_event_lock_irq(wq, condition, lock) \ +#define wait_event_lock_irq(wq, condition, lock, cmd) \ do { \ if (condition) \ break; \ - __wait_event_lock_irq(wq, condition, lock); \ -} while (0) - - -#define __wait_disk_event(wq, condition) \ -do { \ - wait_queue_t __wait; \ - init_waitqueue_entry(&__wait, current); \ - \ - add_wait_queue(&wq, &__wait); \ - for (;;) { \ - set_current_state(TASK_UNINTERRUPTIBLE); \ - if (condition) \ - break; \ - blk_run_queues(); \ - schedule(); \ - } \ - current->state = TASK_RUNNING; \ - remove_wait_queue(&wq, &__wait); \ -} while (0) - -#define wait_disk_event(wq, condition) \ -do { \ - if (condition) \ - break; \ - __wait_disk_event(wq, condition); \ + __wait_event_lock_irq(wq, condition, lock, cmd); \ } while (0) #endif |
