Commit Graph

14729 Commits

Author SHA1 Message Date
Ralph Lange d86723d62a std/rec/test: add test for deadband mechanism of analog record types 2014-07-29 15:13:10 +02:00
Michael Davidsaver e2461e97ff dbLockTest: test creation of DB links 2014-07-28 14:33:17 -04:00
Andrew Johnson 75da9fd454 Moved dlopen version of osdFindSymbol.c into posix
It was identical in solaris, Darwin and Linux, and had
not been included for cygwin so this reduces duplication.
2014-07-28 12:27:02 -05:00
Andrew Johnson 152e8865cc Cleaned up exampleApp Makefiles 2014-07-28 11:38:30 -05:00
Ralph Lange 69e8c4b48e std/rec: Improve subRecord error messages 2014-07-28 16:19:42 +02:00
Andrew Johnson 5708855c36 Release Notes for loading support.
To Do:
 * Test that -l the flag to registerRecordDeviceDriver.pl works
   as expected on Windows.
 * Modify example template, or create a new template.
 * Work out if/how this affects VxWorks, can we generate a munch
   file that works the same way as a shared library?
 * Test on all arch's, especially Darwin & Windows.
2014-07-28 00:52:34 -05:00
Andrew Johnson 4b1fd8cba0 Modify registerRecordDeviceDriver for loadable support
Don't generate code to register record types that have only
been declared, i.e. that have no fields defined in them.
This allows libraries to created which only contain device
support without the record types that they support. The
library must have a DBD file that may declare the record
types (to avoid generating a warning) and also contains any
other device(), variable(), function() and registrar()
entries for software included in the library.

Adds -l flag to the registerRecordDeviceDriver program,
which results in epicsExportSharedSymbols being defined
and shareLib.h being reloaded so the generated output file
can be linked into the library that it is registering.
This aspect has not been tested on Windows DLLs yet.
2014-07-28 00:18:37 -05:00
Andrew Johnson 163cf7971d Errors from the DBD Parser should stop dbdExpand
Such errors used to be just warnings, now they stop the output
file being generated unless the -D flag was given.
2014-07-28 00:16:16 -05:00
Andrew Johnson a2d511b6e9 DBD parser accepts record type declarations
Record types are the only DBD entries for which the parser
will not accept redefinitions. This change lets it accept
a record type declaration any number of times. However once
a record type declaration has been parsed the full record
type definition cannot be loaded, an error will be raised
if the full definition is seen. The parser will still not
accept a full record type definition more than once either,
any later copies of the record type must be declarations.
2014-07-27 23:55:47 -05:00
Andrew Johnson 8eed4cdd88 Perl DBD Parser: Autovivify record types in device() entries
If a record type named in a device() entry does not exist when
the device is seen, the DBD parser will now print a warning
and create an empty record type with that name to hold the
device entry information.
This will allow support modules to be built into libraries that
include their own registerRecordDeviceDriver code, which was
apparently possible with 3.14 although not officially supported.
To avoid the warning message, the DBD file can declare each
record type before the device statement that uses it.

A record type declaration looks like this:
    recordtype(ao) {}
    device(ao, ....)
An IOC will accept and ignore a record type declaration, but it
must have loaded the full record type definition first.
2014-07-27 23:37:58 -05:00
Andrew Johnson ee40ee789c dbStatic: Allow empty recordtype bodies in DBD files
A record type with an empty body is a declaration. The IOC will
accept one of these in a DBD file as long as it has already
loaded the full record type definition.
This will allow device support to provide a DBD file that declares
each record type it uses before giving the related device() entry.
Later commits will explain why.
2014-07-27 23:26:01 -05:00
Andrew Johnson c710a3a898 dbStatic/dbLexRoutines.c fix error message 2014-07-27 15:41:49 -05:00
Andrew Johnson 2de36d3273 Fix lock-set initialization properly. 2014-07-25 17:59:59 -05:00
Michael Davidsaver c4a1208d6e epicsSpinTest: add to libCom test harness 2014-07-25 18:17:27 -04:00
Michael Davidsaver 9cb65e5408 epicsSpinTest: plug some leaks 2014-07-25 18:17:02 -04:00
Andrew Johnson 2a9d05248f Fix epicsSpinTest.c spinThread tests
Runs many more rounds, without blocking with the lock held.
2014-07-25 16:21:03 -05:00
Andrew Johnson 752549d1c8 Fix epicsAtomic headers when used from C code
Several C++ and C99-isms crept in.
2014-07-25 15:05:58 -05:00
Michael Davidsaver 8fec9d6e00 epicsSpin: try lock return non-blocking
Avoid cantProceed() in try lock, even for undefined behavior.
2014-07-25 15:12:02 -04:00
Michael Davidsaver 5824f98972 epicsSpinTest: fix verifyTryLock()
avoid sleeping with a spinlock held.
Now test only works on SMP systems.
2014-07-25 15:11:54 -04:00
Michael Davidsaver 9d03275c53 iocInit: ensure dbLock cleanup after iocShutdown cleanup
by making dbLock init before initDatabase()
2014-07-25 13:49:55 -04:00
Michael Davidsaver b5fe4abfa8 switch to use sysInWord and friends 2014-07-25 11:15:27 -04:00
Michael Davidsaver 95b916ecd4 thread pool: mark epicsJobCreate() as safe for job functions
Also, use epicsJobMove() to avoid some redundant code
2014-07-25 10:16:20 -04:00
Michael Davidsaver cbfbce54f9 thread pool: epicsThreadPoolWait return ETIMEOUT 2014-07-25 09:59:46 -04:00
Michael Davidsaver b3a1fe9c6b thread pool: fix return of epicsJobUnqueue()
Return 0 on success (was queued, now is not),
1 if not queued initially, and EINVAL
if orphaned.
2014-07-24 18:56:27 -04:00
Michael Davidsaver 83dfc7980d thread pool: handle failure to create worker
epicsJobQueue() returns EAGAIN when the first worker
can't be lazily created.

Failure to create workers beyond the first is
silently ignored.
2014-07-24 18:50:19 -04:00
Michael Davidsaver 69d1063067 thread pool: epicsJobQueue return EPERM
When pool control prevents operation
2014-07-24 18:19:33 -04:00
Andrew Johnson 9b6e270b97 Final spinlock tidying-up
* Abort epicsSpinTest() if epicsSpinCreate() returns NULL
* Adjust RELEASE_NOTES that describe the implementations.
2014-07-24 16:33:35 -05:00
Michael Davidsaver fc4119094f thread pool: epicsThreadPoolGetShared accepts NULL as defaults 2014-07-24 14:44:28 -04:00
Michael Davidsaver fd2edfe94c release notes 2014-07-24 14:22:52 -04:00
Michael Davidsaver 01a50b5165 thread pool test 2014-07-24 14:22:52 -04:00
Michael Davidsaver 658bd0b570 thread pool implementation 2014-07-24 14:22:52 -04:00
Michael Davidsaver a8fd14aae1 Thread pool API 2014-07-24 14:22:52 -04:00
Michael Davidsaver 87a6688c17 epicsSpin: remove redundant cantProceed() messages 2014-07-24 10:23:55 -04:00
Ralph Lange ae518f6e3e ioc/db/test: Fix Windows build 2014-07-24 14:06:11 +02:00
Michael Davidsaver 3ba5bf943e epicsSpin: better error messages when mis-use is detected 2014-07-23 18:40:08 -04:00
Andrew Johnson 846ef343e3 Merged ioc-shutdown2 branch. 2014-07-23 16:59:12 -05:00
Andrew Johnson 6bdb8f911a Suppress errlog output of expected warning messages. 2014-07-23 16:18:32 -05:00
Michael Davidsaver 0bf17be9e3 mmio: vxWorks m68k use default, add weak symbols for old versions 2014-07-16 15:12:56 -04:00
Michael Davidsaver 0bcfbd0ffc remove unused 2014-07-14 18:16:30 -04:00
Michael Davidsaver 34f0374ca5 dbLock: yet another fix to dbLockCleanupRecords()
track the lockRecord allocation
2014-07-14 17:57:17 -04:00
Michael Davidsaver 3755b9eaad dbLock: free lockSets 2014-07-11 18:49:41 -04:00
Michael Davidsaver edf1ad0362 dbLock: another fix to dbLockCleanupRecords() 2014-07-11 18:49:41 -04:00
Michael Davidsaver bb51281d9c dbPutLinkTest: set # of tests 2014-07-11 16:59:22 -04:00
Michael Davidsaver fd7a934ce3 dbPutLinkTest: test link string parsing
Test parsing to CONTANT and DB_LINK.
dbCa isn't initialized, so no test for CA_LINK.
2014-07-11 16:51:32 -04:00
Michael Davidsaver f14bfaab24 dbUnitTest: add testdbGetFieldEqual() 2014-07-11 16:47:55 -04:00
Michael Davidsaver a218bfd75c dbLock: fix dbLockCleanupRecords
all lockRecord s allocated in one block.  oops.
2014-07-11 16:27:41 -04:00
Michael Davidsaver 3f11fd1665 dbUnitTest: replace testdbPutField()
add testdbPutFieldOk() and testdbPutFieldFail()
which include calls to testPass() or testFail()

Leave testdbVPutField() as a building block.
2014-07-11 10:30:31 -04:00
Michael Davidsaver ebc3834661 dbUnitTest: testIocInitOk/testIocShutdownOk testAbort() on failure 2014-07-11 10:28:54 -04:00
Michael Davidsaver f85c3249ab dbUnitTest: rename 2014-07-10 18:23:49 -04:00
Andrew Johnson 3ff49fc9b2 Fixed build errors, remove dependency on std.
Build errors: Include guard missing from epicsUnitTest.h;
    dbShutdownTest.c was calling the non-universal strcasecmp()
    instead of epicsStrCaseCmp().

ioc/db/test no longer depends on std. I modified
    xRecord to make it a working record type, and simplified the
    other test programs so they all use the same new expanded
    dbd file rather than each making their own. I also added
    dbShutdownTest() to epicsRunDbTests().
2014-07-10 14:27:44 -05:00