hc
2023-10-25 6c2073b7aa40e29d0eca7d571dd7bc590c7ecaa7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2001 - 2005 Tensilica Inc.
 */
 
#ifndef _XTENSA_SWITCH_TO_H
#define _XTENSA_SWITCH_TO_H
 
/* * switch_to(n) should switch tasks to task nr n, first
 * checking that n isn't the current task, in which case it does nothing.
 */
extern void *_switch_to(void *last, void *next);
 
#define switch_to(prev,next,last)        \
do {                        \
   (last) = _switch_to(prev, next);    \
} while(0)
 
#endif /* _XTENSA_SWITCH_TO_H */