riscv-openocd/src
Peter Stuge 44e6d7720b rtos: Rewrite rtos_try_next() for readability
The new code is almost functionally equivalent to the old.

The function now returns 0 instead of -1 if target->rtos has not yet
been allocated. All call sites only test for success, and in practise
that is also the only thing that matters; if the function successfully
iterated to the next RTOS or not.

Other than that the only difference is that the code is now readable.

Many thanks to Matthias Blaicher for the fix to the iteration error!

Change-Id: I3342826f653b5e46c99ad1f58eec26ff10795c33
Signed-off-by: Peter Stuge <peter@stuge.se>
Reviewed-on: http://openocd.zylin.com/894
Reviewed-by: Matthias Blaicher <matthias@blaicher.com>
Tested-by: jenkins
2012-10-05 21:03:04 +00:00
..
flash Modified Sector Erase for AT91SAM4S 2012-10-04 15:53:19 +00:00
helper build: remove unnecessary jim.h include 2012-10-02 11:36:39 +00:00
jtag build: fix broken ftd2xx bus blaster 2012-10-04 13:42:56 +00:00
pld build: add helper/types.h to config.h 2012-05-21 16:15:26 +00:00
rtos rtos: Rewrite rtos_try_next() for readability 2012-10-05 21:03:04 +00:00
server gdbserver: code cleanup 2012-10-02 11:39:45 +00:00
svf build: cleanup src/svf directory 2012-02-06 10:43:34 +00:00
target Add extra Coresight component ROM identifiers for the Cortex-M4 2012-09-27 14:07:19 +00:00
transport transport: remove interface multiple transport warning 2012-03-30 15:51:37 +00:00
xsvf build: cleanup src/xsvf directory 2012-02-06 10:45:43 +00:00
Makefile.am ecosboard: delete bit-rotted eCos code 2012-03-13 19:11:11 +00:00
hello.c build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
hello.h build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
main.c build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
openocd.c Revert "When calling openocd from a shell like this:" 2012-07-22 19:18:22 +00:00
openocd.h build: cleanup src/ directory 2012-02-06 10:41:23 +00:00