ddk: update

git-svn-id: svn://kolibrios.org@4125 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2013-10-29 07:49:21 +00:00
parent 2b454bada8
commit 5527aca48a
5 changed files with 44 additions and 12 deletions

View File

@@ -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;
}