summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2019-10-21 09:12:07 +0100
committer smf- <smf-@users.noreply.github.com>2019-10-21 09:12:07 +0100
commit62925267225a4bf5d743310dc83c8983309864a8 (patch)
treeb5dcdd0fbec235df146bbb983d07ee188de17d6b /src/emu
parent02f39608f22896ec76a1e26720a1d0f3fd0862b7 (diff)
Ref count in flight calls when a tap is installed, plus fix for less permissive compilers [O. Galibert, smf]
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/emumem_het.cpp8
-rw-r--r--src/emu/emumem_heu.cpp8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/emu/emumem_het.cpp b/src/emu/emumem_het.cpp
index 87f3d35dc10..571b8246eac 100644
--- a/src/emu/emumem_het.cpp
+++ b/src/emu/emumem_het.cpp
@@ -7,8 +7,12 @@
template<int Width, int AddrShift, int Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_tap<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask)
{
+ this->ref();
+
uX data = inh::m_next->read(offset, mem_mask);
m_tap(offset, data, mem_mask);
+
+ this->unref();
return data;
}
@@ -25,8 +29,12 @@ template<int Width, int AddrShift, int Endian> handler_entry_read_tap<Width, Add
template<int Width, int AddrShift, int Endian> void handler_entry_write_tap<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask)
{
+ this->ref();
+
m_tap(offset, data, mem_mask);
inh::m_next->write(offset, data, mem_mask);
+
+ this->unref();
}
template<int Width, int AddrShift, int Endian> std::string handler_entry_write_tap<Width, AddrShift, Endian>::name() const
diff --git a/src/emu/emumem_heu.cpp b/src/emu/emumem_heu.cpp
index 51a51a70d6d..7000f77dc25 100644
--- a/src/emu/emumem_heu.cpp
+++ b/src/emu/emumem_heu.cpp
@@ -62,7 +62,7 @@ template<int Width, int AddrShift, int Endian> void handler_entry_read_units<Wid
template<int Width, int AddrShift, int Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_units<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask)
{
- ref();
+ this->ref();
uX result = m_unmap;
for (int index = 0; index < m_subunits; index++) {
@@ -94,7 +94,7 @@ template<int Width, int AddrShift, int Endian> typename emu::detail::handler_ent
}
}
- unref();
+ this->unref();
return result;
}
@@ -177,7 +177,7 @@ template<int Width, int AddrShift, int Endian> void handler_entry_write_units<Wi
template<int Width, int AddrShift, int Endian> void handler_entry_write_units<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask)
{
- ref();
+ this->ref();
for (int index = 0; index < m_subunits; index++) {
const subunit_info &si = m_subunit_infos[index];
@@ -208,7 +208,7 @@ template<int Width, int AddrShift, int Endian> void handler_entry_write_units<Wi
}
}
- unref();
+ this->unref();
}