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>
This commit is contained in:
Peter Zijlstra
2009-07-10 14:57:56 +02:00
committed by Linus Torvalds
parent 2a6f86bc5e
commit c99e6efe1b
24 changed files with 29 additions and 40 deletions

View File

@@ -498,6 +498,12 @@ struct task_cputime {
.sum_exec_runtime = 0, \
}
/*
* Disable preemption until the scheduler is running.
* Reset by start_kernel()->sched_init()->init_idle().
*/
#define INIT_PREEMPT_COUNT (1)
/**
* struct thread_group_cputimer - thread group interval timer counts
* @cputime: thread group interval timers.