x86/xen: resume timer irqs early
[linux/fpc-iii.git] / arch / frv / include / asm / switch_to.h
blob2cf0f6a7fbb1dbb9018c31311b10413b09220d4e
1 /* FR-V CPU basic task switching
3 * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #ifndef _ASM_SWITCH_TO_H
13 #define _ASM_SWITCH_TO_H
15 #include <linux/thread_info.h>
18 * switch_to(prev, next) should switch from task `prev' to `next'
19 * `prev' will never be the same as `next'.
20 * The `mb' is to tell GCC not to cache `current' across this call.
22 extern asmlinkage
23 struct task_struct *__switch_to(struct thread_struct *prev_thread,
24 struct thread_struct *next_thread,
25 struct task_struct *prev);
27 #define switch_to(prev, next, last) \
28 do { \
29 (prev)->thread.sched_lr = \
30 (unsigned long) __builtin_return_address(0); \
31 (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
32 mb(); \
33 } while(0)
35 #endif /* _ASM_SWITCH_TO_H */