- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# include/delayed_work.h

Go to the documentation of this file.

    00001
    00044 #ifndef DELAYED_WORK_H_INCLUDED
    00045 #define DELAYED_WORK_H_INCLUDED
    00046
    00047 #include <timer_tc.h>
    00048 #include <workqueue.h>
    00049
    00051 struct delayed_work {
    00053         struct timer_task       timer_task;
    00055         struct timer            *timer;
    00057         struct workqueue        *wq;
    00059         struct workqueue_item   *work;
    00060 };
    00061
    00069 static inline void delayed_work_run_us(struct delayed_work *dw,
    00070                 struct workqueue_item *work, uint32_t delay_us)
    00071 {
    00072         dw->work = work;
    00073         timer_add_task_us(dw->timer, &dw->timer_task, delay_us);
    00074 }
    00075
    00083 extern void delayed_work_init(struct delayed_work *dw,
    00084                 struct timer *timer, struct workqueue *wq);
    00085
    00086 #endif /* DELAYED_WORK_H_INCLUDED */
    00087