Merge new stuff after the 7.0.4 release work

This commit is contained in:
Andrew Johnson
2020-05-28 21:23:44 -05:00
8 changed files with 46 additions and 40 deletions
+2
View File
@@ -13,6 +13,8 @@
* Ralph Lange <Ralph.Lange@bessy.de>
*/
#include <string.h>
#include "dbAccessDefs.h"
#include "recSup.h"
#include "recGbl.h"
+1 -8
View File
@@ -12,14 +12,7 @@
*
* \brief Contains a few templates out of the C++ standard header algorithm
*
* \note The templates are provided here in a much smaller file. Standard algorithm
* contains many templates for sorting and searching through C++ template containers
* which are not used in EPICS. If all you need from there is std::min(),
* std::max() and/or std::swap() your code may compile faster if you include
* epicsAlgorithm.h and use epicsMin(), epicsMax() and epicsSwap() instead.
*
* The C++ standard only requires types to be less-than comparable, so
* the epicsMin and epicsMax templates only use operator <.
* \deprecated Use std::min()/max()/swap() in new code
*/
#ifndef __EPICS_ALGORITHM_H__
+1 -3
View File
@@ -73,9 +73,7 @@
/** \brief Size of a record name without the nil terminator */
#define PVNAME_SZ (PVNAME_STRINGSZ - 1)
/**
* \def PVLINK_STRINGSZ
* \brief Buffer size for the string representation of a DBF_*LINK field
/** \brief Buffer size for the string representation of a DBF_*LINK field
*/
#define PVLINK_STRINGSZ 1024
+6 -10
View File
@@ -35,17 +35,7 @@ extern "C" {
typedef void (*REGISTRAR)(void);
/** \brief Generate a name for an export object.
* \param typ Object's data type.
* \param obj Object's name.
* \return C identifier for the export object.
*/
#define EPICS_EXPORT_POBJ(typ, obj) pvar_ ## typ ## _ ## obj
/** \brief Generate a name for an export function object.
* \param fun Function's name.
* \return C identifier for the export object.
*/
#define EPICS_EXPORT_PFUNC(fun) EPICS_EXPORT_POBJ(func, fun)
/** \brief Declare an object for exporting.
@@ -79,6 +69,8 @@ typedef void (*REGISTRAR)(void);
*
* \param typ Object's data type.
* \param obj Object's name.
*
* \note C++ code needs to wrap with @code extern "C" { } @endcode
*/
#define epicsExportAddress(typ, obj) \
epicsShareExtern typ *EPICS_EXPORT_POBJ(typ,obj); \
@@ -96,6 +88,8 @@ typedef void (*REGISTRAR)(void);
\endcode
*
* \param fun Registrar function's name.
*
* \note C++ code needs to wrap with @code extern "C" { } @endcode
*/
#define epicsExportRegistrar(fun) \
epicsShareFunc REGISTRAR EPICS_EXPORT_PFUNC(fun) = (REGISTRAR) &fun
@@ -111,6 +105,8 @@ typedef void (*REGISTRAR)(void);
\endcode
*
* \param fun Function's name
*
* \note C++ code needs to wrap with @code extern "C" { } @endcode
*/
#define epicsRegisterFunction(fun) \
static void register_func_ ## fun(void) \
+19 -8
View File
@@ -88,14 +88,16 @@
MAIN(iocTest)
{
iocBuildIsolated() || iocRun();
... test code ...
iocShutdown();
dbFreeBase(pdbbase);
registryFree();
pdbbase = NULL;
testPlan(0);
testdbPrepare();
testdbReadDatabase("<dbdname>.dbd", 0, 0);
<dbdname>_registerRecordDeviceDriver(pdbbase);
testdbReadDatabase("some.db", 0, 0);
... test code before iocInit(). eg. dbGetString() ...
testIocInitOk();
... test code with IOC running. eg. dbGet()
testIocShutdownOk();
testdbCleanup();
return testDone();
}
\endcode
@@ -235,6 +237,15 @@ LIBCOM_API int testDiag(const char *fmt, ...)
*/
LIBCOM_API int testDone(void);
/** \brief Return non-zero in shared/oversubscribed testing envrionments
*
* May be used to testSkip(), or select longer timeouts, for some cases
* when the test process may be preempted for arbitrarily long times.
* This is common in shared CI environments.
*
* The environment variable $EPICS_TEST_IMPRECISE_TIMING=YES should be
* set in by such testing environments.
*/
LIBCOM_API
int testImpreciseTiming(void);
+3 -3
View File
@@ -20,12 +20,12 @@
*
* When creating the consumer thread also create an epicsEvent.
\code
epicsEvent *pevent = new epicsEvent;
epicsEvent event;
\endcode
* The consumer thread has code containing:
\code
while(1) {
pevent->wait();
pevent.wait();
while( {more work} ) {
{process work}
}
@@ -33,7 +33,7 @@
\endcode
* Producers create requests and issue the statement:
\code
pevent->trigger();
pevent.trigger();
\endcode
**/
+10 -4
View File
@@ -19,12 +19,18 @@
*
* The typical C++ use of a mutual exclusion semaphore is:
\code
epicsMutex *plock = new epicsMutex;
epicsMutex lock;
...
...
plock->lock();
// process resources
plock->unlock();
{
epicsMutex::guard_t G(lock); // lock
// process resources
} // unlock
// or for compatiblity
{
epicsGuard<epicsMutex> G(lock); // lock
// process resources
} // unlock
\endcode
*
* \note The implementation:
+4 -4
View File
@@ -155,10 +155,10 @@ public:
static epicsTime getCurrent ();
/** \brief Get current monotonic time
*
* Returns an epicsTime containing the current monotonic time, a
* high-resolution OS clock that counts at a steady rate, never
* going backwards or jumping forwards. This time is only useful
* for measuring time differences.
* Returns an epicsTime containing the current monotonic time, an
* OS clock which never going backwards or jumping forwards.
* This time is has an undefined epoch, and is only useful for
* measuring time differences.
*/
static epicsTime getMonotonic ();