Include dependency graph for rtai_sched.h:
Go to the source code of this file.
Defines | |
#define | I_BIT PSR_I_BIT |
#define | rt_exchange_tasks(old_task, new_task) |
#define | init_arch_stack() |
#define | DEFINE_LINUX_CR0 |
#define | DEFINE_LINUX_SMP_CR0 |
#define | init_fp_env() |
#define | init_task_fpenv(task) do { init_fpenv((task)->fpu_reg); } while(0) |
#define | DO_TIMER_PROPER_OP() |
Functions | |
unsigned long | current_domain_access_control (void) |
void * | get_stack_pointer (void) |
#define DEFINE_LINUX_CR0 |
Definition at line 145 of file rtai_sched.h.
#define DEFINE_LINUX_SMP_CR0 |
Definition at line 146 of file rtai_sched.h.
#define DO_TIMER_PROPER_OP | ( | ) |
#define I_BIT PSR_I_BIT |
Definition at line 52 of file rtai_sched.h.
#define init_arch_stack | ( | ) |
Value:
do { \ task->stack -= 13; /* make room on stack */ \ task->stack[12] = (int)rt_startup; /* entry point */ \ task->stack[ 3] = SVC_MODE; /* cpsr */ \ task->stack[ 2] = (int)current_domain_access_control(); \ task->stack[ 1] = (int)data; /* arg 2 of rt_startup() */ \ task->stack[ 0] = (int)rt_thread; /* arg 1 " " */ \ } while (0)
Definition at line 135 of file rtai_sched.h.
#define init_fp_env | ( | ) |
Definition at line 154 of file rtai_sched.h.
Definition at line 157 of file rtai_sched.h.
#define rt_exchange_tasks | ( | old_task, | |||
new_task | ) |
Value:
asm volatile( \ "mrc p15, 0, r2, c3, c0\n\t" /* get current domain_access_control */ \ "adr lr, 1f\n\t" /* get address of resume point */ \ "mrs r3, cpsr\n\t" /* get current cpsr */ \ "ldr ip, [%[oldp]]\n\t" /* get pointer to old task */ \ "stmfd sp!, {r0 - fp, lr}\n\t" /* push registers on stack */ \ "str %[new], [%[oldp]]\n\t" /* *oldp = new */ \ "str sp, [ip]\n\t" /* save current stack-pointer to old task */ \ "ldr sp, [%[new]]\n\t" /* get stack-pointer of new task */ \ "ldmfd sp!, {r0-r3}\n\t" /* pop new tasks' r0, r1, cpsr & d.a.c from stack */ \ "mcr p15, 0, r2, c3, c0\n\t" /* restore previous domain_access_control */ \ "msr cpsr_c, %[psr]\n\t" /* disable hw-irqs */ \ "msr spsr, r3\n\t" /* set spsr to previous cpsr */ \ "ldmfd sp!, {r4 - fp, pc}^\n\t" /* pop registers, pc = resume point, cpsr = spsr */ \ "1:" /* resume point (except for startup) */ \ : /* output */ /* none */ \ : /* input */ [oldp] "r" (&old_task), \ [new] "r" (new_task), \ [psr] "i" (SVC_MODE|I_BIT) \ : /* clobber */ "lr", "ip", "r2", "r3", "memory" \ )
Definition at line 91 of file rtai_sched.h.
unsigned long current_domain_access_control | ( | void | ) | [inline] |
Definition at line 115 of file rtai_sched.h.
void* get_stack_pointer | ( | void | ) | [inline] |
Definition at line 160 of file rtai_sched.h.