Merge pull request #12 from 9000h/Switch-to-posix-compaatible-sched_yield

Switch to posix compatible sched_yield
This commit is contained in:
jojo61 2019-10-28 19:58:27 +01:00 committed by GitHub
commit bdfe1a62c9
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
@ -1545,7 +1546,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;
}