Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information
slouken committed Jan 24, 2010
1 parent 09b6314 commit fb9cbe485d9ec4d2c4269705f6ebbbd47a83ea11
@@ -1694,33 +1694,6 @@ AC_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [[
fi
}

dnl See if we can use GNU pth library for threads
CheckPTH()
{
dnl Check for pth support
AC_ARG_ENABLE(pth,
AC_HELP_STRING([--enable-pth], [use GNU pth library for multi-threading [[default=yes]]]),
, enable_pth=yes)
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
AC_PATH_PROG(PTH_CONFIG, pth-config, no)
if test "$PTH_CONFIG" = "no"; then
use_pth=no
else
use_pth=yes
fi
AC_MSG_CHECKING(pth)
AC_MSG_RESULT($use_pth)
if test "x$use_pth" = xyes; then
AC_DEFINE(SDL_THREAD_PTH)
SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
SDL_LIBS="$SDL_LIBS `$PTH_CONFIG --libs --all`"
have_threads=yes
fi
fi
}

dnl See what type of thread model to use on Linux and Solaris
CheckPTHREAD()
{
@@ -1892,8 +1865,6 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]])
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"

have_threads=yes
else
CheckPTH
fi
fi
}
@@ -236,7 +236,6 @@
/* Enable various threading systems */
#undef SDL_THREAD_BEOS
#undef SDL_THREAD_NDS
#undef SDL_THREAD_PTH
#undef SDL_THREAD_PTHREAD
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
@@ -31,10 +31,6 @@
#include "video/SDL_leaks.h"
#endif

#if SDL_THREAD_PTH
#include <pth.h>
#endif

/* Initialization/Cleanup routines */
#if !SDL_JOYSTICK_DISABLED
extern int SDL_JoystickInit(void);
@@ -152,12 +148,6 @@ SDL_InitSubSystem(Uint32 flags)
int
SDL_Init(Uint32 flags)
{
#if !SDL_THREADS_DISABLED && SDL_THREAD_PTH
if (!pth_init()) {
return -1;
}
#endif

if (SDL_AssertionsInit() < 0) {
return -1;
}
@@ -266,9 +256,6 @@ SDL_Quit(void)

SDL_AssertionsQuit();

#if !SDL_THREADS_DISABLED && SDL_THREAD_PTH
pth_kill();
#endif
#ifdef DEBUG_BUILD
printf("[SDL_Quit] : Returning!\n");
fflush(stdout);
@@ -31,8 +31,6 @@
#include "beos/SDL_systhread_c.h"
#elif SDL_THREAD_EPOC
#include "epoc/SDL_systhread_c.h"
#elif SDL_THREAD_PTH
#include "pth/SDL_systhread_c.h"
#elif SDL_THREAD_PTHREAD
#include "pthread/SDL_systhread_c.h"
#elif SDL_THREAD_SPROC

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit fb9cbe4

Please sign in to comment.