diff src/timer/unix/SDL_systimer.c @ 3696:47d923feedb0

Fixed bug #935 Patrice Mandin Hello, I originally added pth support for threads in SDL 1.2 because on the Atari platform we did not have any thread library. I think pth support could be removed from SDL 1.3 for two reasons: - Atari platform removed - pth does not provides real (preemptive) threads, because it is user space, and expect the application to call one of its function to give CPU to another thread. So it is not exactly useful for applications, that expect threads to run simultaneously.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 24 Jan 2010 20:47:20 +0000
parents 99210400e8b9
children f7b03b6838cb
line wrap: on
line diff
--- a/src/timer/unix/SDL_systimer.c	Sun Jan 24 20:21:51 2010 +0000
+++ b/src/timer/unix/SDL_systimer.c	Sun Jan 24 20:47:20 2010 +0000
@@ -42,10 +42,6 @@
 #include <time.h>
 #endif
 
-#if SDL_THREAD_PTH
-#include <pth.h>
-#endif
-
 #if SDL_THREADS_DISABLED
 #define USE_ITIMER
 #endif
@@ -94,12 +90,6 @@
 void
 SDL_Delay(Uint32 ms)
 {
-#if SDL_THREAD_PTH
-    pth_time_t tv;
-    tv.tv_sec = ms / 1000;
-    tv.tv_usec = (ms % 1000) * 1000;
-    pth_nap(tv);
-#else
     int was_error;
 
 #if HAVE_NANOSLEEP
@@ -138,7 +128,6 @@
         was_error = select(0, NULL, NULL, NULL, &tv);
 #endif /* HAVE_NANOSLEEP */
     } while (was_error && (errno == EINTR));
-#endif /* SDL_THREAD_PTH */
 }
 
 #ifdef USE_ITIMER