[lttng-dev] [PATCH lttng-modules] Fix: Remove not used PREEMPT_ACTIVE in Linux 4.4
Felipe F. Tonello
eu at felipetonello.com
Tue Feb 2 07:56:53 EST 2016
This flag was removed in Linux 4.4 as it is not necessary to use it any more.
Check Linux commits:
e61bf1e43b6f ('sched/core: Kill PREEMPT_ACTIVE')
da7142e2ed73 ('sched/core: Simplify preempt_count tests')
3d8f74dd4ca1 ('sched/core: Stop setting PREEMPT_ACTIVE')
Signed-off-by: Felipe F. Tonello <eu at felipetonello.com>
---
instrumentation/events/lttng-module/sched.h | 8 ++++----
instrumentation/events/mainline/sched.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h
index 4f3676bf54ea..53edd2af0e06 100644
--- a/instrumentation/events/lttng-module/sched.h
+++ b/instrumentation/events/lttng-module/sched.h
@@ -51,7 +51,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (preempt_count() & PREEMPT_ACTIVE)
+ if (preempt_count())
state = TASK_RUNNING | TASK_STATE_MAX;
#endif /* CONFIG_PREEMPT */
@@ -68,7 +68,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (task_preempt_count(p) & PREEMPT_ACTIVE)
+ if (task_preempt_count(p))
state = TASK_RUNNING | TASK_STATE_MAX;
#endif
@@ -85,7 +85,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
+ if (task_thread_info(p)->preempt_count)
state = TASK_RUNNING | TASK_STATE_MAX;
#endif
@@ -102,7 +102,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
+ if (task_thread_info(p)->preempt_count)
state = TASK_RUNNING;
#endif
diff --git a/instrumentation/events/mainline/sched.h b/instrumentation/events/mainline/sched.h
index ea7a2035456d..790085190a4b 100644
--- a/instrumentation/events/mainline/sched.h
+++ b/instrumentation/events/mainline/sched.h
@@ -100,7 +100,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
+ if (task_thread_info(p)->preempt_count)
state = TASK_RUNNING | TASK_STATE_MAX;
#endif
--
2.7.0
More information about the lttng-dev
mailing list