From fb5d2aff2401841c5f6631e1371c33a3177bcd95 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 30 Aug 2011 02:44:49 +0200 Subject: Move cdrom_sleep() definition to its original source file * linux/dev/kernel/sched.c (cdrom_sleep): Move to ... * linux/src/drivers/block/ide-cd.c [MACH]: ... here, make it static. Include . --- linux/dev/kernel/sched.c | 10 ---------- linux/src/drivers/block/ide-cd.c | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 12 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 @@ -325,16 +325,6 @@ schedule (void) thread_block (0); } -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..e4548f5 100644 --- a/linux/src/drivers/block/ide-cd.c +++ b/linux/src/drivers/block/ide-cd.c @@ -153,6 +153,10 @@ /***************************************************************************/ +#ifdef MACH +#include +#endif + #include #include #include @@ -1379,10 +1383,19 @@ 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. */ +#ifdef MACH +static +void cdrom_sleep (int time) +{ + int xxx; + + assert_wait ((event_t) &xxx, TRUE); + thread_set_timeout (time); + schedule (); +} +#else static void cdrom_sleep (int time) { -- cgit v1.2.3