restored ca_pend()
This commit is contained in:
@@ -595,6 +595,16 @@ extern "C" chid epicsShareAPI ca_evid_to_chid ( evid pMon )
|
||||
return & pMon->channel ();
|
||||
}
|
||||
|
||||
extern "C" int epicsShareAPI ca_pend ( ca_real timeout, int early )
|
||||
{
|
||||
if ( early ) {
|
||||
return ca_pend_io ( timeout );
|
||||
}
|
||||
else {
|
||||
return ca_pend_event ( timeout );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_pend_event ()
|
||||
*/
|
||||
|
||||
@@ -1668,6 +1668,18 @@ void verifyReasonableBeaconPeriod ( chid chan )
|
||||
}
|
||||
}
|
||||
|
||||
void verifyOldPend ()
|
||||
{
|
||||
int status;
|
||||
/*
|
||||
* at least verify that the old ca_pend() is in the symbol table
|
||||
*/
|
||||
status = ca_pend ( 100000.0, TRUE );
|
||||
assert ( status = ECA_NORMAL );
|
||||
status = ca_pend ( 1e-12, FALSE );
|
||||
assert ( status = ECA_TIMEOUT );
|
||||
}
|
||||
|
||||
int acctst ( char *pName, unsigned channelCount, unsigned repetitionCount )
|
||||
{
|
||||
chid chan;
|
||||
@@ -1697,6 +1709,7 @@ int acctst ( char *pName, unsigned channelCount, unsigned repetitionCount )
|
||||
printf ( "testing with a local channel\n" );
|
||||
}
|
||||
|
||||
verifyOldPend ();
|
||||
arrayTest ( chan );
|
||||
verifyMonitorSubscriptionFlushIO ( chan );
|
||||
monitorSubscriptionFirstUpdateTest ( chan );
|
||||
|
||||
+4
-1
@@ -637,7 +637,7 @@ epicsShareFunc int epicsShareAPI ca_clear_event
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* This routine pends waiting for channel events and calls the */
|
||||
/* These routines wait for channel subscription events and call the */
|
||||
/* functions specified with add_event when events occur. If the */
|
||||
/* timeout is specified as 0 an infinite timeout is assumed. */
|
||||
/* ca_flush_io() is called by this routine. If ca_pend_io () */
|
||||
@@ -662,6 +662,9 @@ epicsShareFunc int epicsShareAPI ca_pend_event (ca_real timeOut);
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_pend_io (ca_real timeOut);
|
||||
|
||||
/* calls ca_pend_io() if early is true otherwise ca_pend_event() is called */
|
||||
epicsShareFunc int epicsShareAPI ca_pend (ca_real timeout, int early);
|
||||
|
||||
/*
|
||||
* ca_test_io()
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user