Skip to contentSkip to conversation

multipath-tools: replace pthread_yield with sched_yield

PATCH New Xose Vazquez Perez 1 participant 1 message Oct 20, 2016 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: replace pthread_yield with sched_yield

pthread_yield is not standard.
It was added in 6e14b7b

Please review.

Patch from Alpine Linux: http://git.alpinelinux.org/cgit/aports/plain/main/multipath-tools/fix-yield.patch

Cc Natanael Copa <[email protected]>
Cc Leonardo Arena <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
---
 multipathd/uxlsnr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
multipathd/uxlsnr.c +1 -1
index daaaa99..dfef03e 100644
@@ -182,7 +182,7 @@ void * uxsock_listen(uxsock_trigger_fn uxsock_trigger, void * trigger_data)
 				pthread_mutex_unlock(&client_lock);
 				condlog(0, "%s: failed to realloc %d poll fds",
 					"uxsock", 1 + num_clients);
-				pthread_yield();
+				sched_yield();
 				continue;
 			}
 			old_clients = num_clients;
Signature · 1 line
2.10.1