From e0c000d0425b1498c9f13fd99eb3a07f3969711f Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Fri, 22 Sep 2023 00:18:05 +0200 Subject: [PATCH] Adding comment for future RTOS/multitasking integration --- drivers/serial.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/serial.c b/drivers/serial.c index c11fd40..dfa3a1c 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -18,6 +18,18 @@ * *************************************************************************** */ +/* + * Note for multitasking and/or real-time OS design : + * Some functions in this driver may spend some time waiting for external + * events or other tasks. + * The concerned functions are serial_write() and serial_flush(). + * These functions should call the scheduler at some point to avoid using more + * time than required or even hang the system. + * Also note that when an uart receives a character this driver will call the + * handler registered by the application (if any). This handler should be kept + * as short as possible, and must not call any OS related function as it will + * be executed within interrupt context. + */ /***************************************************************************** */ -- 2.43.0