diff options
author | Tejun Heo <tj@kernel.org> | 2012-07-13 22:16:44 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-07-13 22:16:44 -0700 |
commit | 4ce62e9e30cacc26885cab133ad1de358dd79f21 (patch) | |
tree | 6b08a377a236f0e44f335f7813d3da58a7ee1c70 /lib/parser.c | |
parent | 11ebea50dbc1ade5994b2c838a096078d4c02399 (diff) |
workqueue: introduce NR_WORKER_POOLS and for_each_worker_pool()
Introduce NR_WORKER_POOLS and for_each_worker_pool() and convert code
paths which need to manipulate all pools in a gcwq to use them.
NR_WORKER_POOLS is currently one and for_each_worker_pool() iterates
over only @gcwq->pool.
Note that nr_running is per-pool property and converted to an array
with NR_WORKER_POOLS elements and renamed to pool_nr_running. Note
that get_pool_nr_running() currently assumes 0 index. The next patch
will make use of non-zero index.
The changes in this patch are mechanical and don't caues any
functional difference. This is to prepare for multiple pools per
gcwq.
v2: nr_running indexing bug in get_pool_nr_running() fixed.
v3: Pointer to array is stupid. Don't use it in get_pool_nr_running()
as suggested by Linus.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/parser.c')
0 files changed, 0 insertions, 0 deletions