mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-01-11 18:33:16 +01:00
Fixed:Can't register the same timer again at timeout handle function
This commit is contained in:
@@ -488,6 +488,7 @@ static void atomTimerCallbacks (void)
|
|||||||
next_ptr = callback_list_head;
|
next_ptr = callback_list_head;
|
||||||
while (next_ptr)
|
while (next_ptr)
|
||||||
{
|
{
|
||||||
|
saved_next_ptr = next_ptr->next_timer;
|
||||||
/* Call the registered callback */
|
/* Call the registered callback */
|
||||||
if (next_ptr->cb_func)
|
if (next_ptr->cb_func)
|
||||||
{
|
{
|
||||||
@@ -495,7 +496,7 @@ static void atomTimerCallbacks (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Move on to the next callback in the list */
|
/* Move on to the next callback in the list */
|
||||||
next_ptr = next_ptr->next_timer;
|
next_ptr = saved_next_ptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user