drop usage of dbCaGetUpdateCount()
This commit is contained in:
@@ -50,13 +50,6 @@ void dbTestIoc_registerRecordDeviceDriver(struct dbBase *);
|
||||
static epicsEventId waitEvent;
|
||||
static unsigned waitCounter;
|
||||
|
||||
static
|
||||
void waitForUpdateN(DBLINK *plink, unsigned long n)
|
||||
{
|
||||
while(dbCaGetUpdateCount(plink)<n)
|
||||
epicsThreadSleep(0.01);
|
||||
}
|
||||
|
||||
static
|
||||
void putLink(DBLINK *plink, short dbr, const void*buf, long nReq)
|
||||
{
|
||||
@@ -133,14 +126,14 @@ static void testNativeLink(void)
|
||||
|
||||
testOk1(psrclnk->type==CA_LINK);
|
||||
|
||||
waitForUpdateN(psrclnk, 1);
|
||||
testdbCaWaitForUpdateCount(psrclnk, 1);
|
||||
|
||||
dbScanLock((dbCommon*)ptarg);
|
||||
ptarg->val = 42;
|
||||
db_post_events(ptarg, &ptarg->val, DBE_VALUE|DBE_ALARM|DBE_ARCHIVE);
|
||||
dbScanUnlock((dbCommon*)ptarg);
|
||||
|
||||
waitForUpdateN(psrclnk, 2);
|
||||
testdbCaWaitForUpdateCount(psrclnk, 2);
|
||||
|
||||
dbScanLock((dbCommon*)psrc);
|
||||
/* local CA_LINK connects immediately */
|
||||
@@ -218,14 +211,14 @@ static void testStringLink(void)
|
||||
|
||||
testOk1(psrclnk->type==CA_LINK);
|
||||
|
||||
waitForUpdateN(psrclnk, 1);
|
||||
testdbCaWaitForUpdateCount(psrclnk, 1);
|
||||
|
||||
dbScanLock((dbCommon*)ptarg);
|
||||
strcpy(ptarg->desc, "hello");
|
||||
db_post_events(ptarg, &ptarg->desc, DBE_VALUE|DBE_ALARM|DBE_ARCHIVE);
|
||||
dbScanUnlock((dbCommon*)ptarg);
|
||||
|
||||
waitForUpdateN(psrclnk, 2);
|
||||
testdbCaWaitForUpdateCount(psrclnk, 2);
|
||||
|
||||
dbScanLock((dbCommon*)psrc);
|
||||
/* local CA_LINK connects immediately */
|
||||
@@ -400,7 +393,7 @@ static void testArrayLink(unsigned nsrc, unsigned ntarg)
|
||||
testIocInitOk();
|
||||
eltc(1);
|
||||
|
||||
waitForUpdateN(psrclnk, 1);
|
||||
testdbCaWaitForUpdateCount(psrclnk, 1);
|
||||
|
||||
bufsrc = psrc->bptr;
|
||||
buftarg= ptarg->bptr;
|
||||
@@ -421,7 +414,7 @@ static void testArrayLink(unsigned nsrc, unsigned ntarg)
|
||||
db_post_events(ptarg, &ptarg->val, DBE_VALUE|DBE_ALARM|DBE_ARCHIVE);
|
||||
dbScanUnlock((dbCommon*)ptarg);
|
||||
|
||||
waitForUpdateN(psrclnk, 2);
|
||||
testdbCaWaitForUpdateCount(psrclnk, 2);
|
||||
|
||||
dbScanLock((dbCommon*)psrc);
|
||||
testDiag("fetch source.INP into source.BPTR");
|
||||
|
||||
Reference in New Issue
Block a user