summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2011-08-30 02:44:49 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-08-30 22:42:55 +0200
commitfb5d2aff2401841c5f6631e1371c33a3177bcd95 (patch)
treef627ccf236454d0e606929b72bc6b39ba67982b9
parent4267ece6350fb33dc6c07549759d4eb253d6f951 (diff)
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 <kern/sched_prim.h>.
-rw-r--r--linux/dev/kernel/sched.c10
-rw-r--r--linux/src/drivers/block/ide-cd.c17
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
@@ -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..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 <kern/sched_prim.h>
+#endif
+
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/delay.h>
@@ -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)
{