From 4b19a1a91440525a073a4e6dcc6697867b7f4112 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Sun, 15 Mar 2020 17:58:26 -0400 Subject: [PATCH] Fix #225, Add timer callback context restrictions Comment/document only --- src/os/inc/osapi-os-timer.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/os/inc/osapi-os-timer.h b/src/os/inc/osapi-os-timer.h index 20d338163..e3d4d8121 100644 --- a/src/os/inc/osapi-os-timer.h +++ b/src/os/inc/osapi-os-timer.h @@ -200,9 +200,9 @@ int32 OS_TimeBaseGetFreeRun (uint32 timebase_id, uint32 *freerun_val); * @note clock_accuracy comes from the underlying OS tick value. The nearest integer * microsecond value is returned, so may not be exact. * - * @warning Depending on the OS, the timer_callback function may be similar to an - * interrupt service routine. System calls the cause the code to block are - * generally not supported. + * @warning Depending on the OS, the callback_ptr function may be similar to an + * interrupt service routine. Calls that cause the code to block or require + * an application context (like sending events) are generally not supported. * * @param[out] timer_id The resource ID of the timer object * @param[in] timer_name Name of the timer object @@ -241,6 +241,10 @@ int32 OS_TimerCreate (uint32 *timer_id, const char *timer_name, uint3 * allowing a single opaque argument to be passed to the callback routine. * The OSAL implementation does not use this parameter, and may be set NULL. * + * @warning Depending on the OS, the callback_ptr function may be similar to an + * interrupt service routine. Calls that cause the code to block or require + * an application context (like sending events) are generally not supported. + * * @param[out] timer_id The resource ID of the timer object * @param[in] timer_name Name of the timer object * @param[in] timebase_id The time base resource to use as a reference