summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2002-05-21 22:24:15 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-05-21 22:24:15 -0700
commita58a8db0f4be44d14283b337b07e30f7ed26d474 (patch)
tree473f2e14ad7a103d2325ba7eecff683cca7bf669 /include/linux
parent57078435cabebaad6c4590e1340c01e3c17a46a8 (diff)
[PATCH] jiffies.h
Trivial patch update against 2.5.17: Tim Schmielau <tim@physik3.uni-rostock.de>: move jiffies from sched.h to it's own jiffies.h: Move 'jiffies' from sched.h to their own header. Then pull the sched.h dependency from 67 files that include sched.h for no apparent reason other than the jiffies declaration. Move the time_[before,after}{_eq}() macros from timer.h to jiffies.h, since there are *no* files using them that don't also use jiffies. Many more sched.h dependencies can be killed after capable(), request_irq(), and free_irq() are moved out of <linux/sched.h>. Tim Schmielau <tim@physik3.uni-rostock.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/jiffies.h30
-rw-r--r--include/linux/sched.h7
-rw-r--r--include/linux/timer.h19
3 files changed, 31 insertions, 25 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
new file mode 100644
index 000000000000..a33b2bcfc625
--- /dev/null
+++ b/include/linux/jiffies.h
@@ -0,0 +1,30 @@
+#ifndef _LINUX_JIFFIES_H
+#define _LINUX_JIFFIES_H
+
+/*
+ * The 64-bit value is not volatile - you MUST NOT read it
+ * without holding read_lock_irq(&xtime_lock)
+ */
+extern u64 jiffies_64;
+extern unsigned long volatile jiffies;
+
+/*
+ * These inlines deal with timer wrapping correctly. You are
+ * strongly encouraged to use them
+ * 1. Because people otherwise forget
+ * 2. Because if the timer wrap changes in future you wont have to
+ * alter your driver code.
+ *
+ * time_after(a,b) returns true if the time a is after time b.
+ *
+ * Do this with "<0" and ">=0" to only test the sign of the result. A
+ * good compiler would generate better code (and a really good compiler
+ * wouldn't care). Gcc is currently neither.
+ */
+#define time_after(a,b) ((long)(b) - (long)(a) < 0)
+#define time_before(a,b) time_after(b,a)
+
+#define time_after_eq(a,b) ((long)(a) - (long)(b) >= 0)
+#define time_before_eq(a,b) time_after_eq(b,a)
+
+#endif
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 067c93387b77..743b1aea2aca 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -13,6 +13,7 @@ extern unsigned long event;
#include <linux/types.h>
#include <linux/times.h>
#include <linux/timex.h>
+#include <linux/jiffies.h>
#include <linux/rbtree.h>
#include <linux/thread_info.h>
@@ -481,12 +482,6 @@ extern void free_uid(struct user_struct *);
#include <asm/current.h>
-/*
- * The 64-bit value is not volatile - you MUST NOT read it
- * without holding read_lock_irq(&xtime_lock)
- */
-extern u64 jiffies_64;
-extern unsigned long volatile jiffies;
extern unsigned long itimer_ticks;
extern unsigned long itimer_next;
extern void do_timer(struct pt_regs *);
diff --git a/include/linux/timer.h b/include/linux/timer.h
index c4f01ada5975..d6f0ce5f8740 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -52,23 +52,4 @@ static inline int timer_pending (const struct timer_list * timer)
return timer->list.next != NULL;
}
-/*
- * These inlines deal with timer wrapping correctly. You are
- * strongly encouraged to use them
- * 1. Because people otherwise forget
- * 2. Because if the timer wrap changes in future you wont have to
- * alter your driver code.
- *
- * time_after(a,b) returns true if the time a is after time b.
- *
- * Do this with "<0" and ">=0" to only test the sign of the result. A
- * good compiler would generate better code (and a really good compiler
- * wouldn't care). Gcc is currently neither.
- */
-#define time_after(a,b) ((long)(b) - (long)(a) < 0)
-#define time_before(a,b) time_after(b,a)
-
-#define time_after_eq(a,b) ((long)(a) - (long)(b) >= 0)
-#define time_before_eq(a,b) time_after_eq(b,a)
-
#endif