All,
During the discussion about nb_peek in the TLM1 FIFO, I found a comment
(and an ugly const_cast) in the blocking peek implementation, which
might be valid issue:
tlm_fifo<T>::peek( tlm_tag<T> * ) const {
while( is_empty() ) {
// this const cast is only needed because sc_prim_channel::wait(.) is
// for some unknown reason, not const
const_cast< tlm_fifo<T> * >( this )->wait( m_data_written_event );
}
return buffer->read_data();
}
Actually, I think there is not really a need for wait() in primitive
channels to be const, is there? next_trigger() may be an issue as well.
Both functions relate to the calling process, not to the innards of
the current primitive channel. Their internal state may not be affected
by calls to these functions at all.
Am I missing something?
Greetings from Oldenburg,
Philipp
-- Philipp A. Hartmann Hardware/Software Design Methodology Group OFFIS R&D Division Transportation | FuE-Bereich Verkehr Escherweg 2 · 26121 Oldenburg · Germany Phone/Fax: +49-441-9722-420/282 · PGP: 0x9161A5C0 · http://www.offis.de/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Mar 29 12:14:08 2010
This archive was generated by hypermail 2.1.8 : Mon Mar 29 2010 - 12:14:08 PDT