summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2024-01-26 11:55:50 -1000
committerTejun Heo <tj@kernel.org>2024-01-26 11:55:50 -1000
commite563d0a7cdc1890ff36bb177b5c8c2854d881e4d (patch)
treecdcb96a85fbf50ad85173a2bcc55817fc0e2f8cb /kernel/workqueue.c
parent6a229b0e2ff6143b65ba4ef42bd71e29ffc2c16d (diff)
workqueue: Break up enum definitions and give names to the types
workqueue is collecting different sorts of enums into a single unnamed enum type which can increase confusion around enum width. Also, unnamed enums can't be accessed from BPF. Let's break up enum definitions according to their purposes and give them type names. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index b6b690a17f7c..45d0a784ba4f 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -56,7 +56,7 @@
#include "workqueue_internal.h"
-enum {
+enum worker_pool_flags {
/*
* worker_pool flags
*
@@ -75,7 +75,9 @@ enum {
*/
POOL_MANAGER_ACTIVE = 1 << 0, /* being managed */
POOL_DISASSOCIATED = 1 << 2, /* cpu can't serve workers */
+};
+enum worker_flags {
/* worker flags */
WORKER_DIE = 1 << 1, /* die die die */
WORKER_IDLE = 1 << 2, /* is idle */
@@ -86,7 +88,9 @@ enum {
WORKER_NOT_RUNNING = WORKER_PREP | WORKER_CPU_INTENSIVE |
WORKER_UNBOUND | WORKER_REBOUND,
+};
+enum wq_internal_consts {
NR_STD_WORKER_POOLS = 2, /* # standard pools per cpu */
UNBOUND_POOL_HASH_ORDER = 6, /* hashed by pool->attrs */