From: Eric W. Biederman Date: Fri, 8 Apr 2011 22:20:26 +0000 (-0700) Subject: core: Move timer functions into timer.h X-Git-Tag: syslinux-4.10-pre1~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71b54fdaeb8b82293f1a19df401b3645d8096144;p=platform%2Fupstream%2Fsyslinux.git 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 --- 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 #include #include +#include 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 */