xref: /openbmc/linux/arch/microblaze/include/asm/switch_to.h (revision c40d04df152a1111c5bbcb632278394dabd2b73d)
1*c40d04dfSDavid Howells /*
2*c40d04dfSDavid Howells  * Copyright (C) 2006 Atmark Techno, Inc.
3*c40d04dfSDavid Howells  *
4*c40d04dfSDavid Howells  * This file is subject to the terms and conditions of the GNU General Public
5*c40d04dfSDavid Howells  * License. See the file "COPYING" in the main directory of this archive
6*c40d04dfSDavid Howells  * for more details.
7*c40d04dfSDavid Howells  */
8*c40d04dfSDavid Howells 
9*c40d04dfSDavid Howells #ifndef _ASM_MICROBLAZE_SWITCH_TO_H
10*c40d04dfSDavid Howells #define _ASM_MICROBLAZE_SWITCH_TO_H
11*c40d04dfSDavid Howells 
12*c40d04dfSDavid Howells struct task_struct;
13*c40d04dfSDavid Howells struct thread_info;
14*c40d04dfSDavid Howells 
15*c40d04dfSDavid Howells extern struct task_struct *_switch_to(struct thread_info *prev,
16*c40d04dfSDavid Howells 					struct thread_info *next);
17*c40d04dfSDavid Howells 
18*c40d04dfSDavid Howells #define switch_to(prev, next, last)					\
19*c40d04dfSDavid Howells 	do {								\
20*c40d04dfSDavid Howells 		(last) = _switch_to(task_thread_info(prev),		\
21*c40d04dfSDavid Howells 					task_thread_info(next));	\
22*c40d04dfSDavid Howells 	} while (0)
23*c40d04dfSDavid Howells 
24*c40d04dfSDavid Howells #endif /* _ASM_MICROBLAZE_SWITCH_TO_H */
25