/* thread_sleep implementation: yield unless Linux/Unix. */
#if defined(__unix__) || defined(__APPLE__)
-#define thread_sleep(nms)
-/* {struct timespec ts;ts.tv_sec=0;
- ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} */
+#define thread_sleep(nms) {struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);}
#else
-#define thread_sleep(nms) sched_yield();
+#define thread_sleep(nms) {struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);}
#endif /* __unix__ || __APPLE__ */
#endif
const int nsync) {
while (mb_col > (vpx_atomic_load_acquire(last_row_current_mb_col) - nsync)) {
x86_pause_hint();
- thread_sleep(0);
+ thread_sleep(1000);
}
}