Commit Graph

3081 Commits

Author SHA1 Message Date
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
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
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
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
Andrew Johnson
bf965cc59c Merged changes from 3.14 branch.
Includes all changes up to rev 12323 on 2012-02-20.
2012-02-20 10:01:04 -06:00
Andrew Johnson
6f9f5498b4 libCom/test: Add diagnostic to epicsStdioTest on vxWorks
This test fails if the cwd is not writable, but on vxWorks the
fault appears at the fclose() not the fopen() line. The code
now detects this and tells the user what's probably wrong.
2012-02-03 16:12:06 -06:00
Andrew Johnson
f5bc02393e libCom: Increase stack sizes for Windows and Posix
Windows stack sizes were the same as vxWorks - tiny.
The stack sizes are now multiples of sizeof(void*).
On 32-bit systems they give 256KB, 512KB and 1MB;
64-bit systems get twice those numbers.

Fixes lp:903448
2012-02-02 18:14:01 -06:00
Andrew Johnson
afaebfbeb1 libCom: Fix iocsh comment recognition
Merged J. Lewis Muir's fix for comments introduced by macro.
Added fixes to allow comments to be indented too, which used
to work if the '#' was followed by white-space or any argument
separator character.
2012-01-11 15:12:15 -06:00
J. Lewis Muir
ee2a2dfffc libCom/iocsh: Ignore comment lines after macro expansion
The handling of comment lines is only performed before macro
expansion, thus lines with macros that expand to comment lines will
not be correctly handled as comment lines.

By chance this kind of worked sometimes because a "#" command that
does nothing is internally added to the command registry to make it
show up in the help output.  Relying on this is broken.  Furthermore,
if the line starts with '#' followed by a non-separator character
(e.g. "##", "#whatever", etc.) it will not work (i.e. it will produce
a command-not-found error).

This fix checks to see if the first character of the line after macro
expansion is '#'.  If it is, it considers the line to be a comment.
2012-01-11 11:40:30 -06:00
Jeff Hill
d8f7c3731d fixed various archaic sun pro build failures repoted by Dirk 2011-12-12 16:10:24 -07:00
Andrew Johnson
946ab722a1 Merged changes from 3.14 branch
Includes all changes up to the 3.14.12.2 release on 2011-12-12.
2011-12-12 16:16:33 -06:00