Skip to contentSkip to conversation

workqueues: s/2/WORK_STRUCT_STATIC/ in WORK_DATA_STATIC_INIT()

PATCH In review Oleg Nesterov 2 participants 2 messages Feb 24, 2010 – Feb 25, 2010 Workqueue

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 workqueues: s/2/WORK_STRUCT_STATIC/ in WORK_DATA_STATIC_INIT()

Cosmetic. Don't hide WORK_STRUCT_STATIC from grep.

---

 include/linux/workqueue.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/workqueue.h renamed from include/linux/workqueue.h~3_STATIC_INIT_USE_STATIC +1 -1
@@ -36,7 +36,7 @@ struct work_struct {
 };
 
 #define WORK_DATA_INIT()	ATOMIC_LONG_INIT(0)
-#define WORK_DATA_STATIC_INIT()	ATOMIC_LONG_INIT(2)
+#define WORK_DATA_STATIC_INIT()	ATOMIC_LONG_INIT(1UL << WORK_STRUCT_STATIC)
 
 struct delayed_work {
 	struct work_struct work;
maintainer
#1 lore raw

Hello,

Quoted 11 lines · Oleg Nesterov

Cosmetic. Don't hide WORK_STRUCT_STATIC from grep.

---

 include/linux/workqueue.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

include/linux/workqueue.h struct work_struct { · line 39

Quoted 5 lines
include/linux/workqueue.h renamed from include/linux/workqueue.h~3_STATIC_INIT_USE_STATIC +1 -1
@@ -36,7 +36,7 @@ struct work_struct {
 };
 
 #define WORK_DATA_INIT()	ATOMIC_LONG_INIT(0)
-#define WORK_DATA_STATIC_INIT()	ATOMIC_LONG_INIT(2)
+#define WORK_DATA_STATIC_INIT()	ATOMIC_LONG_INIT(1UL << WORK_STRUCT_STATIC)

I already have this in my cmwq patches.

Thanks.

Signature · 1 line
tejun