diff options
author | Yunqing Wang <yunqingwang@google.com> | 2010-08-30 18:16:04 -0400 |
---|---|---|
committer | Yunqing Wang <yunqingwang@google.com> | 2010-08-31 20:37:11 -0400 |
commit | 0e78efad0be73d293880d1b71053c0d70a50a080 (patch) | |
tree | a3e76c266712e05fd31a09521ce6075a2b59c982 /vp8/common/threading.h | |
parent | 0b94f5d6e827c0b4d6b2590592be4285f60c8477 (diff) | |
download | libvpx-0e78efad0be73d293880d1b71053c0d70a50a080.tar libvpx-0e78efad0be73d293880d1b71053c0d70a50a080.tar.gz libvpx-0e78efad0be73d293880d1b71053c0d70a50a080.tar.bz2 libvpx-0e78efad0be73d293880d1b71053c0d70a50a080.zip |
Replace sleep(0) calls in multi-threaded decoder
This is a workaround for gLucid problem.
Change-Id: I188a016a07e4c2ea212444c5a6284ff3c48a5caa
Diffstat (limited to 'vp8/common/threading.h')
-rw-r--r-- | vp8/common/threading.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vp8/common/threading.h b/vp8/common/threading.h index 96be710c4..cd2236168 100644 --- a/vp8/common/threading.h +++ b/vp8/common/threading.h @@ -75,7 +75,8 @@ #define thread_sleep(nms) // { struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} #else #include <unistd.h> -#define thread_sleep(nms) usleep(nms*1000);// {struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} +#include <sched.h> +#define thread_sleep(nms) sched_yield();// {struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} #endif /* Not Windows. Assume pthreads */ |