base/include/asm/rtai_sched.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef _RTAI_ASM_I386_SCHED_H
00021
#define _RTAI_ASM_I386_SCHED_H
00022
00023 #define rt_exchange_tasks(oldtask, newtask) \
00024
__asm__ __volatile__( \
00025
"pushl %%eax\n\t" \
00026
"pushl %%ebp\n\t" \
00027
"pushl %%edi\n\t" \
00028
"pushl %%esi\n\t" \
00029
"pushl %%edx\n\t" \
00030
"pushl %%ecx\n\t" \
00031
"pushl %%ebx\n\t" \
00032
"pushl $1f\n\t" \
00033
"movl (%%ecx), %%ebx\n\t" \
00034
"movl %%esp, (%%ebx)\n\t" \
00035
"movl (%%edx), %%esp\n\t" \
00036
"movl %%edx, (%%ecx)\n\t" \
00037
"ret\n\t" \
00038
"1: popl %%ebx\n\t \
00039
popl %%ecx\n\t \
00040
popl %%edx\n\t \
00041
popl %%esi\n\t \
00042
popl %%edi\n\t \
00043
popl %%ebp\n\t \
00044
popl %%eax\n\t" \
00045
: \
00046
: "c" (&oldtask), "d" (newtask) \
00047
);
00048
00049 #define init_arch_stack() \
00050
do { \
00051
*--(task->stack) = data; \
00052
*--(task->stack) = (int) rt_thread; \
00053
*--(task->stack) = 0; \
00054
*--(task->stack) = (int) rt_startup; \
00055
} while(0)
00056
00057 #define DEFINE_LINUX_CR0 static unsigned long linux_cr0;
00058
00059 #define DEFINE_LINUX_SMP_CR0 static unsigned long linux_smp_cr0[NR_RT_CPUS];
00060
00061 #define init_task_fpenv(task) do { init_fpenv((task)->fpu_reg); } while(0)
00062
00063 static inline void *
get_stack_pointer(
void)
00064 {
00065
void *sp;
00066
asm volatile (
"movl %%esp, %0" :
"=r" (sp));
00067
return sp;
00068 }
00069
00070 #define RT_SET_RTAI_TRAP_HANDLER(x) rt_set_rtai_trap_handler(x)
00071
00072 #define DO_TIMER_PROPER_OP();
00073
00074
#endif
Generated on Thu Nov 20 11:49:49 2008 for RTAI API by
1.3.8