mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
Fix autorelease pool warnings when running multithreaded on Mac OS X [Tim Lindner]
This commit is contained in:
parent
44ad8a207f
commit
77e86084ab
@ -405,7 +405,7 @@ endif # Win32
|
|||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
|
||||||
ifeq ($(BASE_TARGETOS),macosx)
|
ifeq ($(BASE_TARGETOS),macosx)
|
||||||
#OSDCOREOBJS += $(SDLOBJ)/osxutils.o
|
OSDCOREOBJS += $(SDLOBJ)/osxutils.o
|
||||||
|
|
||||||
ifndef MACOSX_USE_LIBSDL
|
ifndef MACOSX_USE_LIBSDL
|
||||||
# Compile using framework (compile using libSDL is the exception)
|
# Compile using framework (compile using libSDL is the exception)
|
||||||
|
@ -30,6 +30,9 @@ int sdl_num_processors = 0;
|
|||||||
|
|
||||||
#include "eminline.h"
|
#include "eminline.h"
|
||||||
|
|
||||||
|
#if defined(SDLMAME_MACOSX)
|
||||||
|
#include "osxutils.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
// DEBUGGING
|
// DEBUGGING
|
||||||
@ -627,6 +630,10 @@ static void *worker_thread_entry(void *param)
|
|||||||
work_thread_info *thread = (work_thread_info *)param;
|
work_thread_info *thread = (work_thread_info *)param;
|
||||||
osd_work_queue *queue = thread->queue;
|
osd_work_queue *queue = thread->queue;
|
||||||
|
|
||||||
|
#if defined(SDLMAME_MACOSX)
|
||||||
|
void *arp = NewAutoreleasePool();
|
||||||
|
#endif
|
||||||
|
|
||||||
// loop until we exit
|
// loop until we exit
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
@ -678,6 +685,11 @@ static void *worker_thread_entry(void *param)
|
|||||||
atomic_exchange32(&thread->active, FALSE);
|
atomic_exchange32(&thread->active, FALSE);
|
||||||
atomic_decrement32(&queue->livethreads);
|
atomic_decrement32(&queue->livethreads);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(SDLMAME_MACOSX)
|
||||||
|
ReleaseAutoreleasePool(arp);
|
||||||
|
#endif
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user