From: Enlightenment S. <no-...@en...> - 2011-05-17 07:17:59
|
Log: Ecore : ecore_thread: use Sleep() on Windows, instead of usleep() usleep() does not exists on Windows. Use Sleep() instead. But the resolution timers are not good on Windows. the sleep will be around 50ms at best. Author: caro Date: 2011-05-17 00:17:53 -0700 (Tue, 17 May 2011) New Revision: 59466 Trac: http://trac.enlightenment.org/e/changeset/59466 Modified: trunk/ecore/src/lib/ecore/ecore_thread.c Modified: trunk/ecore/src/lib/ecore/ecore_thread.c =================================================================== --- trunk/ecore/src/lib/ecore/ecore_thread.c 2011-05-17 07:17:31 UTC (rev 59465) +++ trunk/ecore/src/lib/ecore/ecore_thread.c 2011-05-17 07:17:53 UTC (rev 59466) @@ -677,7 +677,11 @@ LKU(_ecore_pending_job_threads_mutex); /* Sleep a little to prevent premature death */ +#ifdef _WIN32 + Sleep(1); /* around 50ms */ +#else usleep(200); +#endif LKL(_ecore_pending_job_threads_mutex); if (_ecore_pending_job_threads || _ecore_pending_job_threads_feedback) |