diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-11 15:51:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-11 15:51:40 -0700 |
commit | 357d596bd552ad157a906289ab13ea6ba7e66e3d (patch) | |
tree | 78b8f6bc2781af2e95a6cf2b20a06dfe8bb04e5c /kernel/sched.c | |
parent | e6c69bd39199656a8bbd0569edaff60574ff9cac (diff) | |
parent | d67eb16f5d444fb6d173bcec889ddb2066c0fa0c (diff) | |
download | kernel-crypto-357d596bd552ad157a906289ab13ea6ba7e66e3d.tar.gz kernel-crypto-357d596bd552ad157a906289ab13ea6ba7e66e3d.tar.xz kernel-crypto-357d596bd552ad157a906289ab13ea6ba7e66e3d.zip |
Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index dbd4490afec..e9ff04a9b56 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -3577,6 +3577,32 @@ task_t *idle_task(int cpu) } /** + * curr_task - return the current task for a given cpu. + * @cpu: the processor in question. + */ +task_t *curr_task(int cpu) +{ + return cpu_curr(cpu); +} + +/** + * set_curr_task - set the current task for a given cpu. + * @cpu: the processor in question. + * @p: the task pointer to set. + * + * Description: This function must only be used when non-maskable interrupts + * are serviced on a separate stack. It allows the architecture to switch the + * notion of the current task on a cpu in a non-blocking manner. This function + * must be called with interrupts disabled, the caller must save the original + * value of the current task (see curr_task() above) and restore that value + * before reenabling interrupts. + */ +void set_curr_task(int cpu, task_t *p) +{ + cpu_curr(cpu) = p; +} + +/** * find_process_by_pid - find a process with a matching PID value. * @pid: the pid in question. */ |