Skip to contentSkip to conversation

multipathd: Change four threads from detached into joinable

PATCH In review Bart Van Assche 2 participants 2 messages Aug 18, 2016 – Aug 29, 2016 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipathd: Change four threads from detached into joinable

Change the CLI listener, checker loop, uevent dispatcher and uevent listener threads from detached into joinable threads. This change is needed because calling pthread_join() is only allowed for joinable threads.

---
 multipathd/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
multipathd/main.c +2 -2
index 2be6cb2..6b3c856 100644
@@ -2216,8 +2216,8 @@ child (void * param)
 	signal_init();
 	rcu_init();
 
-	setup_thread_attr(&misc_attr, 64 * 1024, 1);
-	setup_thread_attr(&uevent_attr, DEFAULT_UEVENT_STACKSIZE * 1024, 1);
+	setup_thread_attr(&misc_attr, 64 * 1024, 0);
+	setup_thread_attr(&uevent_attr, DEFAULT_UEVENT_STACKSIZE * 1024, 0);
 	setup_thread_attr(&waiter_attr, 32 * 1024, 1);
 
 	if (logsink == 1) {
Signature · 1 line
2.9.2
#1 lore raw

Merged.
Thanks.

Quoted 32 lines · Bart Van Assche

Change the CLI listener, checker loop, uevent dispatcher and uevent listener threads from detached into joinable threads. This change is needed because calling pthread_join() is only allowed for joinable threads.

---
 multipathd/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
multipathd/main.c +2 -2
index 2be6cb2..6b3c856 100644
@@ -2216,8 +2216,8 @@ child (void * param)
        signal_init();
        rcu_init();
 
-       setup_thread_attr(&misc_attr, 64 * 1024, 1);
-       setup_thread_attr(&uevent_attr, DEFAULT_UEVENT_STACKSIZE * 1024,
 1);
+       setup_thread_attr(&misc_attr, 64 * 1024, 0);
+       setup_thread_attr(&uevent_attr, DEFAULT_UEVENT_STACKSIZE * 1024,
 0);
        setup_thread_attr(&waiter_attr, 32 * 1024, 1);
        if (logsink == 1) {

--
2.9.2