diff options
author | Tim Newsome <tim@sifive.com> | 2021-10-11 09:56:39 -0700 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-11-05 22:45:13 +0000 |
commit | 5148a1324aeef62d85aaeaa1c061df8e874e4c12 (patch) | |
tree | 8611abefdff70e2a1cddcb8f774451f4ffc83f93 /src/rtos/nuttx.c | |
parent | da434d7d5975c1c7ebae8e35eb71b6d2d6ad062e (diff) | |
download | riscv-openocd-5148a1324aeef62d85aaeaa1c061df8e874e4c12.zip riscv-openocd-5148a1324aeef62d85aaeaa1c061df8e874e4c12.tar.gz riscv-openocd-5148a1324aeef62d85aaeaa1c061df8e874e4c12.tar.bz2 |
rtos: use struct member names instead of comments
This is more readable, and as a bonus the compiler will help out if the
definition of the struct changes.
Change-Id: Ibf660134d9900173f6592407d5cc2203654a4a1b
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6659
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/rtos/nuttx.c')
-rw-r--r-- | src/rtos/nuttx.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/rtos/nuttx.c b/src/rtos/nuttx.c index cc352d1..f0b3048 100644 --- a/src/rtos/nuttx.c +++ b/src/rtos/nuttx.c @@ -119,11 +119,10 @@ static const struct stack_register_offset nuttx_stack_offsets_cortex_m[] = { static const struct rtos_register_stacking nuttx_stacking_cortex_m = { - 0x48, /* stack_registers_size */ - -1, /* stack_growth_direction */ - 17, /* num_output_registers */ - 0, /* stack_alignment */ - nuttx_stack_offsets_cortex_m /* register_offsets */ + .stack_registers_size = 0x48, + .stack_growth_direction = -1, + .num_output_registers = 17, + .register_offsets = nuttx_stack_offsets_cortex_m }; static const struct stack_register_offset nuttx_stack_offsets_cortex_m_fpu[] = { @@ -147,11 +146,10 @@ static const struct stack_register_offset nuttx_stack_offsets_cortex_m_fpu[] = { }; static const struct rtos_register_stacking nuttx_stacking_cortex_m_fpu = { - 0x8c, /* stack_registers_size */ - -1, /* stack_growth_direction */ - 17, /* num_output_registers */ - 0, /* stack_alignment */ - nuttx_stack_offsets_cortex_m_fpu /* register_offsets */ + .stack_registers_size = 0x8c, + .stack_growth_direction = -1, + .num_output_registers = 17, + .register_offsets = nuttx_stack_offsets_cortex_m_fpu }; static int pid_offset = PID; |