summaryrefslogtreecommitdiff
path: root/cesar/bsu/src/bsu.c
diff options
context:
space:
mode:
authorlaranjeiro2010-07-22 08:40:36 +0000
committerlaranjeiro2010-07-22 08:40:36 +0000
commit52b333286f88ee9869b3d056c90dffe21ed81417 (patch)
treea39e59683f0db3c99016b4e153af2eaca08077e5 /cesar/bsu/src/bsu.c
parente17d1a3fc613e6b7fc32793adaf95f9104d9edd1 (diff)
cesar/bsu/beacon: add permanent schedules define
Use it when decreasing the countdowns too. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7303 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/bsu/src/bsu.c')
-rw-r--r--cesar/bsu/src/bsu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cesar/bsu/src/bsu.c b/cesar/bsu/src/bsu.c
index 195fceae50..0b8403d07c 100644
--- a/cesar/bsu/src/bsu.c
+++ b/cesar/bsu/src/bsu.c
@@ -157,9 +157,12 @@ bsu_schedules_merge_process_init (bsu_t *ctx, bsu_beacon_schedules_t *sched,
/* Persistent schedules position index. */
for (i = 0; i < sched->ps.nb; i++)
{
- if (sched->ps.ps[i].pscd <= beacon_period_index
- && (u32) (sched->ps.ps[i].pscd + sched->ps.ps[i].cscd)
- >= beacon_period_index)
+ if ((sched->ps.ps[i].pscd <= beacon_period_index
+ && (u32) (sched->ps.ps[i].pscd + sched->ps.ps[i].cscd)
+ >= beacon_period_index)
+ || (sched->ps.ps[i].pscd == 0
+ && sched->ps.ps[i].cscd ==
+ BSU_BEACON_PERSISTENT_SCHEDULES_PERMANENT_COUNTDOWN))
{
proc->ps = &sched->ps.ps[i];
proc->ps_alloc_index = 0;