many changes
This commit is contained in:
@@ -16,31 +16,17 @@
|
||||
#include "baseNMIU_IL.h"
|
||||
|
||||
tsFreeList < class netSubscription, 1024 > netSubscription::freeList;
|
||||
epicsMutex netSubscription::freeListMutex;
|
||||
|
||||
netSubscription::netSubscription ( nciu &chan, unsigned typeIn, unsigned long countIn,
|
||||
unsigned maskIn, cacNotify ¬ifyIn ) :
|
||||
cacNotifyIO ( notifyIn ), baseNMIU ( chan ),
|
||||
baseNMIU ( notifyIn, chan ),
|
||||
count ( countIn ), type ( typeIn ), mask ( maskIn )
|
||||
{
|
||||
}
|
||||
|
||||
netSubscription::~netSubscription ()
|
||||
{
|
||||
// netiiu lock must _not_ be applied when calling this
|
||||
this->chan.getPIIU ()->subscriptionCancelRequest ( *this, true );
|
||||
}
|
||||
|
||||
void netSubscription::destroy ()
|
||||
{
|
||||
unsigned i = 0u;
|
||||
while ( ! this->chan.getPIIU ()->uninstallIO ( *this ) ) {
|
||||
if ( i++ > 1000u ) {
|
||||
this->chan.getCAC ().printf (
|
||||
"CAC: unable to destroy IO\n" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
delete this;
|
||||
}
|
||||
|
||||
class netSubscription * netSubscription::isSubscription ()
|
||||
@@ -48,38 +34,17 @@ class netSubscription * netSubscription::isSubscription ()
|
||||
return this;
|
||||
}
|
||||
|
||||
void netSubscription::completionNotify ()
|
||||
void netSubscription::ioCancelRequest ()
|
||||
{
|
||||
this->notify ().completionNotify ( this->channel () );
|
||||
}
|
||||
|
||||
void netSubscription::completionNotify ( unsigned typeIn,
|
||||
unsigned long countIn, const void *pDataIn )
|
||||
{
|
||||
this->notify ().completionNotify ( this->channel (), typeIn, countIn, pDataIn );
|
||||
}
|
||||
|
||||
void netSubscription::exceptionNotify ( int status, const char *pContext )
|
||||
{
|
||||
this->notify ().exceptionNotify ( this->channel (), status, pContext );
|
||||
}
|
||||
|
||||
void netSubscription::exceptionNotify ( int statusIn,
|
||||
const char *pContextIn, unsigned typeIn, unsigned long countIn )
|
||||
{
|
||||
this->notify ().exceptionNotify ( this->channel (), statusIn,
|
||||
pContextIn, typeIn, countIn );
|
||||
}
|
||||
|
||||
cacChannelIO & netSubscription::channelIO () const
|
||||
{
|
||||
return this->channel ();
|
||||
this->chan.getPIIU ()->subscriptionCancelRequest ( *this, true );
|
||||
}
|
||||
|
||||
void netSubscription::show ( unsigned level ) const
|
||||
{
|
||||
printf ( "event subscription IO at %p, type %s, element count %lu, mask %u\n",
|
||||
this, dbf_type_to_text ( static_cast <int> (this->type) ), this->count, this->mask );
|
||||
static_cast < const void * > ( this ),
|
||||
dbf_type_to_text ( static_cast < int > ( this->type ) ),
|
||||
this->count, this->mask );
|
||||
if ( level > 0u ) {
|
||||
this->baseNMIU::show ( level - 1u );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user