* linux/dev/kernel/sched.c (cdrom_sleep): Move to ... * linux/src/drivers/block/ide-cd.c: ... here, replace [!MACH] definition, and remove conditionals. --- linux/dev/kernel/sched.c | 10 ---------- linux/src/drivers/block/ide-cd.c | 11 ++++++----- 2 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/linux/dev/kernel/sched.c b/linux/dev/kernel/sched.c index 792c2da..7b5c5e4 100644 --- a/linux/dev/kernel/sched.c +++ b/linux/dev/kernel/sched.c @@ -326,16 +326,6 @@ schedule (void) } void -cdrom_sleep (int t) -{ - int xxx; - - assert_wait ((event_t) &xxx, TRUE); - thread_set_timeout (t); - schedule (); -} - -void linux_sched_init (void) { /* diff --git a/linux/src/drivers/block/ide-cd.c b/linux/src/drivers/block/ide-cd.c index 56656cb..a642f38 100644 --- a/linux/src/drivers/block/ide-cd.c +++ b/linux/src/drivers/block/ide-cd.c @@ -153,6 +153,8 @@ /***************************************************************************/ +#include <kern/sched_prim.h> + #include <linux/types.h> #include <linux/kernel.h> #include <linux/delay.h> @@ -1379,18 +1381,17 @@ static void cdrom_do_packet_command (ide_drive_t *drive) cdrom_start_packet_command (drive, len, cdrom_do_pc_continuation); } - -#ifndef MACH /* Sleep for TIME jiffies. Not to be called from an interrupt handler. */ static void cdrom_sleep (int time) { - current->state = TASK_INTERRUPTIBLE; - current->timeout = jiffies + time; + int xxx; + + assert_wait ((event_t) &xxx, TRUE); + thread_set_timeout (time); schedule (); } -#endif static int cdrom_queue_packet_command (ide_drive_t *drive, struct packet_command *pc) -- 1.7.5.4