From 95b238fc867da32f28c74b98b793fbd40345b595 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 25 Sep 2007 18:41:39 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@23 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/include/delta.h | 14 ++++++++++++++ src/include/threads.h | 5 ++--- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/delta.h b/src/include/delta.h index 2ae4d887f..14f5b550e 100644 --- a/src/include/delta.h +++ b/src/include/delta.h @@ -69,6 +69,20 @@ typedef struct { extern DeltaList dlist; +#define chVTDoTickI() \ + if (&dlist != (DeltaList *)dlist.dl_next) { \ + VirtualTimer *vtp; \ + \ + --dlist.dl_next->vt_dtime; \ + while (!(vtp = dlist.dl_next)->vt_dtime) { \ + t_vtfunc fn = vtp->vt_func; \ + vtp->vt_func = 0; \ + vtp->vt_prev->vt_next = vtp->vt_next; \ + vtp->vt_next->vt_prev = vtp->vt_prev; \ + fn(vtp->vt_par); \ + } \ + } + /* * Virtual Timers APIs. */ diff --git a/src/include/threads.h b/src/include/threads.h index d8937433f..f170ce368 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -80,7 +80,7 @@ struct Thread { #endif }; /** Machine dependent processor context.*/ - Context p_ctx; + Context p_ctx; /* * Start of the optional fields. Note, the null thread may also let its * stack overwrite the following fields since it never uses semaphores, @@ -104,9 +104,8 @@ struct Thread { #endif #ifdef CH_USE_RT_SEMAPHORES /** Priority backup after acquiring a RT semaphore.*/ - t_prio p_bakprio; /** RT semaphores depth counter.*/ - WORD16 p_rtcnt; + int p_rtcnt; #endif }; -- cgit v1.2.3