summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/sync
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-01-07 20:56:57 +0100
committer couriersud <couriersud@arcor.de>2015-01-07 20:56:57 +0100
commitb052d877decd86e37ffacbe120e9aa3f1ad27fd6 (patch)
treeb8f736540a3085d1718f8fd542448eef24d4424a /src/osd/modules/sync
parent941e26ac2f81d6b2bdffba6c9987ee5e8dceff11 (diff)
Fix compile of sync_sdl.c. (nw)
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);
+}