forked from auracaster/openocd
rtos : smp support
Change-Id: I583cddf5e62ed77f108786a085569ab8699ad50d Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/344 Tested-by: jenkins Reviewed-by: Evan Hunter <evan@ozhiker.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
This commit is contained in:
committed by
Øyvind Harboe
parent
ff3028ce1b
commit
ebac7c963a
@@ -49,6 +49,13 @@ static struct rtos_type *rtos_types[] =
|
||||
|
||||
int rtos_thread_packet(struct connection *connection, char *packet, int packet_size);
|
||||
|
||||
int rtos_smp_init(struct target *target)
|
||||
{
|
||||
if (target->rtos->type->smp_init)
|
||||
return target->rtos->type->smp_init(target);
|
||||
return ERROR_TARGET_INIT_FAILED;
|
||||
}
|
||||
|
||||
|
||||
int rtos_create(Jim_GetOptInfo *goi, struct target * target)
|
||||
{
|
||||
@@ -437,10 +444,11 @@ int rtos_get_gdb_reg_list(struct connection *connection)
|
||||
{
|
||||
struct target *target = get_target_from_connection(connection);
|
||||
int64_t current_threadid = target->rtos->current_threadid;
|
||||
if ( ( target->rtos != NULL ) &&
|
||||
( current_threadid != -1 ) &&
|
||||
( current_threadid != 0 ) &&
|
||||
( current_threadid != target->rtos->current_thread ) )
|
||||
if ((target->rtos != NULL) &&
|
||||
(current_threadid != -1) &&
|
||||
(current_threadid != 0) &&
|
||||
((current_threadid != target->rtos->current_thread) ||
|
||||
(target->smp))) /* in smp several current thread are possible */
|
||||
{
|
||||
char * hex_reg_list;
|
||||
target->rtos->type->get_thread_reg_list( target->rtos, current_threadid, &hex_reg_list );
|
||||
|
||||
Reference in New Issue
Block a user