Commit a4b1f629 by Nicolas Capens Committed by Greg Hartman

Use sched_yield() instead of pthread_yield().

pthread_yield() is non-standard and not available on Android. shed_yield() is a POSIX standard function. Change-Id: I093047031dd0b35a28724540aaddeb3f5ba849bc Reviewed-on: https://swiftshader-review.googlesource.com/2682Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarGreg Hartman <ghartman@google.com> Tested-by: 's avatarGreg Hartman <ghartman@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 3bcd2668
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <intrin.h> #include <intrin.h>
#else #else
#include <pthread.h> #include <pthread.h>
#include <sched.h>
#include <unistd.h> #include <unistd.h>
#define TLS_OUT_OF_INDEXES (~0) #define TLS_OUT_OF_INDEXES (~0)
#endif #endif
...@@ -110,7 +111,7 @@ namespace sw ...@@ -110,7 +111,7 @@ namespace sw
#elif defined(__APPLE__) #elif defined(__APPLE__)
pthread_yield_np(); pthread_yield_np();
#else #else
pthread_yield(); sched_yield();
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment