2 * Copyright (C) 2004 Microtronix Datacom Ltd.
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
8 #ifndef _ASM_NIOS2_SWITCH_TO_H
9 #define _ASM_NIOS2_SWITCH_TO_H
12 * switch_to(n) should switch tasks to task ptr, first checking that
13 * ptr isn't the current task, in which case it does nothing. This
14 * also clears the TS-flag if the task we switched to has used the
15 * math co-processor latest.
17 #define switch_to(prev, next, last) \
20 __asm__ __volatile__ ( \
26 : "r" (prev), "r" (next) \
27 : "r4", "r5", "r7", "r8", "ra"); \
31 #endif /* _ASM_NIOS2_SWITCH_TO_H */