|
@@ -428,6 +428,14 @@ struct task_cputime {
|
|
|
.sum_exec_runtime = 0, \
|
|
|
}
|
|
|
|
|
|
+#define PREEMPT_ENABLED (PREEMPT_NEED_RESCHED)
|
|
|
+
|
|
|
+#ifdef CONFIG_PREEMPT_COUNT
|
|
|
+#define PREEMPT_DISABLED (1 + PREEMPT_ENABLED)
|
|
|
+#else
|
|
|
+#define PREEMPT_DISABLED PREEMPT_ENABLED
|
|
|
+#endif
|
|
|
+
|
|
|
/*
|
|
|
* Disable preemption until the scheduler is running.
|
|
|
* Reset by start_kernel()->sched_init()->init_idle().
|
|
@@ -435,9 +443,7 @@ struct task_cputime {
|
|
|
* We include PREEMPT_ACTIVE to avoid cond_resched() from working
|
|
|
* before the scheduler is active -- see should_resched().
|
|
|
*/
|
|
|
-#define INIT_PREEMPT_COUNT (1 + PREEMPT_ACTIVE + PREEMPT_NEED_RESCHED)
|
|
|
-#define PREEMPT_ENABLED (PREEMPT_NEED_RESCHED)
|
|
|
-#define PREEMPT_DISABLED (1 + PREEMPT_NEED_RESCHED)
|
|
|
+#define INIT_PREEMPT_COUNT (PREEMPT_DISABLED + PREEMPT_ACTIVE)
|
|
|
|
|
|
/**
|
|
|
* struct thread_group_cputimer - thread group interval timer counts
|