[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/17] Move cdrom_sleep() definition where it belongs
From: |
Guillem Jover |
Subject: |
[PATCH 15/17] Move cdrom_sleep() definition where it belongs |
Date: |
Thu, 25 Aug 2011 15:22:38 +0200 |
* 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
- [PATCH v2 02/17] Add silent rules support if available and disable it by default, (continued)
[PATCH 14/17] Fix initialization from incompatible pointer type, Guillem Jover, 2011/08/25
[PATCH 07/17] Add prototype for log function, Guillem Jover, 2011/08/25
[PATCH 17/17] Initialize the new map entry when it's a projected buffer, Guillem Jover, 2011/08/25
[PATCH 12/17] Disable unused variables, Guillem Jover, 2011/08/25
[PATCH 15/17] Move cdrom_sleep() definition where it belongs,
Guillem Jover <=
[PATCH 11/17] Remove unused variables, Guillem Jover, 2011/08/25
[PATCH 10/17] Remove ident tags producing preprocessor warnings, Guillem Jover, 2011/08/25
[PATCH 09/17] Add header for printf prototype, Guillem Jover, 2011/08/25