aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/eCos.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtos/eCos.c')
-rw-r--r--src/rtos/eCos.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/rtos/eCos.c b/src/rtos/eCos.c
index 9ab88dec..7310d6d6 100644
--- a/src/rtos/eCos.c
+++ b/src/rtos/eCos.c
@@ -125,25 +125,7 @@ static int eCos_update_threads(struct rtos *rtos)
}
/* wipe out previous thread details if any */
- if (rtos->thread_details != NULL) {
- int j;
- for (j = 0; j < rtos->thread_count; j++) {
- if (rtos->thread_details[j].display_str != NULL) {
- free(rtos->thread_details[j].display_str);
- rtos->thread_details[j].display_str = NULL;
- }
- if (rtos->thread_details[j].thread_name_str != NULL) {
- free(rtos->thread_details[j].thread_name_str);
- rtos->thread_details[j].thread_name_str = NULL;
- }
- if (rtos->thread_details[j].extra_info_str != NULL) {
- free(rtos->thread_details[j].extra_info_str);
- rtos->thread_details[j].extra_info_str = NULL;
- }
- }
- free(rtos->thread_details);
- rtos->thread_details = NULL;
- }
+ rtos_free_threadlist(rtos);
/* determine the number of current threads */
uint32_t thread_list_head = rtos->symbols[eCos_VAL_thread_list].address;