summaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorOleg Nesterov2006-09-29 11:00:49 +0200
committerLinus Torvalds2006-09-29 18:18:17 +0200
commit57a6f51c4281aa3119975473c70dce0480d322bd (patch)
tree05d22c0c64fc9de38554b6aca24b021a81479975 /include/linux/sched.h
parent[PATCH] do_sched_setscheduler(): don't take tasklist_lock (diff)
downloadkernel-qcow2-linux-57a6f51c4281aa3119975473c70dce0480d322bd.tar.gz
kernel-qcow2-linux-57a6f51c4281aa3119975473c70dce0480d322bd.tar.xz
kernel-qcow2-linux-57a6f51c4281aa3119975473c70dce0480d322bd.zip
[PATCH] introduce is_rt_policy() helper
Imho, makes the code a bit easier to read. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 503dea61ff99..fbc69cc3923d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -504,8 +504,8 @@ struct signal_struct {
#define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO)
#define rt_task(p) rt_prio((p)->prio)
#define batch_task(p) (unlikely((p)->policy == SCHED_BATCH))
-#define has_rt_policy(p) \
- unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH)
+#define is_rt_policy(p) ((p) != SCHED_NORMAL && (p) != SCHED_BATCH)
+#define has_rt_policy(p) unlikely(is_rt_policy((p)->policy))
/*
* Some day this will be a full-fledged user tracking system..