Linux Audio

Check our new training course

Loading...
v3.15
 1/*
 
 2 * Copyright (C) 2000, 2001  Paolo Alberelli
 3 * Copyright (C) 2003  Paul Mundt
 4 * Copyright (C) 2004  Richard Curnow
 5 *
 6 * This file is subject to the terms and conditions of the GNU General Public
 7 * License.  See the file "COPYING" in the main directory of this archive
 8 * for more details.
 9 */
10#ifndef __ASM_SH_SWITCH_TO_64_H
11#define __ASM_SH_SWITCH_TO_64_H
12
13struct thread_struct;
14struct task_struct;
15
16/*
17 *	switch_to() should switch tasks to task nr n, first
18 */
19struct task_struct *sh64_switch_to(struct task_struct *prev,
20				   struct thread_struct *prev_thread,
21				   struct task_struct *next,
22				   struct thread_struct *next_thread);
23
24#define switch_to(prev,next,last)				\
25do {								\
26	if (last_task_used_math != next) {			\
27		struct pt_regs *regs = next->thread.uregs;	\
28		if (regs) regs->sr |= SR_FD;			\
29	}							\
30	last = sh64_switch_to(prev, &prev->thread, next,	\
31			      &next->thread);			\
32} while (0)
33
34
35#endif /* __ASM_SH_SWITCH_TO_64_H */
v5.4
 1/* SPDX-License-Identifier: GPL-2.0
 2 *
 3 * Copyright (C) 2000, 2001  Paolo Alberelli
 4 * Copyright (C) 2003  Paul Mundt
 5 * Copyright (C) 2004  Richard Curnow
 
 
 
 
 6 */
 7#ifndef __ASM_SH_SWITCH_TO_64_H
 8#define __ASM_SH_SWITCH_TO_64_H
 9
10struct thread_struct;
11struct task_struct;
12
13/*
14 *	switch_to() should switch tasks to task nr n, first
15 */
16struct task_struct *sh64_switch_to(struct task_struct *prev,
17				   struct thread_struct *prev_thread,
18				   struct task_struct *next,
19				   struct thread_struct *next_thread);
20
21#define switch_to(prev,next,last)				\
22do {								\
23	if (last_task_used_math != next) {			\
24		struct pt_regs *regs = next->thread.uregs;	\
25		if (regs) regs->sr |= SR_FD;			\
26	}							\
27	last = sh64_switch_to(prev, &prev->thread, next,	\
28			      &next->thread);			\
29} while (0)
30
31
32#endif /* __ASM_SH_SWITCH_TO_64_H */