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 <nc...@alpinelinux.org>
Cc: Leonardo Arena <rna...@alpinelinux.org>
Cc: Hannes Reinecke <h...@suse.de>
Cc: Christophe Varoqui <christophe.varo...@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazq...@gmail.com>
---
 multipathd/uxlsnr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c
index daaaa99..dfef03e 100644
--- a/multipathd/uxlsnr.c
+++ b/multipathd/uxlsnr.c
@@ -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;
-- 
2.10.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to