mirror of
https://github.com/yawut/SDL.git
synced 2026-08-31 21:24:10 -05:00
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.
This commit is contained in:
@@ -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 @@ SDL_GetTicks(void)
|
||||
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 @@ SDL_Delay(Uint32 ms)
|
||||
was_error = select(0, NULL, NULL, NULL, &tv);
|
||||
#endif /* HAVE_NANOSLEEP */
|
||||
} while (was_error && (errno == EINTR));
|
||||
#endif /* SDL_THREAD_PTH */
|
||||
}
|
||||
|
||||
#ifdef USE_ITIMER
|
||||
|
||||
Reference in New Issue
Block a user