added preemptive callback control
reinstalled flow control
This commit is contained in:
@@ -89,6 +89,7 @@ int CASG::block ( double timeout )
|
||||
if ( p ) {
|
||||
return ECA_EVDISALLOW;
|
||||
}
|
||||
|
||||
threadPrivateSet (cacRecursionLock, &cacRecursionLock);
|
||||
|
||||
cur_time = osiTime::getCurrent ();
|
||||
@@ -98,6 +99,8 @@ int CASG::block ( double timeout )
|
||||
beg_time = cur_time;
|
||||
delay = 0.0;
|
||||
|
||||
this->client.enableCallbackPreemption ();
|
||||
|
||||
status = ECA_NORMAL;
|
||||
while ( 1 ) {
|
||||
this->mutex.lock ();
|
||||
@@ -135,9 +138,6 @@ int CASG::block ( double timeout )
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* wait for asynch notification
|
||||
*/
|
||||
this->sem.wait ( remaining );
|
||||
|
||||
/*
|
||||
@@ -148,6 +148,8 @@ int CASG::block ( double timeout )
|
||||
delay = cur_time - beg_time;
|
||||
}
|
||||
|
||||
this->client.disableCallbackPreemption ();
|
||||
|
||||
threadPrivateSet (cacRecursionLock, NULL);
|
||||
|
||||
return status;
|
||||
|
||||
Reference in New Issue
Block a user