mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
dde_kit: remove jiffies alias
The alias is rather Linux-specific and also prevents particularly tailored jiffies implementations. For the existing dde_linux ports (usb and lxip) we just define jiffies to be dde_kit_timer_ticks with a preprocessor macro.
This commit is contained in:
parent
6244c6ec97
commit
35239b84df
@ -351,6 +351,30 @@ enum { true = 1, false = 0 };
|
||||
#define __bitwise
|
||||
|
||||
|
||||
/*********************
|
||||
** linux/jiffies.h **
|
||||
*********************/
|
||||
|
||||
/* we directly map 'jiffies' to 'dde_kit_timer_ticks' */
|
||||
#define jiffies dde_kit_timer_ticks
|
||||
|
||||
extern volatile unsigned long jiffies;
|
||||
|
||||
enum { INITIAL_JIFFIES = 0 };
|
||||
|
||||
unsigned int jiffies_to_msecs(const unsigned long);
|
||||
unsigned int jiffies_to_usecs(const unsigned long);
|
||||
unsigned long msecs_to_jiffies(const unsigned int);
|
||||
|
||||
long time_after(long a, long b);
|
||||
long time_after_eq(long a, long b);
|
||||
|
||||
static inline long time_before(long a, long b) { return time_after(b, a); }
|
||||
static inline long time_before_eq(long a, long b) { return time_after_eq(b ,a); }
|
||||
|
||||
clock_t jiffies_to_clock_t(unsigned long);
|
||||
|
||||
|
||||
/******************
|
||||
** linux/kmod.h **
|
||||
******************/
|
||||
@ -1255,27 +1279,6 @@ struct rw_semaphore { int dummy; };
|
||||
|
||||
|
||||
|
||||
/*********************
|
||||
** linux/jiffies.h **
|
||||
*********************/
|
||||
|
||||
extern volatile unsigned long jiffies;
|
||||
|
||||
enum { INITIAL_JIFFIES = 0 };
|
||||
|
||||
unsigned int jiffies_to_msecs(const unsigned long);
|
||||
unsigned int jiffies_to_usecs(const unsigned long);
|
||||
unsigned long msecs_to_jiffies(const unsigned int);
|
||||
|
||||
long time_after(long a, long b);
|
||||
long time_after_eq(long a, long b);
|
||||
|
||||
static inline long time_before(long a, long b) { return time_after(b, a); }
|
||||
static inline long time_before_eq(long a, long b) { return time_after_eq(b ,a); }
|
||||
|
||||
clock_t jiffies_to_clock_t(unsigned long);
|
||||
|
||||
|
||||
/******************
|
||||
** linux/time.h **
|
||||
******************/
|
||||
|
@ -295,6 +295,22 @@ typedef unsigned short ushort;
|
||||
|
||||
#define __printf(a, b) __attribute__((format(printf, a, b)))
|
||||
|
||||
|
||||
/*********************
|
||||
** linux/jiffies.h **
|
||||
*********************/
|
||||
|
||||
/* we directly map 'jiffies' to 'dde_kit_timer_ticks' */
|
||||
#define jiffies dde_kit_timer_ticks
|
||||
|
||||
extern volatile unsigned long jiffies;
|
||||
unsigned long msecs_to_jiffies(const unsigned int m);
|
||||
unsigned int jiffies_to_msecs(const unsigned long j);
|
||||
long time_after(long a, long b);
|
||||
long time_after_eq(long a, long b);
|
||||
long time_before(long a, long b);
|
||||
|
||||
|
||||
/***********************
|
||||
** linux/irqreturn.h **
|
||||
***********************/
|
||||
@ -979,21 +995,6 @@ void up_write(struct rw_semaphore *sem);
|
||||
#define __RWSEM_INITIALIZER(name) { 0 }
|
||||
|
||||
|
||||
/*********************
|
||||
** linux/jiffies.h **
|
||||
*********************/
|
||||
|
||||
/*
|
||||
* XXX check how the jiffies variable is used
|
||||
*/
|
||||
extern volatile unsigned long jiffies;
|
||||
unsigned long msecs_to_jiffies(const unsigned int m);
|
||||
unsigned int jiffies_to_msecs(const unsigned long j);
|
||||
long time_after(long a, long b);
|
||||
long time_after_eq(long a, long b);
|
||||
long time_before(long a, long b);
|
||||
|
||||
|
||||
/******************
|
||||
** linux/time.h **
|
||||
******************/
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
/** Timer tick (global symbol) */
|
||||
extern volatile unsigned long dde_kit_timer_ticks;
|
||||
extern volatile unsigned long jiffies;
|
||||
|
||||
/** Timer tick rate */
|
||||
enum { DDE_KIT_HZ = 100 };
|
||||
|
@ -274,7 +274,7 @@ extern "C" void dde_kit_thread_msleep(unsigned long msecs)
|
||||
Lock *lock;
|
||||
struct dde_kit_timer *timer;
|
||||
|
||||
unsigned long timeout = jiffies + (msecs * DDE_KIT_HZ) / 1000;
|
||||
unsigned long timeout = dde_kit_timer_ticks + (msecs * DDE_KIT_HZ) / 1000;
|
||||
|
||||
lock = new (env()->heap()) Lock(Lock::LOCKED);
|
||||
timer = dde_kit_timer_add(_wake_up_msleep, lock, timeout);
|
||||
|
@ -30,7 +30,6 @@ using namespace Genode;
|
||||
************************/
|
||||
|
||||
volatile unsigned long dde_kit_timer_ticks;
|
||||
extern "C" volatile unsigned long jiffies __attribute__ ((alias ("dde_kit_timer_ticks")));
|
||||
|
||||
|
||||
/***************************
|
||||
|
@ -34,6 +34,9 @@ extern "C" {
|
||||
#include <dde_kit/panic.h>
|
||||
}
|
||||
|
||||
/* we directly map 'jiffies' to 'dde_kit_timer_ticks' */
|
||||
#define jiffies dde_kit_timer_ticks
|
||||
|
||||
|
||||
static Timer::Session_client *timer = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user