base/include/asm-m68knommu/rtai_sched.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 1999-2003 Paolo Mantegazza <mantegazza@aero.polimi.it>
00003  * Copyright (C) 2000      Stuart Hughes    <shughes@zentropix.com>
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License as
00007  * published by the Free Software Foundation; either version 2 of the
00008  * License, or (at your option) any later version.
00009  *
00010  * This program 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
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018  */
00019 
00020 #ifndef _RTAI_ASM_M68KNOMMU_SCHED_H
00021 #define _RTAI_ASM_M68KNOMMU_SCHED_H
00022 
00023 #define rt_exchange_tasks(oldtask, newtask) \
00024        __asm__ __volatile__( \
00025            "lea %%sp@(-60),%%sp\n\t" \
00026            "movem.l %%d0-%%d7/%%a0-%%a6,%%sp@\n\t" \
00027            "pea %%pc@(1f)\n\t" \
00028            "move.l (%0),%%a1\n\t" \
00029            "move.l %%sp,(%%a1)\n\t" \
00030            "move.l %1,(%0)\n\t" \
00031            "move.l %1,%%a1\n\t" \
00032            "move.l (%%a1),%%sp\n\t" \
00033            "rts\n\t" \
00034            "1:  movem.l %%sp@,%%d0-%%d7/%%a0-%%a6\n\t" \
00035            "lea %%sp@(60),%%sp\n\t" \
00036            : /* no output */ \
00037            : "a" (&oldtask) , "d" (newtask) \
00038            : "%a1", "memory");
00039 
00040 #define init_arch_stack() \
00041 do { \
00042     *--(task->stack) = data;        \
00043     *--(task->stack) = (int) rt_thread; \
00044     *--(task->stack) = 0;           \
00045     *--(task->stack) = (int) rt_startup;    \
00046 } while(0)
00047 
00048 #define DEFINE_LINUX_CR0
00049 
00050 #define DEFINE_LINUX_SMP_CR0  static unsigned long linux_smp_cr0[NR_RT_CPUS];
00051 
00052 #define init_task_fpenv(task)  do { init_fpenv((task)->fpu_reg); } while(0)
00053 
00054 static inline void *get_stack_pointer(void)
00055 {
00056     void *sp;
00057     asm volatile ("movl %%sp, %0" : "=d" (sp));
00058     return sp;
00059 }
00060 
00061 #define RT_SET_RTAI_TRAP_HANDLER(x)  rt_set_rtai_trap_handler(x)
00062 
00063 #define DO_TIMER_PROPER_OP()
00064 
00065 #endif /* !_RTAI_ASM_M68KNOMMU_SCHED_H */

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