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:
Sam Lantinga
2010-01-24 20:47:20 +00:00
parent 96cb1303f9
commit 102fd54847
10 changed files with 0 additions and 490 deletions

View File

@@ -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