mirror of
https://github.com/holub/mame
synced 2025-07-07 02:50:50 +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
|
||||
FORMATS_LIB = $(OBJ)/libformats.a
|
||||
|
||||
# add cothread library
|
||||
COTHREAD = $(OBJ)/libco.a
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
@ -726,9 +723,9 @@ $(sort $(OBJDIRS)):
|
||||
ifndef EXECUTABLE_DEFINED
|
||||
|
||||
# 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 $@...
|
||||
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
|
||||
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_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_vblank_interrupt(NULL),
|
||||
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
|
||||
// scheduler thread, over and over
|
||||
//-------------------------------------------------
|
||||
|
||||
/*
|
||||
void device_execute_interface::run_thread_wrapper()
|
||||
{
|
||||
// loop infinitely
|
||||
@ -389,7 +389,7 @@ void device_execute_interface::run_thread_wrapper()
|
||||
scheduler.make_active();
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
//-------------------------------------------------
|
||||
// execute_clocks_to_cycles - convert the number
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
// 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;
|
||||
|
||||
// required operation overrides
|
||||
#if USE_COTHREADS
|
||||
void run() { m_cothread.make_active(); }
|
||||
#else
|
||||
//#if USE_COTHREADS
|
||||
// void run() { m_cothread.make_active(); }
|
||||
//#else
|
||||
void run() { execute_run(); }
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
protected:
|
||||
// internal helpers
|
||||
@ -272,7 +272,7 @@ protected:
|
||||
};
|
||||
|
||||
// internal state
|
||||
cothread m_cothread; // thread used for execution
|
||||
// cothread m_cothread; // thread used for execution
|
||||
|
||||
// configuration
|
||||
bool m_disabled; // disabled from executing?
|
||||
|
@ -65,7 +65,7 @@
|
||||
#include "hash.h"
|
||||
#include "fileio.h" // remove me once NVRAM is implemented as device
|
||||
#include "delegate.h"
|
||||
#include "cothread.h"
|
||||
//#include "cothread.h"
|
||||
|
||||
// memory and address spaces
|
||||
#include "memory.h"
|
||||
|
@ -51,7 +51,6 @@ EMUOBJS = \
|
||||
$(EMUOBJ)/cheat.o \
|
||||
$(EMUOBJ)/clifront.o \
|
||||
$(EMUOBJ)/config.o \
|
||||
$(EMUOBJ)/cothread.o \
|
||||
$(EMUOBJ)/crsshair.o \
|
||||
$(EMUOBJ)/debugger.o \
|
||||
$(EMUOBJ)/delegate.o \
|
||||
|
@ -341,7 +341,7 @@ device_scheduler::device_scheduler(running_machine &machine) :
|
||||
m_executing_device(NULL),
|
||||
m_execute_list(NULL),
|
||||
m_basetime(attotime::zero),
|
||||
m_cothread(co_active()),
|
||||
// m_cothread(co_active()),
|
||||
m_timer_list(NULL),
|
||||
m_timer_allocator(machine.respool()),
|
||||
m_callback_timer(NULL),
|
||||
|
@ -165,7 +165,7 @@ public:
|
||||
void abort_timeslice();
|
||||
void trigger(int trigid, attotime after = attotime::zero);
|
||||
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
|
||||
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_execute_list; // list of devices to be executed
|
||||
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
|
||||
emu_timer * m_timer_list; // head of the active list
|
||||
|
@ -19,7 +19,6 @@ OBJDIRS += \
|
||||
$(LIBOBJ)/formats \
|
||||
$(LIBOBJ)/zlib \
|
||||
$(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/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