OpenOCD
rtkernel.c File Reference
Include dependency graph for rtkernel.c:

Go to the source code of this file.

Data Structures

struct  rtkernel_params
 
struct  symbols
 

Macros

#define ST_CREATE   BIT(13) /* Task was created by task_create() */
 
#define ST_DEAD   BIT(0) /* Task is waiting to be deleted */
 
#define ST_DLY   BIT(5) /* on timer */
 
#define ST_FLAG   BIT(6) /* on flag */
 
#define ST_FLAG_ALL   BIT(7) /* on flag and flag mode is "ALL" */
 
#define ST_MBOX   BIT(8) /* on mailbox */
 
#define ST_MTX   BIT(3) /* on mutex */
 
#define ST_SEM   BIT(2) /* on semaphore */
 
#define ST_SIG   BIT(4) /* on signal */
 
#define ST_STP   BIT(9) /* self stopped */
 
#define ST_SUSPEND   BIT(10) /* Task is suspended */
 
#define ST_TT   BIT(11) /* Time triggered task */
 
#define ST_TT_YIELD   BIT(12) /* Time triggered task that yields */
 
#define ST_WAIT   BIT(1) /* Task is blocked: */
 

Enumerations

enum  rtkernel_symbol_values {
  sym_os_state = 0 , sym___off_os_state2chain = 1 , sym___off_os_state2current = 2 , sym___off_task2chain = 3 ,
  sym___off_task2magic = 4 , sym___off_task2stack = 5 , sym___off_task2state = 6 , sym___off_task2name = 7 ,
  sym___val_task_magic = 8
}
 

Functions

static void * realloc_preserve (void *ptr, size_t old_size, size_t new_size)
 
static int rtkernel_add_task (struct rtos *rtos, uint32_t task, uint32_t current_task)
 
static int rtkernel_create (struct target *target)
 
static bool rtkernel_detect_rtos (struct target *target)
 
static int rtkernel_get_symbol_list_to_lookup (struct symbol_table_elem *symbol_list[])
 
static int rtkernel_get_thread_reg_list (struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
 
static int rtkernel_update_threads (struct rtos *rtos)
 
static int rtkernel_verify_task (struct rtos *rtos, uint32_t task)
 

Variables

static const struct rtkernel_params rtkernel_params_list []
 
const struct rtos_type rtkernel_rtos
 
static const struct symbols rtkernel_symbol_list []
 

Macro Definition Documentation

◆ ST_CREATE

#define ST_CREATE   BIT(13) /* Task was created by task_create() */

Definition at line 35 of file rtkernel.c.

◆ ST_DEAD

#define ST_DEAD   BIT(0) /* Task is waiting to be deleted */

Definition at line 22 of file rtkernel.c.

◆ ST_DLY

#define ST_DLY   BIT(5) /* on timer */

Definition at line 27 of file rtkernel.c.

◆ ST_FLAG

#define ST_FLAG   BIT(6) /* on flag */

Definition at line 28 of file rtkernel.c.

◆ ST_FLAG_ALL

#define ST_FLAG_ALL   BIT(7) /* on flag and flag mode is "ALL" */

Definition at line 29 of file rtkernel.c.

◆ ST_MBOX

#define ST_MBOX   BIT(8) /* on mailbox */

Definition at line 30 of file rtkernel.c.

◆ ST_MTX

#define ST_MTX   BIT(3) /* on mutex */

Definition at line 25 of file rtkernel.c.

◆ ST_SEM

#define ST_SEM   BIT(2) /* on semaphore */

Definition at line 24 of file rtkernel.c.

◆ ST_SIG

#define ST_SIG   BIT(4) /* on signal */

Definition at line 26 of file rtkernel.c.

◆ ST_STP

#define ST_STP   BIT(9) /* self stopped */

Definition at line 31 of file rtkernel.c.

◆ ST_SUSPEND

#define ST_SUSPEND   BIT(10) /* Task is suspended */

Definition at line 32 of file rtkernel.c.

◆ ST_TT

#define ST_TT   BIT(11) /* Time triggered task */

Definition at line 33 of file rtkernel.c.

◆ ST_TT_YIELD

#define ST_TT_YIELD   BIT(12) /* Time triggered task that yields */

Definition at line 34 of file rtkernel.c.

◆ ST_WAIT

#define ST_WAIT   BIT(1) /* Task is blocked: */

Definition at line 23 of file rtkernel.c.

Enumeration Type Documentation

◆ rtkernel_symbol_values

Enumerator
sym_os_state 
sym___off_os_state2chain 
sym___off_os_state2current 
sym___off_task2chain 
sym___off_task2magic 
sym___off_task2stack 
sym___off_task2state 
sym___off_task2name 
sym___val_task_magic 

Definition at line 59 of file rtkernel.c.

Function Documentation

◆ realloc_preserve()

static void* realloc_preserve ( void *  ptr,
size_t  old_size,
size_t  new_size 
)
static

Definition at line 89 of file rtkernel.c.

References MIN.

Referenced by rtkernel_add_task().

◆ rtkernel_add_task()

◆ rtkernel_create()

static int rtkernel_create ( struct target target)
static

◆ rtkernel_detect_rtos()

static bool rtkernel_detect_rtos ( struct target target)
static

◆ rtkernel_get_symbol_list_to_lookup()

static int rtkernel_get_symbol_list_to_lookup ( struct symbol_table_elem symbol_list[])
static

◆ rtkernel_get_thread_reg_list()

◆ rtkernel_update_threads()

◆ rtkernel_verify_task()

static int rtkernel_verify_task ( struct rtos rtos,
uint32_t  task 
)
static

Variable Documentation

◆ rtkernel_params_list

const struct rtkernel_params rtkernel_params_list[]
static
Initial value:
= {
{
"cortex_m",
},
{
"hla_target",
},
}
const struct rtos_register_stacking rtos_standard_cortex_m3_stacking
const struct rtos_register_stacking rtos_standard_cortex_m4f_fpu_stacking
const struct rtos_register_stacking rtos_standard_cortex_m4f_stacking

Definition at line 1 of file rtkernel.c.

Referenced by rtkernel_create().

◆ rtkernel_rtos

const struct rtos_type rtkernel_rtos
Initial value:
= {
.name = "rtkernel",
.detect_rtos = rtkernel_detect_rtos,
.create = rtkernel_create,
.update_threads = rtkernel_update_threads,
.get_thread_reg_list = rtkernel_get_thread_reg_list,
.get_symbol_list_to_lookup = rtkernel_get_symbol_list_to_lookup,
}
static int rtkernel_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
Definition: rtkernel.c:342
static bool rtkernel_detect_rtos(struct target *target)
Definition: rtkernel.c:356
static int rtkernel_update_threads(struct rtos *rtos)
Definition: rtkernel.c:206
static int rtkernel_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
Definition: rtkernel.c:269
static int rtkernel_create(struct target *target)
Definition: rtkernel.c:362

Definition at line 362 of file rtkernel.c.

◆ rtkernel_symbol_list

const struct symbols rtkernel_symbol_list[]
static
Initial value:
= {
{ "os_state", false },
{ "__off_os_state2chain", false },
{ "__off_os_state2current", false },
{ "__off_task2chain", false },
{ "__off_task2magic", false },
{ "__off_task2stack", false },
{ "__off_task2state", false },
{ "__off_task2name", false },
{ "__val_task_magic", false },
{ NULL, false }
}
#define NULL
Definition: usb.h:16

Definition at line 1 of file rtkernel.c.

Referenced by rtkernel_get_symbol_list_to_lookup().