From e06acc4525e52bf718b447db9e1cd8400d5136c9 Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Sun, 28 Feb 2010 14:15:16 +0000 Subject: [PATCH] Prod the watchdog if waiting for along time --- core/net/mac/phase.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/net/mac/phase.c b/core/net/mac/phase.c index 7f7da34b1..8e8519379 100644 --- a/core/net/mac/phase.c +++ b/core/net/mac/phase.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: phase.c,v 1.1 2010/02/18 20:58:59 adamdunkels Exp $ + * $Id: phase.c,v 1.2 2010/02/28 14:15:16 adamdunkels Exp $ */ /** @@ -101,7 +101,9 @@ phase_wait(struct phase_list *list, expected = now + wait - wait_before; if(!RTIMER_CLOCK_LT(expected, now)) { /* Wait until the receiver is expected to be awake */ - while(RTIMER_CLOCK_LT(RTIMER_NOW(), expected)); + while(RTIMER_CLOCK_LT(RTIMER_NOW(), expected)) { + watchdog_periodic(); + } } } }