core: Move timer functions into timer.h
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 8 Apr 2011 22:20:26 +0000 (15:20 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Sun, 10 Apr 2011 01:27:06 +0000 (18:27 -0700)
lwip gets symbol conflicts when we include all of core.h
so move the declaration of the timers into their own header
so that we can use those declartions in thread.h and so
we can use thread.h from lwip without having to deal with
symbol conflicts.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
core/include/core.h
core/include/timer.h [new file with mode: 0644]

index d32bacb..034e996 100644 (file)
@@ -5,6 +5,7 @@
 #include <com32.h>
 #include <syslinux/pmapi.h>
 #include <kaboom.h>
+#include <timer.h>
 
 extern char core_xfer_buf[65536];
 extern char core_cache_buf[65536];
@@ -61,22 +62,6 @@ void call16(void (*)(void), const com32sys_t *, com32sys_t *);
 
 
 /*
- * Basic timer function...
- */
-typedef uint32_t jiffies_t;
-extern volatile jiffies_t __jiffies, __ms_timer;
-static inline jiffies_t jiffies(void)
-{
-    return __jiffies;
-}
-typedef uint32_t mstime_t;
-typedef int32_t  mstimediff_t;
-static inline mstime_t ms_timer(void)
-{
-    return __ms_timer;
-}
-
-/*
  * Helper routine to return a specific set of flags
  */
 static inline void set_flags(com32sys_t *regs, uint32_t flags)
diff --git a/core/include/timer.h b/core/include/timer.h
new file mode 100644 (file)
index 0000000..1d66ba7
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef TIMER_H
+#define TIMER_H
+
+/*
+ * Basic timer function...
+ */
+typedef uint32_t jiffies_t;
+extern volatile jiffies_t __jiffies, __ms_timer;
+static inline jiffies_t jiffies(void)
+{
+    return __jiffies;
+}
+
+typedef uint32_t mstime_t;
+typedef int32_t  mstimediff_t;
+static inline mstime_t ms_timer(void)
+{
+    return __ms_timer;
+}
+
+#endif /* TIMER_H */