summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/sync
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/sync')
-rw-r--r--src/osd/modules/sync/sync_sdl.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/osd/modules/sync/sync_sdl.c b/src/osd/modules/sync/sync_sdl.c
index 66de65e2850..423a23face5 100644
--- a/src/osd/modules/sync/sync_sdl.c
+++ b/src/osd/modules/sync/sync_sdl.c
@@ -13,6 +13,8 @@
// standard C headers
#include <unistd.h>
+#include <sys/types.h>
+#include <signal.h>
// MAME headers
#include "osdcore.h"
@@ -315,7 +317,11 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
thread = (osd_thread *)calloc(1, sizeof(osd_thread));
thread->callback = callback;
thread->param = cbparam;
- thread->thread = SDL_CreateThread(worker_thread_entry, thread);
+#ifdef SDLMAME_SDL2
+ thread->thread = SDL_CreateThread(worker_thread_entry, "Thread", thread);
+#else
+ thread->thread = SDL_CreateThread(worker_thread_entry, thread);
+#endif
if ( thread->thread == NULL )
{
free(thread);
@@ -352,3 +358,12 @@ void osd_thread_wait_free(osd_thread *thread)
SDL_WaitThread(thread->thread, &status);
free(thread);
}
+
+//============================================================
+// osd_process_kill
+//============================================================
+
+void osd_process_kill(void)
+{
+ kill(getpid(), SIGKILL);
+}