162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 362306a36Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 462306a36Sopenharmony_ci * for more details. 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Copyright (C) 2001 - 2005 Tensilica Inc. 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef _XTENSA_SWITCH_TO_H 1062306a36Sopenharmony_ci#define _XTENSA_SWITCH_TO_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci/* * switch_to(n) should switch tasks to task nr n, first 1362306a36Sopenharmony_ci * checking that n isn't the current task, in which case it does nothing. 1462306a36Sopenharmony_ci */ 1562306a36Sopenharmony_ciextern void *_switch_to(void *last, void *next); 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#define switch_to(prev,next,last) \ 1862306a36Sopenharmony_cido { \ 1962306a36Sopenharmony_ci (last) = _switch_to(prev, next); \ 2062306a36Sopenharmony_ci} while(0) 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci#endif /* _XTENSA_SWITCH_TO_H */ 23