Compare commits

..

200 Commits

Author SHA1 Message Date
Janet Anderson
a5999242b0 Creating R3.14.12.3 2012-12-17 14:13:19 -06:00
Janet Anderson
9e484306d6 Creating R3.14.12.3 2012-12-17 14:11:47 -06:00
Andrew Johnson
835199a45d RTEMS: Bump the version number
Also show the other COMMANDLINE_LIBRARY choices.
2012-12-13 15:52:06 -06:00
Andrew Johnson
0df6f849d6 Document another Launchpad bug fix from Jeff 2012-12-13 15:50:44 -06:00
Jeff Hill
75e32c9086 fix for https://bugs.launchpad.net/epics-base/+bug/1090009 2012-12-13 09:35:18 -07:00
Ralph Lange
b7018dd16d ca: Fix bug in "Firewalls" section of Channel Access reference manual 2012-12-11 23:38:42 +01:00
Janet Anderson
3498a6d4e0 Update readline libraries and dont have readline the default 2012-12-05 15:02:26 -06:00
Janet Anderson
f90f021309 Added SHRLIB_PERMISSIONS 2012-12-05 14:34:18 -06:00
Andrew Johnson
c1203076f2 Release Notes update
Mark Rivers asked for documentation on the new
workstation OS stack sizes.
2012-12-04 11:15:41 -06:00
Andrew Johnson
753622315c Set snapshot to 3.14.12.3-rc1-DEV 2012-12-03 16:41:53 -06:00
Andrew Johnson
910ab38af6 Creating 3.14.12.3-rc1 2012-12-03 16:39:27 -06:00
Andrew Johnson
0e990bbe0c Update release notes. 2012-12-03 13:34:27 -06:00
Andrew Johnson
ef5688f8de libCom: Accept hex literals in CALC expressions
Code back-ported from the 3.15 branch.
2012-12-03 12:58:26 -06:00
Andrew Johnson
d622bbad05 Fix compiler warnings on linux-x86 2012-12-03 12:48:11 -06:00
Janet Anderson
416cf68fd1 Make target not first prerequisite depend on Makefile. 2012-12-03 09:33:08 -06:00
Andrew Johnson
cbde3ea9fd cas: Added propertyEventMask support
Allows server tools to send DBE_PROPERTY events to clients.
New functionality not tested, but fairly trivial and doesn't
break existing server tools.
2012-11-30 17:42:47 -06:00
Andrew Johnson
6f9c2db8a8 libCom: Revert 12374 which breaks MSVC++ builds
Both the Microsoft 2008 and 2010 compilers fail with this change.
2012-11-30 13:32:25 -06:00
Andrew Johnson
01276d952f ca: Build caRepeater etc. by default
Exceptions for vxWorks, RTEMS and iOS which don't support
executable programs like the workstation OSs.
2012-11-26 15:37:54 -06:00
Andrew Johnson
809633d698 Set snapshot to 3.14.12.3-pre1-DEV 2012-11-19 15:04:58 -06:00
Andrew Johnson
1f573172b3 Creating 3.14.12.3-pre1 2012-11-19 15:02:22 -06:00
Andrew Johnson
d6f72900f8 Update release notes. 2012-11-19 13:19:04 -06:00
Andrew Johnson
5b1d3a7725 conigure: Fix iOS build warning.
from Tom Palaia.
2012-11-19 10:48:24 -06:00
Andrew Johnson
7d79a83519 Apple iOS updates from Tom Pelaia
Adds iOS 6.0, which is now the default.
- changed the default iOS SDK to version 6.0
- use xcrun to locate the selected compiler
- added armv7s as an option for architecture
- made armv7 + armv7s the default architecture
- renamed the LLVM compiler option to LLVM_GNU for clarity
  since LLVM is naturally associated with CLANG
2012-11-17 13:18:16 -06:00
Andrew Johnson
6fd9fb3066 libCom: Removed epicsSingleton workaround
This undoes commit 11565, "workaround for archaic T202 g++ bug"
which doesn't actually seem to be necessary for T202 compilation.
It also replaces 'typename' with 'class', for another compiler.

Modification provided by Dirk Zimoch.
2012-11-16 16:14:13 -06:00
Andrew Johnson
28c7fe12f3 configure: Added Guobao Shen's comments on using MacPorts GCC 2012-11-16 12:54:29 -06:00
Andrew Johnson
36be0aa783 rec: Fix minor string in + out issue.
Undo strncmp+strncpy to strcmp+strcpy change in r12048.
The 'n' versions are needed because device support was
never explicitly required to Nil-terminate the string.
The dbAccess routines do enforce termination though.
2012-11-16 12:40:57 -06:00
Andrew Johnson
69d8be78d3 startup: Recognize 64-bit Windows
For 64-bit versions of Perl on Windows, the EpicsHostArch.pl
script will now return the host architecture "windows-x64".
2012-11-01 14:57:36 -05:00
Andrew Johnson
fc61cc34ce iocLogServer fix for unsigned char arch's
Reported by Guy Jennings
2012-10-31 13:56:12 -05:00
Andrew Johnson
e889336458 db: Undefined alarm limits should return NaN
Where the record doesn't provide get_alarm_double() or for fields
where the default applies, we were still returning 0.
2012-10-17 18:08:39 -05:00
Michael Davidsaver
7cac267a4b db: Fix possible error handling in dbPut 2012-10-11 18:10:00 -05:00
Andrew Johnson
71079ede4b rec/aSub: Fixes from Michael Davidsaver
* Changing the number of elements in a VALx array triggers monitors
* Post monitors on the NEVx fields, following EFLG
* Remove artificial limit on array sizes
2012-10-11 17:51:00 -05:00
Michael Davidsaver
26173c1e0d devLib: add compatibility typedef for VME table type 2012-10-10 15:52:34 -05:00
Andrew Johnson
9c1b8ba952 rec: Fix problem with NAN in MLST/ALST fields
If MLST or ALST became NAN the associated monitor would never trigger.
Now a NAN will cause it to always trigger.
2012-10-06 21:48:01 -05:00
Andrew Johnson
c574722a9b catools: Fix syntax error from vxWorks gcc. 2012-09-11 15:19:29 -05:00
Andrew Johnson
4790578953 tools: Try harder to collapse ../ components in AbsPath
Idea from Angus Gratton, ANU
2012-09-11 12:11:55 -05:00
Ralph Lange
7e6e38060f catools: Change behaviour of camonitor when printing array of chars as string
camonitor was using strlen() to find out the length of the array to print as %s string,
which led to printing old buffer contents when the array-string was not null terminated.
Now uses the minimum of strlen(), elements received, and elements requested.

Suggested by Mark Rivers on tech-talk (11 Sep 2012)
2012-09-11 16:58:43 +02:00
Ralph Lange
709b6ef2f3 catools: Fix off-by-one bug in caput
An internal buffer was allocated one char too short, when caput was used
with the '-S' (send string as array of chars) option.

Reported by J. Lewis Muir (tech-talk on 17-Aug-2012)
2012-09-03 21:25:44 +02:00
Andrew Johnson
169b30081a Fix for vxWorks 6.x LED_ID
Use LED_ID in epicsReadline.c
Provide a typedef for vxWorks 5.x where it doesn't exist.
2012-08-31 16:05:14 -05:00
Andrew Johnson
a19e1d21da libCom: Fix epicsSnprintf() under MinGW
Use the Microsoft _vscprintf() function which was just missing
a prototype in earlier versions of MinGW's stdio.h header.
2012-08-31 15:57:59 -05:00
Andrew Johnson
1ac8ff6378 as: Make asSetFilename() warn on relative paths
Tell the user if they try this.  They'll get an error from
asInit() later, but it gets lost easily in other noise.
2012-08-28 16:35:52 -05:00
Janet Anderson
5c2ef73c4a Fixed X11 include definitions, X11_INC and XPM_INC. 2012-08-20 12:27:39 -05:00
Andrew Johnson
958aa02320 Change build defaults for darwin-x86
* Use clang and clang++
* Build for x86_64 only
2012-08-20 10:03:50 -05:00
Andrew Johnson
c93c7b5e36 configure: Fix test rules dependency 2012-08-07 10:37:13 -05:00
Andrew Johnson
b993e29fad configure: Minor fixes
Don't add extraneous characters when SHRLIB_VERSION or GNU_TARGET
are empty.  The addprefix or addsuffix functions only include the
prefix/suffix part if the list argument is not empty.

This fixes issues naming libCap5.so at build-time.
2012-08-07 09:41:21 -05:00
Andrew Johnson
e03d10857c tools: Delete makeDbDepends.pl from Makefile 2012-07-31 14:09:02 -05:00
Andrew Johnson
bdbada28a8 makeBaseApp: Remove bad characters from user names
Also warns about some bad characters in record names, but only
the ones that are known to cause known bad behaviour.
2012-07-31 13:47:23 -05:00
Janet Anderson
20c9fa2e8a Added template file as dependency for .db.d file 2012-07-31 10:50:51 -05:00
Janet Anderson
b1ac0c18c4 Fixed typo 2012-07-31 10:48:01 -05:00
Janet Anderson
4133b666a0 Added die if no target file argument 2012-07-31 10:44:33 -05:00
Andrew Johnson
dabd0a969b Release notes update. 2012-07-31 10:03:57 -05:00
Andrew Johnson
1864ac41fb Add support for native linux-arm builds. 2012-07-30 17:50:30 -05:00
Janet Anderson
1649ce6f79 Replaced makeDbDepends with mkmf 2012-07-30 17:10:57 -05:00
Andrew Johnson
93bc78d2ed configure: Don't override CROSS_COMPILER_TARGET_ARCHS on Cygwin
All other host architectures have this setting commented out in
their host-specific CONFIG_SITE.<host>.Common files, so the user
doesn't get confused.
2012-06-21 12:09:04 -05:00
Andrew Johnson
32f556637d libCom/osi: Fixed all epicsThreadSleep() implementations
All are now robust against overflow, NAN or negative argument.
Passing seconds=0 calls the OS scheduler, offering to yield.
Passing seconds>0 delays at least the requested time, up to a
limit which usually depends on the OS tick rate.
2012-06-18 14:52:03 -05:00
Andrew Johnson
146520d035 dbStatic: Fix dbReportDeviceConfig() overflow.
Reported by Hinko Kocevar.
2012-05-21 15:43:03 -05:00
Kate Feng
ea8d19e727 RTEMS: Make nfsMount() globally visible. 2012-05-16 12:25:27 -05:00
Andrew Johnson
39ca40fc33 configure: Move GNU_DIR setting for linux-xscale_be
All site-specific values should be set in CONFIG_SITE files.
2012-05-16 11:57:17 -05:00
Andrew Johnson
b5e1b0117c configure: Added linux-microblaze target files 2012-05-16 11:56:14 -05:00
Andrew Johnson
c1cebc89bf rsrv: Add epicsShareFunc to casStatsFetch()
Fixes lp:999167
2012-05-14 11:16:33 -05:00
Andrew Johnson
4982a6308b db: Don't call epicsPrintf() from callbackRequest()
The callbackRequest() routine can be called from an ISR,
so use epicsInterruptContextMessage() to print errors.
2012-05-04 17:34:48 -05:00
Andrew Johnson
243baddbf6 Add an Init stat to all thread control variables
This makes the uninitilized value not the Run state.
2012-05-04 13:38:59 -05:00
Andrew Johnson
45348ad6ca configure: Replace COMMENT with NOP in ECHO
Using COMMENT the ECHO command drops the whole line under -s,
whereas using NOP (':') only drops up to the next ';' terminator.
2012-05-01 10:15:45 -05:00
Andrew Johnson
dde8c61ad8 registry: Cleanup
Delete spurious global symbols
Remove unnecessary casts
Fix (c) headers
Added missing #include guard
Remove unnecessary #includes
Prettified.
2012-04-30 17:40:43 -05:00
Andrew Johnson
0a0302daad documentation: Update the Converting from 3.13 document. 2012-04-04 11:57:45 -05:00
Andrew Johnson
8ed86967d1 Don't build command-line programs for iOS targets. 2012-03-30 15:52:19 -05:00
Andrew Johnson
129710f149 configure: Redo Jason Abernathy's SHRLIB fix
Now works properly on Darwin where the version number comes
before the .dylib extension.  This also makes Windows-specific
conditional tests fully generic.
2012-03-30 14:40:58 -05:00
Andrew Johnson
bcd604e40b configure: Expand description of the LINKER_USE_RPATH setting 2012-03-30 13:53:45 -05:00
Andrew Johnson
dffe203856 db: Another modification to fix lp:907761
From Dirk Zimoch.
2012-03-19 12:31:11 -05:00
Jason Abernathy
6f8f61db64 Only remove last occurrence of shrlib version string. 2012-03-09 11:55:20 -06:00
Andrew Johnson
e48ca8a688 rec: Fix timestamps from calcout and seq records
Update record timestamp before calling db_post_events()
2012-03-08 09:47:38 -06:00
Andrew Johnson
7435a9831b db: Reject trailing space in numeric => enum/menu/device conversion
This is really a workaround for a Win32/MinGW bug in sscanf, which
will only set the %n argument for the format "%u %n" when there is
a space following the unsigned number.

This changes the IOC's behavior very slightly.
2012-03-06 14:14:39 -06:00
Andrew Johnson
10e7bced84 libCom/test: epicsTimeTest reworked a bit
Report throw from first call to epicsTime::getCurrent().
Reorganized test order so a bad time provider doesn't stop
all tests from being run.  Also cleaned up a few extraneous
variables.
2012-03-06 12:54:54 -06:00
Andrew Johnson
df7fa22a15 libCom/test: Add more tests of the CALC engine
Some of the isnan(Inf) tests were failing on mingw.
This change doesn't fix them, it adds related examples.
2012-02-29 17:11:08 -06:00
Andrew Johnson
140845fb14 configure: Cleanup MacOS and iOS build settings
Makes it easy for users to select which compiler to use.
2012-02-27 14:40:07 -06:00
Andrew Johnson
3dec8f8c78 configure: Removed _ARM_NWFP_
Apparently this hasn't been needed for quite a while.
2012-02-20 09:52:54 -06:00
Andrew Johnson
6f9f5498b4 libCom/test: Add diagnostic to epicsStdioTest on vxWorks
This test fails if the cwd is not writable, but on vxWorks the
fault appears at the fclose() not the fopen() line. The code
now detects this and tells the user what's probably wrong.
2012-02-03 16:12:06 -06:00
Andrew Johnson
f5bc02393e libCom: Increase stack sizes for Windows and Posix
Windows stack sizes were the same as vxWorks - tiny.
The stack sizes are now multiples of sizeof(void*).
On 32-bit systems they give 256KB, 512KB and 1MB;
64-bit systems get twice those numbers.

Fixes lp:903448
2012-02-02 18:14:01 -06:00
Andrew Johnson
f86cf730e9 db: fix dbpf to enum from integer bug 2012-01-27 09:41:37 -06:00
Janet Anderson
73768aae9a Allow install of *.H header files. 2012-01-20 10:50:10 -06:00
Andrew Johnson
adfa1257f5 makeBaseApp: caMonitor example should use ca_create_subscription()
It was calling ca_add_event(), which is a deprecated API.
2012-01-16 16:40:37 -06:00
Andrew Johnson
7cc8a552a3 db: Allow single-char accesses as long strings
Clients try to use long string support to fetch DBF_STRING
fields use DBF_CTRL_CHAR with a 1-element array, but the IOC
was rejecting that.  This permits it, and also ensures that
the resulting strings are zero-terminated.

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

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

This fix checks to see if the first character of the line after macro
expansion is '#'.  If it is, it considers the line to be a comment.
2012-01-11 11:40:30 -06:00
Janet Anderson
2d6f8c585a Move DarwinPorts and Fink usage definitions to a CONFIG_SITE file 2012-01-05 10:45:20 -06:00
Janet Anderson
c538fc8ccc Added -I$(COMMON_DIR) to DBFLAGS and DBDFLAGS definitions. 2011-12-22 11:33:41 -06:00
Andrew Johnson
c32997ffa1 tools: Fix dependency file problem.
Reported by Eric.
2011-12-20 16:30:41 -06:00
Jeff Hill
d8f7c3731d fixed various archaic sun pro build failures repoted by Dirk 2011-12-12 16:10:24 -07:00
Janet Anderson
0c67efd50a R3.14.12.2-DEV 2011-12-12 14:37:04 -06:00
Janet Anderson
5b0693f53d R3.14.12.2 2011-12-12 14:09:32 -06:00
Janet Anderson
36be34656e Creating 3.14.12.2 2011-12-12 14:08:00 -06:00
Andrew Johnson
4a5b8a37df cap5: Load libCap5.so from lib/perl/<perl-version>/<perl-archname>
This allows the same version of Base to be used from both RHEL5 and RHEL6
for example; they use different Perl versions which are not compatible at
the ABI level.
2011-12-10 23:11:33 -06:00
Andrew Johnson
e289af684f configure/linux: Move -g option to OPT_CFLAGS_YES
We were adding it to OP_SYS_CFLAGS but if HOST_OPT=NO
you then get two -g options on the gcc command line.
2011-12-07 13:56:04 -06:00
Andrew Johnson
8cb8ad081b softIoc: Strip single-quote chars from arg
Most shells strip the single-quote chars from arguments, but on
win32-x86 this is not happening so we need to do it ourselves.
The single quotes are important to prevent un-escaping of things
that shouldn't be unescaped.
2011-12-05 12:43:26 -06:00
Andrew Johnson
52ee9916e6 configure: Print a warning when CHECK_RELEASE = NO 2011-12-02 14:10:24 -06:00
Andrew Johnson
3fc6a77fb0 libCom/posix: Define finite() for uClibc
The finite() function is provided in glibc but not in uClibc.
C99 requires isfinite() to be a macro, so we can test for it
and define our own finite() macro in osi/os/posix/epicsMath.h
2011-12-02 11:07:04 -06:00
Andrew Johnson
df6f042b5a configure: Update Apple iOS builds
* Default IOS_VERSION to 5.0
* Allow ARMv6 and ARMv7 universal binaries by setting ARCH_CLASS
* Switch from g++ to clang++
2011-12-02 10:42:43 -06:00
Andrew Johnson
3b268475d3 Fix some warnings reported by Clang. 2011-11-29 16:14:19 -06:00
Andrew Johnson
2010e58c61 libCom/win32: Conditionally define MINLONGLONG
Some version of Visual Studio define MAXLONGLONG but not
MINLONGLONG, so they need separate checks.
2011-11-29 14:07:29 -06:00
Andrew Johnson
54401d5426 Set snapshot to 3.14.12.2-rc1-DEV 2011-11-28 16:37:47 -06:00
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
189 changed files with 4427 additions and 2880 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

@@ -14,8 +14,8 @@ define RELEASE_FLAGS_template
SHRLIB_SEARCH_DIRS += $$($(1)_LIB)
RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include/os/$$(OS_CLASS)))
RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include))
RELEASE_DBDFLAGS += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/dbd))
RELEASE_DBFLAGS += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/db))
RELEASE_DBD_DIRS += $$(wildcard $$(strip $$($(1)))/dbd)
RELEASE_DB_DIRS += $$(wildcard $$(strip $$($(1)))/db)
RELEASE_PERL_MODULE_DIRS += $$(wildcard $$($(1)_LIB)/perl)
endef
$(foreach top, $(RELEASE_TOPS), $(eval $(call RELEASE_FLAGS_template,$(top)) ))

View File

@@ -1,5 +1,5 @@
#*************************************************************************
# Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne
# Copyright (c) 2012 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,18 +19,18 @@
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 = 3
# This will end in -DEV between official releases
#EPICS_DEV_SNAPSHOT=-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.
#*************************************************************************
#
@@ -48,7 +47,7 @@ DB_OPT = NO
#-------------------------------------------------------
# Check configure/RELEASE file for consistency
CHECK_RELEASE_YES = checkRelease
CHECK_RELEASE_NO =
CHECK_RELEASE_NO = noCheckRelease
CHECK_RELEASE_WARN = warnRelease
#-------------------------------------------------------
@@ -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)
NOP = :
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(NOP),echo)
#-------------------------------------------------------
ifdef T_A
@@ -335,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))
@@ -371,6 +371,7 @@ INSTALL_LIB_INSTALLS = $(addprefix $(INSTALL_LIB)/,$(notdir $(LIB_INSTALLS)))
# Installed file permissions
BIN_PERMISSIONS = 555
LIB_PERMISSIONS = 444
SHRLIB_PERMISSIONS = 555
INSTALL_PERMISSIONS = 444
#---------------------------------------------------------------

View File

@@ -72,18 +72,22 @@
# linux-cris (Axis GNU crosscompiler on linux-x86 host)
# linux-cris_v10 (Axis GNU crosscompiler on linux-x86 host)
# linux-cris_v32 (Axis GNU crosscompiler on linux-x86 host)
# linux-microblaze
# linux-xscale_be
# vxWorks-486
# vxWorks-68040
# 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 +107,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
@@ -116,9 +120,9 @@ CROSS_COMPILER_HOST_ARCHS=
# NOTE: os/CONFIG.$(EPICS_HOST_ARCH).$(EPICS_HOST_ARCH) files and
# os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(EPICS_HOST_ARCH) files may override
#
# NOTE WIN32: YES results in a DLL. Valid settings are
# SHARED_LIBRARIES=YES and STATIC_BUILD=NO
# SHARED_LIBRARIES=NO and STATIC_BUILD=YES
# NOTE Windows: YES results in a DLL. Valid settings are
# SHARED_LIBRARIES=YES and STATIC_BUILD=NO
# SHARED_LIBRARIES=NO and STATIC_BUILD=YES
#
SHARED_LIBRARIES=YES
@@ -180,7 +184,9 @@ EPICS_SITE_VERSION =
# between the various stages of compilation.
GCC_PIPE = NO
# Include RPATH when linking executables and libraries.
# must be either YES or NO
LINKER_USE_RPATH=YES
# Set RPATH when linking executables and libraries.
# Must be either YES or NO. If you set this to NO you must also provide a
# way for Base executables to find their shared libraries when they are
# run at build-time, e.g. set the LD_LIBRARY_PATH environment variable.
LINKER_USE_RPATH = YES

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
@@ -22,11 +21,11 @@ vpath %.acs $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
##################################################### dbdflags
# dbExpand
INSTALL_DBDFLAGS += -I $(INSTALL_LOCATION)/dbd
INSTALL_DBFLAGS += -I $(INSTALL_LOCATION)/db
DBDFLAGS = $(USR_DBDFLAGS) -I . -I .. $(INSTALL_DBDFLAGS) $(RELEASE_DBDFLAGS)
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) -I. -I.. $(INSTALL_DBFLAGS) $(RELEASE_DBFLAGS)
DBD_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DBD) $(RELEASE_DBD_DIRS)
DB_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DB) $(RELEASE_DB_DIRS)
DBDFLAGS = $(USR_DBDFLAGS) $(addprefix -I,$(DBD_SEARCH_DIRS))
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) $(addprefix -I,$(DB_SEARCH_DIRS))
#####################################################
# To allow os specific dbd files AND have the -j option work properly,
@@ -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))
@@ -101,7 +100,7 @@ ACF_CPPFLAGS = $(ACF_CPPFLAGS_$(GNU))
ACF_INCLUDES = -I. $(TARGET_INCLUDES) $(USR_INCLUDES)\
$(SRC_INCLUDES) -I$(INSTALL_DB)
ACFDEPENDS_CMD = -$(MKMF) -m $(notdir $@)$(DEP) $(subst -I,,$(ACF_INCLUDES)) $@ $<
ACFDEPENDS_CMD = -$(MKMF) -m $(notdir $@)$(DEP) $(ACF_INCLUDES) $@ $<
ACF_CMD = $(CPP) $(ACF_CPPFLAGS) $(ACF_INCLUDES) $< > $@
##################################################### dependancies
@@ -109,19 +108,17 @@ 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)))
DBDDEPENDS_FLAGS = $(filter-out -S%,$(DBDFLAGS))
DBDDEPENDS_CMD = -$(MKMF) -m $(notdir $@)$(DEP) $(DBDDEPENDS_FLAGS) $@ $<
MAKEDBDEPENDS = $(PERL) $(TOOLS)/makeDbDepends.pl
#####################################################
ifndef T_A
ECHO := $(if $(findstring s,$(MAKEFLAGS)),\#,@echo)
COMMON_DIR = .
INSTALL_DBDS =
INSTALL_DBS =
@@ -223,58 +220,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 +306,9 @@ $(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)
@$(MKMF) -m$(notdir $@)$(DEP) $(DBFLAGS) $@ $< $(TEMPLATE_FILENAME)
echo "$@ : $(TEMPLATE_FILENAME)" >> $(notdir $@)$(DEP)
echo "$(notdir $@)$(DEP): $(TEMPLATE_FILENAME)" >> $(notdir $@)$(DEP)
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
@$(RM) $@ $*.tmp
$(MSI) $(DBFLAGS) -S$< $(TEMPLATE_FILENAME) > $*.tmp
@@ -311,7 +316,7 @@ $(COMMON_DIR)/%.db$(RAW): %.substitutions
$(COMMON_DIR)/%.db$(RAW): %.template
@$(RM) $(notdir $@)$(DEP)
@$(MAKEDBDEPENDS) $@ $^ >> $(notdir $@)$(DEP)
@$(MKMF) -m$(notdir $@)$(DEP) $(DBFLAGS) $@ $< $(TEMPLATE_FILENAME)
$(ECHO) "Inflating database from $<"
@$(RM) $@ $*.tmp
$(MSI) $(DBFLAGS) $< > $*.tmp

View File

@@ -22,6 +22,7 @@ vpath %.cpp $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.C $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.rc $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.h $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.H $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.skel.static $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.y $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.l $(USR_VPATH) $(ALL_SRC_DIRS)
@@ -167,6 +168,10 @@ checkRelease:
$(CONVERTRELEASE) checkRelease
warnRelease:
-$(CONVERTRELEASE) checkRelease
noCheckRelease:
ifeq ($(EPICS_HOST_ARCH),$(T_A))
@echo "Warning: RELEASE file consistency checks have been disabled"
endif
#---------------------------------------------------------------
# The order of the following rules is
@@ -205,11 +210,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) $@
@@ -322,10 +322,10 @@ $(OBJLIB_MUNCHNAME):%.munch : %_ctdt$(OBJ) %$(OBJ)
@$(RM) $@
$(MUNCH_CMD)
runtests: $(TESTSCRIPTS_$(BUILD_CLASS))
runtests: $(TESTSCRIPTS)
-$(PERL) -MTest::Harness -e 'runtests @ARGV if @ARGV;' $^
testspec: $(TESTSCRIPTS_$(BUILD_CLASS))
testspec: $(TESTSCRIPTS)
@$(RM) $@
@echo OS-class: $(OS_CLASS) > $@
@echo Target-arch: $(T_A) >> $@
@@ -383,11 +383,11 @@ $(INSTALL_LIB)/%.lib: %.lib
$(INSTALL_SHRLIBS): $(INSTALL_SHRLIB)/%: %
$(ECHO) "Installing shared library $@"
@$(INSTALL_LIBRARY) -d -m $(LIB_PERMISSIONS) $< $(INSTALL_SHRLIB)
ifneq ($(SHRLIB_SUFFIX),.dll)
@$(INSTALL_LIBRARY) -d -m $(SHRLIB_PERMISSIONS) $< $(INSTALL_SHRLIB)
ifneq ($(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE))
ifneq (,$(strip $(SHRLIB_VERSION)))
@$(RM) $(subst .$(SHRLIB_VERSION),,$@)
ln -s $< $(subst .$(SHRLIB_VERSION),,$@)
@$(RM) $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
ln -s $< $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
endif # SHRLIB_VERSION
endif # SHRLIB_SUFFIX
@@ -408,10 +408,12 @@ $(INSTALL_TCLLIB)/$(TCLINDEX): $(INSTALL_TCLLIBS)
$(INSTALL_LOADABLE_SHRLIBS): $(INSTALL_SHRLIB)/%: %
$(ECHO) "Installing loadable shared library $@"
@$(INSTALL_LIBRARY) -d -m 555 $< $(INSTALL_SHRLIB)
ifneq ($(LOADABLE_SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE))
ifneq (,$(strip $(LOADABLE_SHRLIB_VERSION)))
@$(RM) $(subst .$(LOADABLE_SHRLIB_VERSION),,$@)
ln -s $< $(subst .$(LOADABLE_SHRLIB_VERSION),,$@)
@$(RM) $(subst $(LOADABLE_SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
ln -s $< $(subst $(LOADABLE_SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
endif # LOADABLE_SHRLIB_VERSION
endif # LOADABLE_SHRLIB_SUFFIX
$(INSTALL_CONFIG)/%: %
$(ECHO) "Installing config file $@"
@@ -463,7 +465,7 @@ $(INSTALL_TEMPLATES_SUBDIR)/%: %
.PRECIOUS: $(COMMON_INC)
.PHONY: all inc build install clean rebuild buildInstall
.PHONY: runtests checkRelease warnRelease
.PHONY: runtests checkRelease warnRelease noCheckRelease
endif # BASE_RULES_BUILD
# EOF RULES_BUILD

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

@@ -19,8 +19,9 @@ OBJ = .o
#Library prefix and suffixes
LIB_PREFIX = lib
LIB_SUFFIX = .a
SHRLIB_SUFFIX = .so$(addprefix .,$(SHRLIB_VERSION))
LOADABLE_SHRLIB_SUFFIX = .so$(addprefix .,$(LOADABLE_SHRLIB_VERSION))
SHRLIB_SUFFIX_BASE = .so
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)$(addprefix .,$(SHRLIB_VERSION))
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)$(addprefix .,$(LOADABLE_SHRLIB_VERSION))
LOADABLE_SHRLIB_PREFIX = lib
#-------------------------------------------------------

View File

@@ -14,7 +14,7 @@ OS_CLASS = cygwin32
ARCH_CLASS = x86
# Definitions used when COMMANDLINE_LIBRARY is READLINE
LDLIBS_READLINE = -lreadline -lcurses
LDLIBS_READLINE = -lreadline
POSIX_CPPFLAGS = -D_POSIX_THREADS -D_POSIX_TIMERS
#POSIX_CPPFLAGS += -D_POSIX_SOURCE
@@ -48,11 +48,12 @@ STATIC_CXXFLAGS_NO= $(VISC_DLL) -D_DLL
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_PREFIX=
SHRLIB_SUFFIX=.dll
SHRLIB_PREFIX =
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIB_PREFIX=
LOADABLE_SHRLIB_SUFFIX=.dll
LOADABLE_SHRLIB_PREFIX =
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(LOADABLE_SHRLIB_SUFFIX))
#

View File

@@ -1,17 +1,15 @@
# CONFIG.Common.ios-arm
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for ios-arm target builds
# Sites may override these definitions in CONFIG_SITE.Common.ios-arm
# or CONFIG_SITE.<host>.ios-arm
#-------------------------------------------------------
IOS_PLATFORM = iPhoneOS
#
# Architecture-specific information
#
ARCH_CLASS = armv6
OP_SYS_CFLAGS += -fno-inline-functions
# iOS optimization flags for arm architecture

View File

@@ -1,8 +1,11 @@
# CONFIG.Common.ios-x86
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for ios-x86 target builds
# Sites may override these definitions in CONFIG_SITE.Common.ios-x86
# or CONFIG_SITE.<host>.ios-x86
#-------------------------------------------------------
IOS_PLATFORM = iPhoneSimulator

View File

@@ -3,7 +3,7 @@
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for iOS target archs
# Definitions for all Apple iOS builds
# Sites may override these definitions in CONFIG_SITE.Common.iosCommon
# or CONFIG_SITE.<host>.iosCommon
#-------------------------------------------------------
@@ -29,16 +29,19 @@ SDK_DIR = $(PLATFORM_DIR)/Developer/SDKs/$(IOS_PLATFORM)$(IOS_VERSION).sdk
#-------------------------------------------------------
# Build architecture flags
ARCH_DEP_CFLAGS += -arch $(ARCH_CLASS)
ARCH_DEP_LDFLAGS += -arch $(ARCH_CLASS)
# ARCH_CLASS must contain a list of CPU architectures which must be
# valid arguments to the -arch options for the cc and ld commands.
# ARCH_CLASS is defined in a CONFIG_SITE file which is not loaded
# until after this file.
#
ARCH_DEP_FLAGS = $(addprefix -arch ,$(ARCH_CLASS))
ARCH_DEP_CFLAGS += $(ARCH_DEP_FLAGS)
ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
#--------------------------------------------------
# Operating system flags
OP_SYS_CFLAGS += -isysroot $(SDK_DIR) -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200
#--------------------------------------------------
# Don't try to use precompiled headers when converting sequencer files
CPPSNCFLAGS += -no-cpp-precomp
OP_SYS_LDFLAGS += -isysroot $(SDK_DIR)
#--------------------------------------------------
# Always compile in debugging symbol table information
@@ -48,23 +51,33 @@ OPT_CXXFLAGS_YES += -g
#-------------------------------------------------------
# Compiler definitions:
# Use clang instead of gcc
# Must use g++ still
CC = $(GNU_BIN)/clang
CCC = $(GNU_BIN)/c++
CC_GNU = gcc
CCC_GNU = g++
CC_LLVM_GNU = llvm-gcc
CCC_LLVM_GNU = llvm-g++
CC_CLANG = clang
CCC_CLANG = clang++
# Convert the iOS platform to lowercase for passing to xcrun's sdk parameter
XCRUN_SDK_BASE = $(shell echo $(IOS_PLATFORM) | tr A-Z a-z)
#-------------------------------------------------------
# Linker flags
OP_SYS_LDFLAGS += -dynamic -Z -L$(SDK_DIR)/usr/lib
GNU_LDLIBS_YES =
OP_SYS_LDFLAGS += -dynamic -Z -L$(SDK_DIR)/usr/lib -L$(SDK_DIR)/usr/lib/system
#-------------------------------------------------------
# Shared libraries
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \
-install_name $(shell perl $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \
-install_name $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \
-compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \
-current_version $(SHRLIB_VERSION)
SHRLIB_SUFFIX = .$(SHRLIB_VERSION).dylib
SHRLIB_SUFFIX_BASE = .dylib
SHRLIB_SUFFIX = .$(SHRLIB_VERSION)$(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_LDFLAGS = -bundle -flat_namespace -undefined suppress
@@ -80,7 +93,17 @@ vpath %.m $(USR_VPATH) $(ALL_SRC_DIRS)
%.o: %.m
$(COMPILE.c) -c $<
#--------------------------------------------------
# Header dependency file generation
#
HDEPENDS_METHOD = CMD
#--------------------------------------------------
# Allow site overrides
-include $(CONFIG)/os/CONFIG_SITE.Common.iosCommon
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).iosCommon
#--------------------------------------------------
# Find the Xcode compilers for the specified SDK just once
CC := $(shell xcrun -sdk $(XCRUN_SDK_BASE) -find $(CC_$(COMPILER)))
CCC := $(shell xcrun -sdk $(XCRUN_SDK_BASE) -find $(CCC_$(COMPILER)))

View File

@@ -11,9 +11,6 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = arm
# Set a special definition for network order of Netwinder ARM floating point
ARCH_DEP_CPPFLAGS += -D_ARM_NWFP_
ifeq ($(BUILD_CLASS),CROSS)
VALID_BUILDS = Ioc
GNU_TARGET = arm-linux

View File

@@ -0,0 +1,21 @@
# CONFIG.Common.linux-microblaze
#
# This file is maintained by the build community.
#
# Definitions for Xilinx MicroBlaze FPGA Soft Core Processor target builds.
# This target has been tested with the Xilinx Spartan 6 MicroBlaze.
# Site-specific overrides of these definitions should be made in the file
# CONFIG_SITE.Common.linux-microblaze
#-------------------------------------------------------
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = microblaze
ifeq ($(BUILD_CLASS),CROSS)
VALID_BUILDS = Ioc
GNU_TARGET = microblazeel-unknown-linux-gnu
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
endif

View File

@@ -5,7 +5,8 @@
# Definitions for linux-xscale_be (big-endian) target builds.
# This target has been tested with the MOXA UC-7408-LX Plus.
# Sites may override these definitions in CONFIG_SITE.Common.linux-xscale_be
# Site-specific overrides of these definitions should be made in the file
# CONFIG_SITE.Common.linux-xscale_be
#-------------------------------------------------------
# Include definitions common to all Linux targets
@@ -13,11 +14,6 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = xscale
#
# The vendor's tool chain needs to be located here
#
GNU_DIR=/usr/local/xscale_be
ifeq ($(BUILD_CLASS),CROSS)
VALID_BUILDS = Ioc
GNU_TARGET = xscale_be

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

@@ -55,11 +55,12 @@ STATIC_CXXFLAGS_NO= $(VISC_DLL) -D_DLL
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_PREFIX=
SHRLIB_SUFFIX=.dll
SHRLIB_PREFIX =
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIB_PREFIX=
LOADABLE_SHRLIB_SUFFIX=.dll
LOADABLE_SHRLIB_PREFIX =
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(LOADABLE_SHRLIB_SUFFIX))
#

View File

@@ -49,11 +49,12 @@ STATIC_CXXFLAGS_NO= $(VISC_DLL) -D_DLL
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_PREFIX=
SHRLIB_SUFFIX=.dll
SHRLIB_PREFIX =
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIB_PREFIX=
LOADABLE_SHRLIB_SUFFIX=.dll
LOADABLE_SHRLIB_PREFIX =
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(LOADABLE_SHRLIB_SUFFIX))
#

View File

@@ -36,11 +36,6 @@ ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
#
OP_SYS_CFLAGS += -fno-common
#
# Don't try to use precompiled headers when converting sequencer files
#
CPPSNCFLAGS += -no-cpp-precomp
#
# Darwin os definition
#
@@ -52,20 +47,6 @@ OP_SYS_CPPFLAGS += -Ddarwin
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
#
# The following two definitions enable the use of DarwinPorts packages.
#
OP_SYS_INCLUDES += -I/opt/local/include
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /opt/local/lib/*))))
#
# The following two definitions enable the use of Fink packages.
#
OP_SYS_INCLUDES += -I/sw/include
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /sw/lib/*))))
#
# Libraries for command-line editing.
#
@@ -86,10 +67,11 @@ CCC = $(GNU_BIN)/c++
#
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \
-install_name $(shell perl $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \
-install_name $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \
-compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \
-current_version $(SHRLIB_VERSION)
SHRLIB_SUFFIX = .$(SHRLIB_VERSION).dylib
SHRLIB_SUFFIX_BASE = .dylib
SHRLIB_SUFFIX = .$(SHRLIB_VERSION)$(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_LDFLAGS = -bundle -flat_namespace -undefined suppress

View File

@@ -0,0 +1,10 @@
# CONFIG.linux-arm.Common
#
# $Revision-Id$
#
# Definitions for linux-arm host builds
# Sites may override these definitions in CONFIG_SITE.linux-arm.Common
#-------------------------------------------------------
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common

View File

@@ -0,0 +1,10 @@
# CONFIG.linux-arm.linux-arm
#
# $Revision-Id$
#
# Definitions for native linux-arm builds
# Sites may override these definitions in CONFIG_SITE.linux-arm.linux-arm
#-------------------------------------------------------
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon

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
NOP = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO

View File

@@ -176,7 +176,8 @@ LINK.shrlib+= $(DLL_DEF_FLAG),$(LIBRARY_LD_RESS)
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_SUFFIX=.dll
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))

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
NOP = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO

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
NOP = $(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
@@ -210,7 +212,8 @@ MUNCH_CMD = $(CCC) /Fo $@ $^
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_SUFFIX=.dll
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))

View File

@@ -5,21 +5,22 @@
# Where to find RTEMS
#
RTEMS_VERSION=4.9.2
RTEMS_BASE=/usr/local/rtems/rtems-$(RTEMS_VERSION)
RTEMS_VERSION = 4.10.2
RTEMS_BASE = /usr/local/rtems/rtems-$(RTEMS_VERSION)
# Cross-compile toolchain in $(RTEMS_TOOLS)/bin
#
RTEMS_TOOLS=$(RTEMS_BASE)
RTEMS_TOOLS = $(RTEMS_BASE)
# If you're using neither BOOTP/DHCP nor FLASH to pick up your IOC
# network configuration you must uncomment and specify your Internet
# network configuration you must uncomment and specify your Internet
# Domain Name here
#
#OP_SYS_CFLAGS += -DRTEMS_NETWORK_CONFIG_DNS_DOMAINNAME=<domainname>
#
# Specify your desired command-line-input library
# Select the command-line-input library to use
#
COMMANDLINE_LIBRARY = EPICS
#COMMANDLINE_LIBRARY = LIBTECLA
#COMMANDLINE_LIBRARY = READLINE

View File

@@ -7,4 +7,7 @@
# If readline is installed uncomment the following line
# to add command-line editing and history support
COMMANDLINE_LIBRARY = READLINE
#COMMANDLINE_LIBRARY = READLINE
# Uncomment the following line if readline has problems
#LDLIBS_READLINE= -lreadline -lcurses

View File

@@ -7,9 +7,31 @@
#-------------------------------------------------------
# Select which CPU architecture(s) to include in your MacOS binaries:
# i386
# x86_64 - Needs MacOS 10.4 with the Universal SDK, or 10.5 and later
# i386, x86_64, or both (fat binaries).
ARCH_CLASS = i386
#ARCH_CLASS = x86_64
#ARCH_CLASS = i386
ARCH_CLASS = x86_64
#ARCH_CLASS = i386 x86_64
#
# Comment out the following 3 lines to build with Apple's GCC instead of CLANG.
#
CC = clang
CCC = clang++
GNU = NO
# To use MacPorts GCC, comment out ALL the settings above this line,
# then uncomment (and modify if necessary) the following instead:
#GNU_DIR = /opt/local
#CC = $(GNU_BIN)/gcc -m64
#CCC = $(GNU_BIN)/g++ -m64
# If you see this or similar errors while building in the src/cap5 directory
# gcc: error: unrecognized option '-no-cpp-precomp'
# the problem is due to the ccflags configuration that your version of Perl
# was built with. You can replace the Cap5_CFLAGS setting in the Makefile
# with a hand-edited set of flags for building that Perl library, or ignore
# this problem if you don't need to use Channel Access from Perl.

View File

@@ -0,0 +1,26 @@
# CONFIG_SITE.Common.ios-arm
#
# $Revision-Id$
#
# Site-specific settings for ios-arm target builds
#-------------------------------------------------------
# Which ARM instruction set(s) to generate code for:
# Most iOS devices can run programs compiled for older
# instruction sets, although the newer instructions are
# more efficient.
#
# Apple's compilers can build for multiple architectures,
# generating a Universal binary. This is larger and takes
# longer to compile, but runs efficiently on all devices.
#
# Xcode 4.5 dropped support for the ARMv6.
#
# ARMv7s devices: iPhone 5
# ARMv6 devices: iPhone 1 and 3G, iPod Touch Gen 1 and 2
# All other devices are ARMv7
ARCH_CLASS = armv7 armv7s
#ARCH_CLASS = armv7
#ARCH_CLASS = armv6 armv7
#ARCH_CLASS = armv6

View File

@@ -1,7 +1,6 @@
# CONFIG_SITE.Common.iosCommon
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Site-specific settings for Apple iOS builds
#-------------------------------------------------------
@@ -9,16 +8,32 @@
# iOS Version number
#IOS_VERSION = 3.2
IOS_VERSION = 4.1
#IOS_VERSION = 4.1
#IOS_VERSION = 4.2
#IOS_VERSION = 4.3
#IOS_VERSION = 5.0
#IOS_VERSION = 5.1
IOS_VERSION = 6.0
# Most sites will want shared libraries
# Which compiler to use:
# CLANG is preferred for recent versions of Xcode
# LLVM_GNU uses the llvm-gcc and llvm-g++ compilers
# GNU is needed for older versions of Xcode
STATIC_BUILD=NO
SHARED_LIBRARIES=YES
COMPILER = CLANG
#COMPILER = LLVM_GNU
#COMPILER = GNU
# Platform path, this is probably correct
# Most sites will want to build shared libraries (which is the
# default), but if you get an error from ld while building libCom,
# try uncommenting this, which is needed for some compiler versions:
#SHARED_LIBRARIES = NO
# Get platform path from OS, these are usually correct:
XCODE_PATH := $(shell xcode-select -print-path)
PLATFORM_DIR = $(XCODE_PATH)/Platforms/$(IOS_PLATFORM).platform

View File

@@ -0,0 +1,14 @@
# CONFIG_SITE.Common.linux-microblaze
#
# Site specific definitions for linux-microblaze target builds.
#-------------------------------------------------------
# The gnu tools for cross compiling for MicroBlaze (little endian)
# on Linux can be downloaded from the Xilinx git server:
# git clone git://git.xilinx.com/xldk/microblaze_v2.0_le.git
#
# The result contains a .tgz file with the tool-chain in it.
# Set GNU_DIR to point to the un-tarred tool-chain:
GNU_DIR = /usr/local/vw/microblaze-2.0/microblazeel-unknown-linux-gnu

View File

@@ -33,4 +33,8 @@ COMMANDLINE_LIBRARY = READLINE
#COMMANDLINE_LIBRARY = READLINE_CURSES
OP_SYS_CFLAGS += -g
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g

View File

@@ -33,4 +33,8 @@ COMMANDLINE_LIBRARY = READLINE
#COMMANDLINE_LIBRARY = READLINE_CURSES
OP_SYS_CFLAGS += -g
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g

View File

@@ -0,0 +1,9 @@
# CONFIG_SITE.Common.linux-xscale_be
#
# Site specific definitions for linux-xscale_be target builds.
#-------------------------------------------------------
# Set GNU_DIR to point to directory containing the tool-chain
GNU_DIR = /usr/local/xscale_be

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

@@ -6,5 +6,5 @@
# Site override definitions for cygwin-x86 host builds
#-------------------------------------------------------
CROSS_COMPILER_TARGET_ARCHS =
#CROSS_COMPILER_TARGET_ARCHS =

View File

@@ -0,0 +1,20 @@
# CONFIG_SITE.darwinCommon.darwinCommon
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Site specific definitions for darwin builds
#-------------------------------------------------------
# Uncomment the following two definitions to enable the use of DarwinPorts packages.
#
#OP_SYS_INCLUDES += -I/opt/local/include
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /opt/local/lib/*))))
# Uncomment the following two definitions to enable the use of Fink packages.
#
#OP_SYS_INCLUDES += -I/sw/include
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /sw/lib/*))))

View File

@@ -0,0 +1,7 @@
# CONFIG_SITE.linux-arm.linux-arm
#
# $Revision-Id$
#
# Site specific definitions for native linux-arm builds
#-------------------------------------------------------

View File

@@ -5,8 +5,10 @@
# Site specific definitions for linux-x86 host - linux-arm target builds
#-------------------------------------------------------
# Diamond:
# Tools install path
#GNU_DIR = /home/targetOS/linux-arm/host/x86-linux/gcc_3.3.3
# anj@aps:
#GNU_DIR = /local/anj/cross-arm/gcc-3.4.5-glibc-2.3.6/arm-linux
GNU_DIR = /net/phoebus/vw/zynq-2011.09
# GNU crosscompiler target name
GNU_TARGET = arm-xilinx-linux-gnueabi

View File

@@ -19,7 +19,7 @@ builds with release R3.14. It describes procedures such that:</p>
<li>The application uses the configure rules which are new to R3.14.</li>
<li>The OSI (Operating System Independent) features of R3.14 are available,
i.e. iocCore products can be build for vxWorks as well as other
platforms, e.g. solaris and linux.</li>
platforms, e.g. Solaris and Linux.</li>
</ul>
<h3>Gnumake clean uninstall</h3>
@@ -47,10 +47,14 @@ find *App iocBoot -print | cpio -pvmd <i>/path/to/new/top</i></pre>
<h3>Modify <i>top</i>/configure/RELEASE</h3>
<p>Copy definitions of external modules excluding EPICS_BASE and
TEMPLATES_TOP from old application RELEASE file. <br>
If sequence programs (*.st or *.stt files) exist in your application, add the
SNCSEQ location definition for the R3.14 sncseq external module</p>
<p>Copy definitions of external modules excluding <tt>EPICS_BASE</tt> and
<tt>TEMPLATE_TOP</tt> from your old application config/RELEASE file. In many
cases the modules you actually use under R3.14 will be different to the R3.13
modules, but the old module names here give you a starting-point for what there
replacements will be.</p>
<p>If any sequence programs (*.st or *.stt files) exist in your application, add
the SNCSEQ location definition for the R3.14 sncseq external module.</p>
<blockquote>
<pre>SNCSEQ = <i>/path/to/sncseq</i></pre>
@@ -107,7 +111,7 @@ still to convert):</p>
</blockquote>
<p>This new Makefile has comments explaining how to build the various host
and ioc products. Lets consider some examples</p>
and IOC products. Lets consider some examples</p>
<ul>
<li>Host programs
<p>Makefile.Host contains definitions like:</p>
@@ -149,7 +153,7 @@ DBDNAME = exampleApp.dbd</pre>
<p>NOTES: Change exampleApp.dbd to example.dbd in all st.cmd files. Also
this definition assumes that file exampleInclude.dbd exists.</p>
</li>
<li>Create the ioc application:
<li>Create the IOC application:
<p>Makefile.Vx contains statements like:</p>
<blockquote>
<pre>SRCS.c += ../xxxRecord.c
@@ -198,21 +202,22 @@ baseLIBOBJS, Makefile.Host, and Makefile.Vx</p>
</blockquote>
<p>to your <i>appname</i>Include.dbd file and remove the file
<i>name</i>App/src/base.dbd from your src directory. The base.dbd from base/dbd
will be used instead. If you only want to load a subset of the record
definitions from base you can keep your own copy of base.dbd, but you should
copy the one from your R3.14 base and edit that rather than trying to re-use the
R3.13 version from your old application.</p>
<i>name</i>App/src/base.dbd from your src directory. The base.dbd file from
$(EPICS_BASE)/dbd will be used instead. If you only want to load a subset of the
record definitions from base you can keep a local edited copy of the base.dbd
file but you should copy it from $(EPICS_BASE)/dbd and edit that rather than
trying to re-use the R3.13 version from your old application area.</p>
<h3>Record support</h3>
<p>Add the following line after all existing #includes</p>
<p>Add the following header file inclusion after all other <tt>#include</tt>
statements:</p>
<blockquote>
<pre>#include "epicsExport.h"</pre>
</blockquote>
<p>The structure rset is now a typedef so change</p>
<p>The <tt>struct rset</tt> is now available as a typedef so change</p>
<blockquote>
<pre>struct rset <i>recordname</i>RSET = { ... };</pre>
@@ -224,65 +229,68 @@ R3.13 version from your old application.</p>
<pre>rset <i>recordname</i>RSET = { ... };</pre>
</blockquote>
<p>and add the following line after the <q>rset <i>recordname</i>RSET = { ...
};</q> definition.</p>
<p>and add the following line immediately after that definition:</p>
<blockquote>
<pre>epicsExportAddress(rset,<i>recordname</i>RSET);</pre>
<pre>epicsExportAddress(rset, <i>recordname</i>RSET);</pre>
</blockquote>
<h3>Device support</h3>
<p>Add the following line after all existing #includes</p>
<p>Add the following header file inclusion after all other <tt>#include</tt>
statements:</p>
<blockquote>
<pre>#include "epicsExport.h"</pre>
</blockquote>
<p>and add the following line after the dset definition <q>struct { ... }
dev<i>name</i> = { ... };</q></p>
<p>and add the following line after every dset definition <tt>struct { ... }
dev<i>name</i> = { ... };</tt> in the file.</p>
<blockquote>
<pre>epicsExportAddress(dset,dev<i>name</i>);</pre>
<pre>epicsExportAddress(dset, dev<i>name</i>);</pre>
</blockquote>
<h3>Driver support</h3>
<p>Add the following line after all existing #includes</p>
<p>Add the following header file inclusion after all other <tt>#include</tt>
statements:</p>
<blockquote>
<pre>#include "epicsExport.h"</pre>
</blockquote>
<p>and add the following line after the drvet drv<i>name</i> definition</p>
<p>and add the following line after the <tt>drvet drv<i>name</i></tt>
definition:</p>
<blockquote>
<pre>epicsExportAddress(drvet,drv<i>name</i>);</pre>
<pre>epicsExportAddress(drvet, drv<i>name</i>);</pre>
</blockquote>
<h3>Registration code changed</h3>
<p>Registration code for application specific functions, e.g. subroutine record
init and process functions, must be 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:
<li>Add the following header file inclusions after all other <tt>#include</tt>
statements:
<blockquote>
<pre>#include "registryFunction.h"
#include "epicsExport.h"</pre>
</blockquote></li>
<li>Make the application specific functions static functions, e.g.
<li>Mark the application specific functions as <tt>static</tt>, e.g.
<blockquote>
<pre>static long mySubInit(subRecord *precord)
static long mySubProcess(subRecord *precord)</pre>
</blockquote></li>
<li>Add an epicsExportFunction statement for each of the functions to be
registered, e.g.
<li>Add an <tt>epicsRegisterFunction</tt> statement for each of the functions
to be registered, e.g.
<blockquote>
<pre>epicsExportFunction(mySubInit);
epicsExportFunction(mySubProcess);</pre>
<pre>epicsRegisterFunction(mySubInit);
epicsRegisterFunction(mySubProcess);</pre>
</blockquote></li>
<li>Add a function statement for each of the functions to be registered in a
@@ -293,6 +301,21 @@ function("mySubProcess")</pre>
</blockquote></li>
</ol>
<h3>Additional Headers</h3>
<p>It may be necessary to add one or more of the following header file
inclusions to any C source file if you get warnings or errors from the
compilation process. The most likely file missing is errlog.h.</p>
<ul>
<li><tt>#include &lt;stdarg.h&gt;</tt></li>
<li><tt>#include "errlog.h"</tt></li>
<li><tt>#include "errMdef.h"</tt></li>
<li><tt>#include "ellLib.h"</tt></li>
<li><tt>#include "epicsTypes.h"</tt></li>
</ul>
<h3>Modify the Makefiles in <i>top</i>/iocBoot directory.</h3>
<p>Change <q><tt>include $(TOP)/config/CONFIG_APP</tt></q> to <q><tt>include
@@ -351,14 +374,13 @@ $(TOP)/configure/RULES.ioc</tt></q></p>
ld &lt; iocCore</pre>
</blockquote>
<p>Change <q><tt>ld &lt; <i>name</i>Lib</tt></q> to
<p>The <tt>ld</tt> command in vxWorks 5.5.2 doesn't clean up its standard input
stream properly, so we now recommend passing the filename to it as an argument
instead. Change <q><tt>ld &lt; <i>name</i>Lib</tt></q> to
<blockquote>
<pre>ld 0,0, "<i>name</i>.munch"</pre>
<p>(The <tt>ld</tt> command in vxWorks 5.5.2 doesn't clean up its standard
input properly, so we now recommend passing the filename to it directly
instead.)</p> </blockquote>
</blockquote>
<p>Change <q><tt>cd appbin</tt></q> to <q><tt>cd topbin</tt></q></p>
@@ -381,58 +403,42 @@ to
<p>If any source file makes calls to recGbl routines make sure it includes
<tt>recGbl.h</tt>. If it doesn't the compiler will issue warning messages and
the ioc may issue the message: <q>undefined symbol: _recGblSetSevr</q>.</p>
the IOC may not compile properly, or on vxWorks you could see the load-time
error: <q>undefined symbol: _recGblSetSevr</q>.</p>
<h3>Record support changes</h3>
<p>The steppermotor, scan, and pid records are no longer in base. If these
records are not used in your application, comment out references to them in
base.dbd. If these record types are used at your site, they should be
downloaded and built with base R3.14 by your EPICS administrator. To update
the R3.14 location of these record types in your application you must add
appropriate module definitions to your application's config/RELEASE file and
add <tt>LIBOBJS</tt> definitions to the src Makefile.</p>
<p>The steppermotor, scan, and pid records are no longer in base. If these
record types are used at your site, their unbundled modules should be downloaded
from the EPICS website and built with base R3.14 by your EPICS administrator. To
use these record types in your application you must add them to the application
just like any other external support module. Most modules provide instructions
on how to use them in an IOC application.</p>
<p>For example add</p>
<blockquote>
<pre>PID = <i>/path/to/modules</i>/pid</pre>
</blockquote>
<p>to config/RELEASE and add</p>
<blockquote>
<pre>LIBOBJS += $(PID_BIN)/pidRecord.o</pre>
</blockquote>
<p>to your application src/Makefile.</p>
<p>You should consider changing any existing old steppermotor records to the
new EPICS motor record module supported by Beamline Controls and Data
Acquisition at APS.</p>
<p>Consider changing any existing old steppermotor records to the EPICS motor
record module supported by the Beamline Controls and Data Acquisition group at
APS.</p>
<h3>RecDynLink.o and devPtSoft changes</h3>
<p>recDynLink.o and devPtSoft.o are no longer in EPICS base and now exist as
separate EPICS modules.You must now add the appropriate module full path
definitions to your application config/RELEASE file, and change
<tt>LIBOBJS</tt> location definition <tt>$(EPICS_BASE_BIN)</tt> to the module
definition bin directory in your application src directory files. See
<q>Hardware support changes</q> below for instructions.</p>
separate unbundled EPICS modules. As with the three record types described
above these must now be built separately and added as support modules to any
applications that need them.</p>
<h3>Hardware support changes</h3>
<p>All hardware support (dev, drv and dbd files) except soft support has been
unbundled from base R3.14. This support includes the files symb.dbd,
drvHp1404a.o, drvEpvxiMsg.o, and drvEpvxi.o. If these are not used by your
application, comment out references to them in base.dbd.</p>
application, remove any references to them from your dbd files.</p>
<p>Hardware support now exists as separate EPICS modules. The hardware
support for your site should be downloaded and built with base R3.14 by your
EPICS administrator. You must now add the appropriate module full path
definitions to your application config/RELEASE file, and change
<tt>LIBOBJS</tt> location from <tt>$(EPICS_BASE_BIN) </tt>to the module bin
directory in your application src directory files.</p>
<p>Hardware support now exists as separate EPICS modules. The hardware support
modules used at your site should be downloaded and built with base R3.14 by your
EPICS administrator. To use them, add the appropriate module full path
definitions to your application configure/RELEASE file, and make the documented
changes to your Makefile to link their binaries into the your IOC
executable.</p>
<p>For example, remove</p>
@@ -440,7 +446,7 @@ directory in your application src directory files.</p>
<pre>LIBOBJS += $(EPICS_BASE_BIN)/symb</pre>
</blockquote>
<p>from baseLIBOBJS and add</p>
<p>from <tt>baseLIBOBJS</tt> and add</p>
<blockquote>
<pre>LIBOBJS += $(SYMB_BIN)/symb</pre>
@@ -452,25 +458,25 @@ directory in your application src directory files.</p>
<pre>SYMB = &lt;full path definition for the built module SYMB&gt;</pre>
</blockquote>
<p>into your application config/RELEASE file.</p>
<p>into your application configure/RELEASE file.</p>
<h3>dbLoadtemplate tool changes</h3>
<p>The host tool dbLoadTemplate has been replace by a new EPICS extension,
<p>The host tool dbLoadTemplate has been replace by a new EPICS extension called
msi, which should be downloaded and built with base R3.14 by your EPICS
administrator. dbLoadTemplate is still supported on iocs. If, in your
application, db files are created from template and substitution files you
should add the definition</p>
administrator. dbLoadTemplate is still supported on IOCs. If the msi executable
is not in your default search path and in your application db files are created
from template and substitution files, you should add the definition</p>
<blockquote>
<pre>MSI = &lt;full path name to msi executable&gt;</pre>
</blockquote>
<p>to your application config/RELEASE file.</p>
</body>
<p>to your application's configure/RELEASE file.</p>
<h3>Optional <i>top</i>/configure/CONFIG_SITE changes.</h3>
<h3>Optional <i>top</i>/configure/CONFIG_SITE changes</h3>
<p>Review and optionally modify site build settings.</p>
</body>
</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,15 +3,469 @@
<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.3 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.3</h1>
<h2 align="center">Changes between 3.14.12.2 and 3.14.12.3</h2>
<!-- Insert new items immediately below here ... -->
<h4>Hex literals in CALC expressions</h4>
<p>In previous releases, CALC expressions could contain hexadecimal literal
integers on a target if the OS implementation of strtod() allows them (the
vxWorks implementation does not). Now hex literal integers can be used in CALC
expressions on all architectures. Hexadecimal floating point literals may have
worked on some architectures in the past, but will no longer be accepted.</p>
<h4>CAS: Added propertyEventMask support</h4>
<p>Server tools should now be able to detect subscriptions to and send updates
for DBE_PROPERTY events, using a casEventMask value returned by the new
caServer::propertyEventMask() method.</p>
<h4>caRepeater now built by default</h4>
<p>Previously caRepeater was only built for host architectures, so builds for
cross-compiled but workstation-type targets like linux-arm did not build it.
Explicit exceptions prevent it being built on architectures like vxWorks, RTEMS
and iOS which do not support normal executable programs.</p>
<h4>Array Subroutine (aSub) record type fixes</h4>
<ul>
<li>Changing the number of valid elements in a VALx field now triggers
monitors</li>
<li>The NEVx fields now post monitors, following the EFLG setting</li>
<li>The artificial limit of 10,000,000 array elements has been removed</li>
</ul>
<h4>Problem with NAN values in MLST/ALST fields</h4>
<p>The ai, ao, calc, calcout, dfanout, sel and sub record types could stop
posting monitors if they got NAN values in their MLST or ALST fields. A change
has been included so this should no longer be the case.</p>
<h4>MacOS build defaults changed</h4>
<p>The default build settings for darwin-x86 targets have been changed to match
the latest version of XCode; see configure/os/CONFIG_SITE.Common.darwin-x86
if you need to revert back to building with GCC or to include the i386 CPU
architecture.</p>
<h4>Build problem with db dependencies</h4>
<p>The dependency output for .db and .acf files created by makeDbDepends.pl did
not show the directories of the depended files. The makeDbDepends.pl script has
been replaced by mkmf.pl for this purpose after modifying it to accept multiple
-I include directory options and more than one source file on the command line.
The makeDbDepends.pl script has been removed from Base.</p>
<h4>Native linux-arm builds added</h4>
<p>The configuration files needed for a linux-arm system to build Base for
itself have now been added. Both the Shell and Perl versions of the startup
EpicsHostArch scripts now recognize both arm6l and arm7l CPUs and return the
generic linux-arm host architecture name for them.</p>
<h4>New Microblaze Target Architecture</h4>
<p>A new cross-compiled target architecture is included for the Xilinx
Microblaze FPGA soft-core CPU architecture running Linux.</p>
<h4>Win32 Numeric string to enum/menu/device conversions</h4>
<p>Microsoft's C run-time library has a bug in the sscanf() function such that
the "%n" format specifier does not always work. The string to enum, menu and
device conversion functions have been modified to avoid this problem, but a
numeric string will no longer be converted properly on any architecture if it
has trailing whitespace characters.</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>1090009
<a href="https://bugs.launchpad.net/bugs/1090009">
osdSufficentSpaceInPoolQuery fails on vxWorks 2 GB system</a></li>
<li>999167
<a href="https://launchpad.net/bugs/999167">
Missing epicsShareFunc for casStatsFetch</a></li>
<li>950555
<a href="https://launchpad.net/bugs/950555">
String substitution removes part of path when linking versioned shared
libraries</a></li>
<li>907761
<a href="https://launchpad.net/bugs/907761">
reading only 1st char of link in "long string" ($) syntax fails in read
error</a></li>
<li>903448
<a href="https://launchpad.net/bugs/903448">
RHEL5 nss ldap update cause stack size related failure</a>
<p>
This bug fix changed the stack sizes for both Posix and Windows targets as
follows:</p>
<table>
<tr><th>epicsThreadStackSizeClass</th><th>New Stack Size</th></tr>
<tr><td>epicsThreadStackSmall</td>
<td>0x10000 &times; sizeof (void *)</td></tr>
<tr><td>epicsThreadStackMedium</td>
<td>0x20000 &times; sizeof (void *)</td></tr>
<tr><td>epicsThreadStackBig</td>
<td>0x40000 &times; sizeof (void *)</td></tr>
</table></li>
</ul>
<h4>Calcout and Seq record timestamps</h4>
<p>Both the calcout and seq record types were not updating the record's
timestamp before calling db_post_events() for some field updates. The calcout
record type will now update the record's timestamp before it posts a channel
access monitor on the DLYA field; this happens twice during record processing if
the ODLY field is larger than 0.</p>
<p>Timestamps from all seq record monitor events have been wrong since 1995 or
earlier, the time being provided was from the last time the record processed.
Now the record timestamp will be updated between reading each DOL1..DOLA link
and posting the monitor on the associated DO1..DOA field. The VAL field is
never given a value by the record processing code, but is used for posting
monitors when the alarm status or severity gets updated at the end of record
processing. Alarm monitors are now timestamped properly at that time.</p>
<h4>Comments in iocsh scripts</h4>
<p>The IOC shell was very particular about comments in previous versions of
Base. If the <tt>#</tt> character was indented using white-space characters it
had to be followed immediately by a white-space, comma or parenthesis character,
and macLib would report errors if the rest of the comment contained any
undefined macros. These restrictions have now been removed. The comment
character can come from expanding a macro without it having to be followed by
white-space, although in this case macLib will still report errors due to
undefined or circular macro definitions.</p>
<h4>MacOS-X: Don't use Ports/Fink unless configured</h4>
<p>Previous releases would automatically use headers and link to libraries found
in the DarwinPorts and Fink installation directories. This is now controlled by
entries in the <tt>CONFIG_SITE.darwinCommon.darwinCommon</tt> file in the
<tt>configure/os</tt> directory, which are commented out by default. Recent
versions of MacOS-X come with an implementation of readline, so those additional
code repositories are no longer required.</p>
<h2 align="center">Changes between 3.14.12.1 and 3.14.12.2</h2>
<h4>Path for Cap5 loadable library changed</h4>
<p>The perl CA module makes use of a loadable library, which used to be loaded
from the base/lib/&lt;host-arch&gt; directory. However different versions of
Perl require different loadable library binaries as the Perl ABI can change.
Now the library will be installed into and loaded from the directory
base/lib/perl/&lt;version&gt;/&lt;archname&gt; where both &lt;version&gt; and
&lt;archname&gt; are taken from the Perl configuration. This makes it possible
for the same Perl script to be run on both RHEL5 and RHEL6 workstations say, even
though they use different versions of Perl.</p>
<p>To achieve that, first build EPICS Base using the older OS version. Then
on a machine running the newer version, go into the base/src/cap5 directory and
run a <tt>make rebuild</tt> command. This will rebuild the libCap5.so file and
install it into the location appropriate for its Perl version and architecture.</p>
<h4>Build configurations updated for Apple iOS targets</h4>
<p>The build process can now construct universal binaries containing both ARMv6
and ARMv7 code, and several defaults have been changed when building for iOS
targets:</p>
<ul>
<li>The default value for IOS_VERSION is now 5.0, edit the setting in
<tt>configure/os/CONFIG_SITE.Common.iosCommon</tt> to use an older version.</li>
<li>With the introduction of iOS 5.0 we have switched the C++ compiler for
ios-arm from GNU g++ to using the LLVM-based clang++ (the GNU compilers are
apparetnly no longer included with the SDK). This can be switched back by
editing the new <tt>CONFIG_SITE.Common.ios-arm</tt> file.</li>
<li>Like the Darwin builds, universal binaries can now be compiled for the
ios-arm target, containing either or both ARMv6 and ARMv7 instructions. This is
configured by setting ARCH_CLASS in the new <tt>CONFIG_SITE.Common.ios-arm</tt>
file. The default is now to build for ARMv7 only, which is not compatible with
the original iPhone 1 or 3G, or with the iPod Touch Generations 1 or 2.</li>
</ul>
<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>

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

@@ -173,7 +173,7 @@ initialize_local_filesystem(char **argv)
#if __RTEMS_MAJOR__>4 || \
(__RTEMS_MAJOR__==4 && __RTEMS_MINOR__>9) || \
(__RTEMS_MAJOR__==4 && __RTEMS_MINOR__==9 && __RTEMS_REVISION__==99)
static int
int
nfsMount(char *uidhost, char *path, char *mntpoint)
{
int devl = strlen(uidhost) + strlen(path) + 2;
@@ -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,11 +1,9 @@
/* share/src/as/asDbLib.c */
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2012 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.
\*************************************************************************/
/* Author: Marty Kraimer Date: 02-11-94*/
@@ -69,18 +67,23 @@ static long asDbAddRecords(void)
int epicsShareAPI asSetFilename(const char *acf)
{
if(pacf) free ((void *)pacf);
if(acf) {
pacf = calloc(1,strlen(acf)+1);
if(!pacf) {
errMessage(0,"asSetFilename calloc failure");
} else {
strcpy(pacf,acf);
}
if (pacf)
free (pacf);
if (acf) {
pacf = calloc(1, strlen(acf)+1);
if (!pacf) {
errMessage(0, "asSetFilename calloc failure");
} else {
strcpy(pacf, acf);
if (*pacf != '/' && !strchr(pacf, ':')) {
printf("asSetFilename: Warning - relative paths won't usually "
"work\n");
}
}
} else {
pacf = NULL;
pacf = NULL;
}
return(0);
return 0;
}
int epicsShareAPI asSetSubstitutions(const char *substitutions)

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

@@ -246,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>
@@ -455,7 +455,7 @@ 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
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>
@@ -466,9 +466,9 @@ using iptables this can be accomplished by rules like</p>
</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>
able to be seen by clients, you need to permit inbound TCP or UDP packets with
destination 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
@@ -4359,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

@@ -91,14 +91,19 @@ PROD_LIBS = ca Com
# needed when its an object library build
PROD_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
PROD_HOST += caRepeater catime acctst caConnTest casw caEventRate
OBJS_IOC_vxWorks += catime acctst caConnTest casw caEventRate
PROD_DEFAULT += caRepeater catime acctst caConnTest casw caEventRate
PROD_vxWorks = -nil-
PROD_RTEMS = -nil-
PROD_iOS = -nil-
OBJS_vxWorks = catime acctst caConnTest casw caEventRate acctstRegister
caRepeater_SRCS = caRepeater.cpp
catime_SRCS = catimeMain.c catime.c
acctst_SRCS = acctstMain.c acctst.c
catime_SRCS = catimeMain.c catime.c
acctst_SRCS = acctstMain.c acctst.c
caEventRate_SRCS = caEventRateMain.cpp caEventRate.cpp
casw_SRCS = casw.cpp
caConnTest_SRCS = caConnTestMain.cpp caConnTest.cpp
caConnTest_SRCS = caConnTestMain.cpp caConnTest.cpp
casw_SYS_LIBS_solaris = socket

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

@@ -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

@@ -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 ),
@@ -396,15 +397,20 @@ void udpRecvThread::run ()
} while ( ! this->iiu.shutdownCmd );
}
/* for sunpro compiler */
udpiiu::M_repeaterTimerNotify::~M_repeaterTimerNotify ()
{
}
/*
* 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 +1239,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,25 @@ private:
private:
udpiiu & _udpiiu;
};
class M_repeaterTimerNotify :
public repeaterTimerNotify {
public:
M_repeaterTimerNotify ( udpiiu & iiu ) :
m_udpiiu ( iiu ) {}
~M_repeaterTimerNotify (); /* for sunpro compiler */
// 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 +164,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 +293,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 +301,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

@@ -6,9 +6,6 @@ use warnings;
my $version = '0.4';
exists $ENV{EPICS_HOST_ARCH}
or die "EPICS_HOST_ARCH environment variable not set";
package CA;
@@ -26,12 +23,17 @@ package Cap5;
our $VERSION = $version;
our @ISA = qw(DynaLoader);
# Library is specific to the Perl version and archname
use Config;
my $perl_version = $Config::Config{version};
my $perl_archname = $Config::Config{archname};
require DynaLoader;
# Add our lib/<arch> directory to the shared library search path
use File::Basename;
my $Lib = dirname(__FILE__);
push @DynaLoader::dl_library_path, "$Lib/../$ENV{EPICS_HOST_ARCH}";
push @DynaLoader::dl_library_path, "$Lib/$perl_version/$perl_archname";
bootstrap Cap5 $VERSION;

View File

@@ -22,6 +22,11 @@ ifneq ($(findstring darwin,$(T_A)),)
LOADABLE_SHRLIB_SUFFIX = .bundle
endif
PERL_VERSION = $(shell $(PERL) ../perlConfig.pl version)
PERL_ARCHNAME = $(shell $(PERL) ../perlConfig.pl archname)
PERL_ARCHPATH = $(PERL_VERSION)/$(PERL_ARCHNAME)
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),)
# Doesn't build on WIN32
LOADABLE_LIBRARY_HOST = Cap5
@@ -33,6 +38,11 @@ ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),)
PERL_SCRIPTS += camonitor.pl
PERL_MODULES += CA.pm
PERL_MODULES += $(PERL_ARCHPATH)/$(LOADABLE_SHRLIB_PREFIX)Cap5$(LOADABLE_SHRLIB_SUFFIX)
HTMLS_DIR = .
HTMLS = CA.html
endif
endif
Cap5_SRCS = Cap5.xs
@@ -40,12 +50,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
@@ -59,6 +63,10 @@ ifdef T_A
$(RM) $@
podchecker $< && pod2html --infile=$< --outfile=$@
$(INSTALL_PERL_MODULES)/$(PERL_ARCHPATH)/%: %
$(ECHO) "Installing loadable shared library $@"
@$(INSTALL_LIBRARY) -d -m $(LIB_PERMISSIONS) $< $(INSTALL_PERL_MODULES)/$(PERL_ARCHPATH)
clean::
$(RM) Cap5.c
endif

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

@@ -3,9 +3,8 @@
* 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
* in file LICENSE that is included with this distribution.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* $Revision-Id$
@@ -15,8 +14,8 @@
* 505 665 1831
*/
#include "dbMapper.h" // ait to dbr types
#include "gddAppTable.h" // EPICS application type table
#include "dbMapper.h" // ait to dbr types
#include "gddAppTable.h" // EPICS application type table
#include "fdManager.h"
#define epicsExportSharedSymbols
@@ -37,67 +36,67 @@ caServer::caServer ()
caServer::~caServer()
{
if (this->pCAS) {
delete this->pCAS;
if (this->pCAS) {
delete this->pCAS;
this->pCAS = NULL;
}
}
}
pvExistReturn caServer::pvExistTest ( const casCtx & ctx,
const caNetAddr & /* clientAddress */, const char * pPVAliasName )
const caNetAddr & /* clientAddress */, const char * pPVAliasName )
{
return this->pvExistTest ( ctx, pPVAliasName );
}
pvExistReturn caServer::pvExistTest ( const casCtx &, const char * )
{
return pverDoesNotExistHere;
return pverDoesNotExistHere;
}
pvCreateReturn caServer::createPV ( const casCtx &, const char * )
{
return S_casApp_pvNotFound;
return S_casApp_pvNotFound;
}
pvAttachReturn caServer::pvAttach ( const casCtx &ctx, const char *pAliasName )
{
// remain backwards compatible (call deprecated routine)
return this->createPV ( ctx, pAliasName );
// remain backwards compatible (call deprecated routine)
return this->createPV ( ctx, pAliasName );
}
casEventMask caServer::registerEvent (const char *pName) // X aCC 361
casEventMask caServer::registerEvent (const char *pName)
{
if (this->pCAS) {
return this->pCAS->registerEvent(pName);
}
else {
casEventMask emptyMask;
printf("caServer:: no server internals attached\n");
return emptyMask;
}
if (this->pCAS) {
return this->pCAS->registerEvent(pName);
}
else {
casEventMask emptyMask;
printf("caServer:: no server internals attached\n");
return emptyMask;
}
}
void caServer::show(unsigned level) const
{
if (this->pCAS) {
this->pCAS->show(level);
}
else {
printf("caServer:: no server internals attached\n");
}
if (this->pCAS) {
this->pCAS->show(level);
}
else {
printf("caServer:: no server internals attached\n");
}
}
void caServer::setDebugLevel (unsigned level)
{
if (pCAS) {
this->pCAS->setDebugLevel(level);
}
else {
printf("caServer:: no server internals attached\n");
}
if (pCAS) {
this->pCAS->setDebugLevel(level);
}
else {
printf("caServer:: no server internals attached\n");
}
}
unsigned caServer::getDebugLevel () const // X aCC 361
unsigned caServer::getDebugLevel () const
{
if (pCAS) {
return this->pCAS->getDebugLevel();
@@ -108,7 +107,7 @@ unsigned caServer::getDebugLevel () const // X aCC 361
}
}
casEventMask caServer::valueEventMask () const // X aCC 361
casEventMask caServer::valueEventMask () const
{
if (pCAS) {
return this->pCAS->valueEventMask();
@@ -119,7 +118,7 @@ casEventMask caServer::valueEventMask () const // X aCC 361
}
}
casEventMask caServer::logEventMask () const // X aCC 361
casEventMask caServer::logEventMask () const
{
if (pCAS) {
return this->pCAS->logEventMask();
@@ -130,7 +129,7 @@ casEventMask caServer::logEventMask () const // X aCC 361
}
}
casEventMask caServer::alarmEventMask () const // X aCC 361
casEventMask caServer::alarmEventMask () const
{
if ( pCAS ) {
return this->pCAS->alarmEventMask ();
@@ -141,12 +140,23 @@ casEventMask caServer::alarmEventMask () const // X aCC 361
}
}
casEventMask caServer::propertyEventMask () const
{
if (pCAS) {
return this->pCAS->propertyEventMask();
}
else {
printf("caServer:: no server internals attached\n");
return casEventMask();
}
}
class epicsTimer & caServer::createTimer ()
{
return fileDescriptorManager.createTimer ();
}
unsigned caServer::subscriptionEventsProcessed () const // X aCC 361
unsigned caServer::subscriptionEventsProcessed () const
{
if ( pCAS ) {
return this->pCAS->subscriptionEventsProcessed ();
@@ -156,7 +166,7 @@ unsigned caServer::subscriptionEventsProcessed () const // X aCC 361
}
}
unsigned caServer::subscriptionEventsPosted () const // X aCC 361
unsigned caServer::subscriptionEventsPosted () const
{
if ( pCAS ) {
return this->pCAS->subscriptionEventsPosted ();

View File

@@ -47,22 +47,23 @@ caServerI::caServerI ( caServer & tool ) :
nEventsPosted ( 0u ),
ioInProgressCount ( 0u )
{
assert ( & adapter != NULL );
assert ( & adapter != NULL );
// create predefined event types
this->valueEvent = registerEvent ( "value" );
this->logEvent = registerEvent ( "log" );
this->alarmEvent = registerEvent ( "alarm" );
this->logEvent = registerEvent ( "log" );
this->alarmEvent = registerEvent ( "alarm" );
this->propertyEvent = registerEvent ( "property" );
this->locateInterfaces ();
if (this->intfList.count()==0u) {
errMessage (S_cas_noInterface,
if (this->intfList.count()==0u) {
errMessage (S_cas_noInterface,
"- CA server internals init unable to continue");
throw S_cas_noInterface;
}
}
return;
return;
}
caServerI::~caServerI()
@@ -70,22 +71,22 @@ caServerI::~caServerI()
delete & this->beaconAnomalyGov;
delete & this->beaconTmr;
// delete all clients
// delete all clients
while ( casStrmClient * pClient = this->clientList.get() ) {
delete pClient;
}
delete pClient;
}
casIntfOS *pIF;
while ( ( pIF = this->intfList.get() ) ) {
delete pIF;
}
casIntfOS *pIF;
while ( ( pIF = this->intfList.get() ) ) {
delete pIF;
}
}
void caServerI::destroyClient ( casStrmClient & client )
{
{
epicsGuard < epicsMutex > locker ( this->mutex );
this->clientList.remove ( client );
this->clientList.remove ( client );
}
delete & client;
}
@@ -143,11 +144,11 @@ caStatus caServerI::attachInterface ( const caNetAddr & addrIn,
void caServerI::sendBeacon ( ca_uint32_t beaconNo )
{
epicsGuard < epicsMutex > locker ( this->mutex );
tsDLIter < casIntfOS > iter = this->intfList.firstIter ();
while ( iter.valid () ) {
iter->sendBeacon ( beaconNo );
iter++;
}
tsDLIter < casIntfOS > iter = this->intfList.firstIter ();
while ( iter.valid () ) {
iter->sendBeacon ( beaconNo );
iter++;
}
}
void caServerI::generateBeaconAnomaly ()
@@ -259,11 +260,11 @@ void caServerI::casMonitorDestroy ( casMonitor & cm )
}
//
// caServerI::dumpMsg()
// caServerI::dumpMsg()
//
// Debug aid - print the header part of a message.
// Debug aid - print the header part of a message.
//
// dp arg allowed to be null
// dp arg allowed to be null
//
//
void caServerI::dumpMsg ( const char * pHostName, const char * pUserName,

View File

@@ -44,23 +44,24 @@ caStatus convertContainerMemberToAtomic ( class gdd & dd,
aitUint32 appType, aitUint32 elemCount );
class caServerI :
public caServerIO,
public ioBlockedList,
public casEventRegistry {
public caServerIO,
public ioBlockedList,
public casEventRegistry {
public:
caServerI ( caServer &tool );
~caServerI ();
bool roomForNewChannel() const;
unsigned getDebugLevel() const { return debugLevel; }
inline void setDebugLevel ( unsigned debugLevelIn );
void show ( unsigned level ) const;
caServerI ( caServer &tool );
~caServerI ();
bool roomForNewChannel() const;
unsigned getDebugLevel() const { return debugLevel; }
inline void setDebugLevel ( unsigned debugLevelIn );
void show ( unsigned level ) const;
void destroyMonitor ( casMonitor & );
caServer * getAdapter ();
caServer * operator -> ();
void connectCB ( casIntfOS & );
casEventMask valueEventMask () const; // DBE_VALUE registerEvent("value")
casEventMask logEventMask () const; // DBE_LOG registerEvent("log")
casEventMask alarmEventMask () const; // DBE_ALARM registerEvent("alarm")
caServer * getAdapter ();
caServer * operator -> ();
void connectCB ( casIntfOS & );
casEventMask valueEventMask () const; // DBE_VALUE registerEvent("value")
casEventMask logEventMask () const; // DBE_LOG registerEvent("log")
casEventMask alarmEventMask () const; // DBE_ALARM registerEvent("alarm")
casEventMask propertyEventMask () const; // DBE_PROPERTY registerEvent("property")
unsigned subscriptionEventsProcessed () const;
void incrEventsProcessedCounter ();
unsigned subscriptionEventsPosted () const;
@@ -82,29 +83,30 @@ public:
private:
clientBufMemoryManager clientBufMemMgr;
tsFreeList < casMonitor, 1024 > casMonitorFreeList;
tsDLList < casStrmClient > clientList;
tsDLList < casStrmClient > clientList;
tsDLList < casIntfOS > intfList;
mutable epicsMutex mutex;
mutable epicsMutex diagnosticCountersMutex;
caServer & adapter;
mutable epicsMutex mutex;
mutable epicsMutex diagnosticCountersMutex;
caServer & adapter;
beaconTimer & beaconTmr;
beaconAnomalyGovernor & beaconAnomalyGov;
unsigned debugLevel;
unsigned debugLevel;
unsigned nEventsProcessed;
unsigned nEventsPosted;
unsigned ioInProgressCount;
casEventMask valueEvent; // DBE_VALUE registerEvent("value")
casEventMask logEvent; // DBE_LOG registerEvent("log")
casEventMask alarmEvent; // DBE_ALARM registerEvent("alarm")
casEventMask logEvent; // DBE_LOG registerEvent("log")
casEventMask alarmEvent; // DBE_ALARM registerEvent("alarm")
casEventMask propertyEvent; // DBE_PROPERTY registerEvent("property")
caStatus attachInterface ( const caNetAddr & addr, bool autoBeaconAddr,
bool addConfigAddr );
caStatus attachInterface ( const caNetAddr & addr, bool autoBeaconAddr,
bool addConfigAddr );
void sendBeacon ( ca_uint32_t beaconNo );
caServerI ( const caServerI & );
caServerI & operator = ( const caServerI & );
caServerI ( const caServerI & );
caServerI & operator = ( const caServerI & );
friend class beaconAnomalyGovernor;
friend class beaconTimer;
@@ -113,17 +115,17 @@ private:
inline caServer * caServerI::getAdapter()
{
return & this->adapter;
return & this->adapter;
}
inline caServer * caServerI::operator -> ()
{
return this->getAdapter();
return this->getAdapter();
}
inline void caServerI::setDebugLevel(unsigned debugLevelIn)
{
this->debugLevel = debugLevelIn;
this->debugLevel = debugLevelIn;
}
inline casEventMask caServerI::valueEventMask() const
@@ -141,6 +143,11 @@ inline casEventMask caServerI::alarmEventMask() const
return this->alarmEvent;
}
inline casEventMask caServerI::propertyEventMask() const
{
return this->propertyEvent;
}
inline bool caServerI :: ioIsPending () const
{
return ( ioInProgressCount > 0u );

File diff suppressed because it is too large Load Diff

View File

@@ -245,6 +245,7 @@ public:
epicsShareFunc casEventMask valueEventMask () const; // DBE_VALUE
epicsShareFunc casEventMask logEventMask () const; // DBE_LOG
epicsShareFunc casEventMask alarmEventMask () const; // DBE_ALARM
epicsShareFunc casEventMask propertyEventMask () const; // DBE_PROPERTY
epicsShareFunc void setDebugLevel ( unsigned level );
epicsShareFunc unsigned getDebugLevel () const;

View File

@@ -230,6 +230,18 @@ void casStreamIOWakeup::show ( unsigned level ) const
printf ( "}\n" );
}
//
// casStreamOS::armRecv ()
//
inline void casStreamOS::armRecv()
{
if ( ! this->pRdReg ) {
if ( ! this->inBufFull() ) {
this->pRdReg = new casStreamReadReg ( *this );
}
}
}
//
// casStreamIOWakeup::expire()
//
@@ -297,18 +309,6 @@ void casStreamIOWakeup::start ( casStreamOS &os )
this->pOS->printStatus ( "casStreamIOWakeup tmr start" );
}
//
// casStreamOS::armRecv ()
//
inline void casStreamOS::armRecv()
{
if ( ! this->pRdReg ) {
if ( ! this->inBufFull() ) {
this->pRdReg = new casStreamReadReg ( *this );
}
}
}
//
// casStreamOS::disarmRecv ()
//
@@ -321,7 +321,7 @@ inline void casStreamOS::disarmRecv ()
//
// casStreamOS::armSend()
//
inline void casStreamOS::armSend()
void casStreamOS::armSend()
{
if ( this->outBufBytesPending() == 0u ) {
return;

View File

@@ -25,6 +25,7 @@ catools_LIBS += ca Com
PROD_DEFAULT += caget camonitor cainfo caput
PROD_vxWorks = -nil-
PROD_RTEMS = -nil-
PROD_iOS = -nil-
PROD_LIBS += catools ca Com
catools_DIR = .

View File

@@ -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 (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"
" -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 */
@@ -493,12 +492,12 @@ int main (int argc, char *argv[])
if (charArrAsStr) {
count = len;
dbrType = DBR_CHAR;
ebuf = calloc(strlen(cbuf), sizeof(char));
ebuf = calloc(strlen(cbuf)+1, sizeof(char));
if(!ebuf) {
fprintf(stderr, "Memory allocation failed\n");
return 1;
}
epicsStrnRawFromEscaped(ebuf, strlen(cbuf), cbuf, strlen(cbuf));
epicsStrnRawFromEscaped(ebuf, strlen(cbuf)+1, cbuf, strlen(cbuf));
} else {
for (i = 0; i < count; ++i) {
epicsStrnRawFromEscaped(sbuf[i], sizeof(EpicsStr), *(argv+optind+i), sizeof(EpicsStr));

View File

@@ -445,10 +445,15 @@ char *dbr2str (const void *value, unsigned type)
\
if (charArrAsStr && dbr_type_is_CHAR(TYPE_ENUM) && (reqElems || pv->nElems > 1)) { \
dbr_char_t *s = (dbr_char_t*) dbr_value_ptr(pv->value, pv->dbrType); \
int dlen = epicsStrnEscapedFromRawSize((char*)s, strlen((char*)s)); \
char *d = calloc(dlen+1, sizeof(char)); \
size_t len = strlen((char*)s); \
unsigned long elems = reqElems && (reqElems < pv->nElems) ? reqElems : pv->nElems; \
int dlen; \
char *d; \
if (len < elems) elems = len; \
dlen = epicsStrnEscapedFromRawSize((char*)s, elems); \
d = calloc(dlen+1, sizeof(char)); \
if(d) { \
epicsStrnEscapedFromRaw(d, dlen+1, (char*)s, strlen((char*)s));\
epicsStrnEscapedFromRaw(d, dlen+1, (char*)s, elems); \
printf("%c%s", fieldSeparator, d); \
free(d); \
} else { \

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

@@ -17,6 +17,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "cantProceed.h"
#include "dbDefs.h"
@@ -152,12 +153,12 @@ void callbackRequest(CALLBACK *pcallback)
int lockKey;
if (!pcallback) {
epicsPrintf("callbackRequest called with NULL pcallback\n");
epicsInterruptContextMessage("callbackRequest: pcallback was NULL\n");
return;
}
priority = pcallback->priority;
if (priority < 0 || priority >= NUM_CALLBACK_PRIORITIES) {
epicsPrintf("callbackRequest called with invalid priority\n");
epicsInterruptContextMessage("callbackRequest: Bad priority\n");
return;
}
if (ringOverflow[priority]) return;
@@ -167,8 +168,11 @@ void callbackRequest(CALLBACK *pcallback)
epicsInterruptUnlock(lockKey);
if (!pushOK) {
errlogPrintf("callbackRequest: %s ring buffer full\n",
threadName[priority]);
char msg[48] = "callbackRequest: ";
strcat(msg, threadName[priority]);
strcat(msg, " ring buffer full\n");
epicsInterruptContextMessage(msg);
ringOverflow[priority] = TRUE;
}
epicsEventSignal(callbackSem[priority]);

View File

@@ -27,6 +27,7 @@
#include "errlog.h"
#include "cantProceed.h"
#include "cvtFast.h"
#include "epicsMath.h"
#include "epicsTime.h"
#include "alarm.h"
#include "ellLib.h"
@@ -281,48 +282,41 @@ static void get_control(DBADDR *paddr, char **ppbuffer,
}
static void get_alarm(DBADDR *paddr, char **ppbuffer,
struct rset *prset,long *options)
struct rset *prset, long *options)
{
struct dbr_alDouble ald;
int got_data=FALSE;
char *pbuffer = *ppbuffer;
struct dbr_alDouble ald = {epicsNAN, epicsNAN, epicsNAN, epicsNAN};
long no_data = TRUE;
ald.upper_alarm_limit = ald.upper_warning_limit = 0.0;
ald.lower_warning_limit = ald.lower_alarm_limit = 0.0;
if( prset && prset->get_alarm_double ) {
(*prset->get_alarm_double)(paddr,&ald);
got_data=TRUE;
}
if( (*options) & (DBR_AL_LONG) ) {
char *pbuffer=*ppbuffer;
if (prset && prset->get_alarm_double)
no_data = prset->get_alarm_double(paddr, &ald);
if(got_data) {
struct dbr_alLong *pal=(struct dbr_alLong*)pbuffer;
pal->upper_alarm_limit = (epicsInt32)ald.upper_alarm_limit;
pal->upper_warning_limit = (epicsInt32)ald.upper_warning_limit;
pal->lower_warning_limit = (epicsInt32)ald.lower_warning_limit;
pal->lower_alarm_limit = (epicsInt32)ald.lower_alarm_limit;
} else {
memset(pbuffer,'\0',dbr_alLong_size);
*options = (*options) ^ DBR_AL_LONG; /*Turn off option*/
}
*ppbuffer = ((char *)*ppbuffer) + dbr_alLong_size;
}
if( (*options) & (DBR_AL_DOUBLE) ) {
char *pbuffer=*ppbuffer;
if (*options & DBR_AL_LONG) {
struct dbr_alLong *pal = (struct dbr_alLong*) pbuffer;
if(got_data) {
struct dbr_alDouble *pal=(struct dbr_alDouble*)pbuffer;
pal->upper_alarm_limit = ald.upper_alarm_limit;
pal->upper_warning_limit = ald.upper_warning_limit;
pal->lower_warning_limit = ald.lower_warning_limit;
pal->lower_alarm_limit = ald.lower_alarm_limit;
} else {
memset(pbuffer,'\0',dbr_alDouble_size);
*options = (*options) ^ DBR_AL_DOUBLE; /*Turn off option*/
}
*ppbuffer = ((char *)*ppbuffer) + dbr_alDouble_size;
}
return;
pal->upper_alarm_limit = (epicsInt32) ald.upper_alarm_limit;
pal->upper_warning_limit = (epicsInt32) ald.upper_warning_limit;
pal->lower_warning_limit = (epicsInt32) ald.lower_warning_limit;
pal->lower_alarm_limit = (epicsInt32) ald.lower_alarm_limit;
if (no_data)
*options ^= DBR_AL_LONG; /*Turn off option*/
*ppbuffer += dbr_alLong_size;
}
if (*options & DBR_AL_DOUBLE) {
struct dbr_alDouble *pal = (struct dbr_alDouble*) pbuffer;
pal->upper_alarm_limit = ald.upper_alarm_limit;
pal->upper_warning_limit = ald.upper_warning_limit;
pal->lower_warning_limit = ald.lower_warning_limit;
pal->lower_alarm_limit = ald.lower_alarm_limit;
if (no_data)
*options ^= DBR_AL_DOUBLE; /*Turn off option*/
*ppbuffer += dbr_alDouble_size;
}
}
static void getOptions(DBADDR *paddr,char **poriginal,long *options,void *pflin)
@@ -969,7 +963,7 @@ long epicsShareAPI dbGetField(DBADDR *paddr,short dbrType,
case DBR_CHAR:
case DBR_UCHAR:
if (nRequest && *nRequest > 1) {
if (nRequest && *nRequest > 0) {
maxlen = *nRequest - 1;
break;
}
@@ -984,8 +978,8 @@ long epicsShareAPI dbGetField(DBADDR *paddr,short dbrType,
if (!status) status = dbFindField(&dbEntry, pfldDes->name);
if (!status) {
rtnString = dbGetString(&dbEntry);
strncpy(pbuf, rtnString, maxlen - 1);
pbuf[maxlen - 1] = 0;
strncpy(pbuf, rtnString, maxlen);
pbuf[maxlen] = 0;
}
dbFinishEntry(&dbEntry);
} else {
@@ -1028,7 +1022,7 @@ long epicsShareAPI dbGet(DBADDR *paddr, short dbrType,
case DBR_CHAR:
case DBR_UCHAR:
if (nRequest && *nRequest > 1) {
if (nRequest && *nRequest > 0) {
maxlen = *nRequest - 1;
break;
}
@@ -1037,8 +1031,8 @@ long epicsShareAPI dbGet(DBADDR *paddr, short dbrType,
return S_db_badDbrtype;
}
strncpy(pbuf, (char *)paddr->pfield, maxlen - 1);
pbuf[maxlen - 1] = 0;
strncpy(pbuf, (char *)paddr->pfield, maxlen);
pbuf[maxlen] = 0;
return 0;
}
@@ -1442,8 +1436,9 @@ long epicsShareAPI dbPut(DBADDR *paddr, short dbrType,
else
offset = 0;
if (no_elements < nRequest) nRequest = no_elements;
status = dbPutConvertRoutine[dbrType][field_type](paddr, pbuffer,
nRequest, no_elements, offset);
if (!status)
status = dbPutConvertRoutine[dbrType][field_type](paddr, pbuffer,
nRequest, no_elements, offset);
/* update array info */
if (!status &&

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

@@ -59,8 +59,8 @@ static epicsEventId workListEvent; /*wakeup event for dbCaTask*/
static int removesOutstanding = 0;
#define removesOutstandingWarning 10000
static enum {
ctlRun, ctlPause, ctlExit
static volatile enum {
ctlInit, ctlRun, ctlPause, ctlExit
} dbCaCtl;
static epicsEventId startStopEvent;

View File

@@ -416,6 +416,13 @@ static long getCharChar(
char *pbuffer = (char *)pto;
char *psrc=(char *)(paddr->pfield);
if (paddr->pfldDes && paddr->pfldDes->field_type == DBF_STRING) {
/* This is a DBF_STRING field being read as a long string.
* The buffer we return must be zero-terminated.
*/
pbuffer[--nRequest] = 0;
if (nRequest == 0) return(0);
}
if(nRequest==1 && offset==0) {
*pbuffer = *psrc;
return(0);
@@ -436,6 +443,13 @@ static long getCharUchar(
unsigned char *pbuffer = (unsigned char *)pto;
char *psrc=(char *)(paddr->pfield);
if (paddr->pfldDes && paddr->pfldDes->field_type == DBF_STRING) {
/* This is a DBF_STRING field being read as a long string.
* The buffer we return must be zero-terminated.
*/
pbuffer[--nRequest] = 0;
if (nRequest == 0) return(0);
}
if(nRequest==1 && offset==0) {
*pbuffer = *psrc;
return(0);
@@ -2586,7 +2600,7 @@ static long putStringEnum(
status = (*prset->get_enum_strs)(paddr,&enumStrs);
if(!status) {
nchoices = enumStrs.no_str;
nargs = sscanf(pbuffer," %u %n",&ind,&nchars);
nargs = sscanf(pbuffer,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(pbuffer) && ind<nchoices) {
*pfield = ind;
return(0);
@@ -2635,7 +2649,7 @@ static long putStringMenu(
return(0);
}
}
nargs = sscanf(pbuffer," %u %n",&ind,&nchars);
nargs = sscanf(pbuffer,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(pbuffer) && ind<nChoice) {
*pfield = ind;
return(0);
@@ -2673,7 +2687,7 @@ static long putStringDevice(
return(0);
}
}
nargs = sscanf(pbuffer," %u %n",&ind,&nchars);
nargs = sscanf(pbuffer,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(pbuffer) && ind<nChoice) {
*pfield = ind;
return(0);

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

@@ -272,7 +272,7 @@ static long cvt_st_e(
status = (*prset->get_enum_strs)(paddr,&enumStrs);
if(!status) {
nchoices = enumStrs.no_str;
nargs = sscanf(from," %u %n",&ind,&nchars);
nargs = sscanf(from,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(from) && ind<nchoices) {
*pfield = ind;
return(0);
@@ -315,7 +315,7 @@ static long cvt_st_menu(
return(0);
}
}
nargs = sscanf(from," %u %n",&ind,&nchars);
nargs = sscanf(from,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(from) && ind<nChoice) {
*to = ind;
return(0);
@@ -347,7 +347,7 @@ static long cvt_st_device(
return(0);
}
}
nargs = sscanf(from," %u %n",&ind,&nchars);
nargs = sscanf(from,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(from) && ind<nChoice) {
*to = ind;
return(0);

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

@@ -50,12 +50,12 @@
/* Task Control */
enum ctl {ctlRun, ctlPause, ctlExit};
enum ctl {ctlInit, ctlRun, ctlPause, ctlExit};
/* Task Startup/Shutdown Synchronization */
static epicsEventId startStopEvent;
volatile enum ctl scanCtl;
static volatile enum ctl scanCtl;
/* SCAN ONCE */

View File

@@ -317,7 +317,7 @@ long epicsShareAPI dbpf(const char *pname,const char *pvalue)
if (nameToAddr(pname, &addr)) return -1;
/* For enumerated types must allow for ENUM rather than string*/
/* If entire field is digits then use DBR_ENUM else DBR_STRING*/
if (addr.dbr_field_type == DBR_ENUM && !*pvalue &&
if (addr.dbr_field_type == DBR_ENUM && *pvalue &&
strspn(pvalue,"0123456789") == strlen(pvalue)) {
unsigned short value;

View File

@@ -21,6 +21,7 @@
#include <limits.h>
#include "dbDefs.h"
#include "epicsMath.h"
#include "epicsTime.h"
#include "epicsPrint.h"
#include "dbBase.h"
@@ -107,64 +108,56 @@ void epicsShareAPI recGblRecSupError(long status, const struct dbAddr *paddr,
return;
}
void epicsShareAPI recGblGetPrec(const struct dbAddr *paddr,long *precision)
void epicsShareAPI recGblGetPrec(const struct dbAddr *paddr, long *precision)
{
dbFldDes *pdbFldDes = paddr->pfldDes;
switch(pdbFldDes->field_type){
case(DBF_SHORT):
*precision = 0;
break;
case(DBF_USHORT):
*precision = 0;
break;
case(DBF_LONG):
*precision = 0;
break;
case(DBF_ULONG):
*precision = 0;
break;
case(DBF_FLOAT):
case(DBF_DOUBLE):
if(*precision<0 || *precision>15) *precision=15;
break;
switch (pdbFldDes->field_type) {
case DBF_CHAR:
case DBF_UCHAR:
case DBF_SHORT:
case DBF_USHORT:
case DBF_LONG:
case DBF_ULONG:
*precision = 0;
break;
case DBF_FLOAT:
case DBF_DOUBLE:
if (*precision < 0 || *precision > 15)
*precision = 15;
break;
default:
break;
}
return;
}
void epicsShareAPI recGblGetGraphicDouble(
const struct dbAddr *paddr,struct dbr_grDouble *pgd)
void epicsShareAPI recGblGetGraphicDouble(const struct dbAddr *paddr,
struct dbr_grDouble *pgd)
{
dbFldDes *pdbFldDes = paddr->pfldDes;
getMaxRangeValues(pdbFldDes->field_type,&pgd->upper_disp_limit,
&pgd->lower_disp_limit);
return;
getMaxRangeValues(pdbFldDes->field_type,
&pgd->upper_disp_limit, &pgd->lower_disp_limit);
}
void epicsShareAPI recGblGetAlarmDouble(
const struct dbAddr *paddr,struct dbr_alDouble *pad)
void epicsShareAPI recGblGetAlarmDouble(const struct dbAddr *paddr,
struct dbr_alDouble *pad)
{
pad->upper_alarm_limit = 0;
pad->upper_warning_limit = 0;
pad->lower_warning_limit = 0;
pad->lower_alarm_limit = 0;
return;
pad->upper_alarm_limit = epicsNAN;
pad->upper_warning_limit = epicsNAN;
pad->lower_warning_limit = epicsNAN;
pad->lower_alarm_limit = epicsNAN;
}
void epicsShareAPI recGblGetControlDouble(
const struct dbAddr *paddr,struct dbr_ctrlDouble *pcd)
void epicsShareAPI recGblGetControlDouble(const struct dbAddr *paddr,
struct dbr_ctrlDouble *pcd)
{
dbFldDes *pdbFldDes=paddr->pfldDes;
dbFldDes *pdbFldDes = paddr->pfldDes;
getMaxRangeValues(pdbFldDes->field_type,&pcd->upper_ctrl_limit,
&pcd->lower_ctrl_limit);
return;
getMaxRangeValues(pdbFldDes->field_type,
&pcd->upper_ctrl_limit, &pcd->lower_ctrl_limit);
}
int epicsShareAPI recGblInitConstantLink(
@@ -319,40 +312,39 @@ static void getMaxRangeValues(short field_type, double *pupper_limit,
double *plower_limit)
{
switch(field_type){
case(DBF_CHAR):
*pupper_limit = -128.0;
*plower_limit = 127.0;
break;
case(DBF_UCHAR):
*pupper_limit = 255.0;
*plower_limit = 0.0;
break;
case(DBF_SHORT):
*pupper_limit = (double)SHRT_MAX;
*plower_limit = (double)SHRT_MIN;
break;
case(DBF_ENUM):
case(DBF_USHORT):
*pupper_limit = (double)USHRT_MAX;
*plower_limit = (double)0;
break;
case(DBF_LONG):
/* long did not work using cast to double */
*pupper_limit = 2147483647.;
*plower_limit = -2147483648.;
break;
case(DBF_ULONG):
*pupper_limit = (double)ULONG_MAX;
*plower_limit = (double)0;
break;
case(DBF_FLOAT):
*pupper_limit = (double)1e+30;
*plower_limit = (double)-1e30;
break;
case(DBF_DOUBLE):
*pupper_limit = (double)1e+30;
*plower_limit = (double)-1e30;
break;
case DBF_CHAR:
*pupper_limit = -128.0;
*plower_limit = 127.0;
break;
case DBF_UCHAR:
*pupper_limit = 255.0;
*plower_limit = 0.0;
break;
case DBF_SHORT:
*pupper_limit = (double) SHRT_MAX;
*plower_limit = (double) SHRT_MIN;
break;
case DBF_ENUM:
case DBF_USHORT:
*pupper_limit = (double) USHRT_MAX;
*plower_limit = 0.0;
break;
case DBF_LONG:
*pupper_limit = 2147483647.0;
*plower_limit = -2147483648.0;
break;
case DBF_ULONG:
*pupper_limit = (double) 0xffffffffU;
*plower_limit = 0.0;
break;
case DBF_FLOAT:
*pupper_limit = 1e30;
*plower_limit = -1e30;
break;
case DBF_DOUBLE:
*pupper_limit = 1e300;
*plower_limit = -1e300;
break;
}
return;
}

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

@@ -907,43 +907,52 @@ static void dbBreakBody(void)
pgphentry->userPvt = pnewbrkTable;
}
static void dbRecordHead(char *recordType,char *name, int visible)
static void dbRecordHead(char *recordType, char *name, int visible)
{
DBENTRY *pdbentry;
long status;
char *badch;
DBENTRY *pdbentry;
long status;
badch = strpbrk(name, " \"'.$");
if (badch) {
epicsPrintf("Bad character '%c' in record name \"%s\"\n",
*badch, name);
}
pdbentry = dbAllocEntry(pdbbase);
if(ellCount(&tempList))
yyerrorAbort("dbRecordHead: tempList not empty");
if (ellCount(&tempList))
yyerrorAbort("dbRecordHead: tempList not empty");
allocTemp(pdbentry);
status = dbFindRecordType(pdbentry,recordType);
if(status) {
epicsPrintf("Record \"%s\" is of unknown type \"%s\" - ",
status = dbFindRecordType(pdbentry, recordType);
if (status) {
epicsPrintf("Record \"%s\" is of unknown type \"%s\" - ",
name, recordType);
yyerrorAbort(NULL);
return;
yyerrorAbort(NULL);
return;
}
/*Duplicate records ok if the same type */
status = dbCreateRecord(pdbentry,name);
if(status==S_dbLib_recExists) {
if(strcmp(recordType,dbGetRecordTypeName(pdbentry))!=0) {
epicsPrintf("Record %s already defined with different type %s\n",
name, dbGetRecordTypeName(pdbentry));
if (status==S_dbLib_recExists) {
if (strcmp(recordType, dbGetRecordTypeName(pdbentry))!=0) {
epicsPrintf("Record \"%s\" already defined with different type "
"\"%s\"\n", name, dbGetRecordTypeName(pdbentry));
yyerror(NULL);
duplicate = TRUE;
return;
} else if (dbRecordsOnceOnly) {
epicsPrintf("Record \"%s\" already defined (dbRecordsOnceOnly is set)\n",
name);
yyerror(NULL);
duplicate = TRUE;
}
} else if(status) {
epicsPrintf("Can't create record \"%s\" of type \"%s\"\n",
name, recordType);
yyerrorAbort(NULL);
duplicate = TRUE;
return;
}
else if (dbRecordsOnceOnly) {
epicsPrintf("Record \"%s\" already defined (dbRecordsOnceOnly is "
"set)\n", name);
yyerror(NULL);
duplicate = TRUE;
}
}
if(visible) dbVisibleRecord(pdbentry);
else if (status) {
epicsPrintf("Can't create record \"%s\" of type \"%s\"\n",
name, recordType);
yyerrorAbort(NULL);
}
if (visible)
dbVisibleRecord(pdbentry);
}
static void dbRecordField(char *name,char *value)

View File

@@ -3916,7 +3916,7 @@ void epicsShareAPI dbDumpField(
else
printf("\t field_type: %s\n", pamapdbfType[j].strvalue);
printf("\tprocess_passive: %hd\n",pdbFldDes->process_passive);
printf("\t base: %hd\n",pdbFldDes->base);
printf("\t base: %d\n",pdbFldDes->base);
if(!pdbFldDes->promptgroup) {
printf("\t promptgroup: %d\n",pdbFldDes->promptgroup);
} else {
@@ -3929,7 +3929,7 @@ void epicsShareAPI dbDumpField(
}
}
printf("\t interest: %hd\n", pdbFldDes->interest);
printf("\t as_level: %hd\n",pdbFldDes->as_level);
printf("\t as_level: %d\n",pdbFldDes->as_level);
printf("\t initial: %s\n",
(pdbFldDes->initial ? pdbFldDes->initial : ""));
if(pdbFldDes->field_type==DBF_MENU) {
@@ -4059,12 +4059,12 @@ void epicsShareAPI dbReportDeviceConfig(dbBase *pdbbase,FILE *report)
DBENTRY dbentry;
DBENTRY *pdbentry=&dbentry;
long status;
char busName[40];
char linkValue[40];
char dtypValue[40];
char linkValue[messagesize];
char dtypValue[50];
char cvtValue[40];
int ilink,nlinks;
struct link *plink;
int linkType;
FILE *stream = (report==0) ? stdout : report;
if(!pdbbase) {
@@ -4081,8 +4081,8 @@ void epicsShareAPI dbReportDeviceConfig(dbBase *pdbbase,FILE *report)
status = dbGetLinkField(pdbentry,ilink);
if(status || dbGetLinkType(pdbentry)!=DCT_LINK_FORM) continue;
plink = pdbentry->pfield;
strcpy(busName,bus[plink->type]);
if(strlen(busName)==0) continue;
linkType = plink->type;
if(bus[linkType][0]==0) continue;
strcpy(linkValue,dbGetString(pdbentry));
status = dbFindField(pdbentry,"DTYP");
if(status) break;
@@ -4106,7 +4106,7 @@ void epicsShareAPI dbReportDeviceConfig(dbBase *pdbbase,FILE *report)
}
}
fprintf(stream,"%-8s %-20s %-20s %-20s %-s\n",
busName,linkValue,dtypValue,
bus[linkType],linkValue,dtypValue,
dbGetRecordName(pdbentry),cvtValue);
break;
}

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