git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@337 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
4507047a83
commit
17238a46df
|
@ -53,16 +53,14 @@ struct VirtualTimer {
|
||||||
* Delta List header.
|
* Delta List header.
|
||||||
* @note The delta list is implemented as a double link bidirectional list in
|
* @note The delta list is implemented as a double link bidirectional list in
|
||||||
* order to make the unlink time constant, the reset of a virtual timer
|
* order to make the unlink time constant, the reset of a virtual timer
|
||||||
* is often used in the code. An slower implementation using a single
|
* is often used in the code.
|
||||||
* link list is possible and might be added later with a
|
|
||||||
* \p CH_OPTIMIZE_SPACE option.
|
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/** Next timer in the list (the one that will be triggered next).*/
|
/** Next timer in the list (the one that will be triggered next).*/
|
||||||
VirtualTimer *dl_next;
|
VirtualTimer *dl_next;
|
||||||
/** Last timer in the list.*/
|
/** Last timer in the list.*/
|
||||||
VirtualTimer *dl_prev;
|
VirtualTimer *dl_prev;
|
||||||
/** Not used but it must be set to /p MAXDELTA.*/
|
/** Not used but it must be set to -1.*/
|
||||||
systime_t dl_dtime;
|
systime_t dl_dtime;
|
||||||
} DeltaList;
|
} DeltaList;
|
||||||
|
|
||||||
|
@ -75,7 +73,7 @@ extern DeltaList dlist;
|
||||||
--dlist.dl_next->vt_dtime; \
|
--dlist.dl_next->vt_dtime; \
|
||||||
while (!(vtp = dlist.dl_next)->vt_dtime) { \
|
while (!(vtp = dlist.dl_next)->vt_dtime) { \
|
||||||
vtfunc_t fn = vtp->vt_func; \
|
vtfunc_t fn = vtp->vt_func; \
|
||||||
vtp->vt_func = 0; \
|
vtp->vt_func = NULL; \
|
||||||
(vtp->vt_next->vt_prev = (void *)&dlist)->vt_next = vtp->vt_next; \
|
(vtp->vt_next->vt_prev = (void *)&dlist)->vt_next = vtp->vt_next; \
|
||||||
fn(vtp->vt_par); \
|
fn(vtp->vt_par); \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Reference in New Issue