blob: 36c5332fadaed9c74753830b8d219c31ec56cf59 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Port on Texas Instruments TMS320C6x architecture
4 *
5 * Copyright (C) 2004, 2009, 2010, 2011 Texas Instruments Incorporated
6 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
7 */
8#ifndef _ASM_C6X_SWITCH_TO_H
9#define _ASM_C6X_SWITCH_TO_H
10
11#include <linux/linkage.h>
12
13#define prepare_to_switch() do { } while (0)
14
15struct task_struct;
16struct thread_struct;
17asmlinkage void *__switch_to(struct thread_struct *prev,
18 struct thread_struct *next,
19 struct task_struct *tsk);
20
21#define switch_to(prev, next, last) \
22 do { \
23 current->thread.wchan = (u_long) __builtin_return_address(0); \
24 (last) = __switch_to(&(prev)->thread, \
25 &(next)->thread, (prev)); \
26 mb(); \
27 current->thread.wchan = 0; \
28 } while (0)
29
30#endif /* _ASM_C6X_SWITCH_TO_H */