Compare commits

..

145 Commits

Author SHA1 Message Date
Andrew Johnson
db0c9d7d82 Creating 3.14.12.2-rc1
Set version number, update release notes.
2011-11-28 16:35:43 -06:00
Andrew Johnson
b791a3692b libCom: Clean up win32 build warning
Delete CFLAG added for the Borland compiler (no longer supported).
2011-11-28 15:54:49 -06:00
Benjamin Franksen
0e41c03ff2 dbStatic: Fix windows build issue
fixes: lp:894276
2011-11-28 12:55:55 -06:00
Andrew Johnson
b5ec6e2448 catools: Edited camonitor help text. 2011-11-21 12:30:02 -06:00
unknown
d077c8b0ff dbStatic: Added -b option to dbExpand
-b turns off monotonic checking of breakpoint tables.
2011-11-21 11:33:26 -06:00
Andrew Johnson
b48979f5a5 Set snapshot to 3.14.12.2-pre1-DEV 2011-11-14 14:07:02 -06:00
Andrew Johnson
967ce8eb84 Creating 3.14.12.2-pre1
Set version number, update release notes.
2011-11-14 14:03:22 -06:00
Andrew Johnson
b27e22d75e Makefile cleanup
Various minor changes to comments and build variable names.
2011-11-14 12:33:07 -06:00
Jeff Hill
6ef52b5d03 fixed launchpad bug 697509, Thread synchronization issue in libCom/osi/os/WIN32/osdTime.cpp 2011-11-10 17:34:47 -07:00
Jeff Hill
652235ef13 fixed LP Bug #697517, WIN32 osdtime should handle the system time change properly 2011-11-10 17:22:22 -07:00
Jeff Hill
5b46eebe1a fixed LP bug 697516, PLL time adjustments fail if user sets system time before EPICS epoch 2011-11-10 14:52:22 -07:00
Jeff Hill
a252218e69 fixed launchpad bug 697519 (rollover time diff calc off by two ticks) 2011-11-10 14:03:01 -07:00
Andrew Johnson
fae5bbcf86 cap5: Don't try to process POD on Win32 2011-11-10 13:29:33 -06:00
Andrew Johnson
a0c1c0fb15 makeBaseApp: Remove local duplicates of library functions
Replace the buggy local copies of the functions UnixPath(),
LocalPath(), readRelease() and expandRelease() with the
library versions from our EPICS::Path and EPICS::Release
perl modules.
2011-11-08 17:51:19 -06:00
Andrew Johnson
bb14c6594b Win32: Fix for lp:861214 2011-11-08 15:57:15 -06:00
Andrew Johnson
0dfbd460e1 configure: Fix potential parallel build issue
When creating files in ../O.Common it is eesential to use atomic
file replacement rather than deleting the old file and creating
a new one in its place, because two or three architectures could
be being built in parallel which might interfere.

This commit also ensures that .dbd.d files are constructed
properly when using 'make -s'; $(ECHO) does nothing then.
2011-11-08 13:23:25 -06:00
Andrew Johnson
b36b07db9e Clean up some compiler warnings reported by J. Lewis Muir. 2011-11-07 11:58:09 -06:00
Andrew Johnson
ee95f0c4b7 catools: Fix array handling in caget and camonitor.
Fixes lp:794749
2011-11-02 11:26:29 -05:00
Andrew Johnson
d72b4a3c1e Fix install problems when using parallel builds.
If two targets using the same OS are built in parallel,
they can both try to install the same include/os/* file
at the same time, causing the installEpics.pl script to
die.  We fix this by making all installations atomic:
First copy the file to the installation directory using
a unique name, then rename it to the target name.  The
target name is in the same directory and filesystem as
the temporary name, so the rename should be atomic.
2011-10-28 13:19:08 -05:00
Andrew Johnson
21b4acfa86 ca: Remove anonymous namespace from acctstRegister.cpp
The 3.14 branch still supports vxWorks 5.4.2 whose compiler
doesn't contain any namespace support.
2011-10-19 17:36:21 -05:00
Jeff Hill johill@lanl.gov
96cad82a2a o fixed launchpad epics base bug 878372
o fixed launchpad epics base bug 878387
o added regression test for bug 878372
o build the optional test and diagnostic codes  for all (not just vxWorks) IOCs
o added acctstRegister optional IOC shell registration for regression tests
2011-10-19 12:07:00 -06:00
Andrew Johnson
d088d4b664 configure: Correct INSTALL_DBDFLAGS and INSTALL_DBFLAGS
fixes lp:861627
2011-09-28 15:33:22 -05:00
Andrew Johnson
6cb9a3f7c1 iocInit: Added some database sanity checks to iocIInit
Two menus can get modified by users; these checks make sure they
haven't been damaged too much:

* menuConvert is checked to flag problems with IOCs converted from
  3.13.x, where the SLOPE choice didn't exist.
* menuScan is checked to ensure the three initial choices are still
  present and that there is at least one periodic scan rate.
2011-09-26 16:42:15 -05:00
Till Straumann
6c4164d953 libCom: Second fix for RT thread priority
The previous fix prevented epicsThreads from working properly when
the RT scheduler is *not* used.

fixes lp:835138
2011-09-21 09:55:52 -05:00
Janet Anderson
3a101aa697 Fixed DBDINC_NAME definition 2011-09-15 11:03:20 -05:00
Janet Anderson
46ea687c6d Fixed TARGET_SRCS definition 2011-09-15 11:00:41 -05:00
Andrew Johnson
75aa05d30f libCom: Remove extern "C" { #include <...> } from osdSock.h
Our joint conclusion was that wrapping system includes with
extern "C" used to be necessary on some OS builds when C++
was much less common, but is now wrong.
2011-09-09 17:14:35 -05:00
Andrew Johnson
3cfa011760 libCom: Clean up warning from Darwin. 2011-09-09 17:10:32 -05:00
Jeff Hill
83e5247ed4 workaround for non-standard vxWorks 5.5.2 gnu compiler 2011-09-08 17:57:14 -06:00
Till Straumann
f203e9a48b libCom: Fix OS priority mapping on Posix
Fixes lp:835138
2011-08-30 14:47:31 -05:00
Ralph Lange
14e7111e72 catools: Fixed caget (w/o -c) always fetching max. array count 2011-08-25 17:41:53 +02:00
Till Straumann
2b65025d93 RTEMS: Time registration when dynamically loading
The old test for discriminating between statically and dynamically
linked applications (os/RTEMS/osdTime.cpp:staticTimeRegister()) is
wrong, it never detects a dynamically loaded app.

fixes lp:831648
-------------- This line and the following will be ignored
--------------

modified:
  src/libCom/osi/os/RTEMS/osdTime.cpp
2011-08-23 13:20:00 -05:00
Andrew Johnson
2b4edba8f3 Update copyright names and dates in LICENSE file. 2011-08-17 15:14:10 -05:00
Andrew Johnson
35b72b60fb shutdown: Lock records during dbCa link cleanup
CA links in records were being removed without locking them first.
We also now set the link type to CONSTANT, which prevents some
assertion failures if the record gets processed again before the
IOC finally dies.
2011-08-17 15:08:10 -05:00
Janet Anderson
d286a81ef0 configure: Remove T_A=* from MAKEFLAGS before findstring s in ECHO def. 2011-08-09 11:39:00 -05:00
Ralph Lange
bc4a7854ec libCom: Explicitly use namespace std for size_t declaration in epicsSingleton.h
This fixes a compile error that occurs in new gcc versions (since ~4.6.1)
2011-08-08 18:31:19 +02:00
Janet Anderson
f59825a462 Added HDEPENDS_METHOD override for cross builds 2011-08-05 12:02:30 -05:00
Janet Anderson
7783f0044b Added commented changes from Eric Norum to build with CLANG 2011-07-27 16:08:02 -05:00
Jeff Hill
1b9ca756cc Changed repeaterTimerNotify interface implementation into a nested class of udpiiu so that we dont use multiple inheritance, and therefore hopefully avoid code generation problems with certain versions of g++ on MacOSX (I cant reproduce this problem on any ofthe machines here) 2011-07-26 16:23:34 -06:00
Jeff Hill
f9f8d1150c fixed spelling and formatting nits 2011-07-26 10:40:37 -06:00
Andrew Johnson
e71785edf6 libCom/devLib: Make unsolicitedHandlerEPICS() visible
This symbol is required to be visible on non-PowerPC (68k) vxWorks
systems for devInterruptInUseVME() to recognize interrupt vectors
that the devDisconnectInterruptVME() routine has marked as not used.
2011-07-21 16:10:50 -05:00
Andrew Johnson
a367e4be95 tools: use AbsPath() instead of abs_path() in checkRelease
abs_path() dies for dirs that don't exist.
2011-07-13 10:38:13 -05:00
Michael Davidsaver
a80bd1a630 libCom: Avoid race in errlog shutdown.
A rare race during shutdown.  The contenders are the log thread
coming out of its loop and calling errlogCleanup(), and the
exitHandler signaling waitForWork.

This solution is to move cleanup completely into exitHandler,
which already waits for the log thread to exit.
2011-07-08 11:18:00 -05:00
Andrew Johnson
515712c0e7 startup: Fix host arch for 64-bit darwin kernels
"uname -m" returns x86_86 on those machines, which we weren't expecting.
2011-06-27 15:09:54 -05:00
Andrew Johnson
2fb7df8548 libCom: __attribute__((deprecated)) not in gcc 2.x
Only apply this attribute for gcc 3 and later.
2011-06-20 13:52:32 -05:00
Andrew Johnson
4448a5501a Document recent commits. 2011-06-10 16:23:02 -05:00
Andrew Johnson
dafb7d5d4c configure: Stop make displaying COMMENT lines... 2011-06-10 16:21:52 -05:00
Andrew Johnson
5343b836b8 configure: Reorganized the uninstall targets in RULES_TOP
Useful rules:
    uninstall.<arch> - Remove bin & lib directories for <arch> only.
    archuninstall    - Remove bin & lib directories created by this hostarch.
    realuninstall    - Removes ALL install dirs
2011-06-10 16:17:41 -05:00
Andrew Johnson
d0423738d1 configure: Make the vxWorks macro expand to itself
This fixes a problem in .st sequence programs that do this:
  %%#include <vxWorks.h>
The pre-processor was replacing the token since the line is not a
pre-processor directive (yet) and it doesn't appear inside "quotes".

NB: This will break any code that is incorrectly using
  #if vxWorks
instead of
  #ifdef vxWorks
2011-06-10 10:14:40 -05:00
Andrew Johnson
3bf5b21f57 tools: Improve makeDbDepends
Rewrite, add support for quotes around filenames in "file" statements.
2011-06-08 12:26:01 -05:00
Andrew Johnson
8d15407e2f tools: Remove warning from newer versions of Perl.
Replace \1 with $1 in substitution strings.
2011-06-08 12:15:18 -05:00
Andrew Johnson
7560fb1bb1 rec/compress: Post monitors on NUSE field
Matt Pearson asked for NUSE monitors, so clients can track how
much data has been collected.
2011-06-08 11:16:26 -05:00
Andrew Johnson
445b5e473b configure: Delete %.C (C++) build rule
Breaks build of %.c files on Windows with some versions of Make.
2011-06-07 09:52:54 -05:00
Andrew Johnson
f18b435cf6 configure: Replace REM with perl -e ''
Another good idea from Ben Franksen...
2011-06-06 09:51:31 -05:00
unknown
5649e15842 ca: Remove unnecessary mutable qualifiers
These references are never actually "mutated", and break builds
with a recent C++ compiler.

Fixes lp:736273
2011-06-01 17:22:12 -05:00
unknown
43f58c990a libCom: Only delete a timer queue when its ref count is 0.
Fixes lp:786979
2011-06-01 16:27:18 -05:00
Andrew Johnson
0dfc92f48d util: Support logrotate with iocLogServer
Allow reopening of the same filename on receipt of a SIGHUP.
Requested by Lana Abadie at ITER.
2011-06-01 15:55:10 -05:00
Andrew Johnson
f1a646240b configure: Fix 'make -s' on Windows
Use REM instead of '#' to disable @echo commands.
Thanks to Ben Franksen for the hint.
2011-06-01 15:11:05 -05:00
Andrew Johnson
ce0114418f tools: Fix LocalPath on Cygwin
The LocalPath() function must not replace /cygdrive/x with x:
This used to be necessary when mixing win32 and cygwin tools,
but we tell users not to do that any more.  This problem only
appears if the path to base starts with /cygdrive/x.
2011-05-23 16:34:58 -05:00
Andrew Johnson
342920b1db R3.14.12.1-DEV 2011-04-26 15:37:21 -05:00
Andrew Johnson
ef0442b50d R3.14.12.1 2011-04-26 15:36:19 -05:00
Andrew Johnson
c71093f47f libCom/iocsh: Oops, allow NULL pathname. 2011-04-26 15:18:30 -05:00
Andrew Johnson
c11a31f549 libCom/iocsh: Set IOCSH_STARTUP_SCRIPT env var. 2011-04-26 14:57:26 -05:00
Andrew Johnson
ed0e3e60ed RTEMS: Changes suggested by Kate Feng
* Added macros for configuring MBUF and CLUSTER space allocation
* More MBUF and CLUSTER space on mvme3100, mvme5500 and beatnik
* MVME5500: link with bspExt, use .elf extension like other BSPs
2011-04-26 12:44:46 -05:00
Andrew Johnson
0373da87ed R3.14.12.1-rc1-DEV 2011-04-19 15:11:09 -05:00
Andrew Johnson
3c0cea0f38 R3.14.12.1-rc1 2011-04-19 15:09:57 -05:00
Andrew Johnson
4c7684aad1 Document 3.14.12.1 changes. 2011-04-19 15:05:36 -05:00
Andrew Johnson
6efd4be222 configure: Added vxWorks-ppc32-debug and vxWorks-ppc32sf-debug archs. 2011-04-19 15:02:47 -05:00
Andrew Johnson
1584f98e26 catools: Disable stdout buffering on Windows
Line buffering is not supported on Windows 7.
2011-04-19 14:21:38 -05:00
Janet Anderson
f3f2f23fbc Updates for latest releases of os, Visual Studio, ... 2011-04-19 11:28:04 -05:00
Janet Anderson
5aeb325185 Updated for latest releases of os, Visual Studio, ... 2011-04-19 10:55:18 -05:00
Michael Davidsaver
2949f6650e errlog: Flush messages before exit
When an exit is requested process all messages before exiting.

The atExit flag is set, so no new messages can be added to the buffer.
2011-04-12 18:12:52 -05:00
Janet Anderson
b472473ef1 Restored COMMON_DBS usage in DBDDEPENDS_FILES definition. 2011-04-11 15:47:40 -05:00
Andrew Johnson
8418aa059a libCom/test: Suppress g++ build warnings from epicsCalcTest
Newer versions of gcc support #pragma GCC diagnostic
2011-04-07 17:25:02 -05:00
Andrew Johnson
1106bab73e RTEMS: Use the new mount API to initialize TFTP. 2011-04-05 17:21:54 -05:00
Andrew Johnson
038ac0cd38 Fix some build issues with old Solaris C++ compiler.
src/libCom/test/epicsExceptionTest.cpp:
  exThread needs a destructor

src/cas/generic/st/casStreamOS.cc:
  Can't use inline as armSend already called
2011-04-05 16:08:49 -05:00
Andrew Johnson
8dea585dc2 FreeBSD update to osdSock.h from Gerrit Kuehn. 2011-04-05 12:32:39 -05:00
Andrew Johnson
fc6df7652d Update iOS CONFIG files for iOS 4.3 2011-04-05 12:27:00 -05:00
Andrew Johnson
db89c1f463 Added generic PPC32 targets for vxWorks 6. 2011-04-05 12:12:47 -05:00
Andrew Johnson
c6e1787ff9 Solve C++ static initialization order problem.
Fixes lp:750549
2011-04-05 11:27:22 -05:00
Jeff Hill
0dab032751 avoid c++ static initialization order issues 2011-04-05 09:23:22 -06:00
Jeff Hill
4b780b1011 avoid c++ static initialization order issues 2011-04-04 17:50:49 -06:00
Jeff Hill
fc3e876d57 avoid c++ static initialization order issues 2011-04-04 17:29:51 -06:00
Andrew Johnson
f4528ff5e1 libCom: Fix msgbufGetNode() in errlog.c
Systems that generate large numbers of errlog messages or have a slow
message listener could overwrite older messages in the message buffer
after the buffer wraps.  This also corrects and annotates the test
code to describe what's being checked.
2011-03-01 15:03:33 -06:00
Andrew Johnson
d73f466dbc documentation: KnownProblems template
Modified the empty template file to include GNU Patch usage
instructions.
2011-02-28 17:26:24 -06:00
Andrew Johnson
3d056f63e4 configure: Added vxWorks-mpc8548 target (MVME4100)
Config files from Ernest Williams.
2011-02-15 16:19:26 -06:00
Jeff Hill
fd72cb63bf libCom/WIN32: Merged Jeff's fix for bug 717252
o Fixed race condition where win32 thread parm was not pushed onto the
  list before the thread was started, and so if the thread exits very
  quickly it can try to remove a non-existent thread parameter from
  the list.
o This impacts only win32.
2011-02-11 16:33:58 -06:00
Andrew Johnson
c698853394 libCom: Merged Jeff's epicsThread change.
When finished waiting for a thread to exit, signal the event in case
other threads are waiting also.
2011-02-11 15:04:04 -06:00
Andrew Johnson
22f1e8201f libCom/WIN32: Merged Jeff's WIN32/osdThread changes
Fixed spelling and other cosmetic changes.
2011-02-11 15:01:39 -06:00
Andrew Johnson
b38127450e libCom/WIN32: Merged Jeff's osdTime fix
Fixed last time compare in PLL drift factor update loop.
2011-02-11 14:59:35 -06:00
Andrew Johnson
fbcc7b4a0d ca: Merged Jeff's tcpiiu changes
In disconnectAllChannels mark channels as unassigned to any list
because in some unusual situations (abrupt shutdown) the channels are
not immediately assigned to another list.
2011-02-11 14:55:04 -06:00
Jeff Hill
5a11866431 when finished waiting for a thread to exit, signal the event in case other threads are waiting also 2011-01-14 18:01:53 -07:00
Jeff Hill
253036c36c o committing merge of r3.14 trunk change
o fixed spelling and other cosmetic changes
2011-01-14 18:00:02 -07:00
Jeff Hill
793639f4da fixed last time compare in PLL drift factor update loop 2011-01-14 17:56:49 -07:00
Jeff Hill
a2c87268f5 in disconnectAllChannels mark channels as unassigned to any list because in some unusual situations (abrupt shutdown) the channels are not immediately assigned to another list 2011-01-14 17:53:33 -07:00
Jeff Hill
a52b995ca2 rsrv: Fixed large array element count bug
Reverted commit 12095.2.5 which introduced an incorrect optimization.

Fixes:701673
2011-01-13 16:21:31 -06:00
Jeff Hill
2af392a099 fix for bug 701673 at launchpad (wrong native element count for large arrays) 2011-01-12 15:41:33 -07:00
Michael Davidsaver
6170dc9406 libCom: Fix errlogPrintf() assert fail at shutdown
If errlogPrintf() gets called during shutdown, it can cause a
recursive assert failure.

Fixes lp:693534
2011-01-07 10:24:31 -06:00
Andrew Johnson
23daca46a1 tools: More back-slash escape fixes
Thanks to Stephen Norum for pointing most of these out and
testing the patch.
2010-12-16 17:02:15 -06:00
Andrew Johnson
f9ebe082ff registry: Escape back-slashes in bldTop string literal on Win32. 2010-12-14 15:05:26 -06:00
Andrew Johnson
dc76951945 configure: Set EPICS_DEV_SNAPSHOT back to -DEV 2010-11-24 16:18:25 -06:00
Janet Anderson
253fd8109b R3.14.12 2010-11-24 14:50:38 -06:00
Andrew Johnson
fd4b34be8f docs: Added a couple more LP bug fixes to the Release Notes. 2010-11-24 14:35:35 -06:00
Andrew Johnson
23c7e64490 rec: Fix calc & calcout get_precision() 2010-11-24 13:35:04 -06:00
Ralph Lange
3ca705752a catools: Fix help text for "-s" option (also in CA RefMan) 2010-11-24 13:31:47 -05:00
Andrew Johnson
2069889347 docs: Update notes and comments about readline settings. 2010-11-22 10:40:49 -06:00
Andrew Johnson
04085d340b configure: Link with libdl on Solaris 8 and 9 (but not 10). 2010-11-19 16:38:46 -06:00
Andrew Johnson
bc7e87b961 RTEMS: Warning cleanups from Eric. 2010-11-17 16:30:32 -06:00
Andrew Johnson
81d155c98b documentation: Fixed typos and enhanced Release Notes a little. 2010-11-17 13:31:32 -06:00
Andrew Johnson
512e14e4b7 documentation: Added links to the bugs marked Fix Committed in LP. 2010-11-15 18:02:46 -06:00
Andrew Johnson
c503a03f37 libCom/errlog: Clean up possible problem at shutdown.
Don't use epicsMutexMustLock() in msgbufGetFree().
When we're shutting down, the pvtData.msgQueueLock gets destroyed.
This makes msgbufGetFree() return NULL if the lock is dead.
The epicsMutexMustLock() routine asserts(), which recurses...
2010-11-15 15:46:40 -06:00
Janet Anderson
fb493a064c R3.14.12-rc1-DEV 2010-11-15 14:28:03 -06:00
Janet Anderson
e406440316 R3.14.12-rc1 2010-11-15 13:59:06 -06:00
jba
94a48d23d0 Set HDEPENDS_METHOD to CMD which was overidden by CONFIG.gnuCommon. 2010-11-15 13:43:17 -06:00
jba
cf18208579 Added and removed include files. 2010-11-15 11:27:17 -06:00
Janet Anderson
7cf01b091b Removed unneeded include line. 2010-11-15 10:31:16 -06:00
Janet Anderson
e1c1dd45a6 Added include lines for host build CONFIG_SITE files. 2010-11-14 19:49:17 -06:00
Janet Anderson
8e40be47a0 Removed VX_DIR definition- no longer works in CONFIG_SITE.*.Common files. 2010-11-14 19:29:53 -06:00
Andrew Johnson
9777c63e23 documentation: Paragraphs on epicsEvent and Cygwin support. 2010-11-12 16:48:21 -06:00
Andrew Johnson
18594e1a34 subArray: Bugfix, allow array puts to VAL
Fixed a bug reported by Michael Abbott, NORD goes -ve.
Modified soft channel support so when INP="" it extracts the relevent
sub-array of the existing VAL field; use an external put to set the
array. This lets the other records pull a series of values from the
record in sequence.
2010-11-12 16:09:09 -06:00
Janet Anderson
99e7e7727a Provide a link-time path for readline directory.
Remove unneeded READLINE definitions from last commit.
2010-11-11 13:45:09 -06:00
Janet Anderson
adb201a048 Now RUNTIME_LDFLAGS is set here. 2010-11-11 13:43:53 -06:00
Janet Anderson
56ada25dd7 RUNTIME_LDFLAGS now set in CONFIG_COMMON. Use LINKER_USE_RPATH for
readline dir.
2010-11-11 13:41:03 -06:00
Janet
23bbe233f7 Moved COMMANDLINE to CONFIG_SITE.Common.win32-x86-mingw 2010-11-10 16:59:06 -06:00
Janet Anderson
c48fe29e89 Allow arm cross targets to use readline as command line library. 2010-11-10 12:02:20 -06:00
Andrew Johnson
b5c185877d RTEMS: Allow for 64-bit compatibility in RTEMS 4.10. 2010-11-10 09:44:19 -06:00
Janet Anderson
b82db48335 Use win32-x86 values for default values. 2010-11-09 15:37:08 -06:00
Janet Anderson
da8ae994e4 Initial version. 2010-11-09 15:12:20 -06:00
Janet Anderson
8d2cd8b96c Updated to match extensions/configure. 2010-11-09 14:55:13 -06:00
Janet Anderson
91631919e5 Minor changes. 2010-11-09 08:32:36 -06:00
Janet Anderson
181c4e126a Added includes for CONFIG_SITE files for hostarch. 2010-11-08 08:18:58 -06:00
Janet Anderson
32ebff1881 Removed OPT flag lines which are same as gnu compiler build defaults. 2010-11-08 08:16:12 -06:00
Ralph Lange
e65253f8b9 ca: Minor fix in CA Reference Manual 2010-11-05 15:57:34 -04:00
Ralph Lange
3398950f9d ca: Added chapter about firewalls to CA Reference Manual 2010-11-05 15:41:39 -04:00
Andrew Johnson
2477bf52e6 libCom: Cygwin socket unblocking again...
It helps to include the cygwin header file that
actually has the version number in it...
2010-11-04 14:24:13 -05:00
Andrew Johnson
e7179fc289 libCom: Fix cygwin socket shutdown issue.
Cygwin 1.7 changed the socket shutdown method from BothShutdown
to Close. This fix looks at the cygwin version to work out what
value to return from esscimqi().
2010-11-04 13:30:44 -05:00
Jeff Hill
f340b3e153 o removed -O3 from mingw debug builds (so the issues below are reproduced on mingw)
o gnu compiler for windows doesnt support well dll exporting individual functions from a class
in debug builds so I switched to exporting the entire interface class in several places
o fixed several places in ca lib where include of epicsTimer.h wasnt properly ifdef'd so
that it is imported by ca header files
--- these issues were already fixed on cvs main trunk ---
2010-11-04 10:19:54 -06:00
Andrew Johnson
b4d7b6f851 Merged Jeff's fix for Bug 667384
This commit was needed to reorder the commit history so that everyone
else's commits since 2010-09-27 remain on the mainline.
2010-11-01 18:07:15 -05:00
Jeff Hill
36175b1368 merged in R3.14.12 2010-11-01 15:15:51 -06:00
Jeff Hill
e372a83096 neglected to unlock on error return path 2010-11-01 15:01:04 -06:00
Jeff Hill
3ad06eb0a3 fixed request and response bytes amount was revered in printf 2010-11-01 15:00:02 -06:00
Janet Anderson
93c39c86f7 Added includes for host's CONFIG_SITE files. Changed all to -include. 2010-11-01 14:35:49 -05:00
Andrew Johnson
46b912bc16 cas: Workaround for vxWorks-ppc604 compiler issue. 2010-10-29 12:15:48 -05:00
Andrew Johnson
1e6464cdc4 libCom/test: Various improvements.
Made epicsThreadOnceTest more deterministic, replacing an
epicsThreadSleep() with epicsEventMustWait(), and added a diagnostic
message before running the thread recurse test.

Eric added a series of checks to epicsEventTest.cpp which ensure that
epicsEventSignal() only wakes one waiting thread.
2010-10-29 11:58:44 -05:00
Janet Anderson
c84c3d49ad R3.14.12-pre2-DEV 2010-10-27 17:05:43 -05:00
150 changed files with 2369 additions and 1032 deletions

View File

@@ -1,11 +1,14 @@
Copyright (c) 1991-2007 UChicago Argonne LLC and The Regents of the
University of California. All rights reserved.
Copyright (c) 1991-2011 UChicago Argonne LLC.
Copyright (c) 1991-2006 The Regents of the University of California.
Copyright (c) 2006-2011. Los Alamos National Security, LLC. Some of this
material was produced under U.S. Government contract DE-AC52-06NA25396
for Los Alamos National Laboratory (LANL), which is operated by Los Alamos
National Security, LLC for the U.S. Department of Energy.
EPICS BASE is distributed subject to the following license conditions:
SOFTWARE LICENSE AGREEMENT
Software: EPICS BASE
Versions: 3.13.7 and higher
1. The "Software", below, refers to EPICS BASE (in either source code, or
binary form and accompanying documentation). Each licensee is

View File

@@ -1,5 +1,5 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
@@ -34,6 +34,7 @@
# LIBSRCS source files for building libraries (deprecated)
# PROD_OBJS object files for building prods
# LIB_OBJS object files for building libraries
# USR_OBJS object files for building libraries and prods
# USR_LIBS libs needed by PROD and TESTPROD and LIBRARY
# PROD_LIBS libs needed by PROD and TESTPROD
# LIB_LIBS libs needed by shared LIBRARY

View File

@@ -1,5 +1,5 @@
#*************************************************************************
# Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
@@ -19,26 +19,26 @@
BASE_3_14=YES
# EPICS_VERSION must be a number >0 and <256
# EPICS_VERSION must be a number >0 and <256
EPICS_VERSION = 3
# EPICS_REVISION must be a number >=0 and <256
# EPICS_REVISION must be a number >=0 and <256
EPICS_REVISION = 14
# EPICS_MODIFICATION must be a number >=0 and <256
# EPICS_MODIFICATION must be a number >=0 and <256
EPICS_MODIFICATION = 12
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# Not included if zero
EPICS_PATCH_LEVEL = 0
EPICS_PATCH_LEVEL = 2
# This will end in -DEV between official releases
#EPICS_DEV_SNAPSHOT=-DEV
#EPICS_DEV_SNAPSHOT=-pre1
#EPICS_DEV_SNAPSHOT=-pre1-DEV
EPICS_DEV_SNAPSHOT=-pre2
#PICS_DEV_SNAPSHOT=-pre1-DEV
#EPICS_DEV_SNAPSHOT=-pre2
#EPICS_DEV_SNAPSHOT=-pre2-DEV
#EPICS_DEV_SNAPSHOT=-rc1
EPICS_DEV_SNAPSHOT=-rc1
#EPICS_DEV_SNAPSHOT=-rc1-DEV
#EPICS_DEV_SNAPSHOT=-rc2
#EPICS_DEV_SNAPSHOT=-rc2-DEV

View File

@@ -1,10 +1,9 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
#
@@ -82,7 +81,8 @@ COMMON_DIR = ../O.Common
#-------------------------------------------------------
# Make echo output - suppress echoing if make's '-s' flag is set
ECHO := $(if $(findstring s,$(MAKEFLAGS)),\#,@echo)
COMMENT = \#
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(COMMENT),echo)
#-------------------------------------------------------
ifdef T_A
@@ -258,6 +258,7 @@ LOADABLE_SHRLIB_SUFFIX=$(SHRLIB_SUFFIX)
COMMANDLINE_LIBRARY = EPICS
OP_SYS_LDLIBS += $(LDLIBS_$(COMMANDLINE_LIBRARY))
OP_SYS_LDFLAGS += $(LDFLAGS_$(COMMANDLINE_LIBRARY))
RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(COMMANDLINE_LIBRARY))
#--------------------------------------------------
# Flags
@@ -334,7 +335,7 @@ HDEPENDS_CFLAGS = $(HDEPENDS_CFLAGS_$(HDEPENDS))
#--------------------------------------------------
# depends definition
TARGET_SRCS = $(foreach name, $(TESTPROD) $(PROD) $(LIBRARY), $($(name)_SRCS))
TARGET_SRCS = $(foreach name, $(TESTPROD) $(PROD) $(LIBRARY) $(LOADABLE_LIBRARY), $($(name)_SRCS))
SRC_FILES = $(LIB_SRCS) $(LIBSRCS) $(SRCS) $(USR_SRCS) $(PROD_SRCS) $(TARGET_SRCS)
HDEPENDS_FILES_YES = $(addsuffix $(DEP),$(notdir $(basename $(SRC_FILES))))
HDEPENDS_FILES = $(if $(filter NO,$(HDEPENDS)),,$(HDEPENDS_FILES_YES))

View File

@@ -78,12 +78,15 @@
# vxWorks-68040lc
# vxWorks-68060
# vxWorks-pentium
# vxWorks-ppc32 (32-bit PowerPC CPUs with full FPU)
# vxWorks-ppc32sf (32-bit PowerPC CPUs without FPU)
# vxWorks-ppc603
# vxWorks-ppc603_long
# vxWorks-ppc604
# vxWorks-ppc604_long
# vxWorks-ppc604_altivec
# vxWorks-mpc8540
# vxWorks-mpc8548
# RTEMS-at91rm9200ek
# RTEMS-beatnik
# RTEMS-gen68360
@@ -103,7 +106,7 @@
# override
#
CROSS_COMPILER_TARGET_ARCHS=
#CROSS_COMPILER_TARGET_ARCHS=vxWorks-68040
#CROSS_COMPILER_TARGET_ARCHS=vxWorks-ppc32
# If only a subset of the host architectures perform
# the build for the CROSS_COMPILER_TARGET_ARCHS

View File

@@ -1,10 +1,9 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
#RULES.Db
@@ -23,8 +22,8 @@ vpath %.acs $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
##################################################### dbdflags
# dbExpand
INSTALL_DBDFLAGS += -I $(INSTALL_LOCATION)/dbd
INSTALL_DBFLAGS += -I $(INSTALL_LOCATION)/db
INSTALL_DBDFLAGS += -I $(INSTALL_DBD)
INSTALL_DBFLAGS += -I $(INSTALL_DB)
DBDFLAGS = $(USR_DBDFLAGS) -I . -I .. $(INSTALL_DBDFLAGS) $(RELEASE_DBDFLAGS)
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) -I. -I.. $(INSTALL_DBFLAGS) $(RELEASE_DBFLAGS)
@@ -48,7 +47,7 @@ DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) -I. -I.. $(INSTALL_DBFLAGS) $(RELEASE_DBF
# Following line added for backward compatibilty
DBD += $(DBDNAME)
DBDINC_NAME = $(patsubst %.h,%,$(patsubst %.db,%,$(DBDINC)))
DBDINC_NAME = $(patsubst %.h,%,$(patsubst %.dbd,%,$(DBDINC)))
DBD += $(addsuffix .dbd,$(DBDINC_NAME))
INC += $(addsuffix .h,$(DBDINC_NAME))
@@ -109,7 +108,8 @@ ACF_CMD = $(CPP) $(ACF_CPPFLAGS) $(ACF_INCLUDES) $< > $@
HINC += $(addsuffix .h,$(DBDINC_NAME))
COMMON_DBDINC += $(addprefix $(COMMON_DIR)/,$(HINC))
DBDDEPENDS_FILES += $(addsuffix $(DEP),$(HINC) $(DBS) \
DBDDEPENDS_FILES += $(addsuffix $(DEP),$(HINC) \
$(patsubst $(COMMON_DIR)/%,%,$(COMMON_DBS)) \
$(patsubst $(COMMON_DIR)/%,%,$(COMMON_DBDS)))
DBDDEPENDS_FLAGS = $(subst -I,,$(filter-out -S%,$(DBDFLAGS)))
@@ -121,7 +121,7 @@ MAKEDBDEPENDS = $(PERL) $(TOOLS)/makeDbDepends.pl
ifndef T_A
ECHO := $(if $(findstring s,$(MAKEFLAGS)),\#,@echo)
ECHO := $(if $(findstring s,$(MAKEFLAGS)),$(COMMENT),@echo)
COMMON_DIR = .
INSTALL_DBDS =
INSTALL_DBS =
@@ -223,58 +223,65 @@ $(INSTALL_DB)/%.template: %.template
$(COMMON_DIR)/%Record.h: $(COMMON_DIR)/%Record.dbd
@$(RM) $(notdir $@)$(DEP)
@$(DBDDEPENDS_CMD)
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
@$(RM) $@
$(DBTORECORDTYPEH) $(DBDFLAGS) $< $@
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
@$(RM) $(notdir $@)
$(DBTORECORDTYPEH) $(DBDFLAGS) $< $(notdir $@)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%Record.h: %Record.dbd
@$(RM) $(notdir $@)$(DEP)
@$(DBDDEPENDS_CMD)
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
@$(RM) $@
$(DBTORECORDTYPEH) $(DBDFLAGS) $< $@
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
@$(RM) $(notdir $@)
$(DBTORECORDTYPEH) $(DBDFLAGS) $< $(notdir $@)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/menu%.h: $(COMMON_DIR)/menu%.dbd
@$(RM) $(notdir $@)$(DEP)
@$(DBDDEPENDS_CMD)
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
@$(RM) $@
$(DBTOMENUH) $(DBDFLAGS) $< $@
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
@$(RM) $(notdir $@)
$(DBTOMENUH) $(DBDFLAGS) $< $(notdir $@)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/menu%.h: menu%.dbd
@$(RM) $(notdir $@)$(DEP)
@$(DBDDEPENDS_CMD)
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
@$(RM) $@
$(DBTOMENUH) $(DBDFLAGS) $< $@
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
@$(RM) $(notdir $@)
$(DBTOMENUH) $(DBDFLAGS) $< $(notdir $@)
@$(MV) $(notdir $@) $@
.PRECIOUS: $(COMMON_DIR)/%.h
##################################################### DBD files
$(COMMON_DIR)/bpt%.dbd: bpt%.data
@$(RM) $@
$(MAKEBPT) $< $@
$(MAKEBPT) $< $(notdir $@)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.dbd: $(COMMON_DIR)/%Include.dbd
@$(RM) $(notdir $@)$(DEP)
@$(DBDDEPENDS_CMD)
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
$(ECHO) "Expanding dbd"
@$(RM) $@
@$(DBEXPAND) $(DBDFLAGS) -o $@ $<
@$(RM) $(notdir $@)
@$(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.dbd: %Include.dbd
@$(RM) $(notdir $@)$(DEP)
@$(DBDDEPENDS_CMD)
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
$(ECHO) "Expanding dbd"
@$(RM) $@
$(DBEXPAND) $(DBDFLAGS) -o $@ $<
@$(RM) $(notdir $@)
$(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%Include.dbd:
@$(RM) $@
$(PERL) $(TOOLS)/makeIncludeDbd.pl $($*_DBD) $@
@$(RM) $(notdir $@)
$(PERL) $(TOOLS)/makeIncludeDbd.pl $($*_DBD) $(notdir $@)
@$(MV) $(notdir $@) $@
$(INSTALL_DBD)/%: $(COMMON_DIR)/%
$(ECHO) "Installing created dbd file $@"
@@ -302,8 +309,8 @@ $(COMMON_DIR)/%.db$(RAW): $(COMMON_DIR)/%.edf
$(COMMON_DIR)/%.db$(RAW): %.substitutions
@$(RM) $(notdir $@)$(DEP)
$(MAKEDBDEPENDS) $@ $< $(TEMPLATE_FILENAME) >> $(notdir $@)$(DEP)
$(ECHO) "$@:$(TEMPLATE_FILENAME)" >> $(notdir $@)$(DEP)
@$(MAKEDBDEPENDS) $@ $< $(TEMPLATE_FILENAME) >> $(notdir $@)$(DEP)
echo "$@ : $(TEMPLATE_FILENAME)" >> $(notdir $@)$(DEP)
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
@$(RM) $@ $*.tmp
$(MSI) $(DBFLAGS) -S$< $(TEMPLATE_FILENAME) > $*.tmp

View File

@@ -205,11 +205,6 @@ $(OBJLIBNAME):%$(OBJ):
@$(RM) $@
$(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
%$(OBJ): %.C
@$(HDEPENDS_CMD)
@$(RM) $@
$(COMPILE.cpp) $(call PATH_FILTER,$<) $(COMPILE_FILTER.cpp)
# WIN95/NT resource compiler
%$(RES): %.rc
@$(RM) $@

View File

@@ -1,10 +1,9 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
#
@@ -13,73 +12,73 @@
include $(CONFIG)/RULES_DIRS
distclean: realclean cvsclean realuninstall
CVSCLEAN=$(firstword $(wildcard $(TOOLS)/cvsclean.pl $(TOP)/src/tools/cvsclean.pl))
cvsclean:
$(PERL) $(CVSCLEAN)
realuninstall: uninstallDirs
$(RMDIR) $(INSTALL_LOCATION_BIN)
$(RMDIR) $(INSTALL_LOCATION_LIB)
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC)\
$(INSTALL_HTML) $(INSTALL_JAVA) $(INSTALL_TEMPLATES) \
$(INSTALL_DB)
UNINSTALL_DIRS += $(DIRECTORY_TARGETS)
uninstallDirs:
$(RMDIR) $(UNINSTALL_DIRS)
uninstall: archuninstall uninstallDirs
archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
@$(MAKE) -f Makefile cleandirs
uninstallArchTargets = $(foreach arch,$(BUILD_ARCHS), uninstall$(DIVIDER)$(arch))
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
$(uninstallArchTargets): uninstallDirs
@$(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart) $(INSTALL_LOCATION_LIB)/$(archPart)
uninstall$(DIVIDER)%:
$(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart)
$(RMDIR) $(INSTALL_LOCATION_LIB)/$(archPart)
cleandirs:
ifeq ($(wildcard $(INSTALL_LOCATION_BIN)/*),)
@$(RMDIR) $(INSTALL_LOCATION_BIN)
$(RMDIR) $(INSTALL_LOCATION_BIN)
endif
ifeq ($(wildcard $(INSTALL_LOCATION_LIB)/*),)
@$(RMDIR) $(INSTALL_LOCATION_LIB)
$(RMDIR) $(INSTALL_LOCATION_LIB)
endif
@echo
# The echo above stops a "nothing to be done for cleandirs" message
distclean: realclean realuninstall
CVSCLEAN=$(firstword $(wildcard $(TOOLS)/cvsclean.pl $(TOP)/src/tools/cvsclean.pl))
cvsclean:
@$(PERL) $(CVSCLEAN)
realuninstall:
@$(RMDIR) $(INSTALL_LOCATION_BIN) $(INSTALL_LOCATION_LIB)
@$(RMDIR) $(UNINSTALL_DIRS)
uninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
@$(MAKE) -f Makefile cleandirs
uninstallDirs:
@$(RMDIR) $(UNINSTALL_DIRS)
help:
@echo "Usage: gnumake [options] [target] ..."
@echo "Targets supported by all Makefiles:"
@echo " install - Builds and installs all targets (default rule)"
@echo " all - Same as install"
@echo " buildInstall - Same as install"
@echo " all - Same as install (default rule)"
@echo " inc - Installs header files"
@echo " build - Builds and installs all targets"
@echo " install - Builds and installs all targets"
@echo " buildInstall - Same as install (deprecated)"
@echo " clean - Removes the O.<arch> dirs created by running make"
@echo " In O.<arch> dir, clean removes build created files"
@echo " realclean - Removes ALL O.<arch> dirs"
@echo " Cannot be used within an O.<arch> dir"
@echo " rebuild - Same as clean install"
@echo " inc - Installs header files"
@echo " build - Builds all targets"
@echo " archclean - Removes O.<arch> dirs but not O.Common dir"
@echo "\"Partial\" build targets supported by Makefiles:"
@echo " inc.<arch> - Installs <arch> only header files."
@echo " build.<arch> - Builds and installs <arch> only."
@echo " install.<arch> - Builds and installs <arch> only."
@echo " clean.<arch> - Cleans <arch> binaries in O.<arch> dirs only."
@echo " build.<arch> - Builds <arch> only."
@echo " uninstall.<arch> - Remove bin & lib directories for <arch> only."
@echo "Targets supported by top level Makefile:"
@echo " uninstall - Cleans directories created by the install."
@echo " archuninstall - Remove bin & lib directories created by this hostarch."
@echo " uninstall - Remove install directories created by this hostarch."
@echo " realuninstall - Removes ALL install dirs"
@echo " distclean - Same as realclean realuninstall."
@echo " distclean - Same as realclean cvsclean realuninstall."
@echo " cvsclean - Removes cvs .#* files in all dirs of directory tree"
@echo " help - Prints this list of valid make targets "
@echo "Indiv. object targets are supported by O.<arch> level Makefile .e.g"
@echo " xxxRecord.o"
.PHONY : $(uninstallArchTargets)
.PHONY : uninstall help cleandirs distclean uninstallDirs realuninstall
.PHONY : cvsclean
.PHONY: cleandirs distclean cvsclean realuninstall archuninstall uninstallDirs
.PHONY: uninstall help

View File

@@ -1,17 +1,19 @@
#
# CONFIG.Common.RTEMS-beatnik
# A migration from Eric Norum's CONFIG.Common.RTEMS-mvme5500
# Author: Dayle Kotturi
# SLAC
# dayle@slac.stanford.edu
# $Revision-Id$
# Author: Dayle Kotturi <dayle@slac.stanford.edu>
#
# All RTEMS targets use the same Makefile fragment
#
override EXE=.elf
EXE = .elf
RTEMS_TARGET_CPU = powerpc
GNU_TARGET=powerpc-rtems
GNU_TARGET = powerpc-rtems
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
ARCH_DEP_CFLAGS += -DHAVE_MOTLOAD
ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048
ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120
OP_SYS_LDLIBS += -lbspExt
MUNCH_SUFFIX = .boot
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
@@ -19,16 +21,13 @@ define MUNCH_CMD
$(RTEMS_TOOLS)/bin/$(OBJCOPY_FOR_TARGET) -O binary $< $@
endef
CROSS_COMPILER_TARGET_ARCHS=RTEMS-beatnik
include $(CONFIG)/os/CONFIG.Common.RTEMS
RTEMSSYMS=$(PRODNAME:%$(EXE)=%.sym)
RTEMSIMGS=$(PRODNAME:%$(EXE)=%.bin)
INSTALL_RTEMSSYMS=$(RTEMSSYMS:%=$(INSTALL_BIN)/%)
INSTALL_RTEMSIMGS=$(RTEMSIMGS:%=$(INSTALL_BIN)/%)
OP_SYS_LDLIBS += -lbspExt
%.sym: %$(EXE)
$(XSYMS) $^ $@

View File

@@ -1,15 +1,18 @@
#
# CONFIG.Common.RTEMS-mvme3100
# $Revision-Id$
# Author: W. Eric Norum
# Canadian Light Source
# eric@cls.usask.ca
# Author: W. Eric Norum <wenorum@lbl.gov>
#
# All RTEMS targets use the same Makefile fragment
#
EXE = .elf
RTEMS_TARGET_CPU = powerpc
GNU_TARGET = powerpc-rtems
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
ARCH_DEP_CFLAGS += -DHAVE_PPCBUG
OP_SYS_LDLIBS += -lbspExt
MUNCH_SUFFIX = .boot
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
define MUNCH_CMD
@@ -24,6 +27,4 @@ define MUNCH_CMD
rm -f rtems.gz
endef
OP_SYS_LDLIBS += -lbspExt
include $(CONFIG)/os/CONFIG.Common.RTEMS

View File

@@ -1,11 +1,19 @@
#
# CONFIG.Common.RTEMS-mvme3100
# $Revision-Id$
# Author: W. Eric Norum <wenorum@lbl.gov>
#
# All RTEMS targets use the same Makefile fragment
#
override EXE=.elf
EXE = .elf
RTEMS_TARGET_CPU = powerpc
GNU_TARGET=powerpc-rtems
GNU_TARGET = powerpc-rtems
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
ARCH_DEP_CFLAGS += -DHAVE_MOTLOAD
ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048
ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120
OP_SYS_LDLIBS += -lbspExt
MUNCH_SUFFIX = .boot
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
@@ -13,16 +21,13 @@ define MUNCH_CMD
$(RTEMS_TOOLS)/bin/$(OBJCOPY_FOR_TARGET) -O binary $< $@
endef
CROSS_COMPILER_TARGET_ARCHS=RTEMS-beatnik
include $(CONFIG)/os/CONFIG.Common.RTEMS
RTEMSSYMS=$(PRODNAME:%$(EXE)=%.sym)
RTEMSIMGS=$(PRODNAME:%$(EXE)=%.bin)
INSTALL_RTEMSSYMS=$(RTEMSSYMS:%=$(INSTALL_BIN)/%)
INSTALL_RTEMSIMGS=$(RTEMSIMGS:%=$(INSTALL_BIN)/%)
OP_SYS_LDLIBS += -lbspExt
%.sym: %$(EXE)
$(XSYMS) $^ $@

View File

@@ -1,16 +1,21 @@
#
# CONFIG.Common.RTEMS-mvme5500
# $Revision-Id$
# Author: W. Eric Norum
# Advanced Photon Source
# norume@aps.anl.gov
# Author: W. Eric Norum <wenorum@lbl.gov>
#
# All RTEMS targets use the same Makefile fragment
#
EXE = .elf
RTEMS_TARGET_CPU = powerpc
GNU_TARGET = powerpc-rtems
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
ARCH_DEP_CFLAGS += -DHAVE_MOTLOAD
ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048
ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120
ARCH_DEP_CFLAGS += -DBSP_NVRAM_BASE_ADDR=0xf1110000
OP_SYS_LDLIBS += -lbspExt
MUNCH_SUFFIX = .boot
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
define MUNCH_CMD

View File

@@ -55,7 +55,7 @@ CCC = $(GNU_BIN)/c++
#-------------------------------------------------------
# Linker flags
OP_SYS_LDFLAGS += -dynamic -Z -L$(SDK_DIR)/usr/lib
OP_SYS_LDFLAGS += -dynamic -Z -L$(SDK_DIR)/usr/lib -L$(SDK_DIR)/usr/lib/system
#-------------------------------------------------------
# Shared libraries

View File

@@ -29,4 +29,11 @@ ifeq ($(BUILD_CLASS),CROSS)
# Provide a link-time path for products
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Provide a link-time path for readline
RUNTIME_LDFLAGS_READLINE_YES = -Wl,-rpath-link,$(GNU_DIR)/lib
RUNTIME_LDFLAGS_READLINE = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS_READLINE_CURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS_READLINE_NCURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
endif

View File

@@ -35,8 +35,6 @@ SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-R%)
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(COMMANDLINE_LIBRARY))
GNU_TARGET=sparc-sun-solaris2
STLPORT_CFLAGS_YES= -library=stlport4
@@ -53,17 +51,17 @@ OP_SYS_LDLIBS += $(STLPORT_LDLIBS_$(USE_STLPORT))
# OS libraries used when generating shared libraries or static binaries
OP_SYS_LDLIBS += -lsocket -lnsl
OP_SYS_LDLIBS_8 += -lCrun -lc
OP_SYS_LDLIBS_9 += -lumem -lCrun -lc
OP_SYS_LDLIBS_8 += -ldl -lCrun -lc
OP_SYS_LDLIBS_9 += -ldl -lumem -lCrun -lc
OP_SYS_LDLIBS_10 += -lumem -lCrun -lc
OP_SYS_LDLIBS += $(OP_SYS_LDLIBS_$(SOLARIS_VERSION))
# Definitions used when COMMANDLINE_LIBRARY is READLINE
READLINE_DIR = $(GNU_DIR)
INCLUDES_READLINE = -I$(READLINE_DIR)/include
RUNTIME_LDFLAGS_READLINE += -R$(READLINE_DIR)/lib
RUNTIME_LDFLAGS_READLINE_YES += -R$(READLINE_DIR)/lib
RUNTIME_LDFLAGS_READLINE += $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
LDFLAGS_READLINE += -L$(READLINE_DIR)/lib
LDLIBS_READLINE = -lreadline -lcurses
# Use archive if there is a problem with the readline shared library
#LDLIBS_READLINE = -Bstatic -lreadline -Bdynamic -lcurses

View File

@@ -15,7 +15,7 @@ COMPILER_CPPFLAGS = -D_REENTRANT
STLPORT_LDLIBS_NO =
OP_SYS_LDLIBS_8 =
OP_SYS_LDLIBS_9 =
OP_SYS_LDLIBS_8 = -ldl
OP_SYS_LDLIBS_9 = -ldl
OP_SYS_LDLIBS_10 =

View File

@@ -36,8 +36,6 @@ SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-R%)
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(COMMANDLINE_LIBRARY))
GNU_TARGET=x86-sun-solaris2
STLPORT_CFLAGS_YES= -library=stlport4
@@ -52,8 +50,8 @@ OP_SYS_CFLAGS+=$(STLPORT_CFLAGS_$(USE_STLPORT))
OP_SYS_LDFLAGS+=$(STLPORT_CFLAGS_$(USE_STLPORT))
OP_SYS_LDLIBS += -lsocket -lnsl
OP_SYS_LDLIBS_8 += -lCrun -lc
OP_SYS_LDLIBS_9 += -lCrun -lc
OP_SYS_LDLIBS_8 += -ldl -lCrun -lc
OP_SYS_LDLIBS_9 += -ldl -lCrun -lc
OP_SYS_LDLIBS_10 += -lCrun -lc
OP_SYS_LDLIBS += $(OP_SYS_LDLIBS_$(SOLARIS_VERSION))
OP_SYS_LDLIBS += $(STLPORT_LDLIBS_$(USE_STLPORT))
@@ -61,7 +59,8 @@ OP_SYS_LDLIBS += $(STLPORT_LDLIBS_$(USE_STLPORT))
# Definitions used when COMMANDLINE_LIBRARY is READLINE
READLINE_DIR = $(GNU_DIR)
INCLUDES_READLINE = -I$(READLINE_DIR)/include
RUNTIME_LDFLAGS_READLINE += -R$(READLINE_DIR)/lib
RUNTIME_LDFLAGS_READLINE_YES += -R$(READLINE_DIR)/lib
RUNTIME_LDFLAGS_READLINE += $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
LDFLAGS_READLINE += -L$(READLINE_DIR)/lib
LDLIBS_READLINE = -lreadline -lcurses
# Use archive if there is a problem with the readline shared library

View File

@@ -14,7 +14,7 @@ COMPILER_CPPFLAGS = -D_REENTRANT
STLPORT_LDLIBS_NO =
OP_SYS_LDLIBS_8 = -lc
OP_SYS_LDLIBS_9 = -lc
OP_SYS_LDLIBS_8 = -ldl -lc
OP_SYS_LDLIBS_9 = -ldl -lc
OP_SYS_LDLIBS_10 = -lc

View File

@@ -1,9 +1,10 @@
# CONFIG.Common.vxWorks-mpc8540
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for vxWorks-mpc8540 targets: MPC8540 CPU with >32MB RAM.
# Site-specific overrides go in CONFIG_SITE.Common.vxWorks-mpc8540
#
# This file is maintained by the EPICS build community.
# Definitions for vxWorks-mpc8540 target archs
# Sites may override these definitions in CONFIG_SITE.Common.vxWorks-mpc8540
#-------------------------------------------------------
# Include definitions common to all vxWorks target archs

View File

@@ -0,0 +1,26 @@
# CONFIG.Common.vxWorks-mpc8548
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for vxWorks-mpc8548 target archs
# Sites may override these definitions in CONFIG_SITE.Common.vxWorks-mpc8548
#-------------------------------------------------------
# Include definitions common to all vxWorks target archs
include $(CONFIG)/os/CONFIG.Common.vxWorksCommon
# Vx GNU cross compiler suffix
CMPLR_SUFFIX = ppc
ARCH_CLASS = ppc
# Architecture specific build flags
ARCH_DEP_CPPFLAGS = -DCPU=PPC32
ARCH_DEP_CFLAGS = -DCPU_VARIANT=_ppc85XX_e500v2
ARCH_DEP_CFLAGS += -mlongcall
# This flag isn't present in early vxWorks 6.x versions
#ARCH_DEP_CFLAGS += -te500v2
GNU_TARGET = powerpc-wrs-vxworks

View File

@@ -0,0 +1,14 @@
# CONFIG.Common.vxWorks-mpc8548-debug
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for vxWorks-mpc8548-debug targets.
# Sites may override these definitions in CONFIG_SITE.Common.vxWorks-mpc8548-debug
#-------------------------------------------------------
# Include definitions common to all vxWorks archs
include $(CONFIG)/os/CONFIG.Common.vxWorks-mpc8548
CROSS_OPT = NO

View File

@@ -0,0 +1,24 @@
# $Revision-Id$
#
# Definitions for vxWorks-ppc603 targets with >32MB of RAM
# Site-specific overrides go in CONFIG_SITE.Common.vxWorks-ppc603_long
#
# This file is maintained by the EPICS build community.
#-------------------------------------------------------
# Include definitions common to all vxWorks target archs
include $(CONFIG)/os/CONFIG.Common.vxWorksCommon
# Vx GNU cross compiler suffix
CMPLR_SUFFIX = ppc
ARCH_CLASS = ppc
# Architecture specific build flags
ARCH_DEP_CPPFLAGS = -DCPU=PPC32
ARCH_DEP_CFLAGS = -mstrict-align
GNU_TARGET = powerpc-wrs-vxworks
# Tell compiler to generate long branches
ARCH_DEP_CFLAGS += -mlongcall

View File

@@ -0,0 +1,14 @@
# CONFIG.Common.vxWorks-ppc32-debug
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for vxWorks-ppc32-debug target archs
# Sites may override these definitions in CONFIG_SITE.Common.vxWorks-ppc32-debug
#-------------------------------------------------------
# Include definitions common to all vxWorks archs
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc32
CROSS_OPT = NO

View File

@@ -0,0 +1,13 @@
# $Revision-Id$
#
# Definitions for vxWorks-ppc32sf targets
# Site-specific overrides go in CONFIG_SITE.Common.vxWorks-ppc32sf
#
# This file is maintained by the EPICS build community.
#-------------------------------------------------------
# Inherit the settings from vxWorks-ppc32
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc32
# Tell compiler to use software floating-point
ARCH_DEP_CFLAGS += -msoft-float

View File

@@ -0,0 +1,14 @@
# CONFIG.Common.vxWorks-ppc32sf-debug
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for vxWorks-ppc32sf-debug target archs
# Sites may override these definitions in CONFIG_SITE.Common.vxWorks-ppc32sf-debug
#-------------------------------------------------------
# Include definitions common to all vxWorks archs
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc32sf
CROSS_OPT = NO

View File

@@ -159,7 +159,7 @@ export TOOL_FAMILY = GNU
#--------------------------------------------------
# Operating system flags
OP_SYS_CPPFLAGS += -DvxWorks
OP_SYS_CPPFLAGS += -DvxWorks=vxWorks
OP_SYS_CFLAGS += -fno-builtin
# Fix for vxWorks 5 headers that use macros defined in vxWorks.h but

View File

@@ -7,8 +7,10 @@
# Sites may override these definitions in CONFIG_SITE.cygwin-x86.cygwin-x86-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.Common.cygwin-x86
include $(CONFIG)/os/CONFIG.cygwin-x86.cygwin-x86
-include $(CONFIG)/os/CONFIG.Common.cygwin-x86
-include $(CONFIG)/os/CONFIG.cygwin-x86.cygwin-x86
-include $(CONFIG)/os/CONFIG_SITE.Common.cygwin-x86
-include $(CONFIG)/os/CONFIG_SITE.cygwin-x86.cygwin-x86
BUILD_CLASS = HOST

View File

@@ -9,6 +9,8 @@
-include $(CONFIG)/os/CONFIG.Common.darwin-ppc
-include $(CONFIG)/os/CONFIG.darwin-ppc.darwin-ppc
-include $(CONFIG)/os/CONFIG_SITE.Common.darwin-ppc
-include $(CONFIG)/os/CONFIG_SITE.darwin-ppc.darwin-ppc
BUILD_CLASS=HOST
HOST_OPT = NO

View File

@@ -9,6 +9,9 @@
-include $(CONFIG)/os/CONFIG.Common.darwin-x86
-include $(CONFIG)/os/CONFIG.darwin-x86.darwin-x86
-include $(CONFIG)/os/CONFIG_SITE.Common.darwin-x86
-include $(CONFIG)/os/CONFIG_SITE.darwin-x86.darwin-x86
BUILD_CLASS=HOST
HOST_OPT = NO

View File

@@ -7,8 +7,9 @@
# Sites may override these definitions in CONFIG_SITE.linux-x86.linux-x86-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
-include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
#-include $(CONFIG)/os/CONFIG_SITE.Common.linux-x86
#-include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-x86
BUILD_CLASS=HOST
HOST_OPT=NO

View File

@@ -7,8 +7,9 @@
# Sites may override these definitions in CONFIG_SITE.linux-x86_64.linux-x86_64-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
-include $(CONFIG)/os/CONFIG.linux-x86_64.linux-x86_64
-include $(CONFIG)/os/CONFIG_SITE.Common.linux-x86_64
-include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.linux-x86_64
BUILD_CLASS=HOST
HOST_OPT = NO

View File

@@ -7,7 +7,9 @@
# Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.solaris-sparc.solaris-sparc
-include $(CONFIG)/os/CONFIG.solaris-sparc.solaris-sparc
-include $(CONFIG)/os/CONFIG_SITE.Common.solaris-sparc
-include $(CONFIG)/os/CONFIG_SITE.solaris-sparc.solaris-sparc
BUILD_CLASS=HOST
HOST_OPT=NO

View File

@@ -7,8 +7,10 @@
# Sites may override these definitions in CONFIG_SITE.solaris-x86.solaris-x86-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.Common.solaris-x86
include $(CONFIG)/os/CONFIG.solaris-x86.solaris-x86
-include $(CONFIG)/os/CONFIG.Common.solaris-x86
-include $(CONFIG)/os/CONFIG.solaris-x86.solaris-x86
-include $(CONFIG)/os/CONFIG_SITE.Common.solaris-x86
-include $(CONFIG)/os/CONFIG_SITE.solaris-x86.solaris-x86
BUILD_CLASS=HOST

View File

@@ -8,10 +8,11 @@
#-------------------------------------------------------
CP = $(PERL) -MExtUtils::Command -e cp
MV = $(PERL) -MExtUtils::Command -e mv
MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f
MKDIR = $(PERL) -MExtUtils::Command -e mkpath
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
COMMENT = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO

View File

@@ -11,10 +11,11 @@
include $(CONFIG)/os/CONFIG.UnixCommon.Common
CP = $(PERL) -MExtUtils::Command -e cp
MV = $(PERL) -MExtUtils::Command -e mv
MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f
MKDIR = $(PERL) -MExtUtils::Command -e mkpath
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
COMMENT = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO

View File

@@ -26,7 +26,4 @@ LOADABLE_SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
# Override linking with gcc library from CONFIG.gnuCommon
GNU_LDLIBS_YES =
OPT_CFLAGS_NO = -O3 -g
OPT_CXXFLAGS_NO = -O3 -g
OP_SYS_LDLIBS = -lws2_32

View File

@@ -7,8 +7,10 @@
# Sites may override these definitions in CONFIG_SITE.win32-x86-mingw.win32-x86-mingw-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.Common.win32-x86-mingw
include $(CONFIG)/os/CONFIG.win32-x86-mingw.win32-x86-mingw
-include $(CONFIG)/os/CONFIG.Common.win32-x86-mingw
-include $(CONFIG)/os/CONFIG.win32-x86-mingw.win32-x86-mingw
-include $(CONFIG)/os/CONFIG_SITE.Common.win32-x86-mingw
-include $(CONFIG)/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw
BUILD_CLASS = HOST

View File

@@ -8,10 +8,11 @@
#-------------------------------------------------------
CP = $(PERL) -MExtUtils::Command -e cp
MV = $(PERL) -MExtUtils::Command -e mv
MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f
MKDIR = $(PERL) -MExtUtils::Command -e mkpath
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
COMMENT = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO

View File

@@ -31,7 +31,9 @@ BAFCMD = bscmake /nologo /o $@
# Configure OS vendor C compiler
CC = cl
# Override CONFIG.gnuCommon for cross builds.
GNU = NO
HDEPENDS_METHOD = CMD
#
# /W<N> use warning level N

View File

@@ -7,10 +7,14 @@
# Sites may override these definitions in CONFIG_SITE.win32-x86.win32-x86-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.win32-x86-debug.win32-x86-debug
-include $(CONFIG)/os/CONFIG.Common.win32-x86
-include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
-include $(CONFIG)/os/CONFIG_SITE.Common.win32-x86
-include $(CONFIG)/os/CONFIG_SITE.win32-x86.win32-x86
GNU = NO
HDEPENDS_METHOD = CMD
BUILD_CLASS = HOST
HOST_OPT = NO

View File

@@ -13,3 +13,11 @@
ARCH_CLASS = i386
#ARCH_CLASS = x86_64
#ARCH_CLASS = i386 x86_64
#
# Uncomment the followings lines to build with CLANG instead of GCC.
#
#CC = clang
#CCC = clang++
#GNU_LDLIBS_YES =

View File

@@ -9,7 +9,8 @@
# iOS Version number
#IOS_VERSION = 3.2
IOS_VERSION = 4.1
#IOS_VERSION = 4.1
IOS_VERSION = 4.3
# Most sites will want shared libraries

View File

@@ -1,5 +1,7 @@
# CONFIG_SITE.Common.linux-cris
#
# $Revision-Id$
#
# Site Specific definitions for linux-cris target
# Only the local epics system manager should modify this file
@@ -15,9 +17,21 @@
# c) Add the runtime path to /etc/ld.so.conf and run ldconfig
# to inform the system of the shared library location.
# If readline is not installed comment the following line
# to omit command-line editing and history support
# Depending on your version of Linux you may want one of the following
# lines to enable command-line editing and history in iocsh. If you're
# not sure which, start with the top one and work downwards until the
# build doesn't fail to link the readline library. If none of them work,
# comment them all out to build without readline support.
# No other libraries needed (recent Fedora, Ubuntu etc.):
#COMMANDLINE_LIBRARY = READLINE
# Needs -lncurses (RHEL 5 etc.):
#COMMANDLINE_LIBRARY = READLINE_NCURSES
# Needs -lcurses (older versions)
#COMMANDLINE_LIBRARY = READLINE_CURSES
OP_SYS_CFLAGS += -g

View File

@@ -18,12 +18,19 @@
# to inform the system of the shared library location.
# Depending on your version of Linux you'll want one of the following
# lines to enable command-line editing and history support. If you're
# lines to enable command-line editing and history in iocsh. If you're
# not sure which, start with the top one and work downwards until the
# build doesn't fail to link the readline library. If none of them
# work, comment them all out.
#COMMANDLINE_LIBRARY = READLINE
COMMANDLINE_LIBRARY = READLINE_NCURSES
# build doesn't fail to link the readline library. If none of them work,
# comment them all out to build without readline support.
# No other libraries needed (recent Fedora, Ubuntu etc.):
COMMANDLINE_LIBRARY = READLINE
# Needs -lncurses (RHEL 5 etc.):
#COMMANDLINE_LIBRARY = READLINE_NCURSES
# Needs -lcurses (older versions)
#COMMANDLINE_LIBRARY = READLINE_CURSES
OP_SYS_CFLAGS += -g

View File

@@ -18,12 +18,19 @@
# to inform the system of the shared library location.
# Depending on your version of Linux you'll want one of the following
# lines to enable command-line editing and history support. If you're
# lines to enable command-line editing and history in iocsh. If you're
# not sure which, start with the top one and work downwards until the
# build doesn't fail to link the readline library. If none of them
# work, comment them all out.
# build doesn't fail to link the readline library. If none of them work,
# comment them all out to build without readline support.
# No other libraries needed (recent Fedora, Ubuntu etc.):
COMMANDLINE_LIBRARY = READLINE
# Needs -lncurses (RHEL 5 etc.):
#COMMANDLINE_LIBRARY = READLINE_NCURSES
# Needs -lcurses (older versions)
#COMMANDLINE_LIBRARY = READLINE_CURSES
OP_SYS_CFLAGS += -g

View File

@@ -0,0 +1,6 @@
# $Revision-Id$
#
# Site Specific definitions for the vxWorks-mpc8548 target
#
# Only the local epics system manager should modify this file
#-------------------------------------------------------

View File

@@ -7,6 +7,5 @@
# jba overrides
#CROSS_COMPILER_TARGET_ARCHS=vxWorks-486
#VX_DIR = T:/tornado20
BORLAND = c:\\Borland\\Bcc55

View File

@@ -8,5 +8,4 @@
# jba test overrides
#CROSS_COMPILER_TARGET_ARCHS=vxWorks-486
#CROSS_COMPILER_TARGET_ARCHS+=vxWorks-68040
#VX_DIR = T:/tornado20
#INSTALL_LOCATION = G:/testInstall

View File

@@ -172,7 +172,7 @@ exampleIoc_SRCS += devXxxSoft.c
exampleIoc_LIBS += $(EPICS_BASE_IOC_LIBS)
PROD_IOC_vxWorks = example
example_SRCS += sncExample.stt
example_SRCS += sncExample.st
example_LIBS += exampleIoc
example_LIBS += seq pv
example_LIBS += $(EPICS_BASE_IOC_LIBS)
@@ -263,7 +263,7 @@ dev<i>name</i> = { ... };</q></p>
<h3>Registration code changed</h3>
<p>Registration code for application specific functions, e.g. subroutine record
init and process functions, must been changed as follows</p>
init and process functions, must be changed as follows</p>
<ol>
<li>Include the following header files after all existing #includes:
@@ -468,4 +468,9 @@ should add the definition</p>
<p>to your application config/RELEASE file.</p>
</body>
<h3>Optional <i>top</i>/configure/CONFIG_SITE changes.</h3>
<p>Review and optionally modify site build settings.</p>
</html>

View File

@@ -4,11 +4,21 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Known Problems in R3.14.12</title>
<title>Known Problems in R3.14.12.1</title>
</head>
<body>
<h1 style="text-align: center">EPICS Base R3.14.12: Known Problems</h1>
<h1 style="text-align: center">EPICS Base R3.14.12.1: Known Problems</h1>
<p>Any patch files linked below should be applied at the root of the
base-3.14.12.1 tree. Download them, then use the GNU Patch program as
follows:</p>
<blockquote><pre>% <b>cd <i>/path/to/</i>base-3.14.12.1</b>
% <b>patch -p0 &lt; <i>/path/to/</i>file.patch</b></pre></blockquote>
<p>The following significant problems have been reported with this
version of EPICS Base:</p>
<ul>

View File

@@ -3,21 +3,393 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>EPICS Base R3.14.12 Release Notes</title>
<title>EPICS Base R3.14.12.2-rc1 Release Notes</title>
</head>
<body lang="en">
<h1 align="center">EPICS Base Release 3.14.12</h1>
<h1 align="center">EPICS Base Release 3.14.12.2-rc1</h1>
<h2 align="center">Changes between 3.14.12.1 and 3.14.12.2-rc1</h2>
<!-- Insert new items immediately below here ... -->
<h4>Added <tt>-b</tt> option to dbExpand</h4>
<p>This turns off monotonic checking of breakpoint tables.</p>
<h4>Launchpad Bugs Resolved</h4>
<p>The following are links to bugs in the Launchpad bug tracker that have been
fixed in this release:</p>
<ul>
<li>697509
<a href="https://launchpad.net/bugs/697509">
Thread synchronization issue in libCom/osi/os/WIN32/osdTime.cpp</a></li>
<li>697516
<a href="https://launchpad.net/bugs/697516">
Crash occurs in Com.dll if filetime is before the EPICS epoch </a></li>
<li>697517
<a href="https://launchpad.net/bugs/697517">
WIN32 osdtime should handle the system time change properly</a></li>
<li>697519
<a href="https://launchpad.net/bugs/697519">
The incorrect way to compute the roll-over in WIN32 osdTime.cpp</a></li>
<li>736273
<a href="https://launchpad.net/bugs/736273">
nonstandard c++ mutable ref in cac</a></li>
<li>786979
<a href="https://launchpad.net/bugs/786979">
incorrect ref counting for timer queues</a></li>
<li>794749
<a href="https://launchpad.net/bugs/794749">
3.14.12 caget without -c always requests maximum element count</a></li>
<li>816678
<a href="https://launchpad.net/bugs/816678">
g++ generic thunk generation fails virtual varargs</a></li>
<li>831648
<a href="https://launchpad.net/bugs/831648">
RTEMS dynamically loaded app fails to execute osdTimeRegister</a></li>
<li>835138
<a href="https://launchpad.net/bugs/835138">
Incorrect calculation oss priorities for posix threads</a></li>
<li>861214
<a href="https://launchpad.net/bugs/861214">
epicsThreadOnce crashes in static object destructor on win32</a></li>
<li>861627
<a href="https://launchpad.net/bugs/861627">
RULES.db has incorrect dbExpand flags</a></li>
<li>878372
<a href="https://launchpad.net/bugs/878372">
in-memory channel, ca client subscribe isnt thread safe</a></li>
<li>878387
<a href="https://launchpad.net/bugs/878387">
In memory channel clear fails from put callback function</a></li>
</ul>
<h4>Added database sanity checks to iocInit</h4>
<p>Two menus may legitimately be modified by users; some checks have been added
that run at iocInit and make sure the choices haven't been changed too much for
the IOC to function properly:</p>
<ul>
<li><tt>menuConvert</tt> is checked to flag problems with IOCs converted from
3.13.x, where the SLOPE choice didn't exist.</p>
<li><tt>menuScan</tt> is checked to ensure the three initial choices are still
present and that there is at least one periodic scan rate.</li>
</ul>
<h4>Fix various catools issues</h4>
<p>Array handling in the caget and camonitor programs has been debugged, fixing
<a href="https://bugs.launchpad.net/bugs/794749">launchpad bug 794749</a> along
with a few other related issues dating back to the addition of variable length
array support.</p>
<h4>Another race condition in errlog cleaned up</h4>
<p>If it was still busy when the IOC was closed down, the errlog thread could
have preempted the exit handler and freed the various internal pvtData mutex and
event objects too soon.</p>
<h4>Top-level make target changes</h4>
<p>Several make targets have been changed. Note that these can only be used from
an application's &lt;top&gt; directory.</p>
<dl>
<dt><code>make uninstall.&lt;arch&gt;</code></dt>
<dd>Deletes the bin/&lt;arch&gt; and lib/&lt;arch&gt; directories for
&lt;arch&gt; only. Note that &lt;arch&gt; does not have to be an
architecture that this host is configured to build, it works for any
arch.</dd>
<dt><code>make archuninstall</code></dt>
<dd>Deletes the bin/&lt;arch&gt; and lib/&lt;arch&gt; directories for all
architectures that this host is configured to build. Should not affect files
used for multiple architectures, or for host or target architectures that
this host is not configured to build.</dd>
<dt><code>make uninstall</code></dt>
<dd>Does archuninstall and also deletes the other install directories include,
db, dbd, doc, html, templates and java. This will affect subsequent builds
for other architectures, but it doesn't delete their bin/&lt;arch&gt; or
lib/&lt;arch&gt; contents.</dd>
<dt><code>make realuninstall</code></dt>
<dd>Deletes all install directories for all architectures.</dd>
<dt><code>make distclean</code></dt>
<dd>Does realclean realuninstall as before, and also now does a cvsclean,
which removes file remnants from CVS operations named <code>.#*</code> and
editor backups named <code>*~</code> throughout the source tree.</dd>
</dl>
<h4>Compress record type</h4>
<p>This record now posts monitors on its NUSE field whenever its value changes.
A new field OUSE was added to support this.</p>
<h4>Remove C++ build rule for <code>.C</code> files</h4>
<p>An early convention on Unix systems was to name C++ files with an upper-case
extention, <code>.C</code>. This does not work on Windows or MacOS where the
filesystems are case-insensitive, and the C++ build rule was causing problems so
has been eliminated. Any remaining C++ source files that are still using this
convention will have to be renamed, preferably to <code>.cpp</code></p>
<h4>Support <code>make -s</code> on Windows</h4>
<p>The flag to silence build output did not work on some Windows architecture
combinations. This has now been fixed.</p>
<h4>iocLogServer now supports logrotate</h4>
<p>The feature in the iocLogServer that closed and reopened the logfile used to
ignore the SIGHUP signal when the log filename did not change. This has now been
changed so these logfiles can be used with the standard Linux logrotate
package.</p>
<h2 align="center">Changes between 3.14.12 and 3.14.12.1</h2>
<p>This release only contains changes that fix bugs or add build configuration
files for new or updated target architectures. No functionality has been
changed, and as this is a patch release the software has not gone through as
rigorous a testing regime as it does for a normal minor release.</p>
<h4>Launchpad Bugs Resolved</h4>
<p>The following are links to bugs in the Launchpad bug tracker that have been
fixed in this release:</p>
<ul>
<li>693534
<a href="https://launchpad.net/bugs/693534">
errlog causes crash on IOC exit</a></li>
<li>701673
<a href="https://launchpad.net/bugs/701673">
Large array problem in 3.14.12</a></li>
<li>717252
<a href="https://launchpad.net/bugs/771252">
local caput causes ioc crash on win32</a></li>
<li>750549
<a href="https://launchpad.net/bugs/750549 ">
epicsTime has non-portable c++ static initialization</a></li>
<li>753137
<a href="https://launchpad.net/bugs/753137">
Makefile dependency checking of database files is broken</a></li>
</ul>
<h4>New/Updated target architectures</h4>
<p>The following target architectures have been added or updated:</p>
<dl>
<dt>vxWorks-mpc8548</dt>
<dt>vxWorks-mpc8548-debug</dt>
<dd style="margin-bottom: 1ex">This PowerPC CPU is used on the Emerson MVME4100
VME CPU board (from Ernest Williams, SLAC).</dd>
<dt>vxWorks-ppc32</dt>
<dt>vxWorks-ppc32sf</dt>
<dt>vxWorks-ppc32-debug</dt>
<dt>vxWorks-ppc32sf-debug</dt>
<dd style="margin-bottom: 1ex">New generic 32-bit PowerPC targets for vxWorks
6.x, using hardware or software floating-point. These targets can be used
instead of the CPU-specific ppc603, ppc604, mpc8540 and mpc8548 targets (and
their _long alternatives, these targets are all compiled with the -mlongcall
flag) to reduce the number of distinct build targets needed when supporting
multiple PowerPC board types.</dd>
<dt>ios-386</dt>
<dt>ios-arm</dt>
<dd style="margin-bottom: 1ex">Updated for iOS 4.3, which is now the default OS
version (from Tom Palaia, ORNL).</dd>
</dl>
<h4>IOCSH_STARTUP_SCRIPT environment variable</h4>
<p>The function <tt>iocsh(const char *pathname)</tt> now sets the environment
variable <tt>IOCSH_STARTUP_SCRIPT</tt> to the value of its pathname
argument before it starts executing the script commands.</p>
<h4>RTEMS-mvme5500</h4>
<p>This target now automatically links binary files with the bspExt library, and
adds the extension <tt>.elf</tt> to their filenames, matching the other mvme
targets.</p>
<h4>RTEMS Network Buffer Configuration</h4>
<p>Add the macros <tt>RTEMS_NETWORK_CONFIG_MBUF_SPACE</tt> and
<tt>RTEMS_NETWORK_CONFIG_MBUF_SPACE</tt> to rtems_netconfig.c to allow
customization of the network buffer space allocated. The configuration files
for the RTEMS-mvme3100, RTEMS-mvme5500 and RTEMS-beatnik targets now default to
allocating 2MB for mbufs and 5MB for clusters; other RTEMS targets will continue
to use 180KB and 350KB rspectively.</p>
<h4>RTEMS TFTP filesystem</h4>
<p>Use the new mount API to initialize TFTP on newer RTEMS versions.</p>
<h4>C++ build issues on older Solaris compiler</h4>
<p>Dirk Zimoch reported some problems building with an older SUNWspro C++
compiler which have been resolved where possible.</p>
<h4>FreeBSD broadcast problem</h4>
<p>The <tt>ifreq_size</tt> macro in freebsd/osdsock.h must be different in BSD
4.4.</p>
<h4>Thread exit synchronization</h4>
<p>When finished waiting for a thread to exit, signal the event in case other
threads are waiting also.</p>
<h4>Win32 osdTime provider fix</h4>
<p>Jeff Hill fixed the last time compare in PLL drift factor update loop.</p>
<h4>Errlog can lose messages</h4>
<p>Systems that generate large numbers of errlog messages or have a slow message
listener could overwrite older messages in the message buffer after the buffer
wraps. This also corrects and annotates the test code to describe what's being
checked.</p>
<p>When the IOC is shutting down, the errlog thread should process all queued
messages before it quits.</p>
<h4>Back-slash escapes for Win32</h4>
<p>Stephen Norum pointed out the need for various Perl scripts to escape
back-slash characters in Windows file paths.</p>
<h4>catools on Windows</h4>
<p>Windows 7 does not properly support line-mode buffering of stdio streams; the
catools programs used this mode to ensure that they could be used in pipelines,
but in Windows 7 they became fully buffered and are not flushed when the program
exits, so buffering of stdout has now been completely disabled on Windows.</p>
<h2 align="center">Changes between 3.14.11 and 3.14.12</h2>
<!-- Insert new items immediately below here ... -->
<h4>Launchpad Bugs Resolved</h4>
<p>The following are links to bugs in the Launchpad bug tracker that have been
fixed in this release:</p>
<ul>
<li>541258
<a href="https://bugs.launchpad.net/epics-base/+bug/541258">
compiler warnings in base</a></li>
<li>541264
<a href="https://bugs.launchpad.net/epics-base/+bug/541264">
CA subscription element count is fixed - eliminates compressed video
option</a></li>
<li>541331
<a href="https://bugs.launchpad.net/epics-base/+bug/541331">
Several devLib routines don't use vector table</a></li>
<li>541391
<a href="https://bugs.launchpad.net/epics-base/+bug/541391">
when subscribing for zero elements, array element count should be
dynamic</a></li>
<li>545385
<a href="https://bugs.launchpad.net/epics-base/+bug/545385">
SIGFPE calculating epicsNAN, epicsINF</a></li>
<li>546991
<a href="https://bugs.launchpad.net/epics-base/+bug/546991">
prev. value fields not initialized in init_record</a></li>
<li>551909
<a href="https://bugs.launchpad.net/epics-base/+bug/551909">
macExpandString writes out of boundary</a></li>
<li>552803
<a href="https://bugs.launchpad.net/epics-base/+bug/552803">
Compress record segfaults on ALG (algorithm) change</a></li>
<li>571121
<a href="https://bugs.launchpad.net/epics-base/+bug/571121">
Perl issue compiling with INSTALL_LOCATION set</a></li>
<li>572589
<a href="https://bugs.launchpad.net/epics-base/+bug/572589">
Make dbl emit empty strings for non-existent fields</a></li>
<li>595154
<a href="https://bugs.launchpad.net/epics-base/+bug/595154">
C++ errors building base using cygwin1.7</a></li>
<li>595240
<a href="https://bugs.launchpad.net/epics-base/+bug/595240">
C code uses C++ keywords as variable names</a></li>
<li>595242
<a href="https://bugs.launchpad.net/epics-base/+bug/595242">
C code uses C++ "//" style comments</a></li>
<li>615916
<a href="https://bugs.launchpad.net/epics-base/+bug/615916">
Bug in RULES.Db breaks parallel make when using MSI</a></li>
<li>625034
<a href="https://bugs.launchpad.net/epics-base/+bug/625034">
Remove compiler checks for VMS in src/toolsComm/flex</a></li>
<li>626848
<a href="https://bugs.launchpad.net/epics-base/+bug/626848">
Build with GNU make 3.82 fails when installing libraries</a></li>
<li>626859
<a href="https://bugs.launchpad.net/epics-base/+bug/626859">
RTEMS build does not create .d dependancy files</a></li>
<li>627511
<a href="https://bugs.launchpad.net/epics-base/+bug/627511">
MSVC linker fails if input lib dirs start with forward slash</a></li>
<li>644263
<a href="https://bugs.launchpad.net/epics-base/+bug/644263">
EPICS softIOC always dies in response to SIGHUP</a></li>
<li>650000
<a href="https://bugs.launchpad.net/epics-base/+bug/650000">
caput tool won't write to mbbo w/o state strings</a></li>
<li>663875
<a href="https://bugs.launchpad.net/epics-base/+bug/663875">
NTP broadcasts break NTP synchronization (RTEMS)</a></li>
<li>667384
<a href="https://bugs.launchpad.net/epics-base/+bug/667384">
are the request and response bytes pending reversed in casr?</a></li>
<li>680702
<a href="https://bugs.launchpad.net/epics-base/+bug/680702">
calc and calcout record get_precision bug</a></li>
</ul>
<h4>Support for Cygwin 1.7</h4>
<p>Base can now built with shared libraries on Cygwin 1.7.x, although only with
the gcc-3 compiler. Cygwin 1.5.x only works when compiled without shared
libraries (set <tt>STATIC_BUILD=YES</tt> and <tt>SHARED_LIBRARIES=NO</tt> in
<tt>configure/CONFIG_SITE</tt>). There is code in Base now that depends on the
Cygwin version, so make sure that you rebuild Base if you upgrade your Cygwin
installation.</p>
<h4>epicsEvent</h4>
<p>epicsEvent is now explicitly required to act as a simple binary semaphore.
A single epicsEventSignal call must awaken just one thread when multiple
threads are waiting for the event. A test that checks for this has been
added to epicsEventTest and the Application Developer's Guide has been updated
to describe this requirement.</p>
<h4>Enable array puts to subArray records</h4>
<p>It is now possible to put an array into the VAL field of a soft channel
subArray record whose INP field is empty. Processing the record then causes the
sub-array extraction process to be done on the current VAL array. This can be
used to feed a sequence of values into some other record (set INDX=1 and
NELM=MALM and read one element out of the VAL field each time).</p>
<h4>Added windows-x64 target</h4>
<p>64-bit binaries for Microsoft Windows platforms can now be built using the
target architecture windows-x64, which is also a valid cross-build target for a
win32-x86 host. We do not currently support 64-bit MinGW or Cygwin builds.</p>
win32-x86 host. We do not currently support or recommend trying to use 64-bit
builds on MinGW or Cygwin.</p>
<h4>Deleted osf-alpha targets</h4>
@@ -84,8 +456,8 @@ connections over ssh. See the CA reference manual for more details.</p>
<h4>Record Types aai and aao</h4>
<ul>
<li>Fixed bug in memory allocation that caused crashes when linking other records
to aai or aao.</li>
<li>Fixed bug in memory allocation that caused crashes when linking other
records to aai or aao.</li>
<li>Fixed bug where NELM was modified instead of NORD.</li>
<li>Added Soft Channel device support.</li>
<li>Added SIOL link and proper simulation mode for Soft Channel support.</li>
@@ -113,19 +485,20 @@ macro <tt>NO_DEVLIB_COMPAT</tt> is defined.</li>
<li>The "virtual os" table was renamed from <tt>pdevLibVirtualOS</tt> to
<tt>pdevLibVME</tt> reflecting the fact that other bus types will need seperate
tables.</li>
<li>The "virtual os" table API has been moved to a seperate header file,
<li>The "virtual os" table API has been moved to a different header file,
<tt>devLibVMEImpl.h</tt>.</li>
</ul>
<h4>DTYP and INP/OUT order</h4>
<p>The fields DTYP and INP/OUT can now be specified in any order.</p>
<p>The fields DTYP and INP/OUT can now be specified in any order in a database
instance (.db) file.</p>
<h4>Rewrite epicsThreadOnce()</h4>
<p>Michael Davidsaver suggested a better implementation of epicsThreadOnce()
which makes it possible for all architectures to detect recursive initialization
functions. This change also renames the routines to remove the original macro
functions. This change also renames the routines to remove the original macro,
and fixes some questionable usage in places.</p>
<h4>Many Record Types</h4>
@@ -136,7 +509,7 @@ giving correct initial monitor behavior in some circumstances.</p>
<h4>Compress Record Type</h4>
<p>Fixed crash when ALG (algorithm) was changed to Average at runtime.</p>
<p>Fixed a crash when ALG (algorithm) was changed to Average at runtime.</p>
<h4>configure/RELEASE Enhancements</h4>
@@ -148,9 +521,11 @@ definition is expanded. The variable <tt>EPICS_HOST_ARCH</tt> can now be used,
but target-architecture-specific values must be set in a target-specific
<tt>configure/RELEASE</tt> file such as <tt>RELEASE.Common.linux-x86</tt>.</p>
<h4>VxWorks 6.7 support</h4>
<h4>VxWorks 6.7 and 6.8 support</h4>
<p>Added build support for the latest Wind River release.</p>
<p>Added build support for the latest Wind River releases. This does not
include the ability to run on SMP vxWorks systems though, those will need some
more extensive modifications.</p>
<h4>RTEMS 4.10 support</h4>
@@ -162,7 +537,7 @@ is used.</p>
<p>Changes to the way in which we generate header dependency files, which are
now named with a <tt>.d</tt> suffix instead of <tt>.depends</tt>. We now use
the compiler to generate these if possible, and create them in the
the compiler to generate these where possible, and create them in the
<tt>O.$(T_A)</tt> directory.</p>
<h4>Installed file permissions</h4>
@@ -184,7 +559,11 @@ server.</p>
readline; some need <tt>-lcurses</tt>, others <tt>-lncurses</tt> and others
don't require either. The <tt>configure/os/CONFIG_SITE.Common.linux-*</tt>
files now make this configuration easy to choose between different settings for
the <tt>COMMANDLINE_LIBRARY</tt> variable.</p>
the <tt>COMMANDLINE_LIBRARY</tt> variable. If your build fails as it's trying
to create the <tt>antelope</tt> binary in the Base directory
<tt>src/toolsComm/antelope/O.<i>arch</i></tt> this is almost certainly the
problem. You will need to do a <tt>make rebuild</tt> from the top of Base after
fixing the setting of <tt>COMMANDLINE_LIBRARY</tt>.</p>
<h4>CA Command Line Tools Changes</h4>

View File

@@ -12,15 +12,14 @@ include $(TOP)/configure/CONFIG
INC += epicsRtemsInitHooks.h
SRCS += rtems_init.c
SRCS += rtems_config.c
SRCS += rtems_netconfig.c
SRCS += rtems_util.c
SRCS += setBootConfigFromNVRAM.c
SRCS += epicsRtemsInitHookPre.c
SRCS += epicsRtemsInitHookPost.c
rtemsCom_SRCS += rtems_init.c
rtemsCom_SRCS += rtems_config.c
rtemsCom_SRCS += rtems_netconfig.c
rtemsCom_SRCS += rtems_util.c
rtemsCom_SRCS += setBootConfigFromNVRAM.c
rtemsCom_SRCS += epicsRtemsInitHookPre.c
rtemsCom_SRCS += epicsRtemsInitHookPost.c
LIBRARY_RTEMS = rtemsCom
LIBRARY_SRCS = $(SRCS) $(BUILD_ARCHS)
include $(TOP)/configure/RULES

View File

@@ -209,7 +209,17 @@ initialize_remote_filesystem(char **argv, int hasLocalFilesystem)
{
#ifdef OMIT_NFS_SUPPORT
printf ("***** Initializing TFTP *****\n");
#if __RTEMS_MAJOR__>4 || \
(__RTEMS_MAJOR__==4 && __RTEMS_MINOR__>9) || \
(__RTEMS_MAJOR__==4 && __RTEMS_MINOR__==9 && __RTEMS_REVISION__==99)
mount_and_make_target_path(NULL,
"/TFTP",
RTEMS_FILESYSTEM_TYPE_TFTPFS,
RTEMS_FILESYSTEM_READ_WRITE,
NULL);
#else
rtems_bsdnet_initialize_tftp_filesystem ();
#endif
if (!hasLocalFilesystem) {
char *path;
int pathsize = 200;

View File

@@ -1,7 +1,6 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Saskatchewan
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
@@ -93,6 +92,17 @@ static struct rtems_bsdnet_ifconfig bsp_driver_config = {
# define MY_DO_BOOTP rtems_bsdnet_do_bootp
#endif
/*
* Allow site- and BSP-specific network buffer space configuration.
* The macro values are specified in KBytes.
*/
#ifndef RTEMS_NETWORK_CONFIG_MBUF_SPACE
# define RTEMS_NETWORK_CONFIG_MBUF_SPACE 180
#endif
#ifndef RTEMS_NETWORK_CONFIG_CLUSTER_SPACE
# define RTEMS_NETWORK_CONFIG_CLUSTER_SPACE 350
#endif
/*
* Network configuration
*/
@@ -104,8 +114,8 @@ struct rtems_bsdnet_config rtems_bsdnet_config = {
/* EPICS scan thread. */
/* If non-zero then the network daemons will run */
/* at this *RTEMS* priority */
180*1024, /* MBUF space */
350*1024, /* MBUF cluster space */
RTEMS_NETWORK_CONFIG_MBUF_SPACE*1024,
RTEMS_NETWORK_CONFIG_CLUSTER_SPACE*1024,
NULL, /* Host name */
MY_DOMAINNAME, /* Domain name */
};

View File

@@ -1,8 +1,16 @@
/*************************************************************************\
* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <fcntl.h> /* for open() */
#include <fcntl.h>
#include <unistd.h>
#include <rtems/rtems_bsdnet.h>
#include <bsp.h>
#include <string.h>
@@ -125,12 +133,13 @@ motScriptParm(const char *mot_script_boot, char parm)
int l;
while (*mot_script_boot != '\0') {
if (isspace(*mot_script_boot)
if (isspace(*(unsigned char *)mot_script_boot)
&& (*(mot_script_boot+1) == '-')
&& (*(mot_script_boot+2) == parm)) {
mot_script_boot += 3;
cp = mot_script_boot;
while ((*mot_script_boot != '\0') && !isspace(*mot_script_boot))
while ((*mot_script_boot != '\0') &&
!isspace(*(unsigned char *)mot_script_boot))
mot_script_boot++;
l = mot_script_boot - cp;
ret = malloc(l+1);

View File

@@ -22,7 +22,8 @@ DBD += bptTypeKdegF.dbd
PROD_LIBS = Com
PROD_HOST += makeBpt
makeBpt_SRCS=makeBpt
makeBpt_SRCS = makeBpt
include $(TOP)/configure/RULES

View File

@@ -64,6 +64,7 @@ $Date$</span></small></p>
<li><a href="#Network">IP Network Administration Background
Information</a></li>
<li><a href="#port">IP port numbers</a></li>
<li><a href="#firewall">Firewalls</a></li>
<li><a href="#Environmen">WAN Environment</a></li>
<li><a href="#Disconnect">Disconnect Time Out Interval / Server Beacon
Period</a></li>
@@ -245,7 +246,7 @@ $Date$</span></small></p>
<h3>Why Reconfigure Channel Access</h3>
<p>Typically reasons to reconfigure EPICS Channel Access:</p>
<p>Typical reasons to reconfigure EPICS Channel Access:</p>
<ul>
<li>Two independent control systems must share a network without fear of
interaction</li>
@@ -451,6 +452,32 @@ different port numbers then an extended syntax may be used with the
EPICS_CA_ADDR_LIST environment variable. See <a href="#Environmen">WAN
Environment</a> below.</p>
<h3><a name="firewall">Firewalls</a></h3>
<p>If you want channel access clients on a machine to be able to see
beacons and replies to broadcast PV search requests you need to permit
inbound UDP packets with source port EPICS_CA_SERVER_PORT (default is 5064)
or destination port EPICS_CA_REPEATER_PORT (default is 5065). On systems
using iptables this can be accomplished by rules like</p>
<pre>
-A INPUT -s 192.168.0.0/22 -p udp --sport 5064 -j ACCEPT
-A INPUT -s 192.168.0.0/22 -p udp --dport 5065 -j ACCEPT
</pre>
<p>If you want channel access servers (e.g. "soft IOCs") on a machine to be
able to see clients you need to permit inbound TCP or UDP packets with source
port EPICS_CA_SERVER_PORT (default is 5064). On systems using iptables this
can be accomplished by rules like</p>
<pre>
-A INPUT -s 192.168.0.0/22 -p udp --dport 5064 -j ACCEPT
-A INPUT -s 192.168.0.0/22 -p tcp --dport 5064 -j ACCEPT
</pre>
<p>In all cases the "-s 192.168.0.0/22" specifies the range of addresses from
which you wish to accept packets.</p>
<h3><a name="Environmen">WAN Environment</a></h3>
<p>When the CA client library connects a channel it must first determine the IP
@@ -1295,7 +1322,7 @@ the output.</p>
</tr>
<tr>
<td>-s</td>
<td>Get value as string (may honour server-side precision)</td>
<td>Get value as string (honors server-side precision)</td>
</tr>
<tr>
<td>-lx</td>
@@ -1439,7 +1466,7 @@ the output.</p>
</tr>
<tr>
<td>-s</td>
<td>Get value as string (may honour server-side precision)</td>
<td>Get value as string (honors server-side precision)</td>
</tr>
<tr>
<td>-lx</td>
@@ -4332,7 +4359,7 @@ that use ca_context_destroy).</p>
<p><a href="#ca_context_destroy">ca_context_destroy</a>()</p>
<h3><code><a name="ca_dump_dbr">ca_dump_dbr()</a></code></h3>
<pre>void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);</pre>
<code><pre>void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);</pre></code>
<h4>Description</h4>

View File

@@ -92,7 +92,7 @@ PROD_LIBS = ca Com
PROD_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
PROD_HOST += caRepeater catime acctst caConnTest casw caEventRate
OBJS_IOC_vxWorks += catime acctst caConnTest casw caEventRate
OBJS_IOC += catime acctst caConnTest casw caEventRate acctstRegister
caRepeater_SRCS = caRepeater.cpp
catime_SRCS = catimeMain.c catime.c
acctst_SRCS = acctstMain.c acctst.c

View File

@@ -10,6 +10,10 @@
/*
* CA regression test
* Authors:
* Jeff Hill
* Murali Shankar - initial versions of verifyMultithreadSubscr
*
*/
/*
@@ -26,6 +30,8 @@
*/
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include "epicsAssert.h"
#include "epicsMutex.h"
#include "epicsEvent.h"
#include "epicsTime.h"
#include "dbDefs.h"
#include "envDefs.h"
@@ -2719,6 +2725,186 @@ void fdRegCB ( void * parg, int fd, int opened )
}
}
typedef struct {
char m_chanName[100u];
struct ca_client_context * m_pCtx;
chid m_chan;
epicsMutexId m_mutex;
epicsEventId m_testCompleteEvent;
epicsEventId m_threadExitEvent;
size_t m_nUpdatesReceived;
size_t m_nUpdatesRequired;
int m_testInitiated;
int m_testComplete;
unsigned m_interestLevel;
} MultiThreadSubscrTest;
static void testMultithreadSubscrSubscrCallback
( struct event_handler_args eha )
{
const epicsEventId firstUpdateEvent = ( epicsEventId ) eha.usr;
epicsEventSignal ( firstUpdateEvent );
}
static void testMultithreadSubscrCreateSubscr ( void * pParm )
{
static unsigned nElem = 0;
int testComplete = FALSE;
evid id;
epicsEventId firstUpdateEvent;
epicsEventWaitStatus eventWaitStatus;
MultiThreadSubscrTest * const pMultiThreadSubscrTest =
( MultiThreadSubscrTest * ) pParm;
/* this is required for the ca_flush below to work correctly */
int status = ca_attach_context ( pMultiThreadSubscrTest->m_pCtx );
verify ( status == ECA_NORMAL );
firstUpdateEvent = epicsEventMustCreate ( epicsEventEmpty );
verify ( firstUpdateEvent );
status = ca_create_subscription (
DBR_TIME_LONG,
nElem,
pMultiThreadSubscrTest->m_chan,
DBE_VALUE,
testMultithreadSubscrSubscrCallback,
firstUpdateEvent,
& id );
verify ( status == ECA_NORMAL );
status = ca_flush_io ();
verify ( status == ECA_NORMAL );
/* wait for first update */
eventWaitStatus = epicsEventWaitWithTimeout (
firstUpdateEvent, 60.0 * 10 );
verify ( eventWaitStatus == epicsEventWaitOK );
epicsEventDestroy ( firstUpdateEvent );
status = ca_clear_subscription ( id );
verify ( status == ECA_NORMAL );
epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex );
pMultiThreadSubscrTest->m_nUpdatesReceived++;
testComplete = ( pMultiThreadSubscrTest->m_nUpdatesReceived ==
pMultiThreadSubscrTest->m_nUpdatesRequired );
pMultiThreadSubscrTest->m_testComplete = testComplete;
epicsMutexUnlock ( pMultiThreadSubscrTest->m_mutex );
if ( testComplete ) {
epicsEventSignal ( pMultiThreadSubscrTest->m_testCompleteEvent );
}
}
void testMultithreadSubscrConnHandler ( struct connection_handler_args args )
{
MultiThreadSubscrTest * const pMultiThreadSubscrTest =
( MultiThreadSubscrTest * ) ca_puser ( args.chid );
epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex );
if ( !pMultiThreadSubscrTest->m_testInitiated &&
args.op == CA_OP_CONN_UP ) {
int i;
pMultiThreadSubscrTest->m_testInitiated = TRUE;
for ( i = 0; i < pMultiThreadSubscrTest->m_nUpdatesRequired; i++ ) {
char threadname[64];
epicsThreadId threadId;
sprintf(threadname, "testSubscr%06u", i);
threadId = epicsThreadCreate ( threadname,
epicsThreadPriorityMedium,
epicsThreadGetStackSize(epicsThreadStackSmall),
testMultithreadSubscrCreateSubscr,
pMultiThreadSubscrTest );
verify ( threadId );
}
}
epicsMutexUnlock ( pMultiThreadSubscrTest->m_mutex );
}
void testMultithreadSubscr ( void * pParm )
{
MultiThreadSubscrTest * const pMultiThreadSubscrTest =
( MultiThreadSubscrTest * ) pParm;
int status;
unsigned i;
status = ca_context_create ( ca_enable_preemptive_callback );
verify ( status == ECA_NORMAL );
pMultiThreadSubscrTest->m_pCtx = ca_current_context ();
verify ( pMultiThreadSubscrTest->m_pCtx );
status = ca_create_channel (
pMultiThreadSubscrTest->m_chanName,
testMultithreadSubscrConnHandler,
pMultiThreadSubscrTest,
CA_PRIORITY_MIN,
& pMultiThreadSubscrTest->m_chan );
verify ( status == ECA_NORMAL );
showProgressBegin ( "verifyMultithreadSubscr",
pMultiThreadSubscrTest->m_interestLevel );
i = 0;
while ( TRUE ) {
int success = FALSE;
epicsEventWaitStatus eventWaitStatus;
epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex );
success = pMultiThreadSubscrTest->m_testComplete;
epicsMutexUnlock ( pMultiThreadSubscrTest->m_mutex );
if ( success ) {
break;
}
eventWaitStatus = epicsEventWaitWithTimeout (
pMultiThreadSubscrTest->m_testCompleteEvent, 0.1 );
verify ( eventWaitStatus == epicsEventWaitOK ||
eventWaitStatus == epicsEventWaitTimeout );
if ( i++ % 100 == 0u )
showProgress ( pMultiThreadSubscrTest->m_interestLevel );
verify ( i < 1000 );
}
showProgressEnd ( pMultiThreadSubscrTest->m_interestLevel );
status = ca_clear_channel ( pMultiThreadSubscrTest->m_chan );
verify ( status == ECA_NORMAL );
ca_context_destroy ();
epicsEventSignal ( pMultiThreadSubscrTest->m_threadExitEvent );
}
/*
* test installation of subscriptions similar to usage paterns
* employed by modern versions of the sequencer
*/
void verifyMultithreadSubscr ( const char * pName, unsigned interestLevel )
{
static unsigned nSubscr = 3000;
epicsThreadId threadId;
MultiThreadSubscrTest * const pMultiThreadSubscrTest =
(MultiThreadSubscrTest*) calloc ( 1,
sizeof ( MultiThreadSubscrTest ) );
verify ( pMultiThreadSubscrTest);
pMultiThreadSubscrTest->m_mutex = epicsMutexMustCreate ();
verify ( pMultiThreadSubscrTest->m_mutex );
pMultiThreadSubscrTest->m_testCompleteEvent =
epicsEventMustCreate ( epicsEventEmpty );
verify ( pMultiThreadSubscrTest->m_testCompleteEvent );
pMultiThreadSubscrTest->m_threadExitEvent =
epicsEventMustCreate ( epicsEventEmpty );
verify ( pMultiThreadSubscrTest->m_threadExitEvent );
strncpy ( pMultiThreadSubscrTest->m_chanName, pName,
sizeof ( pMultiThreadSubscrTest->m_chanName ) );
pMultiThreadSubscrTest->m_chanName
[ sizeof ( pMultiThreadSubscrTest->m_chanName ) - 1u ] = '\0';
pMultiThreadSubscrTest->m_nUpdatesRequired = nSubscr;
pMultiThreadSubscrTest->m_interestLevel = interestLevel;
threadId = epicsThreadCreate (
"testMultithreadSubscr",
epicsThreadPriorityMedium,
epicsThreadGetStackSize(epicsThreadStackSmall),
testMultithreadSubscr, pMultiThreadSubscrTest );
verify ( threadId );
{
epicsEventWaitStatus eventWaitStatus;
eventWaitStatus = epicsEventWaitWithTimeout (
pMultiThreadSubscrTest->m_threadExitEvent, 1000.0 );
verify ( eventWaitStatus == epicsEventWaitOK );
}
epicsEventDestroy ( pMultiThreadSubscrTest->m_testCompleteEvent );
epicsEventDestroy ( pMultiThreadSubscrTest->m_threadExitEvent );
epicsMutexDestroy ( pMultiThreadSubscrTest->m_mutex );
free ( pMultiThreadSubscrTest );
}
void fdManagerVerify ( const char * pName, unsigned interestLevel )
{
int status;
@@ -2965,17 +3151,22 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel )
SEVCHK ( status, "context create failed" );
status = ca_create_channel ( pName, 0, 0, 0, & chan );
SEVCHK ( status, NULL );
status = ca_pend_io( timeoutToPendIO );
SEVCHK ( status, "channel connect failed" );
status = ca_put ( DBR_DOUBLE, chan, & stim );
SEVCHK ( status, "channel put failed" );
status = ca_clear_channel ( chan );
SEVCHK ( status, NULL );
/*
* currently in-memory channels cant be used with this test
* !!!! FIX ME, FIX ME, FIX ME, FIX ME !!!!
*/
if ( status != ECA_UNAVAILINSERV ) {
SEVCHK ( status, NULL );
status = ca_pend_io( timeoutToPendIO );
SEVCHK ( status, "channel connect failed" );
status = ca_put ( DBR_DOUBLE, chan, & stim );
SEVCHK ( status, "channel put failed" );
status = ca_clear_channel ( chan );
SEVCHK ( status, NULL );
}
ca_context_destroy ();
}
@@ -2985,24 +3176,28 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel )
dbr_double_t resp;
status = ca_context_create ( ca_disable_preemptive_callback );
SEVCHK ( status, "context create failed" );
status = ca_create_channel ( pName, 0, 0, 0, & chan );
SEVCHK ( status, NULL );
status = ca_pend_io( timeoutToPendIO );
SEVCHK ( status, "channel connect failed" );
status = ca_get ( DBR_DOUBLE, chan, & resp );
SEVCHK ( status, "channel get failed" );
status = ca_pend_io ( timeoutToPendIO );
SEVCHK ( status, "get, pend io failed" );
verify ( stim == resp );
status = ca_clear_channel ( chan );
SEVCHK ( status, NULL );
/*
* currently in-memory channels cant be used with this test
* !!!! FIX ME, FIX ME, FIX ME, FIX ME !!!!
*/
if ( status != ECA_UNAVAILINSERV ) {
status = ca_pend_io( timeoutToPendIO );
SEVCHK ( status, "channel connect failed" );
status = ca_get ( DBR_DOUBLE, chan, & resp );
SEVCHK ( status, "channel get failed" );
status = ca_pend_io ( timeoutToPendIO );
SEVCHK ( status, "get, pend io failed" );
verify ( stim == resp );
status = ca_clear_channel ( chan );
SEVCHK ( status, NULL );
}
ca_context_destroy ();
}
@@ -3028,6 +3223,13 @@ void verifyContextRundownChanStillExist (
for ( i = 0; i < NELEMENTS ( chan ); i++ ) {
status = ca_create_channel ( pName, 0, 0, 0, & chan[i] );
/*
* currently in-memory channels cant be used with this test
* !!!! FIX ME, FIX ME, FIX ME, FIX ME !!!!
*/
if ( status == ECA_UNAVAILINSERV ) {
break;
}
SEVCHK ( status, NULL );
}
@@ -3123,6 +3325,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
verifyHighThroughputReadCallback ( chan, interestLevel );
verifyHighThroughputWriteCallback ( chan, interestLevel );
verifyBadString ( chan, interestLevel );
verifyMultithreadSubscr ( pName, interestLevel );
if ( select != ca_enable_preemptive_callback ) {
fdManagerVerify ( pName, interestLevel );
}

69
src/ca/acctstRegister.cpp Normal file
View File

@@ -0,0 +1,69 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* CA client library diagnostics IOC shell registration
* Authors:
* Jeff Hill
*/
#include <iocsh.h>
#include "caDiagnostics.h"
/* Information needed by iocsh */
static const iocshArg acctstArg0 = { "channel name", iocshArgString };
static const iocshArg acctstArg1 = { "interest level", iocshArgInt };
static const iocshArg acctstArg2 = { "channel count", iocshArgInt };
static const iocshArg acctstArg3 = { "repetition count", iocshArgInt };
static const iocshArg acctstArg4 = { "preemptive callback select", iocshArgInt };
static const iocshArg *acctstArgs[] =
{
&acctstArg0,
&acctstArg1,
&acctstArg2,
&acctstArg3,
&acctstArg4
};
static const iocshFuncDef acctstFuncDef = {"acctst", 5, acctstArgs};
/* Wrapper called by iocsh, selects the argument types that print needs */
static void acctstCallFunc(const iocshArgBuf *args) {
if ( args[1].ival < 0 ) {
printf ( "negative interest level not allowed\n" );
return;
}
if ( args[2].ival < 0 ) {
printf ( "negative channel count not allowed\n" );
return;
}
if ( args[3].ival < 0 ) {
printf ( "negative repetition count not allowed\n" );
return;
}
acctst (
args[0].sval, /* channel name */
( unsigned ) args[1].ival, /* interest level */
( unsigned ) args[2].ival, /* channel count */
( unsigned ) args[3].ival, /* repetition count */
( ca_preemptive_callback_select ) args[4].ival ); /* preemptive callback select */
}
struct AutoInit {
AutoInit ();
};
AutoInit :: AutoInit ()
{
iocshRegister ( &acctstFuncDef, acctstCallFunc );
}
AutoInit autoInit;

View File

@@ -360,6 +360,6 @@ void bheFreeStore::release ( void * pCadaver )
freeList.release ( pCadaver );
}
epicsShareFunc bheMemoryManager::~bheMemoryManager () {}
bheMemoryManager::~bheMemoryManager () {}

View File

@@ -45,9 +45,9 @@ class bheMemoryManager;
// using a pure abstract wrapper class around the free list avoids
// Tornado 2.0.1 GNU compiler bugs
class bheMemoryManager {
class epicsShareClass bheMemoryManager {
public:
epicsShareFunc virtual ~bheMemoryManager ();
virtual ~bheMemoryManager ();
virtual void * allocate ( size_t ) = 0;
virtual void release ( void * ) = 0;
};

View File

@@ -266,8 +266,8 @@ private:
// **** lock hierarchy ****
// 1) callback lock must always be acquired before
// the primary mutex if both locks are needed
mutable epicsMutex & mutex;
mutable epicsMutex & cbMutex;
epicsMutex & mutex;
epicsMutex & cbMutex;
epicsEvent iiuUninstall;
ipAddrToAsciiEngine & ipToAEngine;
epicsTimerQueueActive & timerQueue;

View File

@@ -185,7 +185,8 @@ epicsShareFunc enum channel_state epicsShareAPI ca_state (chid chan);
epicsShareFunc int epicsShareAPI ca_task_initialize (void);
enum ca_preemptive_callback_select
{ ca_disable_preemptive_callback, ca_enable_preemptive_callback };
epicsShareFunc int epicsShareAPI ca_context_create (enum ca_preemptive_callback_select select);
epicsShareFunc int epicsShareAPI
ca_context_create (enum ca_preemptive_callback_select select);
epicsShareFunc void epicsShareAPI ca_detach_context ();
/************************************************************************/

View File

@@ -28,6 +28,18 @@
#include "epicsTimer.h"
#ifdef epicsExportSharedSymbols
# define repeaterSubscribeTimerh_epicsExportSharedSymbols
# undef epicsExportSharedSymbols
#endif
#include "epicsTimer.h"
#ifdef repeaterSubscribeTimerh_epicsExportSharedSymbols
# define epicsExportSharedSymbols
# include "shareLib.h"
#endif
class epicsMutex;
class cacContextNotify;

View File

@@ -26,8 +26,18 @@
#ifndef tcpRecvWatchdogh
#define tcpRecvWatchdogh
#ifdef epicsExportSharedSymbols
# define tcpRecvWatchdogh_epicsExportSharedSymbols
# undef epicsExportSharedSymbols
#endif
#include "epicsTimer.h"
#ifdef tcpRecvWatchdogh_epicsExportSharedSymbols
# define epicsExportSharedSymbols
# include "shareLib.h"
#endif
class tcpiiu;
class tcpRecvWatchdog : private epicsTimerNotify {

View File

@@ -26,8 +26,19 @@
#ifndef tcpSendWatchdogh
#define tcpSendWatchdogh
#ifdef epicsExportSharedSymbols
# define tcpSendWatchdogh_epicsExportSharedSymbols
# undef epicsExportSharedSymbols
#endif
#include "epicsTimer.h"
#ifdef tcpSendWatchdogh_epicsExportSharedSymbols
# define epicsExportSharedSymbols
# include "shareLib.h"
#endif
class tcpSendWatchdog : private epicsTimerNotify {
public:
tcpSendWatchdog (

View File

@@ -1866,10 +1866,14 @@ void tcpiiu::unlinkAllChannels (
guard.assertIdenticalMutex ( this->mutex );
while ( nciu * pChan = this->createReqPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->serviceShutdownNotify ( cbGuard, guard );
}
while ( nciu * pChan = this->createRespPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
// we dont yet know the server's id so we cant
// send a channel delete request and will instead
// trust that the server can do the proper cleanup
@@ -1878,12 +1882,16 @@ void tcpiiu::unlinkAllChannels (
}
while ( nciu * pChan = this->v42ConnCallbackPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
pChan->serviceShutdownNotify ( cbGuard, guard );
}
while ( nciu * pChan = this->subscripReqPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
@@ -1891,6 +1899,8 @@ void tcpiiu::unlinkAllChannels (
}
while ( nciu * pChan = this->connectedList.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
@@ -1898,6 +1908,8 @@ void tcpiiu::unlinkAllChannels (
}
while ( nciu * pChan = this->unrespCircuit.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
// if we know that the circuit is unresponsive
// then we dont send a channel delete request and
@@ -1907,6 +1919,8 @@ void tcpiiu::unlinkAllChannels (
}
while ( nciu * pChan = this->subscripUpdateReqPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );

View File

@@ -81,8 +81,9 @@ udpiiu::udpiiu (
cac::lowestPriorityLevelAbove (
cac::lowestPriorityLevelAbove (
cac.getInitializingThreadsPriority () ) ) ),
m_repeaterTimerNotify ( *this ),
repeaterSubscribeTmr (
*this, timerQueue, cbMutexIn, ctxNotifyIn ),
m_repeaterTimerNotify, timerQueue, cbMutexIn, ctxNotifyIn ),
govTmr ( *this, timerQueue, cacMutexIn ),
maxPeriod ( maxSearchPeriodDefault ),
rtteMean ( minRoundTripEstimate ),
@@ -397,14 +398,14 @@ void udpRecvThread::run ()
}
/*
* udpiiu::repeaterRegistrationMessage ()
* udpiiu::M_repeaterTimerNotify::repeaterRegistrationMessage ()
*
* register with the repeater
*/
void udpiiu::repeaterRegistrationMessage ( unsigned attemptNumber )
void udpiiu :: M_repeaterTimerNotify :: repeaterRegistrationMessage ( unsigned attemptNumber )
{
epicsGuard < epicsMutex > cbGuard ( this->cacMutex );
caRepeaterRegistrationMessage ( this->sock, this->repeaterPort, attemptNumber );
epicsGuard < epicsMutex > cbGuard ( m_udpiiu.cacMutex );
caRepeaterRegistrationMessage ( m_udpiiu.sock, m_udpiiu.repeaterPort, attemptNumber );
}
/*
@@ -1233,16 +1234,16 @@ void udpiiu::govExpireNotify (
this->ppSearchTmr[0]->installChannel ( guard, chan );
}
int udpiiu :: printFormated (
epicsGuard < epicsMutex > & cbGuard,
const char * pformat, ... )
int udpiiu :: M_repeaterTimerNotify :: printFormated (
epicsGuard < epicsMutex > & cbGuard,
const char * pformat, ... )
{
va_list theArgs;
int status;
va_start ( theArgs, pformat );
status = this->cacRef.varArgsPrintFormated ( cbGuard, pformat, theArgs );
status = m_udpiiu.cacRef.varArgsPrintFormated ( cbGuard, pformat, theArgs );
va_end ( theArgs );

View File

@@ -88,8 +88,7 @@ static const double beaconAnomalySearchPeriod = 5.0; // seconds
class udpiiu :
private netiiu,
private searchTimerNotify,
private disconnectGovernorNotify,
private repeaterTimerNotify {
private disconnectGovernorNotify {
public:
udpiiu (
epicsGuard < epicsMutex > & cacGuard,
@@ -139,9 +138,24 @@ private:
private:
udpiiu & _udpiiu;
};
class M_repeaterTimerNotify :
public repeaterTimerNotify {
public:
M_repeaterTimerNotify ( udpiiu & iiu ) :
m_udpiiu ( iiu ) {}
// repeaterTimerNotify
void repeaterRegistrationMessage (
unsigned attemptNumber );
int printFormated (
epicsGuard < epicsMutex > & callbackControl,
const char * pformat, ... );
private:
udpiiu & m_udpiiu;
};
char xmitBuf [MAX_UDP_SEND];
char recvBuf [MAX_UDP_RECV];
udpRecvThread recvThread;
M_repeaterTimerNotify m_repeaterTimerNotify;
repeaterSubscribeTimer repeaterSubscribeTmr;
disconnectGovernorTimer govTmr;
tsDLList < SearchDest > _searchDestList;
@@ -149,8 +163,8 @@ private:
double rtteMean;
double rtteMeanDev;
cac & cacRef;
mutable epicsMutex & cbMutex;
mutable epicsMutex & cacMutex;
epicsMutex & cbMutex;
epicsMutex & cacMutex;
epics_auto_ptr < epics_auto_ptr < class searchTimer >, eapt_array > ppSearchTmr;
unsigned nBytesInXmitBuf;
unsigned nTimers;
@@ -278,14 +292,6 @@ private:
void govExpireNotify (
epicsGuard < epicsMutex > &, nciu & );
// repeaterTimerNotify
void repeaterRegistrationMessage (
unsigned attemptNumber );
int printFormated (
epicsGuard < epicsMutex > & callbackControl,
const char * pformat, ... );
udpiiu ( const udpiiu & );
udpiiu & operator = ( const udpiiu & );
@@ -294,6 +300,7 @@ private:
// These are needed for the vxWorks 5.5 compiler:
friend class udpiiu::SearchDestUDP;
friend class udpiiu::SearchRespCallback;
friend class udpiiu::M_repeaterTimerNotify;
};
#endif // udpiiuh

View File

@@ -33,6 +33,12 @@ ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),)
PERL_SCRIPTS += camonitor.pl
PERL_MODULES += CA.pm
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
# Can only create docs in Host build
HTMLS_DIR = .
HTMLS = CA.html
endif
endif
Cap5_SRCS = Cap5.xs
@@ -40,12 +46,6 @@ Cap5_LIBS = ca Com
Cap5_INCLUDES = -I$(shell $(PERL) ../perlConfig.pl archlib)/CORE
Cap5_CFLAGS = $(shell $(PERL) ../perlConfig.pl ccflags)
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
# Can only create docs in Host build
HTMLS_DIR = .
HTMLS = CA.html
endif
include $(TOP)/configure/RULES
ifdef T_A

View File

@@ -73,6 +73,13 @@ LIBSRCS += casDGIntfIO.cc
LIBSRCS += casStreamIO.cc
LIBSRCS += ipIgnoreEntry.cc
# There is a bug in some vxWorks compilers that these work around:
ifeq ($(VX_GNU_VERSION), 4.1.2)
casStreamOS_CXXFLAGS_vxWorks-ppc604_altivec = -O0
casStreamOS_CXXFLAGS_vxWorks-ppc604_long = -O0
casStreamOS_CXXFLAGS_vxWorks-ppc604 = -O0
endif
LIBSRCS_vxWorks += templateInstances.cpp
LIBRARY = cas

View File

@@ -23,8 +23,8 @@ PROD_LIBS := cas ca gdd Com
#
PROD_SYS_LIBS_WIN32 := ws2_32 advapi32 user32
SRCS += main.cc
SRCS += directoryServer.cc
caDirServ_SRCS += main.cc
caDirServ_SRCS += directoryServer.cc
PROD_HOST = caDirServ

View File

@@ -321,7 +321,7 @@ inline void casStreamOS::disarmRecv ()
//
// casStreamOS::armSend()
//
inline void casStreamOS::armSend()
void casStreamOS::armSend()
{
if ( this->outBufBytesPending() == 0u ) {
return;

View File

@@ -87,7 +87,7 @@ static void usage (void)
" -e <nr>: Use %%e format, with a precision of <nr> digits\n"
" -f <nr>: Use %%f format, with a precision of <nr> digits\n"
" -g <nr>: Use %%g format, with a precision of <nr> digits\n"
" -s: Get value as string (may honour server-side precision)\n"
" -s: Get value as string (honors server-side precision)\n"
" -lx: Round to long integer and print as hex number\n"
" -lo: Round to long integer and print as octal number\n"
" -lb: Round to long integer and print as binary number\n"
@@ -126,7 +126,6 @@ static void event_handler (evargs args)
ppv->dbrType = args.type;
ppv->value = calloc(1, dbr_size_n(args.type, args.count));
memcpy(ppv->value, args.dbr, dbr_size_n(args.type, args.count));
ppv->onceConnected = 1;
ppv->nElems = args.count;
nRead++;
}
@@ -159,12 +158,13 @@ static int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
int n, result;
for (n = 0; n < nPvs; n++) {
unsigned long nElems;
/* Set up pvs structure */
/* -------------------- */
/* Get natural type and array count */
pvs[n].nElems = ca_element_count(pvs[n].chid);
nElems = ca_element_count(pvs[n].chid);
pvs[n].dbfType = ca_field_type(pvs[n].chid);
pvs[n].dbrType = dbrType;
@@ -183,10 +183,6 @@ static int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
pvs[n].dbrType = DBR_TIME_STRING;
}
}
/* Adjust array count */
if (reqElems > pvs[n].nElems)
reqElems = pvs[n].nElems;
pvs[n].reqElems = reqElems;
/* Issue CA request */
/* ---------------- */
@@ -196,17 +192,20 @@ static int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
nConn++;
pvs[n].onceConnected = 1;
if (request == callback)
{ /* Event handler will allocate value */
{
/* Event handler will allocate value and set nElems */
pvs[n].reqElems = reqElems > nElems ? nElems : reqElems;
result = ca_array_get_callback(pvs[n].dbrType,
pvs[n].reqElems,
pvs[n].chid,
event_handler,
(void*)&pvs[n]);
} else {
/* Allocate value structure */
/* We allocate value structure and set nElems */
pvs[n].nElems = reqElems && reqElems < nElems ? reqElems : nElems;
pvs[n].value = calloc(1, dbr_size_n(pvs[n].dbrType, pvs[n].nElems));
if(!pvs[n].value) {
fprintf(stderr,"Allocation failed\n");
if (!pvs[n].value) {
fprintf(stderr,"Memory allocation failed\n");
return 1;
}
result = ca_array_get(pvs[n].dbrType,
@@ -252,9 +251,6 @@ static int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
/* -------------- */
for (n = 0; n < nPvs; n++) {
/* Truncate the data printed to what was requested. */
if (pvs[n].reqElems != 0 && pvs[n].nElems > pvs[n].reqElems)
pvs[n].nElems = pvs[n].reqElems;
switch (format) {
case plain: /* Emulate old caget behaviour */
@@ -377,7 +373,7 @@ static void complainIfNotPlainAndSet (OutputT *current, const OutputT requested)
int main (int argc, char *argv[])
{
int n = 0;
int n;
int result; /* CA result */
OutputT format = plain; /* User specified format */
RequestT request = get; /* User specified request type */
@@ -389,9 +385,9 @@ int main (int argc, char *argv[])
int digits = 0; /* getopt() no. of float digits */
int nPvs; /* Number of PVs */
pv* pvs = 0; /* Array of PV structures */
pv* pvs; /* Array of PV structures */
setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */
LINE_BUFFER(stdout); /* Configure stdout buffering */
while ((opt = getopt(argc, argv, ":taicnhsSe:f:g:l:#:d:0:w:p:F:")) != -1) {
switch (opt) {
@@ -529,7 +525,7 @@ int main (int argc, char *argv[])
result = ca_context_create(ca_disable_preemptive_callback);
if (result != ECA_NORMAL) {
fprintf(stderr, "CA error %s occurred while trying "
"to start channel access '%s'.\n", ca_message(result), pvs[n].name);
"to start channel access.\n", ca_message(result));
return 1;
}
/* Allocate PV structure array */

View File

@@ -6,8 +6,7 @@
* Operator of Los Alamos National Laboratory.
* Copyright (c) 2002 Berliner Elektronenspeicherringgesellschaft fuer
* Synchrotronstrahlung.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
@@ -128,15 +127,15 @@ int cainfo (pv *pvs, int nPvs)
int main (int argc, char *argv[])
{
int n = 0;
int n;
int result; /* CA result */
int opt; /* getopt() current option */
int nPvs; /* Number of PVs */
pv* pvs = 0; /* Array of PV structures */
pv* pvs; /* Array of PV structures */
setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */
LINE_BUFFER(stdout); /* Configure stdout buffering */
while ((opt = getopt(argc, argv, ":nhw:s:p:")) != -1) {
switch (opt) {
@@ -196,7 +195,7 @@ int main (int argc, char *argv[])
result = ca_context_create(ca_disable_preemptive_callback);
if (result != ECA_NORMAL) {
fprintf(stderr, "CA error %s occurred while trying "
"to start channel access '%s'.\n", ca_message(result), pvs[n].name);
"to start channel access.\n", ca_message(result));
return 1;
}
/* Allocate PV structure array */

View File

@@ -6,8 +6,7 @@
* Operator of Los Alamos National Laboratory.
* Copyright (c) 2002 Berliner Elektronenspeicherringgesellschaft fuer
* Synchrotronstrahlung.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
@@ -43,45 +42,49 @@ static int nConn = 0; /* Number of connected
void usage (void)
{
fprintf (stderr, "\nUsage: camonitor [options] <PV name> ...\n\n"
" -h: Help: Print this message\n"
fprintf (stderr, "\nUsage: camonitor [options] <PV name> ...\n"
"\n"
" -h: Help; Print this message\n"
"Channel Access options:\n"
" -w <sec>: Wait time, specifies CA timeout, default is %f second(s)\n"
" -m <mask>: Specify CA event mask to use, with <mask> being any combination of\n"
" 'v' (value), 'a' (alarm), 'l' (log/archive), 'p' (property). Default: va\n"
" -p <prio>: CA priority (0-%u, default 0=lowest)\n"
" -w <sec>: Wait time, specifies CA timeout, default is %f second(s)\n"
" -m <msk>: Specify CA event mask to use. <msk> is any combination of\n"
" 'v' (value), 'a' (alarm), 'l' (log/archive), 'p' (property).\n"
" Default event mask is 'va'\n"
" -p <pri>: CA priority (0-%u, default 0=lowest)\n"
"Timestamps:\n"
" Default: Print absolute timestamps (as reported by CA server)\n"
" -t <key>: Specify timestamp source(s) and type, with <key> containing\n"
" 's' = CA server (remote) timestamps\n"
" 'c' = CA client (local) timestamps (shown in '()'s)\n"
" 'n' = no timestamps\n"
" 'r' = relative timestamps (time elapsed since start of program)\n"
" 'i' = incremental timestamps (time elapsed since last update)\n"
" 'I' = incremental timestamps (time elapsed since last update, by channel)\n"
" Default: Print absolute timestamps (as reported by CA server)\n"
" -t <key>: Specify timestamp source(s) and type, with <key> containing\n"
" 's' = CA server (remote) timestamps\n"
" 'c' = CA client (local) timestamps (shown in '()'s)\n"
" 'n' = no timestamps\n"
" 'r' = relative timestamps (time elapsed since start of program)\n"
" 'i' = incremental timestamps (time elapsed since last update)\n"
" 'I' = incremental timestamps (time since last update, by channel)\n"
" 'r', 'i' or 'I' require 's' or 'c' to select the time source\n"
"Enum format:\n"
" -n: Print DBF_ENUM values as number (default are enum string values)\n"
"Arrays: Value format: print number of requested values, then list of values\n"
" Default: Print all values\n"
" -# <count>: Print first <count> elements of an array\n"
" -S: Print array of char as a string (long string)\n"
"Floating point type format:\n"
" Default: Use %%g format\n"
" -e <nr>: Use %%e format, with a precision of <nr> digits\n"
" -f <nr>: Use %%f format, with a precision of <nr> digits\n"
" -g <nr>: Use %%g format, with a precision of <nr> digits\n"
" -s: Get value as string (may honour server-side precision)\n"
" -lx: Round to long integer and print as hex number\n"
" -lo: Round to long integer and print as octal number\n"
" -lb: Round to long integer and print as binary number\n"
" -n: Print DBF_ENUM values as number (default is enum string)\n"
"Array values: Print number of elements, then list of values\n"
" Default: Request and print all elements (dynamic arrays supported)\n"
" -# <num>: Request and print up to <num> elements\n"
" -S: Print arrays of char as a string (long string)\n"
"Floating point format:\n"
" Default: Use %%g format\n"
" -e <num>: Use %%e format, with a precision of <num> digits\n"
" -f <num>: Use %%f format, with a precision of <num> digits\n"
" -g <num>: Use %%g format, with a precision of <num> digits\n"
" -s: Get value as string (honors server-side precision)\n"
" -lx: Round to long integer and print as hex number\n"
" -lo: Round to long integer and print as octal number\n"
" -lb: Round to long integer and print as binary number\n"
"Integer number format:\n"
" Default: Print as decimal number\n"
" -0x: Print as hex number\n"
" -0o: Print as octal number\n"
" -0b: Print as binary number\n"
" Default: Print as decimal number\n"
" -0x: Print as hex number\n"
" -0o: Print as octal number\n"
" -0b: Print as binary number\n"
"Alternate output field separator:\n"
" -F <ofs>: Use <ofs> as an alternate output field separator\n"
"\nExample: camonitor -f8 my_channel another_channel\n"
" -F <ofs>: Use <ofs> to separate fields in output\n"
"\n"
"Example: camonitor -f8 my_channel another_channel\n"
" (doubles are printed as %%f with precision of 8)\n\n"
, DEFAULT_TIMEOUT, CA_PRIORITY_MAX);
}
@@ -93,7 +96,7 @@ void usage (void)
* Function: event_handler
*
* Description: CA event_handler for request type callback
* Allocates the dbr structure and copies the data
* Prints the event data
*
* Arg(s) In: args - event handler args (see CA manual)
*
@@ -108,10 +111,12 @@ static void event_handler (evargs args)
{
pv->dbrType = args.type;
pv->nElems = args.count;
memcpy(pv->value, args.dbr, dbr_size_n(args.type, args.count));
pv->value = (void *) args.dbr; /* casting away const */
print_time_val_sts(pv, reqElems);
fflush(stdout);
pv->value = NULL;
}
}
@@ -130,51 +135,39 @@ static void connection_handler ( struct connection_handler_args args )
{
pv *ppv = ( pv * ) ca_puser ( args.chid );
if ( args.op == CA_OP_CONN_UP ) {
nConn++;
if (!ppv->onceConnected) {
ppv->onceConnected = 1;
/* Set up pv structure */
/* ------------------- */
/* Get natural type and array count */
ppv->nElems = ca_element_count(ppv->chid);
ppv->dbfType = ca_field_type(ppv->chid);
ppv->dbfType = ca_field_type(ppv->chid);
ppv->dbrType = dbf_type_to_DBR_TIME(ppv->dbfType); /* Use native type */
if (dbr_type_is_ENUM(ppv->dbrType)) /* Enums honour -n option */
{
if (enumAsNr) ppv->dbrType = DBR_TIME_INT;
else ppv->dbrType = DBR_TIME_STRING;
}
else if (floatAsString &&
(dbr_type_is_FLOAT(ppv->dbrType) || dbr_type_is_DOUBLE(ppv->dbrType)))
{
ppv->dbrType = DBR_TIME_STRING;
}
/* Set request count */
ppv->nElems = ca_element_count(ppv->chid);
ppv->reqElems = reqElems > ppv->nElems ? ppv->nElems : reqElems;
/* Set up value structures */
ppv->dbrType = dbf_type_to_DBR_TIME(ppv->dbfType); /* Use native type */
if (dbr_type_is_ENUM(ppv->dbrType)) /* Enums honour -n option */
{
if (enumAsNr) ppv->dbrType = DBR_TIME_INT;
else ppv->dbrType = DBR_TIME_STRING;
}
else if (floatAsString &&
(dbr_type_is_FLOAT(ppv->dbrType) || dbr_type_is_DOUBLE(ppv->dbrType)))
{
ppv->dbrType = DBR_TIME_STRING;
}
/* Adjust array count */
if (reqElems > ppv->nElems)
reqElems = ppv->nElems;
ppv->reqElems = reqElems;
ppv->onceConnected = 1;
nConn++;
/* Issue CA request */
/* ---------------- */
/* install monitor once with first connect */
if ( ! ppv->value ) {
/* Allocate value structure */
ppv->value = calloc(1, dbr_size_n(ppv->dbrType, ppv->nElems));
if ( ppv->value ) {
ppv->status = ca_create_subscription(ppv->dbrType,
/* install monitor once with first connect */
ppv->status = ca_create_subscription(ppv->dbrType,
ppv->reqElems,
ppv->chid,
eventMask,
event_handler,
(void*)ppv,
NULL);
if ( ppv->status != ECA_NORMAL ) {
free ( ppv->value );
}
}
}
}
else if ( args.op == CA_OP_CONN_DOWN ) {
@@ -204,7 +197,7 @@ static void connection_handler ( struct connection_handler_args args )
int main (int argc, char *argv[])
{
int returncode = 0;
int n = 0;
int n;
int result; /* CA result */
IntFormatT outType; /* Output type */
@@ -212,9 +205,9 @@ int main (int argc, char *argv[])
int digits = 0; /* getopt() no. of float digits */
int nPvs; /* Number of PVs */
pv* pvs = 0; /* Array of PV structures */
pv* pvs; /* Array of PV structures */
setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */
LINE_BUFFER(stdout); /* Configure stdout buffering */
while ((opt = getopt(argc, argv, ":nhm:sSe:f:g:l:#:0:w:t:p:F:")) != -1) {
switch (opt) {
@@ -357,7 +350,7 @@ int main (int argc, char *argv[])
result = ca_context_create(ca_disable_preemptive_callback);
if (result != ECA_NORMAL) {
fprintf(stderr, "CA error %s occurred while trying "
"to start channel access '%s'.\n", ca_message(result), pvs[n].name);
"to start channel access.\n", ca_message(result));
return 1;
}
/* Allocate PV structure array */

View File

@@ -251,7 +251,6 @@ int caget (pv *pvs, int nPvs, OutputT format,
int main (int argc, char *argv[])
{
int n = 0;
int i;
int result; /* CA result */
OutputT format = plain; /* User specified format */
@@ -273,10 +272,10 @@ int main (int argc, char *argv[])
struct dbr_gr_enum bufGrEnum;
int nPvs; /* Number of PVs */
pv* pvs = 0; /* Array of PV structures */
pv* pvs; /* Array of PV structures */
setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */
putenv("POSIXLY_CORRECT="); /* Behave correct on GNU getopt systems */
LINE_BUFFER(stdout); /* Configure stdout buffering */
putenv("POSIXLY_CORRECT="); /* Behave correct on GNU getopt systems */
while ((opt = getopt(argc, argv, ":cnlhatsS#:w:p:F:")) != -1) {
switch (opt) {
@@ -372,7 +371,7 @@ int main (int argc, char *argv[])
result = ca_context_create(ca_enable_preemptive_callback);
if (result != ECA_NORMAL) {
fprintf(stderr, "CA error %s occurred while trying "
"to start channel access '%s'.\n", ca_message(result), pvs[n].name);
"to start channel access.\n", ca_message(result));
return 1;
}
/* Allocate PV structure array */

View File

@@ -5,8 +5,7 @@
* Operator of Los Alamos National Laboratory.
* Copyright (c) 2002 Berliner Elektronenspeicherringgesellschaft fuer
* Synchrotronstrahlung.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
@@ -50,6 +49,13 @@
#define DEFAULT_CA_PRIORITY 0 /* Default CA priority */
#define DEFAULT_TIMEOUT 1.0 /* Default CA timeout */
#ifndef _WIN32
# define LINE_BUFFER(stream) setvbuf(stream, NULL, _IOLBF, BUFSIZ)
#else
/* Windows doesn't support line mode, turn buffering off completely */
# define LINE_BUFFER(stream) setvbuf(stream, NULL, _IONBF, 0)
#endif
/* Type of timestamp */
typedef enum { absolute, relative, incremental, incrementalByChan } TimeT;

View File

@@ -196,8 +196,8 @@ private:
dbContextReadNotifyCache readNotifyCache;
dbEventCtx ctx;
unsigned long stateNotifyCacheSize;
mutable epicsMutex & mutex;
mutable epicsMutex & cbMutex;
epicsMutex & mutex;
epicsMutex & cbMutex;
cacContextNotify & notify;
epics_auto_ptr < cacContext > pNetContext;
char * pStateNotifyCache;

View File

@@ -203,35 +203,44 @@ int epicsShareAPI dbel ( const char *pname, unsigned level )
}
if ( level > 1 ) {
unsigned nEntriesFree = ringSpace ( pevent->ev_que );
unsigned nEntriesFree;
const void * taskId;
LOCKEVQUE(pevent->ev_que);
nEntriesFree = ringSpace ( pevent->ev_que );
taskId = ( void * ) pevent->ev_que->evUser->taskid;
UNLOCKEVQUE(pevent->ev_que);
if ( nEntriesFree == 0u ) {
printf ( ", thread=%p, queue full",
(void *) pevent->ev_que->evUser->taskid );
(void *) taskId );
}
else if ( nEntriesFree == EVENTQUESIZE ) {
printf ( ", thread=%p, queue empty",
(void *) pevent->ev_que->evUser->taskid );
(void *) taskId );
}
else {
printf ( ", thread=%p, unused entries=%u",
(void *) pevent->ev_que->evUser->taskid, nEntriesFree );
(void *) taskId, nEntriesFree );
}
}
if ( level > 2 ) {
unsigned nDuplicates;
unsigned nCanceled;
if ( pevent->nreplace ) {
printf (", discarded by replacement=%ld", pevent->nreplace);
}
if ( ! pevent->valque ) {
printf (", queueing disabled" );
}
if ( pevent->ev_que->nDuplicates ) {
printf (", duplicate count =%u\n",
pevent->ev_que->nDuplicates );
LOCKEVQUE(pevent->ev_que);
nDuplicates = pevent->ev_que->nDuplicates;
nCanceled = pevent->ev_que->nCanceled;
UNLOCKEVQUE(pevent->ev_que);
if ( nDuplicates ) {
printf (", duplicate count =%u\n", nDuplicates );
}
if ( pevent->ev_que->nCanceled ) {
printf (", canceled count =%u\n",
pevent->ev_que->nCanceled );
if ( nCanceled ) {
printf (", canceled count =%u\n", nCanceled );
}
}
@@ -264,7 +273,7 @@ int epicsShareAPI dbel ( const char *pname, unsigned level )
*/
dbEventCtx epicsShareAPI db_init_events (void)
{
struct event_user *evUser;
struct event_user * evUser;
if (!dbevEventUserFreeList) {
freeListInitPvt(&dbevEventUserFreeList,
@@ -326,7 +335,7 @@ dbEventCtx epicsShareAPI db_init_events (void)
*/
void epicsShareAPI db_close_events (dbEventCtx ctx)
{
struct event_user *evUser = (struct event_user *) ctx;
struct event_user * const evUser = (struct event_user *) ctx;
/*
* Exit not forced on event blocks for now - this is left to channel
@@ -336,13 +345,32 @@ void epicsShareAPI db_close_events (dbEventCtx ctx)
* NOTE: not deleting events before calling this routine could be
* hazardous to the system's health.
*/
epicsMutexMustLock ( evUser->lock );
evUser->pendexit = TRUE;
epicsMutexUnlock ( evUser->lock );
/* notify the waiting task */
epicsEventSignal(evUser->ppendsem);
}
/*
* create_ev_que()
*/
static struct event_que * create_ev_que ( struct event_user * const evUser )
{
struct event_que * const ev_que = (struct event_que *)
freeListCalloc ( dbevEventQueueFreeList );
if ( ! ev_que ) {
return NULL;
}
ev_que->writelock = epicsMutexCreate();
if ( ! ev_que->writelock ) {
freeListFree ( dbevEventQueueFreeList, ev_que );
return NULL;
}
ev_que->evUser = evUser;
return ev_que;
}
/*
* DB_ADD_EVENT()
*/
@@ -350,13 +378,9 @@ dbEventSubscription epicsShareAPI db_add_event (
dbEventCtx ctx, struct dbAddr *paddr,
EVENTFUNC *user_sub, void *user_arg, unsigned select)
{
struct event_user *evUser = (struct event_user *) ctx;
struct dbCommon *precord;
struct event_que *ev_que;
struct event_que *tmp_que;
struct evSubscrip *pevent;
precord = paddr->precord;
struct event_user * const evUser = (struct event_user *) ctx;
struct event_que * ev_que;
struct evSubscrip * pevent;
/*
* Don't add events which will not be triggered
@@ -365,38 +389,42 @@ dbEventSubscription epicsShareAPI db_add_event (
return NULL;
}
pevent = freeListCalloc (dbevEventBlockFreeList);
if (!pevent) {
pevent = freeListCalloc ( dbevEventBlockFreeList );
if ( ! pevent ) {
return NULL;
}
/* find an event que block with enough quota */
/* otherwise add a new one to the list */
ev_que = &evUser->firstque;
while (TRUE) {
if (ev_que->quota + ev_que->nCanceled < EVENTQUESIZE - EVENTENTRIES) {
epicsMutexMustLock ( evUser->lock );
ev_que = & evUser->firstque;
while ( TRUE ) {
int success = 0;
LOCKEVQUE ( ev_que );
success = ( ev_que->quota + ev_que->nCanceled <
EVENTQUESIZE - EVENTENTRIES );
if ( success ) {
ev_que->quota += EVENTENTRIES;
}
UNLOCKEVQUE ( ev_que );
if ( success ) {
break;
}
if (!ev_que->nextque) {
tmp_que = (struct event_que *)
freeListCalloc(dbevEventQueueFreeList);
if (!tmp_que) {
freeListFree (dbevEventBlockFreeList, pevent);
return NULL;
if ( ! ev_que->nextque ) {
ev_que->nextque = create_ev_que ( evUser );
if ( ! ev_que->nextque ) {
ev_que = NULL;
break;
}
tmp_que->evUser = evUser;
tmp_que->writelock = epicsMutexCreate();
if (!tmp_que->writelock) {
freeListFree (dbevEventBlockFreeList, pevent);
freeListFree (dbevEventQueueFreeList, tmp_que);
return NULL;
}
ev_que->nextque = tmp_que;
ev_que = tmp_que;
break;
}
ev_que = ev_que->nextque;
}
epicsMutexUnlock ( evUser->lock );
if ( ! ev_que ) {
freeListFree ( dbevEventBlockFreeList, pevent );
return NULL;
}
pevent->npend = 0ul;
pevent->nreplace = 0ul;
@@ -409,10 +437,6 @@ dbEventSubscription epicsShareAPI db_add_event (
pevent->enabled = FALSE;
pevent->ev_que = ev_que;
LOCKEVQUE(ev_que);
ev_que->quota += EVENTENTRIES;
UNLOCKEVQUE(ev_que);
/*
* Simple types values queued up for reliable interprocess
* communication (for other types they get whatever happens to be
@@ -434,10 +458,9 @@ dbEventSubscription epicsShareAPI db_add_event (
*/
void epicsShareAPI db_event_enable (dbEventSubscription es)
{
struct evSubscrip *pevent = (struct evSubscrip *) es;
struct dbCommon *precord;
precord = (struct dbCommon *) pevent->paddr->precord;
struct evSubscrip * const pevent = (struct evSubscrip *) es;
struct dbCommon * const precord =
(struct dbCommon *) pevent->paddr->precord;
LOCKREC(precord);
if ( ! pevent->enabled ) {
@@ -452,10 +475,9 @@ void epicsShareAPI db_event_enable (dbEventSubscription es)
*/
void epicsShareAPI db_event_disable (dbEventSubscription es)
{
struct evSubscrip *pevent = (struct evSubscrip *) es;
struct dbCommon *precord;
precord = (struct dbCommon *) pevent->paddr->precord;
struct evSubscrip * const pevent = (struct evSubscrip *) es;
struct dbCommon * const precord =
(struct dbCommon *) pevent->paddr->precord;
LOCKREC(precord);
if ( pevent->enabled ) {
@@ -472,7 +494,7 @@ void epicsShareAPI db_event_disable (dbEventSubscription es)
static void event_remove ( struct event_que *ev_que,
unsigned short index, struct evSubscrip *placeHolder )
{
struct evSubscrip *pEvent = ev_que->evque[index];
struct evSubscrip * const pEvent = ev_que->evque[index];
ev_que->evque[index] = placeHolder;
if ( pEvent->npend == 1u ) {
@@ -495,12 +517,9 @@ static void event_remove ( struct event_que *ev_que,
*/
void epicsShareAPI db_cancel_event (dbEventSubscription es)
{
struct evSubscrip * pevent = ( struct evSubscrip * ) es;
struct dbCommon * precord;
struct evSubscrip * const pevent = ( struct evSubscrip * ) es;
unsigned short getix;
precord = ( struct dbCommon * ) pevent->paddr->precord;
db_event_disable ( es );
/*
@@ -564,12 +583,12 @@ void epicsShareAPI db_cancel_event (dbEventSubscription es)
*/
void epicsShareAPI db_flush_extra_labor_event (dbEventCtx ctx)
{
struct event_user *evUser = (struct event_user *) ctx;
struct event_user * const evUser = (struct event_user *) ctx;
epicsMutexMustLock ( evUser->lock );
while ( evUser->extraLaborBusy ) {
epicsMutexUnlock ( evUser->lock );
epicsThreadSleep(1.0);
epicsThreadSleep(0.1);
epicsMutexMustLock ( evUser->lock );
}
epicsMutexUnlock ( evUser->lock );
@@ -585,7 +604,7 @@ void epicsShareAPI db_flush_extra_labor_event (dbEventCtx ctx)
int epicsShareAPI db_add_extra_labor_event (
dbEventCtx ctx, EXTRALABORFUNC *func, void *arg)
{
struct event_user *evUser = (struct event_user *) ctx;
struct event_user * const evUser = (struct event_user *) ctx;
epicsMutexMustLock ( evUser->lock );
evUser->extralabor_sub = func;
@@ -600,7 +619,7 @@ int epicsShareAPI db_add_extra_labor_event (
*/
int epicsShareAPI db_post_extra_labor (dbEventCtx ctx)
{
struct event_user *evUser = (struct event_user *) ctx;
struct event_user * const evUser = (struct event_user *) ctx;
int doit;
epicsMutexMustLock ( evUser->lock );
@@ -627,12 +646,10 @@ int epicsShareAPI db_post_extra_labor (dbEventCtx ctx)
*/
static void db_post_single_event_private (struct evSubscrip *event)
{
struct event_que *ev_que;
db_field_log *pLog;
int firstEventFlag;
unsigned rngSpace;
ev_que = event->ev_que;
struct event_que * const ev_que = event->ev_que;
db_field_log * pLog;
int firstEventFlag;
unsigned rngSpace;
/*
* evUser ring buffer must be locked for the multiple
@@ -747,10 +764,10 @@ void *pField,
unsigned int caEventMask
)
{
struct dbCommon *pdbc = (struct dbCommon *)pRecord;
struct evSubscrip *event;
struct dbCommon * const pdbc = (struct dbCommon *)pRecord;
struct evSubscrip * event;
if (pdbc->mlis.count == 0) return DB_EVENT_OK; /* no monitors set */
if (pdbc->mlis.count == 0) return DB_EVENT_OK; /* no monitors set */
LOCKREC(pdbc);
@@ -762,8 +779,7 @@ unsigned int caEventMask
* changed or pval==NULL and waiting on alarms and alarms changed
*/
if ( (event->paddr->pfield == (void *)pField || pField==NULL) &&
(caEventMask & event->select)) {
(caEventMask & event->select) ) {
db_post_single_event_private (event);
}
}
@@ -778,8 +794,8 @@ unsigned int caEventMask
*/
void epicsShareAPI db_post_single_event (dbEventSubscription es)
{
struct evSubscrip *event = (struct evSubscrip *) es;
struct dbCommon *precord = event->paddr->precord;
struct evSubscrip * const event = (struct evSubscrip *) es;
struct dbCommon * const precord = event->paddr->precord;
dbScanLock (precord);
db_post_single_event_private (event);
@@ -898,8 +914,8 @@ static int event_read ( struct event_que *ev_que )
*/
static void event_task (void *pParm)
{
struct event_user *evUser = (struct event_user *) pParm;
struct event_que *ev_que;
struct event_user * const evUser = (struct event_user *) pParm;
struct event_que * ev_que;
/* init hook */
if (evUser->init_func) {
@@ -934,12 +950,14 @@ static void event_task (void *pParm)
epicsMutexMustLock ( evUser->lock );
}
evUser->extraLaborBusy = FALSE;
epicsMutexUnlock ( evUser->lock );
for ( ev_que = &evUser->firstque; ev_que;
ev_que = ev_que->nextque ) {
epicsMutexUnlock ( evUser->lock );
event_read (ev_que);
epicsMutexMustLock ( evUser->lock );
}
epicsMutexUnlock ( evUser->lock );
} while( ! evUser->pendexit );
@@ -975,7 +993,7 @@ int epicsShareAPI db_start_events (
dbEventCtx ctx,const char *taskname, void (*init_func)(void *),
void *init_func_arg, unsigned osiPriority )
{
struct event_user *evUser = (struct event_user *) ctx;
struct event_user * const evUser = (struct event_user *) ctx;
epicsMutexMustLock ( evUser->lock );
@@ -995,7 +1013,8 @@ int epicsShareAPI db_start_events (
taskname = EVENT_PEND_NAME;
}
evUser->taskid = epicsThreadCreate (
taskname, osiPriority, epicsThreadGetStackSize(epicsThreadStackMedium),
taskname, osiPriority,
epicsThreadGetStackSize(epicsThreadStackMedium),
event_task, (void *)evUser);
if (!evUser->taskid) {
epicsMutexUnlock ( evUser->lock );
@@ -1008,9 +1027,10 @@ int epicsShareAPI db_start_events (
/*
* db_event_change_priority()
*/
void epicsShareAPI db_event_change_priority ( dbEventCtx ctx, unsigned epicsPriority )
void epicsShareAPI db_event_change_priority ( dbEventCtx ctx,
unsigned epicsPriority )
{
struct event_user * evUser = ( struct event_user * ) ctx;
struct event_user * const evUser = ( struct event_user * ) ctx;
epicsThreadSetPriority ( evUser->taskid, epicsPriority );
}
@@ -1019,9 +1039,11 @@ void epicsShareAPI db_event_change_priority ( dbEventCtx ctx, unsigned epicsPrio
*/
void epicsShareAPI db_event_flow_ctrl_mode_on (dbEventCtx ctx)
{
struct event_user *evUser = (struct event_user *) ctx;
struct event_user * const evUser = (struct event_user *) ctx;
epicsMutexMustLock ( evUser->lock );
evUser->flowCtrlMode = TRUE;
epicsMutexUnlock ( evUser->lock );
/*
* notify the event handler task
*/
@@ -1036,9 +1058,11 @@ void epicsShareAPI db_event_flow_ctrl_mode_on (dbEventCtx ctx)
*/
void epicsShareAPI db_event_flow_ctrl_mode_off (dbEventCtx ctx)
{
struct event_user *evUser = (struct event_user *) ctx;
struct event_user * const evUser = (struct event_user *) ctx;
epicsMutexMustLock ( evUser->lock );
evUser->flowCtrlMode = FALSE;
epicsMutexUnlock ( evUser->lock );
/*
* notify the event handler task
*/

View File

@@ -74,7 +74,7 @@ void dbPutNotifyBlocker::cancel (
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->mutex );
if ( this->pn.paddr ) {
if ( this->pNotify ) {
epicsGuardRelease < epicsMutex > unguard ( guard );
dbNotifyCancel ( &this->pn );
}
@@ -100,26 +100,31 @@ void dbPutNotifyBlocker::expandValueBuf (
extern "C" void putNotifyCompletion ( putNotify *ppn )
{
dbPutNotifyBlocker * pBlocker = static_cast < dbPutNotifyBlocker * > ( ppn->usrPvt );
{
epicsGuard < epicsMutex > guard ( pBlocker->mutex );
if ( pBlocker->pNotify ) {
if ( pBlocker->pn.status != putNotifyOK) {
pBlocker->pNotify->exception (
guard, ECA_PUTFAIL, "put notify unsuccessful",
static_cast <unsigned> (pBlocker->pn.dbrType),
static_cast <unsigned> (pBlocker->pn.nRequest) );
}
else {
pBlocker->pNotify->completion ( guard );
}
dbPutNotifyBlocker * const pBlocker =
static_cast < dbPutNotifyBlocker * > ( ppn->usrPvt );
epicsGuard < epicsMutex > guard ( pBlocker->mutex );
cacWriteNotify * const pNtfy = pBlocker->pNotify;
if ( pNtfy ) {
pBlocker->pNotify = 0;
// Its necessary to signal the initiators now before we call
// the user callback. This is less efficent, and potentially
// causes more thread context switching, but its probably
// unavoidable because its possible that the use callback
// might destroy this object.
pBlocker->block.signal ();
if ( pBlocker->pn.status != putNotifyOK ) {
pNtfy->exception (
guard, ECA_PUTFAIL, "put notify unsuccessful",
static_cast < unsigned > (pBlocker->pn.dbrType),
static_cast < unsigned > (pBlocker->pn.nRequest) );
}
else {
errlogPrintf ( "put notify completion with nill pNotify?\n" );
pNtfy->completion ( guard );
}
pBlocker->pNotify = 0;
}
pBlocker->block.signal ();
else {
errlogPrintf ( "put notify completion with nill pNotify?\n" );
}
}
void dbPutNotifyBlocker::initiatePutNotify (

View File

@@ -1,14 +1,13 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* dbExpand.c */
/* Author: Marty Kraimer Date: 30NOV95 */
/* Author: Marty Kraimer Date: 30NOV95 */
#include <stdlib.h>
#include <stddef.h>
@@ -25,24 +24,25 @@
#include "osiFileName.h"
DBBASE *pdbbase = NULL;
void usage(void)
{
fprintf(stderr, "Usage:\n\tdbExpand -Ipath -ooutfile "
"-S macro=value file1.dbd file2.dbd ...\n");
fprintf(stderr, "Usage:\n\tdbExpand -b -Ipath -ooutfile "
"-S macro=value file1.dbd file2.dbd ...\n");
fprintf(stderr,"Specifying any path will replace the default of '.'\n");
fprintf(stderr,"The -b option enables relaxed breakpoint table checking\n");
}
int main(int argc,char **argv)
{
char *path = NULL;
char *sub = NULL;
int pathLength = 0;
int subLength = 0;
char *path = NULL;
char *sub = NULL;
int pathLength = 0;
int subLength = 0;
char *outFilename = NULL;
FILE *outFP = stdout;
long status;
long returnStatus = 0;
long status;
long returnStatus = 0;
static char *pathSep = OSI_PATH_LIST_SEPARATOR;
static char *subSep = ",";
@@ -53,8 +53,8 @@ int main(int argc,char **argv)
while ((argc > 1) && (**argv == '-')) {
char optLtr = (*argv)[1];
char *optArg;
if (strlen(*argv) > 2) {
if (strlen(*argv) > 2 || optLtr == 'b') {
optArg = *argv+2;
++argv;
--argc;
@@ -63,36 +63,40 @@ int main(int argc,char **argv)
argv += 2;
argc -= 2;
}
switch (optLtr) {
case 'o':
outFilename = optArg;
break;
case 'I':
dbCatString(&path, &pathLength, optArg, pathSep);
break;
case 'S':
dbCatString(&sub, &subLength, optArg, subSep);
break;
case 'b':
dbBptNotMonotonic = 1;
break;
default:
fprintf(stderr, "dbExpand: Unknown option '-%c'\n", optLtr);
usage();
exit(1);
}
}
if (argc < 1) {
fprintf(stderr, "dbExpand: No input file specified\n");
fprintf(stderr, "dbExpand: No input file specified\n");
usage();
exit(1);
exit(1);
}
for (; argc>0; --argc, ++argv) {
status = dbReadDatabase(&pdbbase,*argv,path,sub);
if (status) returnStatus = status;
status = dbReadDatabase(&pdbbase,*argv,path,sub);
if (status) returnStatus = status;
}
if (returnStatus) {
errlogFlush();
@@ -106,7 +110,7 @@ int main(int argc,char **argv)
exit(1);
}
}
dbWriteMenuFP(pdbbase,outFP,0);
dbWriteRecordTypeFP(pdbbase,outFP,0);
dbWriteDeviceFP(pdbbase,outFP);
@@ -116,7 +120,7 @@ int main(int argc,char **argv)
dbWriteVariableFP(pdbbase,outFP);
dbWriteBreaktableFP(pdbbase,outFP);
dbWriteRecordFP(pdbbase,outFP,0,0);
free((void *)path);
free((void *)sub);
return 0;

View File

@@ -74,6 +74,8 @@ epicsShareFunc DBENTRY * epicsShareAPI dbCopyEntry(DBENTRY *pdbentry);
epicsShareFunc void epicsShareAPI dbCopyEntryContents(DBENTRY *pfrom,
DBENTRY *pto);
epicsShareExtern int dbBptNotMonotonic;
epicsShareFunc long epicsShareAPI dbReadDatabase(DBBASE **ppdbbase,
const char *filename, const char *path, const char *substitutions);
epicsShareFunc long epicsShareAPI dbReadDatabaseFP(DBBASE **ppdbbase,

View File

@@ -72,15 +72,24 @@ static long read_sa(subArrayRecord *prec)
if (nRequest > prec->malm)
nRequest = prec->malm;
dbGetLink(&prec->inp, prec->ftvl, prec->bptr, 0, &nRequest);
prec->nord = ecount = nRequest - prec->indx;
if (prec->inp.type == CONSTANT)
nRequest = prec->nord;
else
dbGetLink(&prec->inp, prec->ftvl, prec->bptr, 0, &nRequest);
ecount = nRequest - prec->indx;
if (ecount > 0) {
int esize = dbValueSize(prec->ftvl);
if (ecount > prec->nelm)
ecount = prec->nelm;
memmove(prec->bptr, (char *)prec->bptr + prec->indx * esize,
ecount * esize);
}
} else
ecount = 0;
prec->nord = ecount;
if (nRequest > 0 &&
prec->tsel.type == CONSTANT &&

View File

@@ -1,5 +1,5 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
@@ -19,7 +19,7 @@ SRC_DIRS += $(TOP)/src/makeBaseApp/top/caServerApp
#
# Added ws2_32 winmm user32 for the non-dll build
#
SYS_PROD_LIBS_WIN32 += ws2_32 advapi32 user32
PROD_SYS_LIBS_WIN32 += ws2_32 advapi32 user32
PROD_HOST = excas

View File

@@ -222,8 +222,6 @@ SRCS += epicsTempFile.cpp
SRCS += epicsStdio.c
SRCS += osdStdio.c
osdEnv_CFLAGS_WIN32= -U__STDC__
SRCS += osdThread.c
SRCS += osdMutex.c
SRCS += osdEvent.c

View File

@@ -34,7 +34,7 @@ public:
void * pInstance () const;
private:
void * _pInstance;
size_t _refCount;
std :: size_t _refCount;
SingletonUntyped ( const SingletonUntyped & );
SingletonUntyped & operator = ( const SingletonUntyped & );
};

View File

@@ -41,7 +41,6 @@
/*Declare storage for errVerbose */
epicsShareDef int errVerbose = 0;
static void errlogCleanup(void);
static void exitHandler(void *);
static void errlogThread(void);
@@ -119,10 +118,11 @@ epicsShareFunc int errlogPrintf(const char *pFormat, ...)
errlogInit(0);
if (pvtData.atExit || (isOkToBlock && pvtData.toConsole)) {
va_start(pvar, pFormat);
vfprintf(stderr, pFormat, pvar);
nchar = vfprintf(stderr, pFormat, pvar);
va_end (pvar);
fflush(stderr);
}
if (pvtData.atExit) return nchar;
pbuffer = msgbufGetFree(isOkToBlock);
if (!pbuffer) return 0;
va_start(pvar, pFormat);
@@ -390,8 +390,15 @@ static void exitHandler(void *pvt)
pvtData.atExit = 1;
epicsEventSignal(pvtData.waitForWork);
epicsEventMustWait(pvtData.waitForExit);
free(pvtData.pbuffer);
epicsMutexDestroy(pvtData.flushLock);
epicsEventDestroy(pvtData.flush);
epicsEventDestroy(pvtData.waitForFlush);
epicsMutexDestroy(pvtData.listenerLock);
epicsMutexDestroy(pvtData.msgQueueLock);
epicsEventDestroy(pvtData.waitForWork);
epicsEventDestroy(pvtData.waitForExit);
return;
}
struct initArgs {
@@ -431,18 +438,6 @@ static void errlogInitPvt(void *arg)
pvtData.errlogInitFailed = FALSE;
}
}
static void errlogCleanup(void)
{
free(pvtData.pbuffer);
epicsMutexDestroy(pvtData.flushLock);
epicsEventDestroy(pvtData.flush);
epicsEventDestroy(pvtData.waitForFlush);
epicsMutexDestroy(pvtData.listenerLock);
epicsMutexDestroy(pvtData.msgQueueLock);
epicsEventDestroy(pvtData.waitForWork);
/*Note that exitHandler must destroy waitForExit*/
}
epicsShareFunc int epicsShareAPI errlogInit2(int bufsize, int maxMsgSize)
{
@@ -494,9 +489,7 @@ static void errlogThread(void)
epicsAtExit(exitHandler,0);
while (TRUE) {
epicsEventMustWait(pvtData.waitForWork);
if (pvtData.atExit) break;
while ((pmessage = msgbufGetSend(&noConsoleMessage))) {
if (pvtData.atExit) break;
epicsMutexMustLock(pvtData.listenerLock);
if (pvtData.toConsole && !noConsoleMessage) {
fprintf(stderr,"%s",pmessage);
@@ -515,7 +508,6 @@ static void errlogThread(void)
epicsThreadSleep(.2); /*just wait an extra .2 seconds*/
epicsEventSignal(pvtData.waitForFlush);
}
errlogCleanup();
epicsEventSignal(pvtData.waitForExit);
}
@@ -533,8 +525,10 @@ static msgNode *msgbufGetNode(void)
char *plimit = pbuffer + pvtData.buffersize;
pnextFree = plast->message + adjustToWorstCaseAlignment(plast->length);
if (pfirst <= plast &&
pnextFree + pvtData.msgNeeded > plimit) {
if (pfirst > plast) {
plimit = (char *)pfirst;
}
else if (pnextFree + pvtData.msgNeeded > plimit) {
pnextFree = pbuffer; /* Hit end, wrap to start */
plimit = (char *)pfirst;
}
@@ -552,7 +546,9 @@ static char *msgbufGetFree(int noConsoleMessage)
{
msgNode *pnextSend;
epicsMutexMustLock(pvtData.msgQueueLock);
if (epicsMutexLock(pvtData.msgQueueLock) != epicsMutexLockOK)
return 0;
if ((ellCount(&pvtData.msgQueue) == 0) && pvtData.missedMessages) {
int nchar;

View File

@@ -798,6 +798,8 @@ iocshBody (const char *pathname, const char *commandLine)
int epicsShareAPI
iocsh (const char *pathname)
{
if (pathname)
epicsEnvSet("IOCSH_STARTUP_SCRIPT", pathname);
return iocshBody(pathname, NULL);
}

View File

@@ -95,7 +95,7 @@
/*
* Deprecation marker
*/
#ifdef __GNUC__
#if defined( __GNUC__ ) && (__GNUC__ > 2)
# define EPICS_DEPRECATED __attribute__((deprecated))
#else
# define EPICS_DEPRECATED

View File

@@ -169,6 +169,8 @@ bool epicsThread::exitWait ( const double delay ) throw ()
"epicsThread::exitWait()\n" );
epicsThreadSleep ( epicsMin ( delay, 5.0 ) );
}
// the event mechanism is used for other purposes
this->event.signal ();
return this->terminated;
}

View File

@@ -74,8 +74,6 @@ public:
bool useDiffTimeOptimization;
};
static const epicsTimeLoadTimeInit lti;
//
// epicsTimeLoadTimeInit ()
//
@@ -125,6 +123,9 @@ inline void epicsTime::addNanoSec (long nSecAdj)
//
epicsTime::epicsTime ( const time_t_wrapper & ansiTimeTicks )
{
// avoid c++ static initialization order issues
static epicsTimeLoadTimeInit & lti = * new epicsTimeLoadTimeInit ();
//
// try to directly map time_t into an unsigned long integer because this is
// faster on systems w/o hardware floating point and a simple integer type time_t.
@@ -212,6 +213,8 @@ epicsTime epicsTime::getEvent (const epicsTimeEvent &event)
//
epicsTime::operator time_t_wrapper () const
{
// avoid c++ static initialization order issues
static epicsTimeLoadTimeInit & lti = * new epicsTimeLoadTimeInit ();
time_t_wrapper wrap;
if ( lti.useDiffTimeOptimization ) {

View File

@@ -1,7 +1,6 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Saskatchewan
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
@@ -13,10 +12,6 @@
#ifndef osdSockH
#define osdSockH
#ifdef __cplusplus
extern "C" {
#endif
#include <errno.h>
#include <sys/types.h>
@@ -24,8 +19,6 @@ extern "C" {
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
/*#include <sys/filio.h>
#include <sys/sockio.h>*/
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
@@ -34,10 +27,6 @@ extern "C" {
#include <unistd.h> /* close() and others */
#ifdef __cplusplus
}
#endif
typedef int SOCKET;
#define INVALID_SOCKET (-1)
#define SOCKERRNO errno

View File

@@ -3,8 +3,7 @@
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
@@ -26,10 +25,6 @@
#ifndef osdSockH
#define osdSockH
#ifdef __cplusplus
extern "C" {
#endif
#include <errno.h>
#include <sys/types.h>
@@ -37,8 +32,6 @@ extern "C" {
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
/*#include <sys/filio.h>
#include <sys/sockio.h>*/
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
@@ -47,10 +40,6 @@ extern "C" {
#include <unistd.h> /* close() and others */
#ifdef __cplusplus
}
#endif
typedef int SOCKET;
#define INVALID_SOCKET (-1)
#define SOCKERRNO errno

View File

@@ -1,7 +1,6 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Saskatchewan
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
@@ -14,10 +13,6 @@
#ifndef osdSockH
#define osdSockH
#ifdef __cplusplus
extern "C" {
#endif
#include <errno.h>
#include <sys/types.h>
@@ -32,6 +27,10 @@ extern "C" {
#include <netdb.h>
#include <unistd.h>
#ifdef __cplusplus
extern "C" {
#endif
int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
#ifdef __cplusplus

View File

@@ -18,6 +18,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <rtems/rtems_bsdnet_internal.h>
#include "epicsTime.h"
#include "osdTime.h"
#include "osiNTPTime.h"
@@ -117,17 +118,21 @@ double rtemsTicksPerSecond_double, rtemsTicksPerTwoSeconds_double;
* explicitly calls osdTimeRegister() at the appropriate time.
* However if we are loaded dynamically we *do* register our
* standard time providers at static constructor time; in this
* case the tick rate will have been set already.
* case the network is available already.
*/
static int staticTimeRegister(void)
{
if (rtemsTicksPerSecond != 0)
osdTimeRegister();
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &rtemsTicksPerSecond);
rtemsTicksPerSecond_double = rtemsTicksPerSecond;
rtemsTicksPerTwoSeconds_double = rtemsTicksPerSecond_double * 2.0;
/* If networking is already up at the time static constructors
* are executed then we are probably run-time loaded and it's
* OK to osdTimeRegister() at this point.
*/
if (rtems_bsdnet_ticks_per_second != 0)
osdTimeRegister();
return 1;
}
static int done = staticTimeRegister();

View File

@@ -3,15 +3,12 @@
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef osdSockH
#define osdSockH
#include <time.h>
#include <errno.h>
@@ -25,9 +22,6 @@ extern "C" {
#endif
#include <winsock2.h>
#ifdef __cplusplus
}
#endif
#define SOCKERRNO WSAGetLastError()
@@ -79,3 +73,4 @@ typedef int osiSocklen_t;
epicsShareFunc unsigned epicsShareAPI wsaMajorVersion ();
#endif /*osdSockH*/

View File

@@ -124,7 +124,7 @@ BOOL WINAPI DllMain (
#if _WIN32_WINNT >= 0x0501
/*
* Only in WXP
* Thats a shame becaus ethis is probably much faster
* Thats a shame because this is probably much faster
*/
success = GetModuleHandleEx (
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
@@ -268,13 +268,10 @@ static void threadCleanupWIN32 ( void )
return;
}
while ( ( pParm = ( win32ThreadParam * ) ellFirst ( & pGbl->threadList ) ) ) {
while ( ( pParm = ( win32ThreadParam * )
ellFirst ( & pGbl->threadList ) ) ) {
epicsParmCleanupWIN32 ( pParm );
}
TlsFree ( pGbl->tlsIndexThreadLibraryEPICS );
DeleteCriticalSection ( & pGbl->mutex );
}
/*
@@ -446,7 +443,8 @@ epicsShareFunc epicsThreadBooleanStatus epicsShareAPI epicsThreadHighestPriority
/*
* epicsThreadGetStackSize ()
*/
epicsShareFunc unsigned int epicsShareAPI epicsThreadGetStackSize ( epicsThreadStackSizeClass stackSizeClass )
epicsShareFunc unsigned int epicsShareAPI
epicsThreadGetStackSize ( epicsThreadStackSizeClass stackSizeClass )
{
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {4000, 6000, 11000};
@@ -628,18 +626,21 @@ epicsShareFunc epicsThreadId epicsShareAPI epicsThreadCreate (const char *pName,
free ( pParmWIN32 );
return NULL;
}
EnterCriticalSection ( & pGbl->mutex );
ellAdd ( & pGbl->threadList, & pParmWIN32->node );
LeaveCriticalSection ( & pGbl->mutex );
wstat = ResumeThread ( pParmWIN32->handle );
if (wstat==0xFFFFFFFF) {
EnterCriticalSection ( & pGbl->mutex );
ellDelete ( & pGbl->threadList, & pParmWIN32->node );
LeaveCriticalSection ( & pGbl->mutex );
CloseHandle ( pParmWIN32->handle );
free ( pParmWIN32 );
return NULL;
}
EnterCriticalSection ( & pGbl->mutex );
ellAdd ( & pGbl->threadList, & pParmWIN32->node );
LeaveCriticalSection ( & pGbl->mutex );
return ( epicsThreadId ) pParmWIN32;
}
@@ -955,10 +956,17 @@ static void epicsThreadShowPrivate ( epicsThreadId id, unsigned level )
(void *) pParm, idForFormat, pParm->epicsPriority,
epics_GetThreadPriorityAsString ( pParm->handle ),
epicsThreadIsSuspended ( id ) ? "suspend" : "ok" );
if ( level ) {
fprintf (epicsGetStdout(), " %-8p %-8p ",
(void *) pParm->handle, (void *) pParm->parm );
}
}
else {
fprintf (epicsGetStdout(),
"NAME EPICS-ID WIN32-ID EPICS-PRI WIN32-PRI STATE " );
if ( level ) {
fprintf (epicsGetStdout(), " HANDLE FUNCTION PARAMETER" );
}
}
fprintf (epicsGetStdout(),"\n" );
}

Some files were not shown because too many files have changed in this diff Show More