]> www.infradead.org Git - users/borneoa/openocd-next.git/commit
rtos: rework rtos_types[] and rtos_try_next()
authorAntonio Borneo <borneo.antonio@gmail.com>
Fri, 18 Apr 2025 15:04:47 +0000 (17:04 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Fri, 9 May 2025 12:07:47 +0000 (12:07 +0000)
commit3a879c7dcb718f7e575f5a35beeb42d0f67eaa85
tree43e1ee22ae01f901f8c8f13c32e75453ad664dd0
parentb3b790e4e01331f79b196f8312193ae0130d2394
rtos: rework rtos_types[] and rtos_try_next()

Drop the NULL sentinel at the end of the array and use ARRAY_SIZE()
to bound the loops.
Adapt rtos_try_next() to use ARRAY_SIZE().

While there:
- change to bool the return type of rtos_try_next();
- move rtos_try_next() to avoid the forward declaration.

Change-Id: I1bee11db943b670789e62f1bebe2509bbef451a0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8855
Tested-by: jenkins
src/rtos/rtos.c