Commit Graph

10606 Commits

Author SHA1 Message Date
Michael Davidsaver 470a9f9fc9 Introduce struct dbLinkInfo and dbParseLink()
This structure holds the processed form of any link type.
It is populated by dbParseLink(), which can be called w/o
record locking.

dbCanSetLink() checks the the parsed link, and a DBLINK field
have compatible types for assignment.
Record locking is required, but this does not modify the field.

dbSetLink() makes the actual assignment.
2014-08-01 11:28:10 -04:00
Michael Davidsaver 99626f03cd dbLink: remove struct lset and dbDb_lset
unnecessary exposure of internal API
2014-08-01 11:28:10 -04:00
Michael Davidsaver 8c60e7e2cb track INP/OUT field in struct dbFldDes
avoid string comparisons
2014-08-01 11:28:10 -04:00
Michael Davidsaver d05f2e6062 dbPutLinkTest: check HW link parsing 2014-07-31 16:22:02 -04:00
Michael Davidsaver e09066cfab dbPutLinkTest: check parsing of CA_LINK 2014-07-31 16:22:01 -04:00
Michael Davidsaver 40838579af iocShutdown: cleanup links 2014-07-31 16:22:01 -04:00
Michael Davidsaver 9f53417a8d add dbCaLinkInitIsolated()
Initialize dbCa workList lock so that CA_LINK
creation in test code doesn't crash.
Once created links will never connect.

clean up workList for unittest when dbCaShutdown
is called state is already exit.
2014-07-31 16:22:01 -04:00
Michael Davidsaver 29490f24c7 dbFreeLinkContents: missing case for RF_IO 2014-07-31 16:22:01 -04:00
Andrew Johnson ab78480d54 Merged spinlockfix branch.
Some last-minute fixes for VxWorks build warnings.
2014-07-31 12:45:40 -05:00
Andrew Johnson 63d2d8de33 Merged cas-intf-addr-list branch. 2014-07-31 11:34:10 -05:00
Andrew Johnson 68bcc77885 Merged alarm-strings branch. 2014-07-31 10:17:24 -05:00
Andrew Johnson b3afbea7cf Merged Michael's thread-pool branch.
Made various formatting changes, and fixed one problem in the
test program which failed a test on UP machines.
2014-07-29 16:05:24 -05:00
Andrew Johnson 41502f9525 db: Remove status message from dbpf
The status returned from dbPutField() can now include errors from
the record processing such as a link alarm, so it doesn't mean
what it used to and printing the error might be wrong.
Now we just return the status value.
2014-07-29 12:46:38 -05:00
Michael Davidsaver 716f2679a7 thread pool: don't use reserved names
Avoid global symbols with leading underscore
2014-07-29 12:21:07 -04:00
Michael Davidsaver b1a8b2f20e thread pool: switch thread counts to unsigned int
size_t is considered overly optimistic
2014-07-29 12:18:19 -04:00
Michael Davidsaver 6fee83900e don't include errCommon.h
doesn't exist anymore
2014-07-29 12:06:24 -04:00
Michael Davidsaver 6d11cba513 add missing TESTFILES 2014-07-29 10:32:47 -04:00
Michael Davidsaver e2461e97ff dbLockTest: test creation of DB links 2014-07-28 14:33:17 -04:00
Ralph Lange 69e8c4b48e std/rec: Improve subRecord error messages 2014-07-28 16:19:42 +02: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 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 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 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