Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #935
Browse files Browse the repository at this point in the history
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 fb9cbe4
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 490 deletions.
29 changes: 0 additions & 29 deletions configure.in
Expand Up @@ -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()
{
Expand Down Expand Up @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion include/SDL_config.h.in
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions src/SDL.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions src/thread/SDL_thread_c.h
Expand Up @@ -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
Expand Down
173 changes: 0 additions & 173 deletions src/thread/pth/SDL_syscond.c

This file was deleted.

93 changes: 0 additions & 93 deletions src/thread/pth/SDL_sysmutex.c

This file was deleted.

33 changes: 0 additions & 33 deletions src/thread/pth/SDL_sysmutex_c.h

This file was deleted.

0 comments on commit fb9cbe4

Please sign in to comment.