Go to the documentation of this file.
44 #define PORT_SUPPORTS_RT FALSE
50 #define PORT_NATURAL_ALIGN sizeof (void *)
56 #define PORT_STACK_ALIGN sizeof (stkalign_t)
62 #define PORT_WORKING_AREA_ALIGN sizeof (stkalign_t)
72 #define PORT_ARCHITECTURE_XXX
77 #define PORT_ARCHITECTURE_XXX_YYY
82 #define PORT_ARCHITECTURE_NAME "XXX Architecture"
87 #if defined(__GNUC__) || defined(__DOXYGEN__)
88 #define PORT_COMPILER_NAME "GCC " __VERSION__
91 #error "unsupported compiler"
97 #define PORT_INFO "no info"
110 #if !defined(PORT_IDLE_THREAD_STACK_SIZE) || defined(__DOXYGEN__)
111 #define PORT_IDLE_THREAD_STACK_SIZE 32
119 #if !defined(PORT_INT_REQUIRED_STACK) || defined(__DOXYGEN__)
120 #define PORT_INT_REQUIRED_STACK 256
129 #if !defined(PORT_USE_ALT_TIMER) || defined(__DOXYGEN__)
130 #define PORT_USE_ALT_TIMER FALSE
136 #if !defined(PORT_XXX_WFI_SLEEP_IDLE) || defined(__DOXYGEN__)
137 #define PORT_XXX_ENABLE_WFI_IDLE FALSE
150 #if !defined(_FROM_ASM_)
200 #define PORT_SETUP_CONTEXT(tp, wbase, wtop, pf, arg) { \
207 #define PORT_WA_SIZE(n) (sizeof(struct port_intctx) + \
208 sizeof(struct port_extctx) + \
209 ((size_t)(n)) + ((size_t)(PORT_INT_REQUIRED_STACK)))
219 #define PORT_WORKING_AREA(s, n) \
220 stkalign_t s[THD_WORKING_AREA_SIZE(n) / sizeof (stkalign_t)]
225 #define PORT_IRQ_IS_VALID_PRIORITY(n) false
230 #define PORT_IRQ_IS_VALID_KERNEL_PRIORITY(n) false
237 #define PORT_IRQ_PROLOGUE()
244 #define PORT_IRQ_EPILOGUE()
252 #define PORT_IRQ_HANDLER(id) extern "C" void id(void)
254 #define PORT_IRQ_HANDLER(id) void id(void)
263 #define PORT_FAST_IRQ_HANDLER(id) extern "C" void id(void)
265 #define PORT_FAST_IRQ_HANDLER(id) void id(void)
278 #if !CH_DBG_ENABLE_STACK_CHECK || defined(__DOXYGEN__)
279 #define port_switch(ntp, otp) _port_switch(ntp, otp)
281 #define port_switch(ntp, otp) { \
282 register struct port_intctx *sp asm ("%r1"); \
283 if ((stkalign_t *)(sp - 1) < otp->wabase) \
284 chSysHalt("stack overflow"); \
285 _port_switch(ntp, otp); \
295 #if !defined(_FROM_ASM_)
314 #if !defined(_FROM_ASM_)
424 #if PORT_XXX_ENABLE_WFI_IDLE
446 #if !defined(_FROM_ASM_)
448 #if CH_CFG_ST_TIMEDELTA > 0
449 #if !PORT_USE_ALT_TIMER
450 #include "chcore_timer.h"
452 #include "chcore_timer_alt.h"
static bool port_irq_enabled(syssts_t sts)
Checks the interrupt status.
static void port_unlock_from_isr(void)
Kernel-unlock action from an interrupt handler.
static bool port_is_isr_context(void)
Determines the current execution context.
uint64_t stkalign_t
Type of stack and memory alignment enforcement.
Structure representing a thread.
static void port_suspend(void)
Disables the interrupt sources below kernel-level priority.
static void port_unlock(void)
Kernel-unlock action.
static syssts_t port_get_irq_status(void)
Returns a word encoding the current interrupts status.
static void port_lock(void)
Kernel-lock action.
static void port_enable(void)
Enables all the interrupt sources.
static void port_lock_from_isr(void)
Kernel-lock action from an interrupt handler.
static void port_disable(void)
Disables all the interrupt sources.
void _port_init(void)
Port-related initialization code.
static void port_wait_for_interrupt(void)
Enters an architecture-dependent IRQ-waiting mode.
static rtcnt_t port_rt_get_counter_value(void)
Returns the current value of the realtime counter.
Platform dependent part of the thread_t structure.
void _port_switch(thread_t *ntp, thread_t *otp)
Performs a context switch between two threads.