commit 3da8ef855d7d7b3da96a9f1cba55df276e112f11 from: Stefan Sperling date: Tue Sep 21 11:05:06 2021 UTC tog: use sched_yield(2) instead of pthread_yield(3) for portability pthread_yield(3) is an optional POSIX 2001 extension while sched_yield(2) is part of POSIX 2008. On OpenBSD they are actually equivalent, albeit not documented as such. Using sched_yield(2) helps the -portable version. Patch by Quentin Rameau commit - 6062e8ea890c053733ec0ad3387a40da18a45cda commit + 3da8ef855d7d7b3da96a9f1cba55df276e112f11 blob - 52159fccda01040bb4cb1a1a48e126350a420f5c blob + cbf77a99b234b7a155644a3abe25adda577f1a8d --- tog/tog.c +++ tog/tog.c @@ -38,6 +38,7 @@ #include #include #include +#include #include "got_version.h" #include "got_error.h" @@ -841,7 +842,7 @@ view_input(struct tog_view **new, int *done, struct to if (errcode) return got_error_set_errno(errcode, "pthread_mutex_unlock"); - pthread_yield(); + sched_yield(); errcode = pthread_mutex_lock(&tog_mutex); if (errcode) return got_error_set_errno(errcode,