]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sched/wait: Standardize internal naming of wait-queue heads
authorIngo Molnar <mingo@kernel.org>
Sun, 5 Mar 2017 10:10:18 +0000 (11:10 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 20 Jun 2017 10:18:28 +0000 (12:18 +0200)
commit9d9d676f595b5081326be7a17dc681fcb38fb3b2
tree51ca43da6b1e40276947672ff0307d4008f4dc74
parent50816c48997af857d4bab3dca1aba90339705e96
sched/wait: Standardize internal naming of wait-queue heads

The wait-queue head parameters and variables are named in a
couple of ways, we have the following variants currently:

wait_queue_head_t *q
wait_queue_head_t *wq
wait_queue_head_t *head

In particular the 'wq' naming is ambiguous in the sense whether it's
a wait-queue head or entry name - as entries were often named 'wait'.

( Not to mention the confusion of any readers coming over from
  workqueue-land. )

Standardize all this around a single, unambiguous parameter and
variable name:

struct wait_queue_head *wq_head

which is easy to grep for and also rhymes nicely with the wait-queue
entry naming:

struct wait_queue_entry *wq_entry

Also rename:

struct __wait_queue_head => struct wait_queue_head

... and use this struct type to migrate from typedefs usage to 'struct'
usage, which is more in line with existing kernel practices.

Don't touch any external users and preserve the main wait_queue_head_t
typedef.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/wait.h
kernel/sched/wait.c