trunk/src/osd/modules/sync/sync_sdl.c
| r242753 | r242754 | |
| 13 | 13 | |
| 14 | 14 | // standard C headers |
| 15 | 15 | #include <unistd.h> |
| 16 | #include <sys/types.h> |
| 17 | #include <signal.h> |
| 16 | 18 | |
| 17 | 19 | // MAME headers |
| 18 | 20 | #include "osdcore.h" |
| r242753 | r242754 | |
| 315 | 317 | thread = (osd_thread *)calloc(1, sizeof(osd_thread)); |
| 316 | 318 | thread->callback = callback; |
| 317 | 319 | thread->param = cbparam; |
| 318 | | thread->thread = SDL_CreateThread(worker_thread_entry, thread); |
| 320 | #ifdef SDLMAME_SDL2 |
| 321 | thread->thread = SDL_CreateThread(worker_thread_entry, "Thread", thread); |
| 322 | #else |
| 323 | thread->thread = SDL_CreateThread(worker_thread_entry, thread); |
| 324 | #endif |
| 319 | 325 | if ( thread->thread == NULL ) |
| 320 | 326 | { |
| 321 | 327 | free(thread); |
| r242753 | r242754 | |
| 352 | 358 | SDL_WaitThread(thread->thread, &status); |
| 353 | 359 | free(thread); |
| 354 | 360 | } |
| 361 | |
| 362 | //============================================================ |
| 363 | // osd_process_kill |
| 364 | //============================================================ |
| 365 | |
| 366 | void osd_process_kill(void) |
| 367 | { |
| 368 | kill(getpid(), SIGKILL); |
| 369 | } |