rtai-core/include/asm-mips/rtai_sched.h

00001 /*
00002  * COPYRIGHT (C) 2000  Paolo Mantegazza (mantegazza@aero.polimi.it)
00003  * COPYRIGHT (C) 2001  Steve Papacharalambous (stevep@lineo.com)
00004  *                      
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
00018  *                        */
00019 #ifndef _RTAI_ASM_MIPS_RTAI_SCHED_H_
00020 #define _RTAI_ASM_MIPS_RTAI_SCHED_H_
00021 
00022 #include <asm/rtai_stackframe.h>
00023 
00024 extern void up_task_sw(void *, void *);
00025 
00026 
00027 #define rt_switch_to(newtask) up_task_sw(&rt_current, (newtask));
00028 
00029 #define rt_exchange_tasks(oldtask, newtask) up_task_sw(&(oldtask), (newtask));
00030 
00031 #define init_arch_stack() \
00032 do { \
00033         task->stack -= (RT_SIZE / sizeof(int));                         \
00034         *(task->stack + (RT_R5 / sizeof(int))) = data;                  \
00035         *(task->stack + (RT_R4 / sizeof(int))) = (int)rt_thread;        \
00036         *(task->stack + (RT_R31 / sizeof(int))) = (int)rt_startup;      \
00037 } while(0)
00038 
00039 #define DEFINE_LINUX_CR0
00040 #define DEFINE_LINUX_SMP_CR0
00041 
00042 #define init_fp_env() \
00043 do { \
00044         memset(&task->fpu_reg, 0, sizeof(task->fpu_reg));       \
00045 } while(0)
00046 
00047 static inline void *get_stack_pointer(void)
00048 {
00049 
00050         void *sp;
00051 
00052         __asm__ __volatile__ (
00053                 "move\t%0,$29\n\t"
00054                 : "=r" (sp));
00055         return(sp);
00056 
00057 }  /* End function - get_stack_pointer */
00058 
00059 #define RT_SET_RTAI_TRAP_HANDLER(x)
00060 
00061 #define DO_TIMER_PROPER_OP()
00062 
00063 #endif /* _RTAI_ASM_MIPS_RTAI_SCHED_H_ */
00064 

Generated on Sat Jul 24 19:36:02 2004 for RTAI API by doxygen 1.3.4