* [PATCH][plugsched 21/28] Move private macro
@ 2004-10-30 14:40 Con Kolivas
0 siblings, 0 replies; only message in thread
From: Con Kolivas @ 2004-10-30 14:40 UTC (permalink / raw)
To: linux
Cc: Andrew Morton, Ingo Molnar, Peter Williams, William Lee Irwin III,
Alexander Nyberg, Nick Piggin
[-- Attachment #1.1: Type: text/plain, Size: 20 bytes --]
Move private macro
[-- Attachment #1.2: move_ingosched_macros.diff --]
[-- Type: text/x-patch, Size: 2138 bytes --]
Take the MAX_PRIO macro and comments out of sched.h to allow more
flexible range of dynamic priorities and scheduler designs.
Signed-off-by: Con Kolivas <kernel@kolivas.org>
Index: linux-2.6.10-rc1-mm2-plugsched1/include/linux/sched.h
===================================================================
--- linux-2.6.10-rc1-mm2-plugsched1.orig/include/linux/sched.h 2004-10-29 21:47:52.739595073 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/include/linux/sched.h 2004-10-29 21:48:10.494824131 +1000
@@ -328,11 +328,6 @@ struct signal_struct {
};
/*
- * Priority of a process goes from 0..MAX_PRIO-1, valid RT
- * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL tasks are
- * in the range MAX_RT_PRIO..MAX_PRIO-1. Priority values
- * are inverted: lower p->prio value means higher priority.
- *
* The MAX_USER_RT_PRIO value allows the actual maximum
* RT priority to be separate from the value exported to
* user-space. This allows kernel threads to set their
@@ -343,8 +338,6 @@ struct signal_struct {
#define MAX_USER_RT_PRIO 100
#define MAX_RT_PRIO MAX_USER_RT_PRIO
-#define MAX_PRIO (MAX_RT_PRIO + 40)
-
extern int rt_task(task_t *p);
/*
@@ -515,6 +508,8 @@ struct mempolicy;
#include <linux/scheduler.h>
+extern struct sched_drv *scheduler;
+
struct task_struct {
volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
struct thread_info *thread_info;
Index: linux-2.6.10-rc1-mm2-plugsched1/kernel/sched.c
===================================================================
--- linux-2.6.10-rc1-mm2-plugsched1.orig/kernel/sched.c 2004-10-29 21:48:08.237176468 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/kernel/sched.c 2004-10-29 21:48:10.495823975 +1000
@@ -59,6 +59,15 @@
#endif
/*
+ * Priority of a process goes from 0..MAX_PRIO-1, valid RT
+ * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL tasks are
+ * in the range MAX_RT_PRIO..MAX_PRIO-1. Priority values
+ * are inverted: lower p->prio value means higher priority.
+ */
+
+#define MAX_PRIO (MAX_RT_PRIO + 40)
+
+/*
* Convert user-nice values [ -20 ... 0 ... 19 ]
* to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
* and back.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-30 15:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-30 14:40 [PATCH][plugsched 21/28] Move private macro Con Kolivas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).