Switch to posix compaatible sched_yield

Use sched_yield() instead of pthread_yield()
This commit is contained in:
9000h 2019-10-28 12:34:46 +01:00 committed by GitHub
parent 5653e31466
commit 70ef3d6602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@
#include <string.h>
#include <math.h>
#include <sys/prctl.h>
#include <sched.h>
#include <libintl.h>
#define _(str) gettext(str) ///< gettext shortcut
@ -1584,7 +1585,7 @@ static int OssThread(void)
if (err < 0) { // underrun error
return -1;
}
pthread_yield();
sched_yield();
usleep(OssFragmentTime * 1000); // let fill/empty the buffers
return 0;
}