fixed a disconnect related problem and also improved

structure of locking
This commit is contained in:
Jeff Hill
2001-06-20 17:45:19 +00:00
parent 61ff831b2d
commit 99df1b5584
5 changed files with 102 additions and 96 deletions

View File

@@ -88,15 +88,10 @@ int CASG::block ( double timeout )
beg_time = cur_time;
delay = 0.0;
this->client.enableCallbackPreemption ();
while ( 1 ) {
{
epicsAutoMutex locker ( this->mutex );
if ( this->ioList.count() == 0u ) {
status = ECA_NORMAL;
break;
}
if ( this->ioList.count() == 0u ) {
status = ECA_NORMAL;
break;
}
remaining = timeout - delay;
@@ -110,7 +105,7 @@ int CASG::block ( double timeout )
break;
}
this->sem.wait ( remaining );
this->client.blockForEventAndEnableCallbacks ( this->sem, remaining );
/*
* force a time update
@@ -120,8 +115,6 @@ int CASG::block ( double timeout )
delay = cur_time - beg_time;
}
this->client.disableCallbackPreemption ();
return status;
}