Commit Graph

3088 Commits

Author SHA1 Message Date
Andrew Johnson
a857f7a5ed Merged Ralph's thread-hooks branch.
Minor modifications to fix the vxWorks epicsThreadInit() and
rename some functions.
2012-07-04 13:28:55 -05:00
Ralph Lange
137283ec0b libCom/osi: Add default start hook for _main_ thread 2012-07-03 15:27:50 +02:00
Ralph Lange
7b47cad8e4 libCom/osi: Clean up epicsThreadHooks API
- remove exit hooks completely
- remove non-public functions fom header files
- add test for epicsThreadMap
- fix bugs in RTEMS and vxWorks implementation of epicsThreadMap
2012-07-03 14:38:12 +02:00
Ralph Lange
e834832cda libCom/osi: Don't decorate epicsThreadHook functions with epicsShareAPI 2012-07-03 13:20:01 +02:00
Ralph Lange
0e6a01d56a libCom/osi: Streamline epicsThreadShowInfo functions between implementations
- epicsThreadShowInfo: private function to print headers or task line,
  not in header file, using internal pointer type
2012-07-03 11:16:09 +02:00
Ralph Lange
da91893ec2 libCom/test: Add test for epicsThreadHooks 2012-07-02 18:18:54 +02:00
Andrew Johnson
9fe5ce82d3 Merged the db-test branch.
Also made additional changes:
* Simplified xRecord.c so it can run on vxWorks.
* Standard way to load DBD and DB files in tests

All test harnesses now run on vxWorks (but some tests still fail).
2012-07-02 11:03:55 -05:00
Ralph Lange
37e490d1b2 libCom/osi: Make vxWorks implementation of epicsThreadMap() safe and dynamic 2012-07-02 14:21:39 +02:00
Ralph Lange
cfd8c0abde libCom/osi: Fix nesting for epicsThreadHooks, add WIN32 implementation, lock traversal
- call (generic) exit hook after calling the (specific) epicsExitCallAtThreadExits()
- for start hooks added as 1-2-3, run exit hooks in opposite order: 3-2-1
- add calls to hooks module to WIN32 osdThread.c
- add lock/unlock to hook list traversal
2012-07-02 11:31:01 +02:00
Andrew Johnson
da9982f875 libCom: Fix unsigned overflow limits in epicsParse*
The strtoul() routine accepts negative numbers.  This fix
ensures we handle them properly, and adds suitable tests.

Also fix the test for 1e300, in case the compiler gives a
slightly different literal constant than strtod() returns.
2012-06-30 15:34:29 -05:00
Andrew Johnson
fb61234431 Change the epicsParse APIs to return a units pointer.
This lets us use epicsParseDouble() for scan rate parsing.

Ensure the scanOnce thread is a higher priority than the fastest
periodic scan thread, irrespective of how many threads there are.
2012-06-29 14:41:35 -05:00
Ralph Lange
d6648d4473 libCom/osi: Add some copyrights for ITER 2012-06-29 18:12:07 +02:00
Ralph Lange
8c323b2197 libCom/osi: Add epicsThreadMap (calls user function for each thread) 2012-06-29 17:54:38 +02:00
Ralph Lange
1f5376b30b libCom/osi: Add RTEMS and vxWorks implementation for epicsThreadHooks 2012-06-29 14:49:24 +02:00
Ralph Lange
7e9f048433 Add decorations to epicsThreadHooks.c 2012-06-29 11:22:48 +02:00
Ralph Lange
803777329c Cleanup of epicsThread hooks
- move declarations to epicsThread.h, use epicsThreadId type
- use static elllist initializer for static lists
2012-06-29 11:15:47 +02:00
Ralph Lange
222ea314b0 Add thread hooks to epicsThread that are called when a thread starts or exits
- add Linux implementation that
  + sets the system command name to the EPICS thread name
  + retrieves the Linux LWP ID and prints it instead of the posix thread ID
    in show commands
2012-06-28 18:12:26 +02:00
Michael Davidsaver
026307c06d db cleanup
cleanup to allow database re-load
2012-06-28 10:55:44 -04:00
Andrew Johnson
6595ff9518 Clean up some compiler warnings from gcc 4.6 2012-06-26 00:19:10 -05:00
Andrew Johnson
0dc67498ed libCom: Mark epicsStrtod() as extern "C" 2012-06-25 10:39:47 -05:00
Andrew Johnson
44a70cca5a merged server-side-plugins branch 2012-06-22 18:16:26 -05:00
Andrew Johnson
fb6dfe6210 merged remove-hpux-artifacts branch 2012-06-22 17:32:10 -05:00
Andrew Johnson
269fb01c63 libCom: Add routines for parsing strings into epicsTypes
Adds new routines for converting numeric strings into the
standard epicsInt8, epicsUInt8, epicsInt16, epicsUInt16,
epicsInt32 and epicsUInt32 types, along with Long, ULong,
Double and Float.  These all provide error checking and
detection of extraneous characters.  The epicsScanDouble
and epicsScanFloat routines originally in epicsStdlib.h
are replaced by macros that call the epicsParse routine,
and this also provides epicsScanLong and epicsScanULong
to match.

A test file is added to ensure conversions work properly
and report appropriate errors.  This file also checks the
native strtod() routine if not used to check whether the
epicsStrtod() code is required on this platform.
2012-06-22 14:06:52 -05:00
Andrew Johnson
7cae5ebd7b Fixes for build issues found on Darwin. 2012-06-21 17:58:07 -05:00
Andrew Johnson
84a8bacc58 Re-merged the dontcant branch.
Michael backed out a few changes and added some others.
I added some modifications to default/osdMessageQueue.cpp to
remove arguments from a couple of internal (static) functions.
2012-06-19 14:28:26 -05:00
Andrew Johnson
c708bb1bac epicsTypes: Added epicsInt64 and epicsUInt64
With size checks for them in epicsTypesTest.
Also added static checks of type sizes there, since we can.
2012-06-08 16:28:31 -05:00
Andrew Johnson
24e2452bd4 libCom/test: epicsAtomic tests
Added C++ template instances, so this code loads on
a vxWorks 5.5.2 system.
2012-06-07 13:38:11 -05:00
Andrew Johnson
958b40f74c libCom: Silence errlog when running tests
Removes extraneous noise.
2012-06-05 15:53:32 -05:00
Andrew Johnson
2b9d66273c Merged changes from 3.14 branch.
Includes everything up to revno 12343 on 2012-05-21
2012-05-29 16:44:49 -05:00
Michael Davidsaver
3e9bae45b9 default MQ report event wait errors 2012-05-24 14:31:29 -04:00
Michael Davidsaver
5d2e5b46e5 minor 2012-05-24 14:31:28 -04:00
Michael Davidsaver
3333217f56 simplify 2012-05-24 14:31:28 -04:00
Michael Davidsaver
6060f2eaaa Only ignore errors when there is an error reporting path
can't report from thread free mutex unlock or implicit thread creation
2012-05-24 14:31:27 -04:00
Andrew Johnson
243baddbf6 Add an Init stat to all thread control variables
This makes the uninitilized value not the Run state.
2012-05-04 13:38:59 -05:00
Andrew Johnson
5b228618e1 Merged epicsStdioRedirect.h into epicsStdio.h 2012-05-03 12:19:34 -05:00
Ralph Lange
926246a495 =?UTF-8?q?Update=20copyright=20notices,=20refactor=20in=20dbEvent.c:=20make=20LOCK/UNLOCK=20macros=20require=20=C2=A8;=C2=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
2012-04-27 13:21:57 -04:00
Andrew Johnson
9a02181084 Add ellPop() function, removes and returns the last node on a list. 2012-04-27 13:21:45 -04:00
Andrew Johnson
0ab891fca4 Added gphFindParse(), which takes a string length parameter.
This is useful for hash lookups while parsing a const string, to avoid
 having to copy and nil-terminate it.
2012-04-27 13:21:33 -04:00
Andrew Johnson
cf623e290a Upgraded to yajl version 1.0.9. 2012-04-27 13:21:31 -04:00
Andrew Johnson
359fc1b69e Move YAJL_API to front of declarations. 2012-04-27 13:21:31 -04:00
Andrew Johnson
625a7adc69 Add Lloyd Hilaiel's Yet Another JSON Library v 1.05 to libCom.
This is BSD licensed, modified only enough to build under EPICS.
2012-04-27 13:21:29 -04:00
Andrew Johnson
729f04ecce Merged Michael's dontcant branch.
This removes various calls to cantProceed() and its relatives
and replaces them with an error return status when a resource
allocation fails.  It only does it for routines that already
have an error status return, so it makes no API changes, and
will prevent threads from being suspended unnecessarily.
2012-04-19 13:57:05 -05:00
Andrew Johnson
cec6aee81b HPUX: Delete void * operator new(size_t) methods
These were apparently needed by the HPUX compiler even though it
never actually executed them.  They are never used.
2012-04-12 11:28:23 -05:00
Andrew Johnson
2a20d48ca4 HPUX: Remove all // X aCC comments
These were added to suppress warnings from the HPUX compiler.
2012-04-12 11:13:50 -05:00
Andrew Johnson
afd9e69a25 Merged parallel-fixes branch
This separates out the rules for %.d files from the rules that
create the related target file (%.o etc).  Doing this can reduce
the amount of work to be done when rebuilding applications after
making source changes.  For files in O.Common which can be built
by any target architecture this can solve problems when parallel
builds (-j) are used.
2012-04-06 16:13:22 -05:00
Andrew Johnson
09c313764e Merged changes from 3.14 branch
Includes all changes up to revno 12334 on 2012-04-04
2012-04-06 12:22:20 -05:00
Andrew Johnson
e39c5aad8b libCom: Cleaned up bldEnvData.pl and makeEpicsVersion.pl
Added a -q flag, and cleaned up and simplified the code.
Added -h (help) options, and make more use of other modules.
2012-04-05 17:28:19 -05:00
Andrew Johnson
10e7bced84 libCom/test: epicsTimeTest reworked a bit
Report throw from first call to epicsTime::getCurrent().
Reorganized test order so a bad time provider doesn't stop
all tests from being run.  Also cleaned up a few extraneous
variables.
2012-03-06 12:54:54 -06:00
Andrew Johnson
1d0dcf0171 libCom: Deleted the 3.13 tsDefs API. 2012-03-01 11:31:32 -06:00
Andrew Johnson
df7fa22a15 libCom/test: Add more tests of the CALC engine
Some of the isnan(Inf) tests were failing on mingw.
This change doesn't fix them, it adds related examples.
2012-02-29 17:11:08 -06:00