diff options
author | Ritu Baldwa <ritu.baldwa@ittiam.com> | 2019-01-02 11:58:34 +0530 |
---|---|---|
committer | Ritu Baldwa <ritu.baldwa@ittiam.com> | 2019-01-19 10:20:32 +0530 |
commit | 5818014b691c1dc20f3597bbcbf165782b54eacb (patch) | |
tree | d5bbe5ebaebde85b614a467777307260f6ef73a0 /vpx_util | |
parent | 06983668cf41f66765528db044419f954e5a5d64 (diff) | |
download | libvpx-5818014b691c1dc20f3597bbcbf165782b54eacb.tar libvpx-5818014b691c1dc20f3597bbcbf165782b54eacb.tar.gz libvpx-5818014b691c1dc20f3597bbcbf165782b54eacb.tar.bz2 libvpx-5818014b691c1dc20f3597bbcbf165782b54eacb.zip |
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
Diffstat (limited to 'vpx_util')
-rw-r--r-- | vpx_util/vpx_thread.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 <os2.h> // NOLINT |