diff options
author | Spencer Oliver <spen@spen-soft.co.uk> | 2014-09-11 22:07:10 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2014-10-06 11:57:29 +0000 |
commit | 03410e92dae6efbb2dc474fb7556117cc60c3f82 (patch) | |
tree | 04a55ac0bd302e71f229f568a4301b8bae47d392 /src/rtos/eCos.c | |
parent | 40815bd39a7ee9f93a95a89e978fdace081c3563 (diff) |
rtos: constify symbol names and lists
Change-Id: I72f3cd50fc6a33a178e72e169c9660e707751524
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2292
Tested-by: jenkins
Diffstat (limited to 'src/rtos/eCos.c')
-rw-r--r-- | src/rtos/eCos.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rtos/eCos.c b/src/rtos/eCos.c index 742437bb..62fb3b7b 100644 --- a/src/rtos/eCos.c +++ b/src/rtos/eCos.c @@ -37,10 +37,10 @@ static int eCos_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); struct eCos_thread_state { int value; - char *desc; + const char *desc; }; -struct eCos_thread_state eCos_thread_states[] = { +static const struct eCos_thread_state eCos_thread_states[] = { { 0, "Ready" }, { 1, "Sleeping" }, { 2, "Countsleep" }, @@ -52,7 +52,7 @@ struct eCos_thread_state eCos_thread_states[] = { #define ECOS_NUM_STATES (sizeof(eCos_thread_states)/sizeof(struct eCos_thread_state)) struct eCos_params { - char *target_name; + const char *target_name; unsigned char pointer_width; unsigned char thread_stack_offset; unsigned char thread_name_offset; @@ -62,7 +62,7 @@ struct eCos_params { const struct rtos_register_stacking *stacking_info; }; -const struct eCos_params eCos_params_list[] = { +static const struct eCos_params eCos_params_list[] = { { "cortex_m", /* target_name */ 4, /* pointer_width; */ @@ -82,7 +82,7 @@ enum eCos_symbol_values { eCos_VAL_current_thread_ptr = 1 }; -static char *eCos_symbol_list[] = { +static const char * const eCos_symbol_list[] = { "Cyg_Thread::thread_list", "Cyg_Scheduler_Base::current_thread", NULL @@ -257,7 +257,7 @@ static int eCos_update_threads(struct rtos *rtos) */ } - char *state_desc; + const char *state_desc; if (i < ECOS_NUM_STATES) state_desc = eCos_thread_states[i].desc; else |