header fix for 2.6.23-rt3
PATCH 1/1 header fix for 2.6.23-rt3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Steven/Peter,
There's a circular include problem with sched.h -> aio.h -> workqueues.h that manifests in a couple of modules (net/rfkill/rfkill.c and drivers/hwmon/applesmc.c).
The attached patch factors out the priority #defines into <linux/sched_prio.h> which is then included by <linux/sched.h> and <linux/workqueues.h>.
Clark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFHIMmTHyuj/+TTEp0RAj7uAJ95P4Pw44UC4iT2hhBy1D8K2JrfxQCdFax1 3Zsfku5WEMILcRxZCalkxe4=
=rc5L
-----END PGP SIGNATURE-----
factor out priorities for workqueue.h and sched.h
From: Clark Williams <[email protected]>
This fixes a circular dependency between sched.h and workqueue.h by factoring out the common defines to a new header which is included by both
---
include/linux/sched.h | 19 +------------------ include/linux/sched_prio.h | 23 +++++++++++++++++++++++ include/linux/workqueue.h | 1 + 3 files changed, 25 insertions(+), 18 deletions(-)
include/linux/sched.h +1 -18
@@ -1428,24 +1428,7 @@ struct task_struct {# define set_printk_might_sleep (x) do { } while(0)#endif -/* -* Priority of a process goes from 0..MAX_PRIO-1, valid RT -* priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH -* 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 -* priority to a value higher than any user task. Note: -* MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. -*/ - -#define MAX_USER_RT_PRIO 100 -#define MAX_RT_PRIO MAX_USER_RT_PRIO - -#define MAX_PRIO (MAX_RT_PRIO + 40) -#define DEFAULT_PRIO (MAX_RT_PRIO + 20) +#include <linux/sched_prio.h> static inline int rt_prio (int prio) {
include/linux/sched_prio.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef __SCHED_PRIO_H +#define __SCHED_PRIO_H + +/* +* Priority of a process goes from 0..MAX_PRIO-1, valid RT +* priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH +* 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 +* priority to a value higher than any user task. Note: +* MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. +*/ + +#define MAX_USER_RT_PRIO 100 +#define MAX_RT_PRIO MAX_USER_RT_PRIO + +#define MAX_PRIO (MAX_RT_PRIO + 40) +#define DEFAULT_PRIO (MAX_RT_PRIO + 20) + +#endif
include/linux/workqueue.h +1 -0
@@ -9,6 +9,7 @@#include <linux/linkage.h> #include <linux/bitops.h> #include <linux/plist.h> +#include <linux/sched_prio.h> #include <asm/atomic.h> struct workqueue_struct ;