diff src/thread/amigaos/SDL_systhread.c @ 21:75a95f82bc1f

Updated the Amiga OS port of SDL (thanks Gabriele)
author Sam Lantinga <slouken@lokigames.com>
date Thu, 10 May 2001 20:13:29 +0000
parents 74212992fb08
children e8157fcb3114
line wrap: on
line diff
--- a/src/thread/amigaos/SDL_systhread.c	Thu May 10 20:10:54 2001 +0000
+++ b/src/thread/amigaos/SDL_systhread.c	Thu May 10 20:13:29 2001 +0000
@@ -25,7 +25,7 @@
  "@(#) $Id$";
 #endif
 
-/* AmigaOS thread management routines for SDL */
+/* BeOS thread management routines for SDL */
 
 #include "SDL_error.h"
 #include "SDL_mutex.h"
@@ -40,6 +40,8 @@
 	struct Task *wait;
 } thread_args;
 
+#ifndef MORPHOS
+
 #if defined(__SASC) && !defined(__PPC__) 
 __saveds __asm Uint32 RunThread(register __a0 char *args )
 #elif defined(__PPC__)
@@ -60,6 +62,34 @@
 	return(0);
 }
 
+#else
+
+#include <emul/emulinterface.h>
+
+Uint32 RunTheThread(void)
+{
+	thread_args *data=(thread_args *)atol(REG_A0);
+	struct Task *Father;
+
+	D(bug("Received data: %lx\n",data));
+	Father=data->wait;
+
+	SDL_RunThread(data);
+
+	Signal(Father,SIGBREAKF_CTRL_F);
+	return(0);
+}
+
+struct EmulLibEntry RunThread=
+{
+	TRAP_LIB,
+	0,
+	RunTheThread
+};
+
+#endif
+
+
 int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
 {
 	/* Create the thread and go! */
@@ -98,6 +128,7 @@
 
 void SDL_SYS_WaitThread(SDL_Thread *thread)
 {
+	SetSignal(0L,SIGBREAKF_CTRL_F|SIGBREAKF_CTRL_C);
 	Wait(SIGBREAKF_CTRL_F|SIGBREAKF_CTRL_C);
 }