base/include/asm-ppc/rtai_sched.h

Go to the documentation of this file.
00001 /*
00002 COPYRIGHT (C) 2000-2007  Paolo Mantegazza (mantegazza@aero.polimi.it)
00003               2000       Stuart Hughes    (shughes@zentropix.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 
00020 
00021 #ifndef RTAI_SCHED_H
00022 #define RTAI_SCHED_H
00023 
00024 #define RTAI_MSR_FLAGS  (MSR_KERNEL | MSR_FP)
00025 
00026 extern void up_task_sw(void *, void *);
00027 #define rt_exchange_tasks(oldtask, newtask)  up_task_sw(&(oldtask), (new_task))
00028 
00029 #define init_arch_stack() \
00030     do { \
00031         *(task->stack - 28) = data;     \
00032         *(task->stack - 29) = (long)rt_thread;  \
00033         *(task->stack - 35) = (long)rt_startup; \
00034         *(task->stack - 36) = RTAI_MSR_FLAGS;   \
00035     } while(0)
00036 
00037 #define DEFINE_LINUX_CR0      static unsigned long linux_cr0;
00038 
00039 #define DEFINE_LINUX_SMP_CR0  static unsigned long linux_smp_cr0[NR_RT_CPUS];
00040 
00041 #ifdef CONFIG_RTAI_FPU_SUPPORT
00042 #define init_task_fpenv(task) \
00043     do { \
00044         memset(&task->fpu_reg, 0, sizeof(task->fpu_reg)); \
00045     } while(0)
00046 #else
00047 #define init_task_fpenv(task)  do { } while(0)
00048 #endif
00049 
00050 static inline void *get_stack_pointer(void)
00051 {
00052     void *sp;
00053     asm volatile ("mr 1, %0" : "=r" (sp));
00054     return sp;
00055 }
00056 
00057 #define RT_SET_RTAI_TRAP_HANDLER(x)
00058 
00059 #define DO_TIMER_PROPER_OP()
00060 
00061 #endif

Generated on Tue Feb 2 17:46:04 2010 for RTAI API by  doxygen 1.4.7