diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-07-31 15:28:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-05-05 03:23:59 -0400 |
commit | eb58075149b7f0300ff19142e6245fe75db2a081 (patch) | |
tree | 05d413ba23958f62067ccd079859e81c7f822663 /kernel/sched/sched.h | |
parent | 3e71a462dd483ce508a723356b293731e7d788ea (diff) |
sched/core: Introduce 'struct rq_flags'
In order to be able to pass around more than just the IRQ flags in the
future, add a rq_flags structure.
No difference in code generation for the x86_64-defconfig build I
tested.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index aab4cf05d48a..a5eecb1e5e4b 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
@@ -1451,13 +1451,17 @@ static inline void sched_rt_avg_update(struct rq *rq, u64 rt_delta) { } | |||
1451 | static inline void sched_avg_update(struct rq *rq) { } | 1451 | static inline void sched_avg_update(struct rq *rq) { } |
1452 | #endif | 1452 | #endif |
1453 | 1453 | ||
1454 | struct rq *__task_rq_lock(struct task_struct *p) | 1454 | struct rq_flags { |
1455 | unsigned long flags; | ||
1456 | }; | ||
1457 | |||
1458 | struct rq *__task_rq_lock(struct task_struct *p, struct rq_flags *rf) | ||
1455 | __acquires(rq->lock); | 1459 | __acquires(rq->lock); |
1456 | struct rq *task_rq_lock(struct task_struct *p, unsigned long *flags) | 1460 | struct rq *task_rq_lock(struct task_struct *p, struct rq_flags *rf) |
1457 | __acquires(p->pi_lock) | 1461 | __acquires(p->pi_lock) |
1458 | __acquires(rq->lock); | 1462 | __acquires(rq->lock); |
1459 | 1463 | ||
1460 | static inline void __task_rq_unlock(struct rq *rq) | 1464 | static inline void __task_rq_unlock(struct rq *rq, struct rq_flags *rf) |
1461 | __releases(rq->lock) | 1465 | __releases(rq->lock) |
1462 | { | 1466 | { |
1463 | lockdep_unpin_lock(&rq->lock); | 1467 | lockdep_unpin_lock(&rq->lock); |
@@ -1465,13 +1469,13 @@ static inline void __task_rq_unlock(struct rq *rq) | |||
1465 | } | 1469 | } |
1466 | 1470 | ||
1467 | static inline void | 1471 | static inline void |
1468 | task_rq_unlock(struct rq *rq, struct task_struct *p, unsigned long *flags) | 1472 | task_rq_unlock(struct rq *rq, struct task_struct *p, struct rq_flags *rf) |
1469 | __releases(rq->lock) | 1473 | __releases(rq->lock) |
1470 | __releases(p->pi_lock) | 1474 | __releases(p->pi_lock) |
1471 | { | 1475 | { |
1472 | lockdep_unpin_lock(&rq->lock); | 1476 | lockdep_unpin_lock(&rq->lock); |
1473 | raw_spin_unlock(&rq->lock); | 1477 | raw_spin_unlock(&rq->lock); |
1474 | raw_spin_unlock_irqrestore(&p->pi_lock, *flags); | 1478 | raw_spin_unlock_irqrestore(&p->pi_lock, rf->flags); |
1475 | } | 1479 | } |
1476 | 1480 | ||
1477 | #ifdef CONFIG_SMP | 1481 | #ifdef CONFIG_SMP |