mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-25 08:21:08 +00:00
dde_oss: use dde_kit_timer_ticks
The Linux-specific 'jiffies' symbol was removed from dde_kit in 35239b8
.
Fixes #1302.
This commit is contained in:
parent
038a7999bf
commit
f60e2af21f
@ -181,7 +181,7 @@ enum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define HZ DDE_KIT_HZ
|
#define HZ DDE_KIT_HZ
|
||||||
#define GET_JIFFIES() jiffies
|
#define GET_JIFFIES() dde_kit_timer_ticks
|
||||||
|
|
||||||
|
|
||||||
#define MUTEX_INIT(osdev, mutex, hier)
|
#define MUTEX_INIT(osdev, mutex, hier)
|
||||||
|
@ -41,11 +41,11 @@ static Timer::Connection _timer;
|
|||||||
|
|
||||||
void oss_udelay(unsigned long usecs)
|
void oss_udelay(unsigned long usecs)
|
||||||
{
|
{
|
||||||
unsigned long start = jiffies;
|
unsigned long start = GET_JIFFIES();
|
||||||
/* check for IRQs etc */
|
/* check for IRQs etc */
|
||||||
Service_handler::s()->check_signal(false);
|
Service_handler::s()->check_signal(false);
|
||||||
|
|
||||||
unsigned delta = (jiffies - start) * 10000;
|
unsigned delta = (GET_JIFFIES() - start) * 10000;
|
||||||
|
|
||||||
/* return if already expired */
|
/* return if already expired */
|
||||||
if (delta > usecs)
|
if (delta > usecs)
|
||||||
@ -187,12 +187,12 @@ extern "C" int oss_sleep(struct oss_wait_queue *wq, oss_mutex_t * mutex, int tic
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
wq->blocked = 1;
|
wq->blocked = 1;
|
||||||
unsigned long start = jiffies;
|
unsigned long start = GET_JIFFIES();
|
||||||
|
|
||||||
while (wq->blocked) {
|
while (wq->blocked) {
|
||||||
Irq::check_irq(true);
|
Irq::check_irq(true);
|
||||||
|
|
||||||
if (jiffies - start > (unsigned long)ticks) {
|
if (GET_JIFFIES() - start > (unsigned long)ticks) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user