mirror of
https://github.com/holub/mame
synced 2025-10-04 08:28:39 +03:00
Ref count in flight calls when a tap is installed, plus fix for less permissive compilers [O. Galibert, smf]
This commit is contained in:
parent
02f39608f2
commit
6292526722
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user