1
0
mirror of https://github.com/jojo61/vdr-plugin-softhdcuvid.git synced 2023-10-10 13:37:41 +02:00

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

View File

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