Merge 7.0 into rtems5

This commit is contained in:
Andrew Johnson
2021-06-04 16:11:10 -05:00
28 changed files with 348 additions and 99 deletions
@@ -28,7 +28,5 @@ softIoc_LIBS = $(EPICS_BASE_IOC_LIBS)
DB += softIocExit.db
FINAL_LOCATION ?= $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LOCATION))
CLEANS += epicsInstallDir.h
@@ -249,7 +249,10 @@ int main(int argc, char *argv[])
} else {
if (loadedDb || ranScript) {
epicsThreadExitMain();
// non-interactive IOC. spin forever
while(true) {
epicsThreadSleep(1000.0);
}
} else {
usage(argv[0], dbd_file);
-1
View File
@@ -40,7 +40,6 @@ HTMLS += dbdToHtml.html
# Build Package Config Files
FINAL_LOCATION ?= $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LOCATION))
C_CFLAGS += $(filter-out -g,$(filter-out -O%,$(filter-out -W%,$(CPPFLAGS))))
C_CFLAGS += $(filter-out -g,$(filter-out -O%,$(filter-out -W%,$(CFLAGS))))
PKGVARS += FINAL_LOCATION OS_CLASS CMPLR_CLASS C_CFLAGS LDFLAGS LDLIBS
+21 -5
View File
@@ -12,9 +12,11 @@
#include <testMain.h>
#include <dbAccess.h>
#include <epicsTime.h>
#include <epicsEvent.h>
#include <epicsThread.h>
#include <errlog.h>
#include <alarm.h>
#include <callback.h>
#include "recSup.h"
#include "aiRecord.h"
@@ -414,6 +416,15 @@ void testSiolWrite(const char *name,
* Asynchronous processing using simm:DELAY
*/
static void
ping(CALLBACK *pcb)
{
epicsEventId ev;
callbackGetUser(ev, pcb);
epicsEventMustTrigger(ev);
}
static
void testSimmDelay(const char *name,
epicsFloat64 *psdly,
@@ -422,6 +433,14 @@ void testSimmDelay(const char *name,
epicsTimeStamp now;
const double delay = 0.01; /* 10 ms */
double diff;
epicsEventId poked;
CALLBACK cb;
memset(&cb, 0, sizeof(CALLBACK));
poked = epicsEventMustCreate(epicsEventEmpty);
callbackSetCallback(ping, &cb);
callbackSetPriority(priorityLow, &cb);
callbackSetUser(poked, &cb);
testDiag("## Asynchronous processing with simm:DELAY ##");
@@ -443,14 +462,11 @@ void testSimmDelay(const char *name,
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(namePACT, DBR_USHORT, 1);
epicsTimeGetCurrent(&now);
epicsThreadSleep(1.75*delay);
if(testImpreciseTiming())
testTodoBegin("imprecise");
callbackRequestDelayed(&cb, 1.5 * delay);
epicsEventWait(poked);
testdbGetFieldEqual(namePACT, DBR_USHORT, 0);
diff = epicsTimeDiffInSeconds(mytime, &now);
testOk(diff >= 0.0, "time stamp is recent (%.9f sec)", diff);
if(testImpreciseTiming())
testTodoEnd();
/* Reset delay */
*psdly = -1.;