summaryrefslogtreecommitdiffstats
path: root/src/emu/schedule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/schedule.cpp')
-rw-r--r--src/emu/schedule.cpp35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/emu/schedule.cpp b/src/emu/schedule.cpp
index e32afb68f00..dd72dfa13b0 100644
--- a/src/emu/schedule.cpp
+++ b/src/emu/schedule.cpp
@@ -49,7 +49,6 @@ emu_timer::emu_timer() :
m_next(nullptr),
m_prev(nullptr),
m_param(0),
- m_ptr(nullptr),
m_enabled(false),
m_temporary(false),
m_period(attotime::zero),
@@ -75,7 +74,7 @@ emu_timer::~emu_timer()
// re-allocated as a non-device timer
//-------------------------------------------------
-inline emu_timer &emu_timer::init(running_machine &machine, timer_expired_delegate callback, void *ptr, bool temporary)
+inline emu_timer &emu_timer::init(running_machine &machine, timer_expired_delegate callback, bool temporary)
{
// ensure the entire timer state is clean
m_machine = &machine;
@@ -83,7 +82,6 @@ inline emu_timer &emu_timer::init(running_machine &machine, timer_expired_delega
m_prev = nullptr;
m_callback = callback;
m_param = 0;
- m_ptr = ptr;
m_enabled = false;
m_temporary = temporary;
m_period = attotime::never;
@@ -107,7 +105,7 @@ inline emu_timer &emu_timer::init(running_machine &machine, timer_expired_delega
// re-allocated as a device timer
//-------------------------------------------------
-inline emu_timer &emu_timer::init(device_t &device, device_timer_id id, void *ptr, bool temporary)
+inline emu_timer &emu_timer::init(device_t &device, device_timer_id id, bool temporary)
{
// ensure the entire timer state is clean
m_machine = &device.machine();
@@ -115,7 +113,6 @@ inline emu_timer &emu_timer::init(device_t &device, device_timer_id id, void *pt
m_prev = nullptr;
m_callback = timer_expired_delegate(FUNC(emu_timer::device_timer_expired), this);
m_param = 0;
- m_ptr = ptr;
m_enabled = false;
m_temporary = temporary;
m_period = attotime::never;
@@ -296,7 +293,7 @@ inline void emu_timer::schedule_next_period()
void emu_timer::dump() const
{
- machine().logerror("%p: en=%d temp=%d exp=%15s start=%15s per=%15s param=%d ptr=%p", this, m_enabled, m_temporary, m_expire.as_string(PRECISION), m_start.as_string(PRECISION), m_period.as_string(PRECISION), m_param, m_ptr);
+ machine().logerror("%p: en=%d temp=%d exp=%15s start=%15s per=%15s param=%d", this, m_enabled, m_temporary, m_expire.as_string(PRECISION), m_start.as_string(PRECISION), m_period.as_string(PRECISION), m_param);
if (m_device == nullptr)
if (m_callback.name() == nullptr)
machine().logerror(" cb=NULL\n");
@@ -312,9 +309,9 @@ void emu_timer::dump() const
// conditional jump on the hot path
//-------------------------------------------------
-void emu_timer::device_timer_expired(emu_timer &timer, void *ptr, s32 param)
+void emu_timer::device_timer_expired(emu_timer &timer, s32 param)
{
- timer.m_device->timer_expired(timer, timer.m_id, param, ptr);
+ timer.m_device->timer_expired(timer, timer.m_id, param);
}
@@ -340,7 +337,7 @@ device_scheduler::device_scheduler(running_machine &machine) :
m_quantum_minimum(ATTOSECONDS_IN_NSEC(1) / 1000)
{
// append a single never-expiring timer so there is always one in the list
- m_timer_list = &m_timer_allocator.alloc()->init(machine, timer_expired_delegate(), nullptr, true);
+ m_timer_list = &m_timer_allocator.alloc()->init(machine, timer_expired_delegate(), true);
m_timer_list->adjust(attotime::never);
// register global states
@@ -597,9 +594,9 @@ void device_scheduler::boost_interleave(const attotime &timeslice_time, const at
// timer and return a pointer
//-------------------------------------------------
-emu_timer *device_scheduler::timer_alloc(timer_expired_delegate callback, void *ptr)
+emu_timer *device_scheduler::timer_alloc(timer_expired_delegate callback)
{
- return &m_timer_allocator.alloc()->init(machine(), callback, ptr, false);
+ return &m_timer_allocator.alloc()->init(machine(), callback, false);
}
@@ -609,9 +606,9 @@ emu_timer *device_scheduler::timer_alloc(timer_expired_delegate callback, void *
// amount of time
//-------------------------------------------------
-void device_scheduler::timer_set(const attotime &duration, timer_expired_delegate callback, int param, void *ptr)
+void device_scheduler::timer_set(const attotime &duration, timer_expired_delegate callback, int param)
{
- m_timer_allocator.alloc()->init(machine(), callback, ptr, true).adjust(duration, param);
+ m_timer_allocator.alloc()->init(machine(), callback, true).adjust(duration, param);
}
@@ -620,9 +617,9 @@ void device_scheduler::timer_set(const attotime &duration, timer_expired_delegat
// and return a pointer
//-------------------------------------------------
-emu_timer *device_scheduler::timer_alloc(device_t &device, device_timer_id id, void *ptr)
+emu_timer *device_scheduler::timer_alloc(device_t &device, device_timer_id id)
{
- return &m_timer_allocator.alloc()->init(device, id, ptr, false);
+ return &m_timer_allocator.alloc()->init(device, id, false);
}
@@ -632,9 +629,9 @@ emu_timer *device_scheduler::timer_alloc(device_t &device, device_timer_id id, v
// time
//-------------------------------------------------
-void device_scheduler::timer_set(const attotime &duration, device_t &device, device_timer_id id, int param, void *ptr)
+void device_scheduler::timer_set(const attotime &duration, device_t &device, device_timer_id id, int param)
{
- m_timer_allocator.alloc()->init(device, id, ptr, true).adjust(duration, param);
+ m_timer_allocator.alloc()->init(device, id, true).adjust(duration, param);
}
@@ -655,7 +652,7 @@ void device_scheduler::eat_all_cycles()
// given amount of time
//-------------------------------------------------
-void device_scheduler::timed_trigger(void *ptr, s32 param)
+void device_scheduler::timed_trigger(s32 param)
{
trigger(param);
}
@@ -904,7 +901,7 @@ inline void device_scheduler::execute_timers()
LOG("execute_timers: timer device %s timer %d\n", timer.m_device->tag(), timer.m_id);
else
LOG("execute_timers: timer callback %s\n", timer.m_callback.name());
- timer.m_callback(timer.m_ptr, timer.m_param);
+ timer.m_callback(timer.m_param);
}
g_profiler.stop();