ISIX-RTOS - small operating system for ARM microcontrollers 1.2
Defines | Functions

port_scheduler.c File Reference

#include <isix/config.h>
#include <isix/printk.h>
#include <isix/types.h>
#include <prv/scheduler.h>
Include dependency graph for arm-cm3/port_scheduler.c:

Go to the source code of this file.

Defines

#define cpu_save_context()
#define cpu_restore_context()
#define portNVIC_INT_CTRL   ( ( volatile unsigned long *) 0xe000ed04 )
#define portNVIC_PENDSVSET   0x10000000
#define INITIAL_XPSR   0x01000000
#define DEBUG_SCHEDULER   DBG_OFF

Functions

void pend_svc_isr_vector (void)
void svc_isr_vector (void)
unsigned long * isixp_task_init_stack (unsigned long *sp, task_func_ptr_t pfun, void *param)
static void unused_func (void)
void isix_systime_handler (void)
void port_set_interrupt_mask (void)
void port_clear_interrupt_mask (void)
void port_yield (void)
void port_start_first_task (void)

Define Documentation

#define cpu_restore_context ( )
Value:
asm volatile  (                                             \
    "mov r0,#0\t\n"                                             \
    "msr basepri,r0\t\n"                                        \
        "ldmia sp!, {r3,r14}\t\n"                                   \
    "ldr r1,[r3]\t\n"                                           \
    "ldr r0, [r1]\t\n"                                          \
    "ldmia r0!, {r4-r11}\t\n"                                   \
    "msr psp, r0\t\n"                                           \
    "bx r14\r\n"                                                \
    ".align 2 \t\n"                                                                                             \
    "0: .word isix_current_task\t\n"                                                    \
   )

Definition at line 23 of file arm-cm3/port_scheduler.c.

Referenced by pend_svc_isr_vector().

#define cpu_save_context ( )
Value:
asm volatile (                                                                                          \
    "mrs r0, psp\t\n"                                                                           \
    "stmdb r0!, {r4-r11}\t\n"                                   \
    "ldr r3,0f\t\n"                                                     \
    "ldr r2,[r3]\t\n"                                           \
    "str r0, [r2]\t\n"                                          \
    "stmdb sp!, {r3,r14}\t\n"                                   \
    "mov r0,%0\t\n"                                             \
    "msr basepri,r0\t\n"                                        \
    ::"i"(ISIX_MAX_SYSCALL_INTERRUPT_PRIORITY)                 \
        )

Definition at line 9 of file arm-cm3/port_scheduler.c.

Referenced by pend_svc_isr_vector().

#define DEBUG_SCHEDULER   DBG_OFF

Definition at line 46 of file arm-cm3/port_scheduler.c.

#define INITIAL_XPSR   0x01000000

Definition at line 43 of file arm-cm3/port_scheduler.c.

Referenced by isixp_task_init_stack().

#define portNVIC_INT_CTRL   ( ( volatile unsigned long *) 0xe000ed04 )

Definition at line 38 of file arm-cm3/port_scheduler.c.

Referenced by isix_systime_handler(), and port_yield().

#define portNVIC_PENDSVSET   0x10000000

Definition at line 39 of file arm-cm3/port_scheduler.c.

Referenced by isix_systime_handler(), and port_yield().


Function Documentation

void isix_systime_handler ( void  )
unsigned long* isixp_task_init_stack ( unsigned long *  sp,
task_func_ptr_t  pfun,
void *  param 
)

Definition at line 84 of file arm-cm3/port_scheduler.c.

Referenced by isix_task_create().

void pend_svc_isr_vector ( void  )

Definition at line 51 of file arm-cm3/port_scheduler.c.

References cpu_restore_context, cpu_save_context, and isixp_schedule().

void port_clear_interrupt_mask ( void  )

Definition at line 148 of file arm-cm3/port_scheduler.c.

void port_set_interrupt_mask ( void  )

Definition at line 139 of file arm-cm3/port_scheduler.c.

References ISIX_MAX_SYSCALL_INTERRUPT_PRIORITY.

void port_start_first_task ( void  )

Definition at line 163 of file arm-cm3/port_scheduler.c.

void port_yield ( void  )

Definition at line 155 of file arm-cm3/port_scheduler.c.

References portNVIC_INT_CTRL, and portNVIC_PENDSVSET.

void svc_isr_vector ( void  )

Definition at line 64 of file arm-cm3/port_scheduler.c.

static void unused_func ( void  ) [static]

Definition at line 109 of file arm-cm3/port_scheduler.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines