switch_to.h 601 B

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