[syslinux:lwip] core: Move timer functions into timer.h

syslinux-bot for Eric W. Biederman ebiederm at xmission.com
Fri Apr 22 20:05:09 PDT 2011


Commit-ID:  71b54fdaeb8b82293f1a19df401b3645d8096144
Gitweb:     http://syslinux.zytor.com/commit/71b54fdaeb8b82293f1a19df401b3645d8096144
Author:     Eric W. Biederman <ebiederm at xmission.com>
AuthorDate: Fri, 8 Apr 2011 15:20:26 -0700
Committer:  Eric W. Biederman <ebiederm at xmission.com>
CommitDate: Sat, 9 Apr 2011 18:27:06 -0700

core: Move timer functions into timer.h

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 at xmission.com>


---
 core/include/core.h  |   17 +----------------
 core/include/timer.h |   21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/core/include/core.h b/core/include/core.h
index d32bacb..034e996 100644
--- a/core/include/core.h
+++ b/core/include/core.h
@@ -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
index 0000000..1d66ba7
--- /dev/null
+++ b/core/include/timer.h
@@ -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 */



More information about the Syslinux-commits mailing list