From 5818014b691c1dc20f3597bbcbf165782b54eacb Mon Sep 17 00:00:00 2001 From: Ritu Baldwa Date: Wed, 2 Jan 2019 11:58:34 +0530 Subject: Revert "Revert "Add Tile-SB-Row based Multi-threading in Decoder"" This reverts commit 06983668cf41f66765528db044419f954e5a5d64. Fixes Visual Studio build errors introduced by earlier row mt commit BUG=webm:1587 Change-Id: I792df86e8254cd6b2a511955b691af619a569cd0 --- vpx_util/vpx_thread.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'vpx_util') diff --git a/vpx_util/vpx_thread.h b/vpx_util/vpx_thread.h index 4c20f378b..26de0de9f 100644 --- a/vpx_util/vpx_thread.h +++ b/vpx_util/vpx_thread.h @@ -211,6 +211,17 @@ static INLINE int pthread_cond_wait(pthread_cond_t *const condition, #endif return !ok; } + +static INLINE int sched_yield() { + int ok = 0; +#if _WIN32_WINNT >= 0x0400 // Windows XP and above + SwitchToThread(); +#else + Sleep(0); +#endif // _WIN32_WINNT >= 0x0400 + return ok; +} + #elif defined(__OS2__) #define INCL_DOS #include // NOLINT -- cgit v1.2.3