diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-07-10 08:57:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-10 17:24:05 -0400 |
commit | c99e6efe1ba04561e7d93a81f0be07e37427e835 (patch) | |
tree | 8a1743463ef9676e68b9c3971f0bbeea04111bdd /include | |
parent | 2a6f86bc5ed4af2ff04bc927eb77789c70e53a1e (diff) |
sched: INIT_PREEMPT_COUNT
Pull the initial preempt_count value into a single
definition site.
Maintainers for: alpha, ia64 and m68k, please have a look,
your arch code is funny.
The header magic is a bit odd, but similar to the KERNEL_DS
one, CPP waits with expanding these macros until the
INIT_THREAD_INFO macro itself is expanded, which is in
arch/*/kernel/init_task.c where we've already included
sched.h so we're good.
Cc: tony.luck@intel.com
Cc: rth@twiddle.net
Cc: geert@linux-m68k.org
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 0085d758d645..2a99f1c15cf8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -498,6 +498,12 @@ struct task_cputime { | |||
498 | .sum_exec_runtime = 0, \ | 498 | .sum_exec_runtime = 0, \ |
499 | } | 499 | } |
500 | 500 | ||
501 | /* | ||
502 | * Disable preemption until the scheduler is running. | ||
503 | * Reset by start_kernel()->sched_init()->init_idle(). | ||
504 | */ | ||
505 | #define INIT_PREEMPT_COUNT (1) | ||
506 | |||
501 | /** | 507 | /** |
502 | * struct thread_group_cputimer - thread group interval timer counts | 508 | * struct thread_group_cputimer - thread group interval timer counts |
503 | * @cputime: thread group interval timers. | 509 | * @cputime: thread group interval timers. |