rtos: rework rtos_create()
To simplify the caller of rtos_create(), convert the code from jimtcl oriented to OpenOCD commands. While there, fix inconsistencies in almost every rtos create() method and reset rtos_auto_detect to better cooperate on run-time rtos configuration. Change-Id: I59c443aaed77a48174facdfc86db75d6b28c8480 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8830 Tested-by: jenkins
This commit is contained in:
@@ -364,12 +364,12 @@ static int rtkernel_create(struct target *target)
|
||||
for (size_t i = 0; i < ARRAY_SIZE(rtkernel_params_list); i++) {
|
||||
if (strcmp(rtkernel_params_list[i].target_name, target_type_name(target)) == 0) {
|
||||
target->rtos->rtos_specific_params = (void *)&rtkernel_params_list[i];
|
||||
return 0;
|
||||
return ERROR_OK;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_ERROR("Could not find target in rt-kernel compatibility list");
|
||||
return -1;
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
const struct rtos_type rtkernel_rtos = {
|
||||
|
||||
Reference in New Issue
Block a user