forked from KolibriOS/kolibrios
ddk: update
git-svn-id: svn://kolibrios.org@4125 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -94,7 +94,7 @@ int queue_delayed_work(struct workqueue_struct *wq,
|
||||
// dbgprintf("%s %p queue: %p\n", __FUNCTION__, &dwork->work, wq);
|
||||
|
||||
work->data = wq;
|
||||
TimerHs(delay,0, delayed_work_timer_fn, dwork);
|
||||
TimerHS(delay,0, delayed_work_timer_fn, dwork);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -104,3 +104,20 @@ bool schedule_delayed_work(struct delayed_work *dwork, unsigned long delay)
|
||||
return queue_delayed_work(system_wq, dwork, delay);
|
||||
}
|
||||
|
||||
int mod_timer(struct timer_list *timer, unsigned long expires)
|
||||
{
|
||||
int ret = 0;
|
||||
expires - GetTimerTicks();
|
||||
|
||||
if(timer->handle)
|
||||
{
|
||||
CancelTimerHS(timer->handle);
|
||||
timer->handle = 0;
|
||||
ret = 1;
|
||||
};
|
||||
|
||||
timer->handle = TimerHS(expires, 0, timer->function, timer->data);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user