Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
0004  */
0005 
0006 #ifndef _ASM_ARC_SWITCH_TO_H
0007 #define _ASM_ARC_SWITCH_TO_H
0008 
0009 #ifndef __ASSEMBLY__
0010 
0011 #include <linux/sched.h>
0012 #include <asm/dsp-impl.h>
0013 #include <asm/fpu.h>
0014 
0015 struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n);
0016 
0017 #define switch_to(prev, next, last) \
0018 do {                    \
0019     dsp_save_restore(prev, next);   \
0020     fpu_save_restore(prev, next);   \
0021     last = __switch_to(prev, next);\
0022     mb();               \
0023 } while (0)
0024 
0025 #endif
0026 
0027 #endif