mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
Commented (per Kale's request) not removed libcothread usage in core (requires clean build), (no whatsnew)
We can safely remove comments and cothread.* from /emu and /lib/cothread if it's confirmed way to go
This commit is contained in:
parent
fc37544200
commit
cda1b4765c
7
makefile
7
makefile
@ -621,9 +621,6 @@ SOFTFLOAT = $(OBJ)/libsoftfloat.a
|
|||||||
# add formats emulation library
|
# add formats emulation library
|
||||||
FORMATS_LIB = $(OBJ)/libformats.a
|
FORMATS_LIB = $(OBJ)/libformats.a
|
||||||
|
|
||||||
# add cothread library
|
|
||||||
COTHREAD = $(OBJ)/libco.a
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
@ -726,9 +723,9 @@ $(sort $(OBJDIRS)):
|
|||||||
ifndef EXECUTABLE_DEFINED
|
ifndef EXECUTABLE_DEFINED
|
||||||
|
|
||||||
# always recompile the version string
|
# always recompile the version string
|
||||||
$(VERSIONOBJ): $(DRVLIBS) $(LIBOSD) $(LIBCPU) $(LIBEMU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(SOFTFLOAT) $(FORMATS_LIB) $(COTHREAD) $(LIBOCORE) $(RESFILE)
|
$(VERSIONOBJ): $(DRVLIBS) $(LIBOSD) $(LIBCPU) $(LIBEMU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(SOFTFLOAT) $(FORMATS_LIB) $(LIBOCORE) $(RESFILE)
|
||||||
|
|
||||||
$(EMULATOR): $(VERSIONOBJ) $(EMUINFOOBJ) $(DRIVLISTOBJ) $(DEVLISTOBJ) $(DRVLIBS) $(LIBOSD) $(LIBCPU) $(LIBEMU) $(LIBDASM) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(SOFTFLOAT) $(FORMATS_LIB) $(COTHREAD) $(ZLIB) $(LIBOCORE) $(RESFILE)
|
$(EMULATOR): $(VERSIONOBJ) $(EMUINFOOBJ) $(DRIVLISTOBJ) $(DEVLISTOBJ) $(DRVLIBS) $(LIBOSD) $(LIBCPU) $(LIBEMU) $(LIBDASM) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(SOFTFLOAT) $(FORMATS_LIB) $(ZLIB) $(LIBOCORE) $(RESFILE)
|
||||||
@echo Linking $@...
|
@echo Linking $@...
|
||||||
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
|
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
|
||||||
ifeq ($(TARGETOS),win32)
|
ifeq ($(TARGETOS),win32)
|
||||||
|
@ -73,7 +73,7 @@ const int TRIGGER_SUSPENDTIME = -4000;
|
|||||||
|
|
||||||
device_execute_interface::device_execute_interface(const machine_config &mconfig, device_t &device)
|
device_execute_interface::device_execute_interface(const machine_config &mconfig, device_t &device)
|
||||||
: device_interface(device),
|
: device_interface(device),
|
||||||
m_cothread(cothread_entry_delegate(FUNC(device_execute_interface::run_thread_wrapper), this)),
|
// m_cothread(cothread_entry_delegate(FUNC(device_execute_interface::run_thread_wrapper), this)),
|
||||||
m_disabled(false),
|
m_disabled(false),
|
||||||
m_vblank_interrupt(NULL),
|
m_vblank_interrupt(NULL),
|
||||||
m_vblank_interrupts_per_frame(0),
|
m_vblank_interrupts_per_frame(0),
|
||||||
@ -377,7 +377,7 @@ UINT64 device_execute_interface::total_cycles() const
|
|||||||
// which just calls run and then returns to the
|
// which just calls run and then returns to the
|
||||||
// scheduler thread, over and over
|
// scheduler thread, over and over
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
/*
|
||||||
void device_execute_interface::run_thread_wrapper()
|
void device_execute_interface::run_thread_wrapper()
|
||||||
{
|
{
|
||||||
// loop infinitely
|
// loop infinitely
|
||||||
@ -389,7 +389,7 @@ void device_execute_interface::run_thread_wrapper()
|
|||||||
scheduler.make_active();
|
scheduler.make_active();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// execute_clocks_to_cycles - convert the number
|
// execute_clocks_to_cycles - convert the number
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// set to 1 to execute on cothread instead of directly
|
// set to 1 to execute on cothread instead of directly
|
||||||
#define USE_COTHREADS 1
|
//#define USE_COTHREADS 1
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
@ -204,11 +204,11 @@ public:
|
|||||||
UINT64 total_cycles() const;
|
UINT64 total_cycles() const;
|
||||||
|
|
||||||
// required operation overrides
|
// required operation overrides
|
||||||
#if USE_COTHREADS
|
//#if USE_COTHREADS
|
||||||
void run() { m_cothread.make_active(); }
|
// void run() { m_cothread.make_active(); }
|
||||||
#else
|
//#else
|
||||||
void run() { execute_run(); }
|
void run() { execute_run(); }
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// internal helpers
|
// internal helpers
|
||||||
@ -272,7 +272,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// internal state
|
// internal state
|
||||||
cothread m_cothread; // thread used for execution
|
// cothread m_cothread; // thread used for execution
|
||||||
|
|
||||||
// configuration
|
// configuration
|
||||||
bool m_disabled; // disabled from executing?
|
bool m_disabled; // disabled from executing?
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "fileio.h" // remove me once NVRAM is implemented as device
|
#include "fileio.h" // remove me once NVRAM is implemented as device
|
||||||
#include "delegate.h"
|
#include "delegate.h"
|
||||||
#include "cothread.h"
|
//#include "cothread.h"
|
||||||
|
|
||||||
// memory and address spaces
|
// memory and address spaces
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
@ -51,7 +51,6 @@ EMUOBJS = \
|
|||||||
$(EMUOBJ)/cheat.o \
|
$(EMUOBJ)/cheat.o \
|
||||||
$(EMUOBJ)/clifront.o \
|
$(EMUOBJ)/clifront.o \
|
||||||
$(EMUOBJ)/config.o \
|
$(EMUOBJ)/config.o \
|
||||||
$(EMUOBJ)/cothread.o \
|
|
||||||
$(EMUOBJ)/crsshair.o \
|
$(EMUOBJ)/crsshair.o \
|
||||||
$(EMUOBJ)/debugger.o \
|
$(EMUOBJ)/debugger.o \
|
||||||
$(EMUOBJ)/delegate.o \
|
$(EMUOBJ)/delegate.o \
|
||||||
|
@ -341,7 +341,7 @@ device_scheduler::device_scheduler(running_machine &machine) :
|
|||||||
m_executing_device(NULL),
|
m_executing_device(NULL),
|
||||||
m_execute_list(NULL),
|
m_execute_list(NULL),
|
||||||
m_basetime(attotime::zero),
|
m_basetime(attotime::zero),
|
||||||
m_cothread(co_active()),
|
// m_cothread(co_active()),
|
||||||
m_timer_list(NULL),
|
m_timer_list(NULL),
|
||||||
m_timer_allocator(machine.respool()),
|
m_timer_allocator(machine.respool()),
|
||||||
m_callback_timer(NULL),
|
m_callback_timer(NULL),
|
||||||
|
@ -165,7 +165,7 @@ public:
|
|||||||
void abort_timeslice();
|
void abort_timeslice();
|
||||||
void trigger(int trigid, attotime after = attotime::zero);
|
void trigger(int trigid, attotime after = attotime::zero);
|
||||||
void boost_interleave(attotime timeslice_time, attotime boost_duration);
|
void boost_interleave(attotime timeslice_time, attotime boost_duration);
|
||||||
void make_active() { m_cothread.make_active(); }
|
// void make_active() { m_cothread.make_active(); }
|
||||||
|
|
||||||
// timers, specified by callback/name
|
// timers, specified by callback/name
|
||||||
emu_timer *timer_alloc(timer_expired_delegate callback, void *ptr = NULL);
|
emu_timer *timer_alloc(timer_expired_delegate callback, void *ptr = NULL);
|
||||||
@ -210,7 +210,7 @@ private:
|
|||||||
device_execute_interface * m_executing_device; // pointer to currently executing device
|
device_execute_interface * m_executing_device; // pointer to currently executing device
|
||||||
device_execute_interface * m_execute_list; // list of devices to be executed
|
device_execute_interface * m_execute_list; // list of devices to be executed
|
||||||
attotime m_basetime; // global basetime; everything moves forward from here
|
attotime m_basetime; // global basetime; everything moves forward from here
|
||||||
cothread m_cothread; // core scheduler thread
|
// cothread m_cothread; // core scheduler thread
|
||||||
|
|
||||||
// list of active timers
|
// list of active timers
|
||||||
emu_timer * m_timer_list; // head of the active list
|
emu_timer * m_timer_list; // head of the active list
|
||||||
|
@ -19,7 +19,6 @@ OBJDIRS += \
|
|||||||
$(LIBOBJ)/formats \
|
$(LIBOBJ)/formats \
|
||||||
$(LIBOBJ)/zlib \
|
$(LIBOBJ)/zlib \
|
||||||
$(LIBOBJ)/softfloat \
|
$(LIBOBJ)/softfloat \
|
||||||
$(LIBOBJ)/cothread \
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -204,18 +203,3 @@ $(OBJ)/libsoftfloat.a: $(SOFTFLOATOBJS)
|
|||||||
|
|
||||||
$(LIBOBJ)/softfloat/softfloat.o: $(LIBSRC)/softfloat/softfloat.c $(LIBSRC)/softfloat/softfloat.h $(LIBSRC)/softfloat/softfloat-macros $(LIBSRC)/softfloat/softfloat-specialize
|
$(LIBOBJ)/softfloat/softfloat.o: $(LIBSRC)/softfloat/softfloat.c $(LIBSRC)/softfloat/softfloat.h $(LIBSRC)/softfloat/softfloat-macros $(LIBSRC)/softfloat/softfloat-specialize
|
||||||
$(LIBOBJ)/softfloat/fsincos.o: $(LIBSRC)/softfloat/fsincos.c $(LIBSRC)/softfloat/fpu_constant.h $(LIBSRC)/softfloat/softfloat.h $(LIBSRC)/softfloat/softfloat-macros $(LIBSRC)/softfloat/softfloat-specialize
|
$(LIBOBJ)/softfloat/fsincos.o: $(LIBSRC)/softfloat/fsincos.c $(LIBSRC)/softfloat/fpu_constant.h $(LIBSRC)/softfloat/softfloat.h $(LIBSRC)/softfloat/softfloat-macros $(LIBSRC)/softfloat/softfloat-specialize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------
|
|
||||||
# cothread library objects
|
|
||||||
#-------------------------------------------------
|
|
||||||
|
|
||||||
COTHREADOBJS = \
|
|
||||||
$(LIBOBJ)/cothread/libco.o
|
|
||||||
|
|
||||||
$(OBJ)/libco.a: $(COTHREADOBJS)
|
|
||||||
|
|
||||||
$(LIBOBJ)/cothread/%.o: $(LIBSRC)/cothread/%.c | $(OSPREBUILD)
|
|
||||||
@echo Compiling $<...
|
|
||||||
$(CC) $(CDEFS) $(CCOMFLAGS) -c -fomit-frame-pointer $< -o $@
|
|
||||||
|
Loading…
Reference in New Issue
Block a user