From 1b8681efa4eda5df3efddf42f3442c63ec1f547e Mon Sep 17 00:00:00 2001 From: Kelvin Lawson Date: Tue, 1 Oct 2013 21:57:23 +0100 Subject: [PATCH] atomtimer: Add note regarding timer callback registrations from within timer callbacks. --- kernel/atomtimer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/atomtimer.c b/kernel/atomtimer.c index 3693295..68c3fed 100755 --- a/kernel/atomtimer.c +++ b/kernel/atomtimer.c @@ -117,6 +117,12 @@ static void atomTimerDelayCallback (POINTER cb_data); * through the time list, so the potential execution cycles cannot be * determined in advance. * + * Note that although the function can be called from interrupt context, + * it should not be called in the context of a timer callback interrupt. + * It modifies the internal timer list, and timer callbacks happen while + * walking the timer list, so you should not register a new timer in + * another timer's callback routine. + * * @param[in] timer_ptr Pointer to timer descriptor * * @retval ATOM_OK Success