This is an automated email from Gerrit.

Evan Hunter (evanhunter...@gmail.com) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/2392

-- gerrit

commit c265f829b8b507068d37f4c59ff41828ce2353ab
Author: Evan Hunter <ehun...@broadcom.com>
Date:   Fri Nov 21 17:06:55 2014 +0000

    RTOS: Fix ThreadX/FreeRTOS current execution when there are no threads.
    
    Change-Id: I7a43948fb8cf586064d68421114461e77a3602a4
    Signed-off-by: Evan Hunter <ehun...@broadcom.com>

diff --git a/src/rtos/FreeRTOS.c b/src/rtos/FreeRTOS.c
index 1e699c6..15b7bcb 100644
--- a/src/rtos/FreeRTOS.c
+++ b/src/rtos/FreeRTOS.c
@@ -198,7 +198,7 @@ static int FreeRTOS_update_threads(struct rtos *rtos)
                        LOG_ERROR("Error allocating memory for %d threads", 
thread_list_size);
                        return ERROR_FAIL;
                }
-               rtos->thread_details->threadid = 1;
+               rtos->thread_details->threadid = -1;
                rtos->thread_details->exists = true;
                rtos->thread_details->display_str = NULL;
                rtos->thread_details->extra_info_str = NULL;
diff --git a/src/rtos/ThreadX.c b/src/rtos/ThreadX.c
index 88470b6..beb82ee 100644
--- a/src/rtos/ThreadX.c
+++ b/src/rtos/ThreadX.c
@@ -176,7 +176,7 @@ static int ThreadX_update_threads(struct rtos *rtos)
                tasks_found++;
                rtos->thread_details = malloc(
                                sizeof(struct thread_detail) * 
thread_list_size);
-               rtos->thread_details->threadid = 1;
+               rtos->thread_details->threadid = -1;
                rtos->thread_details->exists = true;
                rtos->thread_details->display_str = NULL;
                rtos->thread_details->extra_info_str = NULL;

-- 

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to