riscv-openocd/src/rtos
Antonio Borneo 17f86fdedf rtos: uCOS-III: split struct ucos_iii_params
The static analyser 'sparse' complains about using sizeof() on a
struct that has variable size:
	src/rtos/uCOS-III.c:267:32: warning: using sizeof on a flexible structure
	src/rtos/uCOS-III.c:269:41: warning: using sizeof on a flexible structure
	src/rtos/uCOS-III.c:275:66: warning: using sizeof on a flexible structure
The struct ucos_iii_params contains either constants values for
different target type and variable fields. The last field is an
variable size array, always allocated to UCOS_III_MAX_THREADS
items. It's not practical to fix this size because we would get
too huge initialization in data segment.

Split away from struct ucos_iii_params all the variable fields and
put them in struct ucos_iii_private. Add in the new struct a
pointer to the selected element of ucos_iii_params_list[] and fix
the size of array threads[] to its maximum value; this would be
allocated at run-time, avoiding impacts to data segment.

Change-Id: I569011a257783d35a8795adbda06e942b4157f2a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7678
Tested-by: jenkins
2023-05-18 10:17:18 +00:00
..
FreeRTOS.c rtos/FreeRTOS: some optimization of freertos_update_threads() 2023-04-07 21:44:31 +00:00
Makefile.am rtos/nuttx: add Espressif target support and refactoring 2023-03-25 18:06:08 +00:00
ThreadX.c rtos/ThreadX: added check for NULL-named tasks 2022-11-15 21:35:12 +00:00
chibios.c rtos: with pointers, use NULL instead of 0 2023-05-05 22:09:24 +00:00
chromium-ec.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
eCos.c rtos: move prototype of rtos_thread_packet() in rtos.h 2023-05-18 10:16:32 +00:00
embKernel.c rtos: Fix constness of struct rtos_type 2023-01-28 15:52:25 +00:00
hwthread.c rtos: move prototype of rtos_thread_packet() in rtos.h 2023-05-18 10:16:32 +00:00
linux.c rtos/linux.c: Fix Linux user space border check 2023-04-14 15:16:43 +00:00
linux_header.h openocd: src: add GPL license tag on files that miss it 2022-07-23 13:13:39 +00:00
mqx.c rtos: Fix constness of struct rtos_type 2023-01-28 15:52:25 +00:00
nuttx.c rtos/nuttx: add Espressif target support and refactoring 2023-03-25 18:06:08 +00:00
riot.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
rtkernel.c rtos: Support rt-kernel 2023-01-28 15:52:03 +00:00
rtos.c rtos: move prototype of rtos_thread_packet() in rtos.h 2023-05-18 10:16:32 +00:00
rtos.h rtos: move prototype of rtos_thread_packet() in rtos.h 2023-05-18 10:16:32 +00:00
rtos_chibios_stackings.c rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_chibios_stackings.h rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_ecos_stackings.c rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_ecos_stackings.h rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_embkernel_stackings.c rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_embkernel_stackings.h rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_mqx_stackings.c rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_mqx_stackings.h rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_nuttx_stackings.c rtos/nuttx: add stacking info for Espressif Xtensa chips 2023-01-28 15:51:15 +00:00
rtos_nuttx_stackings.h rtos/nuttx: add Espressif target support and refactoring 2023-03-25 18:06:08 +00:00
rtos_riot_stackings.c rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_riot_stackings.h rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_standard_stackings.c rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_standard_stackings.h rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_ucos_iii_stackings.c rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
rtos_ucos_iii_stackings.h rtos: remove config.h includes from stackings headers 2023-01-28 15:55:36 +00:00
uCOS-III.c rtos: uCOS-III: split struct ucos_iii_params 2023-05-18 10:17:18 +00:00
zephyr.c rtos: Fix constness of struct rtos_type 2023-01-28 15:52:25 +00:00