[Bugfix rtems-lwip 2/4] Fix definition of vTaskDelay(x)
Bernd Moessner
berndmoessner80 at gmail.com
Sun Mar 31 22:49:22 UTC 2024
FreeRTOS's vTaskDelay(x) is the FreeRTOS equivalent to
rtems_task_wake_after(x), it suspends a task for x Ticks.
The previously used sys_arch_delay(x) would add x/10 before
passing it to rtems_task_wake_after. Due to the fact that
portTICK_RATE_MS was set to wrong value the previous impl
always called with rtems_task_wake_after(1).
---
rtemslwip/xilinx/xlwipopts.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rtemslwip/xilinx/xlwipopts.h b/rtemslwip/xilinx/xlwipopts.h
index 23b942f..8befd67 100644
--- a/rtemslwip/xilinx/xlwipopts.h
+++ b/rtemslwip/xilinx/xlwipopts.h
@@ -30,6 +30,6 @@
/* These macros allow RTEMS to pretend to be FreeRTOS for Xilinx drivers */
#define tskIDLE_PRIORITY RTEMS_MAXIMUM_PRIORITY
#define portTICK_RATE_MS (1000 / rtems_clock_get_ticks_per_second())
-#define vTaskDelay(x) sys_arch_delay(x)
+#define vTaskDelay(x) rtems_task_wake_after(x)
#endif /* __XLWIPOPTS_H__ */
--
2.34.1
More information about the devel
mailing list