From: José Fonseca <jfons...@vmware.com> Prevents undetermined sleeps. --- src/gallium/auxiliary/os/os_time.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c index 4055125..f943e0f 100644 --- a/src/gallium/auxiliary/os/os_time.c +++ b/src/gallium/auxiliary/os/os_time.c @@ -88,7 +88,11 @@ os_time_get_nano(void) void os_time_sleep(int64_t usecs) { - Sleep((usecs + 999) / 1000); + DWORD dwMilliseconds = (usecs + 999) / 1000; + /* Avoid Sleep(O) as that would cause to sleep for an undetermined duration */ + if (dwMilliseconds) { + Sleep(dwMilliseconds); + } } #endif -- 1.7.9.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev