Compare commits

...

225 Commits

Author SHA1 Message Date
Janet Anderson
3009091875 Creating R3.14.12.3 2013-12-16 15:51:45 -06:00
Janet Anderson
6a0d5e0e87 Changed EPICS to Release 3.14.12.4 2013-12-16 15:48:54 -06:00
Andrew Johnson
97636a45e0 libCom: Remove epicsShareAPI from epicsExit APIs
Passing epicsExitCallAtExits into atexit() was generating
a warning about passing in a __stdcall routine pointer.
2013-12-16 14:52:29 -06:00
Andrew Johnson
a50c66b6ff libCom/test: Added epicsEnvTest.c
VxWorks 6.x can make environment variables private to each
thread, which doesn't work too well.
A test failure on VxWorks explains how to change the image
configuration to fix this.
2013-12-16 12:48:25 -06:00
Andrew Johnson
88ae947c84 configure: Refined how/when we pull in <top>/cfg files
Only read CONFIG* and RULES* files,
and only do so in build dirs, i.e. when T_A is defined.
2013-12-13 16:04:01 -06:00
Andrew Johnson
22540ac743 docs: Release note update.
Credit Peter Heesterman with windows build updates.
2013-12-11 18:11:51 -06:00
Andrew Johnson
197e992241 Fixed iocsh stream redirection for several commands
Eric provided the fixes to iocsh (empty commands would not reset
redirected streams), I fixed various commands.
2013-12-11 17:50:29 -06:00
Andrew Johnson
b0cf5c256a startup: Add cygwin-x86_64 to EpicsHostArch.pl script 2013-12-10 16:28:08 -06:00
Andrew Johnson
76e967c960 dbStatic: Fixed crash loading record of unknown type
Fixed segfault when dbLoadRecords tried to load a record of a
type that was not defined in its DBD files.
2013-12-04 17:37:42 -06:00
Andrew Johnson
4ac35ab85c docs: iPhone Simulator builds broken by Xcode 5
From Mark Engbretson, no known solution yet.
2013-12-04 10:37:44 -06:00
Janet Anderson
4209abe2cf Set snapshot to 3.14.12.4-rc1-DEV 2013-12-02 14:12:45 -06:00
Janet Anderson
90d1d9568c Creating 3.14.12.4-rc1 2013-12-02 13:56:17 -06:00
Janet Anderson
082df89090 Creating 3.14.12.4-rc1 2013-12-02 13:54:20 -06:00
Andrew Johnson
78a4e462d5 libCom: Recognize hex literals in epicsStrtod()
Allows Windows and VxWorks to accept hex integers as a double.
2013-12-02 11:12:19 -06:00
Andrew Johnson
bd82554299 Set snapshot to 3.14.12.4-pre1-DEV 2013-11-20 18:03:16 -06:00
Andrew Johnson
1a3e7414b3 Creating 3.14.12.4-pre1 2013-11-20 18:02:28 -06:00
Andrew Johnson
9ab6f89604 Clean up epicsExport.h includes
Mostly in record and device support, this commit puts
the include in the right place and moves some other
includes around to get the order right.
2013-11-20 16:21:10 -06:00
Andrew Johnson
570993e32b configure: New targets cygwin-x86_64 and windows-x64-mingw 2013-11-19 18:50:49 -06:00
Andrew Johnson
93be1400c1 Fixed various 64-bit windows build issues. 2013-11-19 18:42:45 -06:00
Andrew Johnson
176ee926ad cygwin: Fixed SocketSystemCallInterruptMechanism
Cygwin changed it back again.
2013-11-19 18:41:03 -06:00
Andrew Johnson
2d52067484 libCom: Clean up build warnings from Visual Studio. 2013-11-19 15:26:22 -06:00
Andrew Johnson
66209118f6 libCom/macLib: Don't use unsigned chars in macParseDefns()
These pointers are really pointing to standard chars.
2013-11-13 12:39:23 -06:00
Andrew Johnson
d6dab34ae9 Merged changes from Jeff Hill's ca-ref-man-maint branch.
This contains only text changes to the CA reference manual.
2013-11-07 17:57:09 -06:00
Andrew Johnson
4b44881744 db: Fixed bogus dbScan overrun warnings
Penalizing the 0.1 second scan thread by 0.1 seconds
guarantees another overrun in most cases...
Warning message improved.

Also added a release note for Jeff's CAS commit.
2013-10-17 17:21:26 -05:00
Jeff Hill
42f4c3a0a5 fixed potential memory leak 2013-10-17 09:23:47 -06:00
Andrew Johnson
2ad468dd38 CAref: Fix returns from ca_attach_context()
ECA_NORMAL was missing, ECA_ISATTACHED given twice.
2013-09-27 09:59:34 -05:00
Andrew Johnson
2bf4b36639 configure: Support Apple Xcode 5.0 and iOS 7.0
Not tested on the 64-bit ARMv8 architecture, although it should be
compatible (confirmation would be welcome).
2013-09-24 15:30:26 -05:00
Andrew Johnson
6814b09fad docs: Release Notes update
... for several recent commits.
2013-09-13 17:30:38 -05:00
Andrew Johnson
2d3a828acd Fixed read-back of TSEL link
Reading back a .TSEL field that was originally pointed to
another record's .TIME field was exposing internal details
that didn't need to be made visible. This commit hides the
.TIME => .VAL change completely, and allows a .TSEL link
field to be saved and restored properly using autosave.
2013-09-13 11:57:18 -05:00
Andrew Johnson
4ae048572a Added dbTemplateMaxVars variable
Allows users to configure dbLoadTemplate command to accept more than
100 variables or a larger string buffer for variables.
2013-09-13 11:36:52 -05:00
Andrew Johnson
e49210a3ea configure: IOS version bump to 6.1 2013-08-30 12:50:34 -05:00
Andrew Johnson
d25eff3af7 configure: Darwin build settings
Modify comments and defaults for darwin builds.
Changing to use gcc wasn't working.
2013-08-30 11:51:51 -05:00
Andrew Johnson
01f0fdbf1e More file permission fixes. 2013-08-19 15:46:51 -05:00
Andrew Johnson
3219ea0608 Fixed file permissions. 2013-08-19 13:30:19 -05:00
Ralph Lange
fb983fe382 CAref: typos, replace ..._event() calls with ..._subscription() (by J. Lewis Muir) 2013-08-16 17:00:13 +02:00
Andrew Johnson
ffa96d36e1 db: dbpf can now put strings to UCHAR arrays
Also improved the dbpf error message on value conversion failures.
Source code reformatting inside dbTest.c as well.
2013-08-01 18:10:18 -05:00
Janet Anderson
515f882c7b Added OPT_CXXFLAGS_YES += -g 2013-07-25 10:49:26 -05:00
Janet Anderson
d3b6d01807 Added WIN32 system library for epicsSockResolveTest 2013-07-17 15:55:49 -05:00
Andrew Johnson
f2891d72e5 ca: Add missing template instances for VxWorks 5.5.x 2013-07-10 14:55:34 -05:00
Andrew Johnson
75a5f19d2e IOCS_APPL_TOP must be absolute path
Fix a recently introduced problem where cdCommands and envParams
had TOP as a relative path (which actually worked by chance).
Also fixed a problem with convertRelease hanging when the -t
argument matched the absolute path to TOP.
2013-07-10 14:13:31 -05:00
Andrew Johnson
98deef5004 configure: Added FULLPATHNAME tool variable
Changed os/CONFIG files where we use the fullPathName.pl script.
2013-07-10 14:07:51 -05:00
Andrew Johnson
c187d8c13a CAref: typo's, added missing ca_put_callback 2013-07-05 13:26:26 -05:00
Andrew Johnson
1289f99e30 rec: Additional dependencies for parallel builds. 2013-06-21 10:36:26 -05:00
Andrew Johnson
ef5d88d3e5 libCom: Back-ported aToIPAddr fix from 3.15 branch.
Cherry-picked 3.15 revno 12398 with some changes.
2013-06-07 17:03:55 -05:00
Andrew Johnson
93449dccb8 ca: Fix acctst.c for older C compilers
All declarations must still precede other statements within a block...
2013-06-07 16:08:57 -05:00
Andrew Johnson
863e8fdd3b libCom: Fix VxWorks localtime_r() and gmtime_r() wrappers
Wind River changed the return value between VxWorks 6.8 and 6.9.
2013-06-07 14:35:45 -05:00
Andrew Johnson
ee9c0ba409 ca: Minor reference manual tweaks. 2013-05-28 15:07:33 -05:00
Andrew Johnson
7f82c2f32e libCom: Added osi/os/WIN32/osdFindSymbol.c
Implemented by Dirk Zimoch.
2013-05-28 14:16:22 -05:00
Jeff Hill johill@lanl.gov
e0bc071de3 merged in fix for https://bugs.launchpad.net/epics-base/+bug/1179642
also merged in removal of c++ support for old HPUX compiler
2013-05-16 12:33:31 -06:00
Andrew Johnson
593e313fab dbStatic: More commands accept "" or "*" to mean 'all'
dbDumpRecordType, dbDumpMenu and dbDumpRecord commands improved.
2013-05-09 15:48:49 -05:00
Andrew Johnson
34744264e1 libCom: Fix win32 handle leak
Closing an epicsThread would leak one Win32 handle.
Reported by Giles Knap, Diamond.
2013-05-06 17:29:10 -05:00
Andrew Johnson
5ac686fafd tools: Munch support for module destructors
Added in VxWorks 6.9
2013-04-25 17:00:36 -05:00
Andrew Johnson
7e347b2de9 libCom: Fix sysAtReboot registration on vxWorks 6.8+
Removed C++ static constructor, do it from epicsThreadInit()
2013-04-24 12:52:05 -05:00
Andrew Johnson
5bc15b72a1 libCom: Add some missing #include guards.
There are still quite a few missing in libCom/osi/os/*
2013-04-11 12:56:56 -05:00
Andrew Johnson
880db9d4af configure: Set IOCS_APPL_TOP from INSTALL_LOCATION
Fixes lp:1165257
2013-04-09 12:39:26 -05:00
Andrew Johnson
58c031238b configure: Modify help rule to use $(DIVIDER)
... in case someone changes it.
2013-04-01 10:03:38 -05:00
Andrew Johnson
f824246baa Add configuration for vxWorks 6.9 builds. 2013-03-29 11:17:09 -05:00
Andrew Johnson
f9a0c82a63 libCom/osi: Resolve bcopyLongs() conflict on vxWorks 6.9 2013-03-28 17:17:41 -05:00
Andrew Johnson
a4edc46a5f dbStatic: Allow empty DB & DBD files
They used to cause a Syntax error with a bad context string.
2013-03-20 16:53:10 -05:00
Andrew Johnson
738b8ca55f libCom: Add a High-Resolution Time Provider on MacOS
Since Apple don't support clock_gettime(CLOCK_REALTIME) I added a
new time provider that uses the Mach kernel Clock service to get
nanosecond resolution time.
2013-03-13 14:48:34 -05:00
Andrew Johnson
c767958539 gdd: Build tweaks
Remove obselete HPUX warning flags
Disable strict-aliasing to suppress warnings (RTEMS, Linux)
2013-02-11 17:49:05 -06:00
Andrew Johnson
8400e74606 Fix epicsRingPointerGetSize()
Definition name didn't match declaration.

Fixes lp:1109785 reported by Martin Konrad.
2013-01-29 18:02:51 -06:00
Andrew Johnson
451c4cc854 Unify #! line for Perl scripts
/usr/bin/env exists on all current workstation OSs.
2013-01-23 07:29:07 -06:00
Andrew Johnson
038a1140f4 Fix drift in periodic scan times.
Method from Eric Norum, with warnings added by me.

Fixes lp:597054
2013-01-09 18:12:30 -06:00
Jeff Hill
89d000be08 fixed problems with ca clear channel protocol during reload of the access security file.
See https://bugs.launchpad.net/epics-base/+bug/1091401.
2012-12-18 14:32:12 -07:00
Janet Anderson
a0798939b3 R3.14.13.3-DEV 2012-12-17 14:24:23 -06:00
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
326 changed files with 6197 additions and 4008 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,17 +1,13 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2013 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
# in file LICENSE that is included with this distribution.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
#
# $Revision-Id$
#
# The developer may edit this file.
# assume T_A is the host arch if not specified
#
# Common build definitions
@@ -89,8 +85,6 @@ endif
-include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A)
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
endif
# Include <top>/cfg/CONFIG* definitions from tops defined in RELEASE* files
#
ifneq ($(CONFIG),$(TOP)/configure)
@@ -103,12 +97,12 @@ endif
# Include $(INSTALL_CFG)/CONFIG* definitions
#
ifndef T_A
TOP_CFG_CONFIGS = $(wildcard $(INSTALL_CFG)/CONFIG*)
ifneq ($(TOP_CFG_CONFIGS),)
include $(TOP_CFG_CONFIGS)
endif
endif
endif # ifdef T_A
# User specific definitions
#
@@ -119,22 +113,3 @@ ifdef T_A
-include $(HOME)/configure/CONFIG_USER.$(EPICS_HOST_ARCH).$(T_A)
endif
# All options
# may be overridden here.
#
# EXAMPLES
# --------
# Build client objects statically ? must be either YES or NO
#STATIC_BUILD=NO
# Host build optimization, must be either YES or NO
#HOST_OPT=YES
# Cross build optimization, must be either YES or NO
#CROSS_OPT=YES
# Generate Verbose Compiler Warnings for host build, must be either YES or NO
#HOST_WARN=YES
# Generate Verbose Compiler Warnings for cross compile builds, must be either YES or NO
#CROSS_WARN=YES
#etc.
#CROSS_COMPILER_TARGET_ARCHS=vxWorks-68040

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

@@ -63,7 +63,8 @@ DBEXPAND = $(call PATH_FILTER, $(TOOLS)/dbExpand$(HOSTEXE))
DBTORECORDTYPEH = $(call PATH_FILTER, $(TOOLS)/dbToRecordtypeH$(HOSTEXE))
DBTOMENUH = $(call PATH_FILTER, $(TOOLS)/dbToMenuH$(HOSTEXE))
REGISTERRECORDDEVICEDRIVER = $(PERL) $(TOOLS)/registerRecordDeviceDriver.pl
CONVERTRELEASE=$(PERL) $(TOOLS)/convertRelease.pl
CONVERTRELEASE = $(PERL) $(TOOLS)/convertRelease.pl
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
#-------------------------------------------------------
# tools for installing libraries and products

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 = 1
EPICS_PATCH_LEVEL = 4
# 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
#-------------------------------------------------------
@@ -77,12 +76,16 @@ INSTALL_DB = $(INSTALL_LOCATION)/db
INSTALL_CONFIG = $(INSTALL_LOCATION)/configure
INSTALL_JAVA = $(INSTALL_LOCATION)/javalib
#Directory for OS independant build created files
# Directory for OS independant build created files
COMMON_DIR = ../O.Common
# IOC's absolute path to $(TOP), may be overridden inside the application
IOCS_APPL_TOP = $(shell $(FULLPATHNAME) $(INSTALL_LOCATION))
#-------------------------------------------------------
# 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 +338,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 +374,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

@@ -1,10 +1,10 @@
#*************************************************************************
# Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne
# Copyright (c) 2013 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 is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
# $Revision-Id$
#
@@ -12,7 +12,7 @@
#
# --------------------------------------------------------------
# Module developers can now define a new type of file, e.g. ABC,
# Module developers can now define a new type of file, e.g. ABC,
# so that files of type ABC will be installed into a directory
# defined by INSTALL_ABC. This is done by creating a new CONFIG<name>
# file, e.g. CONFIG_ABC, with the following lines:
@@ -24,8 +24,14 @@
# $(INSTALL_LOCATION). The file type ABC should be target
# architecture independent (alh files, medm files, edm files).
#
# Optional rules necessary for files of type ABC should be put in
# a RULES_ABC file.
# Files of type ABC are then installed into the INSTALL_ABC
# directory by adding a line like the following to a Makefile.
#
# ABC += <filename1> <filename2> <filename3>
#
# Rules necessary to create files of type ABC should be put in
# a RULES_ABC file. Variables used by those rules should appear
# in a CONFIG_ABC file.
#
# The module developer installs new CONFIG* or RULES* files
# into the directory $(INSTALL_LOCATION)/cfg by including the
@@ -33,16 +39,11 @@
#
# CFG += CONFIG_ABC RULES_ABC
#
# Files of type ABC are installed into INSTALL_ABC directory
# by adding a line like the following to a Makefile.
#
# ABC += <filename1> <filename2> <filename3>
#
# Files in $(INSTALL_LOCATION)/cfg directory are now included by
# the base config files so the definitions and rules are available
# for use by later src directory Makefiles in the same module or
# by other modules with a RELEASE line pointing to the TOP of
# the module with RULES_ABC.
# CONFIG and RULES files in the $(INSTALL_LOCATION)/cfg directory
# are included by the Base config files so their definitions and
# rules are available for use by later src directory Makefiles in
# the same module, or by other modules with a RELEASE line that
# points to the TOP of the module providing these files.
FILE_TYPE += ADL
INSTALL_ADL = $(INSTALL_LOCATION)/adl
@@ -59,6 +60,6 @@ INSTALL_EDL = $(INSTALL_LOCATION)/edl
FILE_TYPE += PERL_MODULES
INSTALL_PERL_MODULES = $(INSTALL_LOCATION_LIB)/perl
INSTALLS_CFG= $(CFG:%= $(INSTALL_CFG)/%)
INSTALLS_CFG = $(CFG:%= $(INSTALL_CFG)/%)
DIRECTORY_TARGETS += $(foreach type, $(FILE_TYPE),$(INSTALL_$(type)))

View File

@@ -19,6 +19,7 @@
# aix-ppc (IBM compiler used for host builds)
# aix-ppc-gnu (GNU compiler used for host builds)
# cygwin-x86 (cygwin compiler used for host builds)
# cygwin-x86_64 (cygwin compiler used for host builds)
# darwin-ppc (PowerPC based Apple running OSX)
# darwin-ppcx86 (Universal binaries for both CPUs)
# darwin-x86 (Intel based Apple running OSX)
@@ -41,6 +42,7 @@
# win32-x86-cygwin (WIN32 API with cygwin GNU compiler used for host builds)
# win32-x86-mingw (MinGW compiler used for host builds)
# windows-x64 (MS Visual C++ compiler used for host builds)
# windows-x64-mingw (MinGW compiler used for host builds)
# Debugging builds
# linux-x86-debug (GNU compiler with -g option for host builds)
@@ -72,6 +74,7 @@
# 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
@@ -119,9 +122,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
@@ -183,7 +186,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
@@ -113,16 +112,13 @@ 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 =
@@ -224,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 $@"
@@ -303,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
@@ -312,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
@@ -364,17 +368,14 @@ $(foreach file, $(DB_INSTALLS), $(eval $(call DB_INSTALLS_template, $(file))))
##################################################### register record,device,driver support
IOC_INST_TOP := $(firstword $(IOCS_APPL_TOP) \
$(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LOCATION) ) )
%_registerRecordDeviceDriver.cpp: $(COMMON_DIR)/%.dbd
@$(RM) $@ $*.tmp
$(REGISTERRECORDDEVICEDRIVER) $< $(basename $@) $(IOC_INST_TOP) > $*.tmp
$(REGISTERRECORDDEVICEDRIVER) $< $(basename $@) $(IOCS_APPL_TOP) > $*.tmp
$(MV) $*.tmp $@
%_registerRecordDeviceDriver.cpp: %.dbd
@$(RM) $@ $*.tmp
$(REGISTERRECORDDEVICEDRIVER) $< $(basename $@) $(IOC_INST_TOP) > $*.tmp
$(REGISTERRECORDDEVICEDRIVER) $< $(basename $@) $(IOCS_APPL_TOP) > $*.tmp
$(MV) $*.tmp $@
.PRECIOUS: %_registerRecordDeviceDriver.cpp

View File

@@ -1,13 +1,13 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2013 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
# 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.
#*************************************************************************
#RULES.ioc
include $(CONFIG)/RULES_DIRS
build$(DIVIDER)$(ARCH) build: buildInstall
@@ -15,23 +15,18 @@ install$(DIVIDER)$(ARCH) install: buildInstall
$(ARCH): buildInstall
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(ARCH))
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
clean$(DIVIDER)$(ARCH) clean:
clean$(DIVIDER)$(ARCH) clean:
$(RM) cdCommands envPaths dllPath.bat
else
buildInstall$(DIVIDER)$(ARCH) buildInstall:
clean$(DIVIDER)$(ARCH) clean:
else
buildInstall$(DIVIDER)$(ARCH) buildInstall:
clean$(DIVIDER)$(ARCH) clean:
endif
cdCommands envPaths dllPath.bat: $(wildcard $(TOP)/configure/RELEASE*) \
$(TOP)/configure/CONFIG $(INSTALL_BIN)
ifeq ($(IOCS_APPL_TOP),)
$(PERL) $(TOOLS)/convertRelease.pl -a $(ARCH) $@
else
$(PERL) $(TOOLS)/convertRelease.pl -a $(ARCH) -t $(IOCS_APPL_TOP) $@
endif
$(wildcard $(TOP)/configure/CONFIG_SITE*) $(INSTALL_BIN)
$(CONVERTRELEASE) -a $(ARCH) -t $(IOCS_APPL_TOP) $@
realclean:
$(RM) cdCommands envPaths dllPath.bat

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,10 @@
#*************************************************************************
# Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne
# Copyright (c) 2013 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 is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
# $Revision-Id$
#
@@ -36,13 +36,11 @@ endif
endif
#---------------------------------------------
# Include existing and new $(INSTALL_CFG)/* definitions
# Include our own $(INSTALL_CFG)/RULES* definitions
#
TOP_CFG_FILES = $(sort $(wildcard $(INSTALL_CFG)/RULES*) \
$(wildcard $(INSTALL_CFG)/CONFIG*) \
$(addprefix $(INSTALL_CFG)/,$(CFG)))
ifneq ($(TOP_CFG_FILES),)
include $(TOP_CFG_FILES)
TOP_CFG_RULES = $(wildcard $(INSTALL_CFG)/RULES*)
ifneq ($(TOP_CFG_RULES),)
include $(TOP_CFG_RULES)
endif
#---------------------------------------------------------------

0
configure/RULES_TARGET Executable file → Normal file
View File

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 " 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 " inc$(DIVIDER)<arch> - Installs <arch> only header files."
@echo " build$(DIVIDER)<arch> - Builds and installs <arch> only."
@echo " install$(DIVIDER)<arch> - Builds and installs <arch> only."
@echo " clean$(DIVIDER)<arch> - Cleans <arch> binaries in O.<arch> dirs only."
@echo " uninstall$(DIVIDER)<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

0
configure/Sample.Makefile Executable file → Normal file
View File

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
#-------------------------------------------------------
@@ -49,7 +50,7 @@ SHRLIB_LDLIBS = $(addprefix -l, $($*_LDLIBS) $(LIB_LIBS) $(USR_LIBS))\
$(LDLIBS)
SHRLIB_DEPLIB_DIRS = $(foreach word,$(sort $(dir $($*_DEPLIBS) $(SHRLIB_DEPLIBS))), \
$(shell $(PERL) $(TOOLS)/fullPathName.pl $(word)))
$(shell $(FULLPATHNAME) $(word)))
SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-L%)
@@ -72,7 +73,7 @@ PROD_LDLIBS += $($(firstword $(LDLIBS_STATIC_$(STATIC_BUILD)) \
$(LDLIBS_SHARED_$(SHARED_LIBRARIES))))
PROD_DEPLIB_DIRS = $(foreach word,$(sort $(dir $($*_DEPLIBS) $(PROD_DEPLIBS))), \
$(shell $(PERL) $(TOOLS)/fullPathName.pl $(word)))
$(shell $(FULLPATHNAME) $(word)))
PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-L%)

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

@@ -0,0 +1,14 @@
# CONFIG.Common.cygwin-x86_64
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for cygwin-x86_64 target builds
# Sites may override these definitions in CONFIG_SITE.Common.cygwin-x86_64
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.Common.cygwin-x86
ARCH_DEP_CFLAGS = -m64
ARCH_DEP_LDFLAGS = -m64

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
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 $(FULLPATHNAME) $(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

@@ -93,6 +93,7 @@ VX_GNU_VERSION_6.5 = 3.4.4
VX_GNU_VERSION_6.6 = 4.1.2
VX_GNU_VERSION_6.7 = 4.1.2
VX_GNU_VERSION_6.8 = 4.1.2
VX_GNU_VERSION_6.9 = 4.3.3
VX_GNU_VERSION = $(VX_GNU_VERSION_$(VXWORKS_VERSION))
VX_GNU_MAJOR_VERSION = $(basename $(basename $(VX_GNU_VERSION)))
@@ -134,6 +135,7 @@ NM_DIR_6.5 = $(WORKBENCH_BIN)
NM_DIR_6.6 = $(WORKBENCH_BIN)
NM_DIR_6.7 = $(GNU_BIN)
NM_DIR_6.8 = $(UTILITIES_BIN)
NM_DIR_6.9 = $(UTILITIES_BIN)
NM_DIR = $(firstword $(NM_DIR_$(VXWORKS_VERSION)) $(GNU_BIN))
NM = $(NM_DIR)/$(CMPLR_PREFIX)nm$(CMPLR_SUFFIX)$(HOSTEXE)
@@ -159,7 +161,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

@@ -0,0 +1,15 @@
# CONFIG.Common.windows-x64-mingw
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for windows-x64-mingw target builds
# Sites may override these definitions in CONFIG_SITE.Common.windows-x64-mingw
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.Common.win32-x86-mingw
ARCH_CLASS = x64
ARCH_DEP_CFLAGS = -m64
ARCH_DEP_LDFLAGS = -m64

View File

@@ -0,0 +1,10 @@
# CONFIG.cygwin-x86_64.Common
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for cygwin-x86_64 host archs
# Sites may override these definitions in CONFIG_SITE.cygwin-x86_64.Common
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.cygwin-x86.Common

View File

@@ -0,0 +1,11 @@
# CONFIG.cygwin-x86_64.cygwin-x86_64
#
# $Revision-Id$
#
# Definitions for cygwin-x86_64 host - cygwin-x86_64 target builds
# Sites may override these definitions in CONFIG_SITE.cygwin-x86_64.cygwin-x86_64
#-------------------------------------------------------
# Include common gnu compiler definitions
include $(CONFIG)/os/CONFIG.cygwin-x86.cygwin-x86

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.
#
@@ -78,18 +59,21 @@ COMMANDLINE_LIBRARY=READLINE
GNU_DIR = /usr
CC = $(GNU_BIN)/cc
CCC = $(GNU_BIN)/c++
# Apple soft-links these compilers to clang/clang++
CC = cc
CCC = c++
GNU = NO
#
# Darwin 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 $(FULLPATHNAME) $(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

@@ -9,14 +9,15 @@
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon
# gcc, g++, ar, ld, and ranlib must be in user's path
CC = gcc
CCC = g++
AR = ar -rc
LD = ld -r
RANLIB = ranlib
RES=.coff
RCCMD = windres $(INCLUDES) $< $@
CMPLR_PREFIX =
CC = $(CMPLR_PREFIX)gcc
CCC = $(CMPLR_PREFIX)g++
AR = $(CMPLR_PREFIX)ar -rc
LD = $(CMPLR_PREFIX)ld -r
RANLIB = $(CMPLR_PREFIX)ranlib
RES = .coff
RCCMD = $(CMPLR_PREFIX)windres $(INCLUDES) $< $@
# No -fPIC avoids "-fPIC ignored for target (all code is position independent)"
SHRLIB_CFLAGS =
@@ -26,4 +27,4 @@ LOADABLE_SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
# Override linking with gcc library from CONFIG.gnuCommon
GNU_LDLIBS_YES =
OP_SYS_LDLIBS = -lws2_32
OP_SYS_LDLIBS = -lws2_32

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

@@ -0,0 +1,11 @@
# CONFIG.windows-x64-mingw.Common
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for windows-x64-mingw host archs
# Sites may override these definitions in CONFIG_SITE.windows-x64-mingw.Common
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.win32-x86-mingw.Common

View File

@@ -0,0 +1,11 @@
# CONFIG.windows-x64-mingw.windows-x64-mingw
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for windows-x64-mingw target archs
# Sites may override these definitions in CONFIG_SITE.windows-x64-mingw.windows-x64-mingw
#-------------------------------------------------------
# Include common gnu compiler definitions
include $(CONFIG)/os/CONFIG.win32-x86-mingw.win32-x86-mingw

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

@@ -0,0 +1,14 @@
# CONFIG_SITE.Common.cygwin-x86_64
#
# $Revision-Id$
#
# Site Specific definitions for cygwin-x86_64 target
# Only the local epics system manager should modify this file
# If readline is installed uncomment the following line
# to add command-line editing and history support
#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
#
# Uncomment the following 3 lines to build with Apple's GCC instead of CLANG.
#
#CC = gcc
#CCC = g++
#GNU = YES
# To use MacPorts GCC uncomment (and modify if necessary) the following:
#GNU_DIR = /opt/local
#CC = $(GNU_BIN)/gcc -m64
#CCC = $(GNU_BIN)/g++ -m64
#GNU = YES
# 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,31 @@
# 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.
#
# ARMv8 (arm64) devices: iPhone 5S
# ARMv7s devices: iPhone 5 and 5C, iPad Gen 4
# ARMv7 devices: iPhone 3GS, 4 and 4S, iPod Touch Gen 3 to 5
# iPad Gen 1 to 3, iPad Mini, Apple TV Gen 2 and 3
# ARMv6 devices: iPhone 1 and 3G, iPod Touch Gen 1 and 2
#ARCH_CLASS = arm64
#ARCH_CLASS = armv7s arm64
ARCH_CLASS = armv7 armv7s arm64
#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
#-------------------------------------------------------
@@ -10,16 +9,33 @@
#IOS_VERSION = 3.2
#IOS_VERSION = 4.1
IOS_VERSION = 4.3
#IOS_VERSION = 4.2
#IOS_VERSION = 4.3
#IOS_VERSION = 5.0
#IOS_VERSION = 5.1
#IOS_VERSION = 6.0
#IOS_VERSION = 6.1
IOS_VERSION = 7.0
# Most sites will want shared libraries
# Which compiler to use:
# CLANG is required for Xcode 5.0 and later
# 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,9 @@ 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
OPT_CXXFLAGS_YES += -g

View File

@@ -33,4 +33,9 @@ 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
OPT_CXXFLAGS_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

@@ -20,6 +20,7 @@ VXWORKS_VERSION = 5.5
#VXWORKS_VERSION = 6.6
#VXWORKS_VERSION = 6.7
#VXWORKS_VERSION = 6.8
#VXWORKS_VERSION = 6.9
# Sites may override the following path for a particular host
@@ -40,6 +41,7 @@ WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
#WORKBENCH_VERSION = 2.6
#WORKBENCH_VERSION = 3.0
#WORKBENCH_VERSION = 3.2
#WORKBENCH_VERSION = 3.3
# Utilities Version number, required from vxWorks 6.8 and later

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

@@ -0,0 +1,9 @@
# CONFIG_SITE.windows-x64-mingw.windows-x64-mingw
#
# $Revision-Id$
#
# Site Specific definitions for windows-x64-mingw target
# Only the local epics system manager should modify this file
# Prefix for mingw compiler from cygwin
#CMPLR_PREFIX = x86_64-w64-mingw32-

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

@@ -3,14 +3,531 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>EPICS Base R3.14.12.1 Release Notes</title>
<title>EPICS Base R3.14.12.4 Release Notes</title>
</head>
<body lang="en">
<h1 align="center">EPICS Base Release 3.14.12.1</h1>
<h1 align="center">EPICS Base Release 3.14.12.4</h1>
<h2 align="center">Changes between 3.14.12.3 and 3.14.12.4</h2>
<!-- Insert new items immediately below here ... -->
<h3>New test for environment variables</h3>
<p>A new test program epicsEnvTest has been added to the libCom tests which
checks environment variable APIs. It was written to confirm that threads see
environment variable values that have been set in their parent thread. VxWorks
6.x boot images must be configured with ENV_VAR_USE_HOOKS set to FALSE for the
correct behaviour to occur (a test failure on VxWorks explains this).</p>
<h3>Inclusion of &lt;top&gt;/cfg/* files refined</h3>
<p>The way the build system includes files installed in the &lt;top&gt;/cfg/*
directory has been cleaned up. Files whose names begin with CONFIG will now get
included by the CONFIG step, and files whose names begin with RULES will get
included in the RULES step. These files are only ever included when GNUMake is
working in an application build (O.) directory and T_A is defined, so they
cannot be used to create generic build targets at other levels.</p>
<p>Files whose names don't start with either CONFIG or RULES are no longer
included automatically, but such files can still be installed into
&lt;top&gt;/cfg by naming them in the CFG variable.</p>
<h3>Fixed iocsh stream redirection for several commands</h3>
<p>A number of iocsh commands did not respond correctly to redirection of their
output using the iocsh '>file' or '2>error-file' syntax, and redirecting an
empty command could create files with garbage names. There may still be a few
commands that do not properly redirect their output, please notify the core
developers if you discover any. Thanks to Eric Norum for the iocsh changes.</p>
<p>For externally developed commands, the simplest way to support redirection in
your C/C++ code is to <tt>#include "epicsStdioRedirect.h"</tt> instead of
<tt>stdio.h</tt>.</p>
<h3>Fixed crash on loading record instance of unknown type</h3>
<p>Fixed segfault when dbLoadRecords tried to load a record of a type that was
not defined in its DBD files.</p>
<h3>Hex literal support in epicStrtod()</h3>
<p>Some OS implementations of the standard C library routine strtod() do not
recognize hexadecimal integers, in particular the libraries provided on Windows
and VxWorks. The internal implementation of epicsStrtod() that these targets use
now recognizes the 0x prefix and will convert hex numbers correctly. Thanks to
Dirk Zimoch for suggesting this change.</p>
<h3>Added support for 64-bit Cygwin and MinGW targets</h3>
<p>Both windows-x64-mingw and cygwin-x86_64 build targets are now provided.</p>
<h3>Windows build issues</h3>
<p>Thanks to Peter Heesterman for suggesting a number of small changes that
clean up build issues on Windows, mostly related to symbol import and export
to/from DLLs.</p>
<h3>CAS: GDD Reference Count Underflow</h3>
<p>Thanks to Bruce Hill a source of an underflow in a GDD reference count in the
CAS code has been fixed.</p>
<h3>Support for Apple Xcode 5.0</h3>
<p>This adds the ability to build for iOS 7.0 and the ARMv8 64-bit CPU on the
newest iPhone 5S device. Unfortunately the Xcode upgrade breaks the build of the
ios-x86 simulator target, although the ios-arm target successfully builds code
which runs fine on the real hardware.</p>
<h3>Reading TSEL field</h3>
<p>The TSEL link field has two complementary uses; it is read to fetch a
time-stamp event number for the TSE field, or if pointed to the .TIME field of
another record the record's timestamp is copied directly from the target record.
However with the latter usage if the TSEL link is itself read back instead of
pointing to the .TIME field the link appears to have changed to point to the VAL
field. This is due to an internal detail, and makes it impossible to save the
TSEL field's value using autosave. This has been fixed, and now the TSEL field
should always read back the same PV that it was pointed to.</p>
<h3>dbLoadTemplate variable limits adjustable</h3>
<p>The <tt>dbLoadTemplate</tt> command used to allocate a fixed amount of memory
for the template macro values that it used to 5000 bytes, and also limited the
number of variables that could defined to 100. These limits can now be changed
at runtime using the variable <tt>dbTemplateMaxVars</tt> which sets the maximum
number of macro variables that can be used; the amount of memory allocated for
value storage is 50 times this number. This variable is registered as an iocsh
variable in the base.dbd file, and can be adjusted as necessary before each
individual call to <tt>dbLoadTemplate</tt>.</p>
<p>The code now checks for and prevents any attempt to define more than the set
number of variables, but it does not check for overruns of the storage buffer.
This means that template files which define many long macro value strings could
still cause a buffer overflow and crash the IOC at startup, but increasing the
variable is all that is needed to allow that template file to be loaded.</p>
<h3>Improvements to dbpf</h3>
<p>It is now possible to use the <tt>dbpf</tt> command to put a long string
value into a UCHAR array field, previously only CHAR arrays were supported by
this command even though through Channel Access could put a long string to
either type. The error message printed by <tt>dbpf</tt> when a value conversion
fails has also been significantly improved.</p>
<h3>Support for VxWorks 6.9</h3>
<p>Various changes have been made that were needed to allow Base to build and
run properly on VxWorks 6.9.</p>
<h3>Improvements to aToIPAddr()</h3>
<p>The libCom routine aToIPAddr() and the vxWorks implementation of the
associated hostToIPAddr() function have been modified to be able to look up
hostnames that begin with one or more digits. The epicsSockResolveTest program
was added to check this functionality.</p>
<h4>Added osdFindSymbol for Windows</h4>
<p>Dirk Zimoch implemented the epicsLoadLibrary(), epicsLoadError() and
epicsFindSymbol() routines for Windows OS targets.</p>
<h4>More dbStatic commands accept "" or "*" to mean 'all'</h4>
<p>The IOC commands dbDumpRecordType, dbDumpMenu and dbDumpRecord will now
accept either an empty string or any string beginning with an asterisk '*' to
mean all record types or menus. Previously the 'all' option for these commands
required passing in a NULL value, which could be done from the vxWorks shell but
was not possible from iocsh.</p>
<h4>VxWorks sysAtReboot Registration</h4>
<p>The increasing intelligence of the GNU compiler and linker broke the method
that was being used by the VxWorks code to register a reboot hook that can close
down TCP connections nicely before the network stack gets disabled. This has
been fixed and no longer uses a C++ static contructor to execute that code.</p>
<h4>IOCS_APPL_TOP and INSTALL_LOCATION</h4>
<p>An IOC application that sets INSTALL_LOCATION in its configure/CONFIG_SITE
file no longer has to set IOCS_APPL_TOP there as well, unless the IOC uses a
different path than the build host to reach the application's top directory in
its filesystem. The IOCS_APPL_TOP variable now defaults to the value of
INSTALL_LOCATION, so setting the latter automatically sets the former. This
change fixes <a href="https://bugs.launchpad.net/bugs/1165257">Launchpad bug
1165257</a>.</p>
<h4>devLibVME.h</h4>
<p>Moved the declaration of bcopyLongs() from this header into RTEMS/osdVME.h.
Its original location broke the build for vxWorks 6.9 (the int nlongs argument
becomes size_t in 6.9, thus conflicting with this declaration). The only local
implementation of this routine is found in RTEMS/devLibVMEOSD.c, but it is not
used anywhere in Base.</p>
<h4>Allow empty database files</h4>
<p>The IOC used to report an error if dbLoadRecords or dbLoadDatabase was asked
to load an empty file or one containing just whitespace and/or comments. Such
files are now permitted, simplifying the task of automated database generation
programs which might discover they have nothing to output.</p>
<h4>High-Resolution Time Provider on MacOS</h4>
<p>MacOS does not provide the clock_gettime() API with CLOCK_REALTIME that other
Posix systems implement, so we previously used gettimeofday() to fetch the
current date & time from the OS. That older routine only provides the time with
a resolution of 1 microsecond though, whereas clock_gettime() gives results with
a nanosecond resolution. This release uses a new MachTime time provider on
MacOS which uses the Mach Kernel's CALENDAR_CLOCK service to fetch the time, and
provides nanosecond resolution.</p>
<h4>Time drift in periodic scans</h4>
<p>The implementation of the periodic scan code has been modified to remove
long-term drift associated with OS thread sheduling. The new code keeps scan
times much more closely tied to the system clock tick, only allowing the scan
period to drift if the record processing time takes longer to execute than the
interval between scans. If this happens the scan thread is made to wait for an
additional half-period but at most 1 second before the records are scanned
again, to allow lower priority threads some time to process on a preemptive
priority scheduled OS. After 10 repeated over-runs a warning will be logged,
with an increasing delay between messages up to hourly.</p>
<p>This fixes <a href="https://bugs.launchpad.net/bugs/597054">launchpad bug
597054</a>.</p>
<h2 align="center">Changes between 3.14.12.2 and 3.14.12.3</h2>
<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

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;

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)

0
src/as/asHost.rc Executable file → Normal file
View File

0
src/as/asIoc.rc Executable file → Normal file
View File

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

@@ -25,8 +25,6 @@
#include "cac.h"
#include "sgAutoPtr.h"
casgRecycle::~casgRecycle () {}
CASG::CASG ( epicsGuard < epicsMutex > & guard, ca_client_context & cacIn ) :
client ( cacIn ), magic ( CASG_MAGIC )
{
@@ -38,12 +36,13 @@ CASG::~CASG ()
}
void CASG::destructor (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
if ( this->verify ( guard ) ) {
this->reset ( guard );
this->reset ( cbGuard, guard );
this->client.uninstallCASG ( guard, *this );
this->magic = 0;
}
@@ -127,36 +126,37 @@ int CASG::block (
delay = cur_time - beg_time;
}
this->reset ( guard );
return status;
}
void CASG::reset (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->destroyCompletedIO ( guard );
this->destroyPendingIO ( guard );
this->destroyCompletedIO ( cbGuard, guard );
this->destroyPendingIO ( cbGuard, guard );
}
// lock must be applied
void CASG::destroyCompletedIO (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
syncGroupNotify * pNotify;
while ( ( pNotify = this->ioCompletedList.get () ) ) {
pNotify->destroy ( guard, * this );
pNotify->destroy ( cbGuard, guard );
}
}
void CASG::destroyPendingIO (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
while ( syncGroupNotify * pNotify = this->ioPendingList.first () ) {
pNotify->cancel ( guard );
pNotify->cancel ( cbGuard, guard );
// cancel must release the guard while
// canceling put callbacks so we
// must double check list membership
@@ -166,7 +166,7 @@ void CASG::destroyPendingIO (
else {
this->ioCompletedList.remove ( *pNotify );
}
pNotify->destroy ( guard, *this );
pNotify->destroy ( cbGuard, guard );
}
}
@@ -201,10 +201,11 @@ void CASG::show (
}
bool CASG::ioComplete (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->destroyCompletedIO ( guard );
this->destroyCompletedIO ( cbGuard, guard );
return this->ioPendingList.count () == 0u;
}
@@ -212,9 +213,9 @@ void CASG::put ( epicsGuard < epicsMutex > & guard, chid pChan,
unsigned type, arrayElementCount count, const void * pValue )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
sgAutoPtr < syncGroupWriteNotify > pNotify ( guard, *this, this->ioPendingList );
sgAutoPtr < syncGroupWriteNotify > pNotify ( guard, *this );
pNotify = syncGroupWriteNotify::factory (
this->freeListWriteOP, *this, pChan );
this->freeListWriteOP, *this, & CASG :: recycleWriteNotifyIO, pChan );
pNotify->begin ( guard, type, count, pValue );
pNotify.release ();
}
@@ -223,9 +224,9 @@ void CASG::get ( epicsGuard < epicsMutex > & guard, chid pChan,
unsigned type, arrayElementCount count, void *pValue )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
sgAutoPtr < syncGroupReadNotify > pNotify ( guard, *this, this->ioPendingList );
sgAutoPtr < syncGroupReadNotify > pNotify ( guard, *this );
pNotify = syncGroupReadNotify::factory (
this->freeListReadOP, *this, pChan, pValue );
this->freeListReadOP, *this, & CASG :: recycleReadNotifyIO, pChan, pValue );
pNotify->begin ( guard, type, count );
pNotify.release ();
}
@@ -241,20 +242,20 @@ void CASG::completionNotify (
}
}
void CASG::recycleSyncGroupWriteNotify (
epicsGuard < epicsMutex > & guard, syncGroupWriteNotify & io )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->freeListWriteOP.release ( & io );
}
void CASG::recycleSyncGroupReadNotify (
epicsGuard < epicsMutex > & guard, syncGroupReadNotify & io )
void CASG :: recycleReadNotifyIO ( epicsGuard < epicsMutex > & guard,
syncGroupReadNotify & io )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->freeListReadOP.release ( & io );
}
void CASG :: recycleWriteNotifyIO ( epicsGuard < epicsMutex > & guard,
syncGroupWriteNotify & io )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->freeListWriteOP.release ( & io );
}
int CASG :: printFormated ( const char *pformat, ... )
{
va_list theArgs;
@@ -295,13 +296,6 @@ void CASG::exception (
}
}
void * CASG::operator new ( size_t ) // X aCC 361
{
// The HPUX compiler seems to require this even though no code
// calls it directly
throw std::logic_error ( "why is the compiler calling private operator new" );
}
void CASG::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if

View File

@@ -165,7 +165,8 @@ $Date$</span></small></p>
<li><a href="#ca_pend_io">block for certain requests to complete</a></li>
<li><a href="#ca_test_io">test to see if certain requests have
completed</a></li>
<li><a href="#ca_pend_event">process CA client library background activities</a></li>
<li><a href="#ca_pend_event">process CA client library background
activities</a></li>
<li><a href="#ca_flush_io">flush outstanding requests to the server</a></li>
<li><a href="#ca_add_exception_event">replace the default exception
handler</a></li>
@@ -246,7 +247,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>
@@ -454,26 +455,20 @@ Environment</a> below.</p>
<h3><a name="firewall">Firewalls</a></h3>
<p>If you want channel access clients on a machine to be able to see
beacons and replies to broadcast PV search requests you need to permit
inbound UDP packets with source port EPICS_CA_SERVER_PORT (default is 5064)
or destination port EPICS_CA_REPEATER_PORT (default is 5065). On systems
using iptables this can be accomplished by rules like</p>
<pre>
-A INPUT -s 192.168.0.0/22 -p udp --sport 5064 -j ACCEPT
-A INPUT -s 192.168.0.0/22 -p udp --dport 5065 -j ACCEPT
</pre>
<p>If you want channel access clients on a machine to be able to see beacons
and replies to broadcast PV search requests, you need to permit inbound UDP
packets with source port EPICS_CA_SERVER_PORT (default is 5064) or destination
port EPICS_CA_REPEATER_PORT (default is 5065). On systems using iptables this
can be accomplished by rules like</p>
<pre> -A INPUT -s 192.168.0.0/22 -p udp --sport 5064 -j ACCEPT
-A INPUT -s 192.168.0.0/22 -p udp --dport 5065 -j ACCEPT</pre>
<p>If you want channel access servers (e.g. "soft IOCs") on a machine to be
able to see clients you need to permit inbound TCP or UDP packets with source
port EPICS_CA_SERVER_PORT (default is 5064). On systems using iptables this
can be accomplished by rules like</p>
<pre>
-A INPUT -s 192.168.0.0/22 -p udp --dport 5064 -j ACCEPT
-A INPUT -s 192.168.0.0/22 -p tcp --dport 5064 -j ACCEPT
</pre>
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
-A INPUT -s 192.168.0.0/22 -p tcp --dport 5064 -j ACCEPT</pre>
<p>In all cases the "-s 192.168.0.0/22" specifies the range of addresses from
which you wish to accept packets.</p>
@@ -498,9 +493,8 @@ broadcast address of that subnet is added to the list. For each point to point
interface found, the destination address of that link is added to the list.
This automatic server address list initialization can be disabled if the EPICS
environment variable EPICS_CA_AUTO_ADDR_LIST exists and its value is either
of "no" or "NO". The typical default is to enable network interface
introspection driven initialization with EPICS_CA_AUTO_ADDR_LIST set to "YES"
or "yes".</p>
"no" or "NO". The typical default is to enable network interface introspection
driven initialization with EPICS_CA_AUTO_ADDR_LIST set to "YES" or "yes".</p>
<p>Following network interface introspection, any IP addresses specified in the
EPICS environment variable EPICS_CA_ADDR_LIST are added to the list of
@@ -511,8 +505,8 @@ CA servers unless a CA proxy (gateway) is installed. The addresses in
EPICS_CA_ADDR_LIST may be dotted IP addresses or host names if the local OS has
support for host name to IP address translation. When multiple names are added
to EPICS_CA_ADDR_LIST they must be separated by white space. There is no
requirement that the addresses specified in the EPICS_CA_ADDR_LIST be
broadcast addresses, but this will often be the most convenient choice.</p>
requirement that the addresses specified in the EPICS_CA_ADDR_LIST be broadcast
addresses, but this will often be the most convenient choice.</p>
<p>For any IP addresses specified in the EPICS environment variable
EPICS_CA_NAME_SERVERS, TCP connections are opened and used for CA client name
@@ -560,7 +554,7 @@ default to EPICS_CA_SERVER_PORT.</p>
<p>Frequently vxWorks systems boot by default with routes limiting access only
to the local subnet. If a EPICS system is operating in a WAN environment it may
be necessary to configure routes into the vxWorks system which enable a vxWorks
based CA server to respond to requests originating outside it's subnet. These
based CA server to respond to requests originating outside its subnet. These
routing restrictions can also apply to vxWorks base CA clients communicating
with off subnet servers. An EPICS system manager can implement an rudimentary,
but robust, form of access control for a particular host by not providing
@@ -865,8 +859,8 @@ the contents of EPICS_CA_ADDR_LIST is used to augment the list. Otherwise, the
list is not augmented.</p>
<p>The EPICS_CAS_BEACON_PORT parameter specifies the destination port for
server beacons. The only exception to this occurs when ports are specified
in EPICS_CAS_BEACON_ADDR_LIST or possibly in EPICS_CA_ADDR_LIST. If
server beacons. The only exception to this occurs when ports are specified in
EPICS_CAS_BEACON_ADDR_LIST or possibly in EPICS_CA_ADDR_LIST. If
EPICS_CAS_BEACON_PORT is not specified then beacons are sent to the port
specified in EPICS_CA_REPEATER_PORT.</p>
@@ -874,7 +868,7 @@ specified in EPICS_CA_REPEATER_PORT.</p>
<p>The parameter EPICS_CAS_INTF_ADDR_LIST allows a ca server to bind itself to,
and therefore accept messages only over, a limited set of the local host's
network interfaces (each specified by it's IP address). On UNIX systems type
network interfaces (each specified by its IP address). On UNIX systems type
"netstat -i" (type "ipconfig" on windows) to see a list of the local host's
network interfaces. Specifically, UDP search messages addressed to both the IP
addresses in EPICS_CAS_INTF_ADDR_LIST and also to the broadcast addresses of
@@ -1885,7 +1879,7 @@ order to connect to this new beacon-out-of-range server. The typical situation
where a client would not see the server's beacon might be when the client isnt
on the same IP subnet as the server, and the client's EPICS_CA_ADDR_LIST was
modified to include a destination address for the server, but the server's
beacon address list was not modified so that it's beacons are received by the
beacon address list was not modified so that its beacons are received by the
client.</p>
<h4><a name="Server1">A Server's IP Address Was Changed</a></h4>
@@ -1938,8 +1932,8 @@ Termination Appear to be Ignored</a></h3>
<p>Short lived CA client applications that issue a CA put request and then
immediately exit the process (return from <code>main</code> or call
<code>exit</code>) may find that there request isn't executed. To guarantee
that the request is sent call <code>ca_flush</code> followed by
<code>ca_context_destroy</code> prior to terminating the process.</p>
that the request is sent call <code>ca_flush_io()</code> followed by
<code>ca_context_destroy()</code> prior to terminating the process.</p>
<h3><a name="Problems">ENOBUFS Messages</a></h3>
@@ -2017,8 +2011,8 @@ OS and even between different versions of the same OS.</p>
<p>If the subscription update producer in the server produces subscription
updates faster than the subscription update consumer in the client consumes
them, then events have to be discarded if the buffering in the server
isn't allowed to grow to an infinite size. This is a law of nature
- based on queuing theory of course.</p>
isn't allowed to grow to an infinite size. This is a law of nature &ndash;
based on queuing theory of course.</p>
<p>What is done depends on the version of the CA server. All server versions
place quotas on the maximum number of subscription updates allowed on the
@@ -2040,10 +2034,10 @@ server to resume with subscription updates. This prevents slow clients from
getting time warped, but also guarantees that intervening events are discarded
until the slow client catches up.</p>
<p>There is currently no message on the IOC's console when a
particular client is slow on the uptake. A message of this type used to exist
many years ago, but it was a source of confusion (and what we will call
message noise) so it was removed. </p>
<p>There is currently no message on the IOC's console when a particular client
is slow on the uptake. A message of this type used to exist many years ago, but
it was a source of confusion (and what we will call message noise) so it was
removed.</p>
<p>There is unfortunately no field in the protocol allowing the server to
indicate that an intervening subscription update was discarded. We should
@@ -2320,7 +2314,7 @@ int main ( int argc, char ** argv )
<p>Certain CA client initiated requests asynchronously execute an application
supplied call back in the client process when a response arrives. The functions
ca_put_callback, ca_get_callback, and ca_add_event all request notification of
ca_put_callback, ca_get_callback, and ca_create_subscription all request notification of
asynchronous completion via this mechanism. The <code>event_handler_args
</code>structure is passed <em>by value</em> to the application supplied
callback. In this structure the <code>dbr</code> field is a void pointer to any
@@ -2355,8 +2349,8 @@ void myCallback ( struct event_handler_args args )
<h3><a name="Channel1">Channel Access Exceptions</a></h3>
<p>When the server detects a failure, and there is no client call back function
attached to the request, an exception handler is executed in the client.
The default exception handler prints a message on the console and exits if the
attached to the request, an exception handler is executed in the client. The
default exception handler prints a message on the console and exits if the
exception condition is severe. Certain internal exceptions within the CA client
library, and failures detected by the SEVCHK macro may also cause the exception
handler to be invoked. To modify this behavior see <a
@@ -2423,12 +2417,12 @@ same process).</p>
all OS (in past releases the library was thread safe only on vxWorks). When the
client library is initialized the programmer may specify if preemptive callback
is to be enabled. Preemptive callback is disabled by default. If preemptive
callback is enabled, then the user's callback functions might be called by
CA's auxiliary threads when the main initiating channel access thread is not
inside of a function in the channel access client library. Otherwise, the
user's callback functions will be called only when the main initiating channel
access thread is executing inside of the CA client library. When the CA client
library invokes a user's callback function, it will always wait for the current
callback is enabled, then the user's callback functions might be called by CA's
auxiliary threads when the main initiating channel access thread is not inside
of a function in the channel access client library. Otherwise, the user's
callback functions will be called only when the main initiating channel access
thread is executing inside of the CA client library. When the CA client library
invokes a user's callback function, it will always wait for the current
callback to complete prior to executing another callback function. Programmers
enabling preemptive callback should be familiar with using mutex locks to
create a reliable multi-threaded program.</p>
@@ -2457,10 +2451,10 @@ address space (process) to be independent of each other. For example, the
database CA links and the sequencer are designed to not use the same CA client
library threads, network circuits, and data structures. Each thread that calls
<a href="#ca_context_create">ca_context_create()</a> for the first time either
directly or implicitly when calling any CA library function for the first
time, creates a CA client library context. A CA client library context contains
all of the threads, network circuits, and data structures required to connect
and communicate with the channels that a CA client application has created. The
directly or implicitly when calling any CA library function for the first time,
creates a CA client library context. A CA client library context contains all
of the threads, network circuits, and data structures required to connect and
communicate with the channels that a CA client application has created. The
priority of auxiliary threads spawned by the CA client library are at fixed
offsets from the priority of the thread that called <a
href="#ca_context_create">ca_context_create()</a>. An application specific
@@ -2530,9 +2524,9 @@ questionable practice for the following reasons.</p>
<ul>
<li>The vxWorks shell thread runs at the very highest priority in the system
and therefore socket calls are made at a priority that is above the
priority of tNetTask - a practice that has caused the WRS IP kernel
to get sick in the past. That symptom was observed some time ago, but we
don't know if WRS has fixed the problem.</li>
priority of tNetTask. This has caused problems with the WRS IP kernel in
the past. That symptom was observed some time ago, but we don't know if
WRS has fixed the problem.</li>
</ul>
<ul>
<li>The vxWorks shell thread runs at the very highest priority in the system
@@ -2648,7 +2642,7 @@ get called in the correct order.</p>
resources used by the client library such as sockets and allocated memory are
automatically released by the system when the process exits and
ca_context_destroy() hasn't been called, but on light weight systems such as
vxWorks or RTEMS no cleanup occurs unless the application call
vxWorks or RTEMS no cleanup occurs unless the application calls
ca_context_destroy().</p>
<h4>Returns</h4>
@@ -2661,16 +2655,10 @@ ca_context_destroy().</p>
<h3><code><a name="ca_create_channel">ca_create_channel()</a></code></h3>
<pre>#include &lt;cadef.h&gt;
typedef void ( *pCallBack ) (
struct connection_handler_args );
int ca_create_channel
(
const char *PROCESS_VARIABLE_NAME,
caCh *USERFUNC,
void *PUSER,
capri priority,
chid *PCHID
);</pre>
typedef void ( caCh ) (struct connection_handler_args);
int ca_create_channel (const char *PVNAME,
caCh *USERFUNC, void *PUSER,
capri PRIORITY, chid *PCHID );</pre>
<h4>Description</h4>
@@ -2685,7 +2673,7 @@ on a channel.</p>
<p>The circuit may be initially connected or disconnected depending on the
state of the network and the location of the channel. A channel will only enter
a connected state after server's address is determined, and only if channel
a connected state after the server's address is determined, and only if channel
access successfully establishes a virtual circuit through the network to the
server. Channel access routines that send a request to a server will return
ECA_DISCONNCHID if the channel is currently disconnected.</p>
@@ -2695,7 +2683,7 @@ a connected state.</p>
<ul>
<li>The first and simplest method requires that you call ca_pend_io(), and
wait for successful completion, prior to using a channel that was created
specifying a nil connection call back function pointer.</li>
specifying a nill connection call back function pointer.</li>
<li>The second method requires that you register a connection handler by
supplying a valid connection callback function pointer. This connection
handler is called whenever the connection state of the channel changes. If
@@ -2719,7 +2707,7 @@ time.</p>
<h4>Arguments</h4>
<dl>
<dt><code>PROCESS_VARIABLE_NAME</code></dt>
<dt><code>PVNAME</code></dt>
<dd>A nil terminated process variable name string. EPICS process control
function block database variable names are of the form "&lt;record
name&gt;.&lt;field name&gt;". If the field name and the period separator
@@ -2731,10 +2719,10 @@ time.</p>
<dt><code>USERFUNC</code></dt>
<dd>Optional address of the user's call back function to be run when the
connection state changes. Casual users of channel access may decide to
set this field to nil or 0 if they do not need to have a call back
set this field to nill or 0 if they do not need to have a call back
function run in response to each connection state change event.
<p>The following structure is passed <em>by value </em>to the user's
connection connection callback function. The <code>op</code> field will
connection callback function. The <code>op</code> field will
be set by the CA client library to <code>CA_OP_CONN_UP</code> when the
channel connects, and to <code>CA_OP_CONN_DOWN</code> when the channel
disconnects. See <code><a href="#ca_puser">ca_puser</a></code> if the
@@ -2751,7 +2739,7 @@ time.</p>
<dd>The value of this void pointer argument is retained in
storage associated with the specified channel. See the MACROS manual page
for reading and writing this field. Casual users of channel access may
wish to set this field to nil or 0.</dd>
wish to set this field to nill or 0.</dd>
</dl>
<dl>
<dt><code>PRIORITY</code></dt>
@@ -2818,29 +2806,27 @@ subscriptions (monitors) registered with the channel.</p>
<pre>#include &lt;cadef.h&gt;
int ca_put ( chtype TYPE,
chid CHID, void *PVALUE );
int ca_array_put ( chtype TYPE,
unsigned long COUNT,
int ca_array_put ( chtype TYPE, unsigned long COUNT,
chid CHID, const void *PVALUE);
typedef void ( *pCallBack ) (struct event_handler_args );
typedef void ( caEventCallBackFunc ) (struct event_handler_args);
int ca_put_callback ( chtype TYPE,
chid CHID, const void *PVALUE,
pCallBack PFUNC, void *USERARG );
int ca_array_put_callback ( chtype TYPE,
unsigned long COUNT,
caEventCallBackFunc PFUNC, void *USERARG );
int ca_array_put_callback ( chtype TYPE, unsigned long COUNT,
chid CHID, const void *PVALUE,
pCallBack PFUNC, void *USERARG );</pre>
caEventCallBackFunc PFUNC, void *USERARG );</pre>
<h4>Description</h4>
<p>Write a scalar or array value to a process variable.</p>
<p>When ca_array_put or ca_put are invoked the client will receive no response
<p>When ca_put or ca_array_put are invoked the client will receive no response
unless the request can not be fulfilled in the server. If unsuccessful an
exception handler is run on the client side.</p>
<p>When ca_array_put_callback are invoked the user supplied asynchronous call
back is called only after the initiated write operation, and all actions
resulting from the initiating write operation, complete.</p>
<p>When ca_put_callback or ca_array_put_callback are invoked the user supplied
asynchronous call back is called only after the initiated write operation, and
all actions resulting from the initiating write operation, complete.</p>
<p>If unsuccessful the call back function is invoked indicating failure status.
</p>
@@ -2861,7 +2847,7 @@ This allows several requests to be efficiently combined into one message.</p>
<h4>Description (IOC Database Specific)</h4>
<p>A CA put request causes the record to process if the record's SCAN field is
set to passive, and the field being written has it's process passive attribute
set to passive, and the field being written has its process passive attribute
set to true. If such a record is already processing when a put request is
initiated the specified field is written immediately, and the record is
scheduled to process again as soon as it finishes processing. Earlier instances
@@ -2869,20 +2855,19 @@ of multiple put requests initiated while the record is being processing may be
discarded, but the last put request initiated is always written and
processed.</p>
<p>A CA put <span style="font-style: italic;">callback</span> request causes
the record to process if the record's SCAN field is set to passive, and the
field being written has it's process passive attribute set to true. For such a
record, the user's put callback function is not called until after the record,
and any records that the record links to, finish processing. If such a record
is already processing when a put <span
style="font-style: italic;">callback</span> request is initiated the put <span
style="font-style: italic;">callback</span> request is postponed until the
record, and any records it links to, finish processing.</p>
<p>A CA put <em>callback</em> request causes the record to process if the
record's SCAN field is set to passive, and the field being written has its
process passive attribute set to true. For such a record, the user's put
callback function is not called until after the record, and any records that
the record links to, finish processing. If such a record is already processing
when a put <em>callback</em> request is initiated the put <em>callback</em>
request is postponed until the record, and any records it links to, finish
processing.</p>
<p>If the record's SCAN field is not set to passive, or the field being written
has it's process passive attribute set to false then the CA put or CA put
callback request cause the specified field to be immediately written, but they
do not cause the record to be processed.</p>
has its process passive attribute set to false then the CA put or CA put
<em>callback</em> request cause the specified field to be immediately written,
but they do not cause the record to be processed.</p>
<h4>Arguments</h4>
<dl>
@@ -2948,18 +2933,19 @@ int ca_get ( chtype TYPE,
chid CHID, void *PVALUE );
int ca_array_get ( chtype TYPE, unsigned long COUNT,
chid CHID, void *PVALUE );
typedef void ( *pCallBack ) (struct event_handler_args );
typedef void ( caEventCallBackFunc ) (struct event_handler_args);
int ca_get_callback ( chtype TYPE,
chid CHID, pCallBack USERFUNC, void *USERARG);
chid CHID,
caEventCallBackFunc USERFUNC, void *USERARG);
int ca_array_get_callback ( chtype TYPE, unsigned long COUNT,
chid CHID,
pCallBack USERFUNC, void *USERARG );</pre>
caEventCallBackFunc USERFUNC, void *USERARG);</pre>
<h4>Description</h4>
<p>Read a scalar or array value from a process variable.</p>
<p>When ca_get or ca_array_get are invoked the returned channel value cant be
<p>When ca_get or ca_array_get are invoked the returned channel value can't be
assumed to be stable in the application supplied buffer until after ECA_NORMAL
is returned from ca_pend_io. If a connection is lost outstanding ca get
requests are not automatically reissued following reconnect.</p>
@@ -3051,11 +3037,10 @@ when a CA get request is initiated.</p>
<h3><code><a name="ca_add_event">ca_create_subscription()</a></code></h3>
<pre>#include &lt;cadef.h&gt;
typedef void ( *pCallBack ) (
struct event_handler_args );
int ca_create_subscription ( chtype TYPE,
unsigned long COUNT, chid CHID,
unsigned long MASK, pCallBack USERFUNC, void *USERARG,
typedef void ( caEventCallBackFunc ) (struct event_handler_args);
int ca_create_subscription ( chtype TYPE, unsigned long COUNT,
chid CHID, unsigned long MASK,
caEventCallBackFunc USERFUNC, void *USERARG,
evid *PEVID );</pre>
<h4>Description</h4>
@@ -3064,10 +3049,10 @@ int ca_create_subscription ( chtype TYPE,
invoked whenever the process variable undergoes significant state changes. A
significant change can be a change in the process variable's value, alarm
status, or alarm severity. In the process control function block database the
deadband field determines the magnitude of a significant change for for the
deadband field determines the magnitude of a significant change for the
process variable's value. Each call to this function consumes resources in the
client library and potentially a CA server until one of ca_clear_channel or
ca_clear_event is called.</p>
ca_clear_subscription is called.</p>
<p>Subscriptions may be installed or canceled against both connected and
disconnected channels. The specified USERFUNC is called once immediately after
@@ -3075,7 +3060,7 @@ the subscription is installed with the process variable's current state if the
process variable is connected. Otherwise, the specified USERFUNC is called
immediately after establishing a connection (or reconnection) with the process
variable. The specified USERFUNC is called immediately with the process
variable's current state from within ca_add_event() if the client and the
variable's current state from within ca_create_subscription() if the client and the
process variable share the same address space.</p>
<p>If a subscription is installed on a channel in a disconnected state then the
@@ -3132,8 +3117,8 @@ indicating the current state of the channel.</p>
<dl>
<dt><code>PEVID</code></dt>
<dd>This is a pointer to user supplied event id which is overwritten if
successful. This event id can later be used to clear a specific
event. This option may may be omitted by passing a nil pointer.</dd>
successful. This event id can later be used to clear a specific event.
This option may be omitted by passing a nill pointer.</dd>
</dl>
<dl>
<dt><code>MASK</code></dt>
@@ -3181,7 +3166,7 @@ int ca_clear_subscription ( evid EVID );</pre>
<p>Cancel a subscription.</p>
<p>All ca_clear_event() requests such as the above are accumulated (buffered)
<p>All cancel-subscription requests such as the above are accumulated (buffered)
and not forwarded to the server until one of ca_flush_io, ca_pend_io,
ca_pend_event, or ca_sg_pend are called. This allows several requests to be
efficiently sent together in one message.</p>
@@ -3189,7 +3174,7 @@ efficiently sent together in one message.</p>
<h4>Arguments</h4>
<dl>
<dt>EVID</dt>
<dd>event id returned by ca_add_event()</dd>
<dd>event id returned by ca_create_subscription()</dd>
</dl>
<h4>Returns</h4>
@@ -3240,9 +3225,9 @@ activities</em>.</p>
network delays such as Ethernet collision exponential back off until
retransmission delays which can be quite long on overloaded networks.</p>
<p>Unlike <code><a href="#ca_pend_event">ca_pend_event</a></code>, this routine will
not process CA's background activities if none of the selected IO requests are
pending.</p>
<p>Unlike <code><a href="#ca_pend_event">ca_pend_event</a></code>, this routine
will not process CA's background activities if none of the selected IO requests
are pending.</p>
<h4>Arguments</h4>
<dl>
@@ -3305,7 +3290,7 @@ activity is processed for TIMEOUT seconds.</p>
background activity is processed.</p>
<p>The ca_pend_event function will <em>not</em> return before the specified
time-out expires and all unfinished channel access labor has been processed,
timeout expires and all unfinished channel access labor has been processed,
and unlike <code><a href="#ca_pend_io">ca_pend_io</a></code> returning from the
function does <em>not </em>indicate anything about the status of pending IO
requests.</p>
@@ -3417,7 +3402,7 @@ field should not be used.</p>
<dl>
<dt><code>USERFUNC</code></dt>
<dd>Address of user callback function to be executed when an exceptions
occur. Passing a nil value causes the default exception handler to be
occur. Passing a nill value causes the default exception handler to be
reinstalled. The following structure is passed by value to the user's
callback function. Currently, the <code>op</code> field can be one of
<code>CA_OP_GET, CA_OP_PUT, CA_OP_CREATE_CHANNEL, CA_OP_ADD_EVENT,
@@ -3540,7 +3525,7 @@ get the lowest latency response to the arrival of CA messages.</p>
<h3><code><a name="ca_replace_printf_handler">ca_replace_printf_handler
()</a></code></h3>
<pre>#include &lt;cadef.h&gt;
typedef int caPrintfFunc ( const char *pFromat, va_list args );
typedef int caPrintfFunc ( const char *pFormat, va_list args );
int ca_replace_printf_handler ( caPrintfFunc *PFUNC );</pre>
<h4>Description</h4>
@@ -3552,7 +3537,7 @@ default handler uses fprintf to send messages to 'stderr'.</p>
<dl>
<dt><code>PFUNC</code></dt>
<dd>The address of a user supplied call back handler to be invoked when CA
prints diagnostic messages. Installing a nil pointer will cause the
prints diagnostic messages. Installing a nill pointer will cause the
default call back handler to be reinstalled.</dd>
</dl>
@@ -3571,8 +3556,9 @@ SEVCHK ( status, "failed to install my printf handler" );</pre>
<h3><code><a name="ca_replace">ca_replace_access_rights_event()</a></code></h3>
<pre>#include &lt;cadef.h&gt;
typedef void ( *pCallBack )( struct access_rights_handler_args );
int ca_replace_access_rights_event ( chid CHAN, pCallBack PFUNC );</pre>
typedef void ( caEventCallBackFunc )(struct access_rights_handler_args);
int ca_replace_access_rights_event ( chid CHAN,
caEventCallBackFunc PFUNC );</pre>
<h4>Description</h4>
@@ -3598,7 +3584,7 @@ specified channel.</p>
</dl>
<dl>
<dt><code>PFUNC</code></dt>
<dd>Address of user supplied call back function. A nil pointer uninstalls
<dd>Address of user supplied call back function. A nill pointer uninstalls
the current handler. The following arguments are passed <em>by value</em>
to the supplied callback handler.
<pre>typedef struct ca_access_rights {
@@ -3941,12 +3927,12 @@ prints diagnostics to standard out.</p>
<h4>Examples</h4>
<pre>void ca_test_event ();
status = ca_add_event ( type, chid, ca_test_event, NULL, NULL );
status = ca_create_subscription ( type, chid, ca_test_event, NULL, NULL );
SEVCHK ( status, .... );</pre>
<h4>See Also</h4>
<p><a href="#ca_add_event">ca_add_event</a>()</p>
<p><a href="#ca_add_event">ca_create_subscription</a>()</p>
<h3><code><a name="ca_sg_create">ca_sg_create()</a></code></h3>
<pre>#include &lt;cadef.h&gt;
@@ -4029,7 +4015,7 @@ SEVCHK ( status, Sync group delete failed );</pre>
<h3><code><a name="ca_sg_block">ca_sg_block()</a></code></h3>
<pre>#include &lt;cadef.h&gt;
int ca_sg_block ( CA_SYNC_GID GID, double timeout );</pre>
int ca_sg_block ( CA_SYNC_GID GID, double TIMEOUT );</pre>
<h4>Description</h4>
@@ -4050,13 +4036,16 @@ access background activity while it is waiting.</p>
<h4>Arguments</h4>
<dl>
<dt>GID</dt>
<dt><code>GID</code></dt>
<dd>Identifier of the synchronous group.</dd>
<dt><code>TIMEOUT</code></dt>
<dd>The duration to block in this routine in seconds. A timeout of zero
seconds blocks forever.</dd>
</dl>
<h4>Examples</h4>
<pre>CA_SYNC_GID gid;
status = ca_sg_block(gid);
status = ca_sg_block(gid, 0.0);
SEVCHK(status, Sync group block failed);</pre>
<h4>Returns</h4>
@@ -4267,8 +4256,8 @@ reissued.</p>
<h3><code><a name="ca_client_status">ca_client_status()</a></code></h3>
<pre>int ca_client_status ( unsigned level );
int ca_context_status ( struct ca_client_context *,
unsigned level );</pre>
int ca_context_status ( struct ca_client_context *CONTEXT,
unsigned LEVEL );</pre>
<h4>Description</h4>
@@ -4279,7 +4268,7 @@ ca_client_status() prints information about the calling threads CA context.</p>
<h4>Arguments</h4>
<dl>
<dt><code>CONTEXT</code></dt>
<dd>A pointer to the CA context to join with.</dd>
<dd>A pointer to the CA context to examine.</dd>
<dt><code>LEVEL</code></dt>
<dd>The interest level. Increasing level produces increasing detail.</dd>
</dl>
@@ -4289,7 +4278,7 @@ ca_client_status() prints information about the calling threads CA context.</p>
<h4>Description</h4>
<p>Returns a pointer to the current thread's CA context. If none then nil is
<p>Returns a pointer to the current thread's CA context. If none then nill is
returned.</p>
<h4>See Also</h4>
@@ -4322,12 +4311,11 @@ preemptively from more than one thread.</p>
<h4>Returns</h4>
<p>ECA_ISATTACHED - already attached to a CA context</p>
<p>ECA_NORMAL - Normal successful completion</p>
<p>ECA_NOTTHREADED - the specified context is non-preemptive and therefore does
not allow other threads to join</p>
<p>ECA_NOTTHREADED - Context is not preemptive so cannot be joined</p>
<p>ECA_ISATTACHED - the current thread is already attached to a CA context</p>
<p>ECA_ISATTACHED - Thread already attached to a CA context</p>
<h4>See Also</h4>
@@ -4359,7 +4347,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

0
src/ca/SearchDest.h Executable file → Normal file
View File

View File

@@ -376,15 +376,35 @@ int epicsShareAPI ca_create_channel (
int epicsShareAPI ca_clear_channel ( chid pChan )
{
ca_client_context & cac = pChan->getClientCtx ();
epicsGuard < epicsMutex > guard ( cac.mutex );
try {
pChan->eliminateExcessiveSendBacklog ( guard );
{
epicsGuard < epicsMutex > guard ( cac.mutex );
try {
pChan->eliminateExcessiveSendBacklog ( guard );
}
catch ( cacChannel::notConnected & ) {
// intentionally ignored
}
}
catch ( cacChannel::notConnected & ) {
// intentionally ignored
}
pChan->destructor ( guard );
if ( cac.pCallbackGuard.get() &&
cac.createdByThread == epicsThreadGetIdSelf () ) {
epicsGuard < epicsMutex > guard ( cac.mutex );
pChan->destructor ( *cac.pCallbackGuard.get(), guard );
cac.oldChannelNotifyFreeList.release ( pChan );
}
else {
//
// we will definately stall out here if all of the
// following are true
//
// o user creates non-preemtive mode client library context
// o user doesnt periodically call a ca function
// o user calls this function from an auxiillary thread
//
CallbackGuard cbGuard ( cac.cbMutex );
epicsGuard < epicsMutex > guard ( cac.mutex );
pChan->destructor ( *cac.pCallbackGuard.get(), guard );
cac.oldChannelNotifyFreeList.release ( pChan );
}
return ECA_NORMAL;
}
@@ -433,7 +453,7 @@ chid epicsShareAPI ca_evid_to_chid ( evid pMon )
}
// extern "C"
int epicsShareAPI ca_pend ( ca_real timeout, int early ) // X aCC 361
int epicsShareAPI ca_pend ( ca_real timeout, int early )
{
if ( early ) {
return ca_pend_io ( timeout );
@@ -516,7 +536,7 @@ int epicsShareAPI ca_flush_io ()
/*
* CA_TEST_IO ()
*/
int epicsShareAPI ca_test_io () // X aCC 361
int epicsShareAPI ca_test_io ()
{
ca_client_context *pcac;
int caStatus = fetchClientContext ( &pcac );
@@ -551,7 +571,7 @@ void epicsShareAPI ca_signal ( long ca_status, const char *message )
* (if they call this routine again).
*/
// extern "C"
const char * epicsShareAPI ca_message ( long ca_status ) // X aCC 361
const char * epicsShareAPI ca_message ( long ca_status )
{
unsigned msgNo = CA_EXTRACT_MSG_NO ( ca_status );

View File

@@ -10,6 +10,11 @@
/*
* CA regression test
* Authors:
* Jeff Hill
* Murali Shankar - initial versions of verifyMultithreadSubscr
* Michael Abbott - initial versions of multiSubscrDestroyNoLateCallbackTest
*
*/
/*
@@ -26,6 +31,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"
@@ -1322,6 +1329,159 @@ void test_sync_groups ( chid chan, unsigned interestLevel )
showProgressEnd ( interestLevel );
}
#define multiSubscrDestroyNoLateCallbackEventCount 500
struct MultiSubscrDestroyNoLateCallbackEventData {
evid m_id;
size_t m_nCallback;
int m_callbackIsOk;
struct MultiSubscrDestroyNoLateCallbackTestData * m_pTestData;
};
struct MultiSubscrDestroyNoLateCallbackTestData {
const char * m_pChanName;
chid m_chan;
epicsMutexId m_mutex;
epicsEventId m_testDoneEvent;
unsigned m_interestLevel;
struct MultiSubscrDestroyNoLateCallbackEventData
m_eventData [multiSubscrDestroyNoLateCallbackEventCount];
};
static void noLateCallbackDetect ( struct event_handler_args args )
{
int callbackIsOk;
struct MultiSubscrDestroyNoLateCallbackEventData * const pEventData = args.usr;
epicsMutexLockStatus lockStatus = epicsMutexLock ( pEventData->m_pTestData->m_mutex );
callbackIsOk = pEventData->m_callbackIsOk;
pEventData->m_nCallback++;
epicsMutexUnlock ( pEventData->m_pTestData->m_mutex );
verify ( lockStatus == epicsMutexLockOK );
verify ( callbackIsOk );
}
static void multiSubscrDestroyNoLateCallbackThread ( void * pParm )
{
struct MultiSubscrDestroyNoLateCallbackTestData * const pTestData =
( struct MultiSubscrDestroyNoLateCallbackTestData * ) pParm;
unsigned i, j;
int status;
status = ca_context_create ( ca_enable_preemptive_callback );
verify ( status == ECA_NORMAL );
status = ca_create_channel ( pTestData->m_pChanName, 0, 0,
CA_PRIORITY_DEFAULT, &pTestData->m_chan );
status = ca_pend_io ( timeoutToPendIO );
SEVCHK ( status, "multiSubscrDestroyLateNoCallbackTest: channel connect failed" );
verify ( status == ECA_NORMAL );
/*
* create a set of subscriptions
*/
for ( i=0; i < 10000; i++ ) {
unsigned int priorityOfTestThread;
for ( j=0; j < multiSubscrDestroyNoLateCallbackEventCount; j++ ) {
epicsMutexLockStatus lockStatus = epicsMutexLock ( pTestData->m_mutex );
verify ( lockStatus == epicsMutexLockOK );
pTestData->m_eventData[j].m_nCallback = 0;
pTestData->m_eventData[j].m_callbackIsOk = TRUE;
pTestData->m_eventData[j].m_pTestData = pTestData;
epicsMutexUnlock ( pTestData->m_mutex );
SEVCHK ( ca_add_event ( DBR_GR_FLOAT, pTestData->m_chan, noLateCallbackDetect,
&pTestData->m_eventData[j], &pTestData->m_eventData[j].m_id ) , NULL );
}
SEVCHK ( ca_flush_io(), NULL );
/*
* raise the priority of the current thread hoping to improve our
* likelyhood of detecting a bug
*/
priorityOfTestThread = epicsThreadGetPrioritySelf ();
epicsThreadSetPriority ( epicsThreadGetIdSelf(), epicsThreadPriorityHigh );
/*
* wait for the first subscription update to arrive
*/
{
epicsMutexLockStatus lockStatus = epicsMutexLock ( pTestData->m_mutex );
verify ( lockStatus == epicsMutexLockOK );
while ( pTestData->m_eventData[0].m_nCallback == 0 ) {
epicsMutexUnlock ( pTestData->m_mutex );
epicsThreadSleep ( 50e-6 );
lockStatus = epicsMutexLock ( pTestData->m_mutex );
verify ( lockStatus == epicsMutexLockOK );
}
epicsMutexUnlock ( pTestData->m_mutex );
}
/*
* try to destroy all of the subscriptions at precisely the same time that
* their first callbacks are running
*/
for ( j=0; j < multiSubscrDestroyNoLateCallbackEventCount; j++ ) {
epicsMutexLockStatus lockStatus;
SEVCHK ( ca_clear_event ( pTestData->m_eventData[j].m_id ) , NULL );
lockStatus = epicsMutexLock ( pTestData->m_mutex );
verify ( lockStatus == epicsMutexLockOK );
pTestData->m_eventData[j].m_callbackIsOk = FALSE;
epicsMutexUnlock ( pTestData->m_mutex );
}
/*
* return to the original priority
*/
epicsThreadSetPriority ( epicsThreadGetIdSelf(), priorityOfTestThread );
if ( i % 1000 == 0 ) {
showProgress ( pTestData->m_interestLevel );
}
}
SEVCHK ( ca_clear_channel ( pTestData->m_chan ), NULL );
ca_context_destroy ();
epicsEventSignal ( pTestData->m_testDoneEvent );
}
/*
* verify that, in a preemtive callback mode client, a subscription callback never
* comes after the subscription is destroyed
*/
static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned interestLevel )
{
struct MultiSubscrDestroyNoLateCallbackTestData * pTestData;
showProgressBegin ( "multiSubscrDestroyNoLateCallbackTest", interestLevel );
pTestData = calloc ( 1u, sizeof ( struct MultiSubscrDestroyNoLateCallbackTestData ) );
verify ( pTestData );
pTestData->m_mutex = epicsMutexMustCreate ();
pTestData->m_testDoneEvent = epicsEventMustCreate ( epicsEventEmpty );
pTestData->m_pChanName = pName;
pTestData->m_interestLevel = interestLevel;
epicsThreadMustCreate (
"multiSubscrDestroyNoLateCallbackTest",
epicsThreadPriorityLow,
epicsThreadGetStackSize ( epicsThreadStackMedium ),
multiSubscrDestroyNoLateCallbackThread,
pTestData );
/*
* wait for test to complete
*/
epicsEventMustWait ( pTestData->m_testDoneEvent );
/*
* cleanup
*/
epicsMutexDestroy ( pTestData->m_mutex );
epicsEventDestroy ( pTestData->m_testDoneEvent );
free ( pTestData );
showProgressEnd ( interestLevel );
}
/*
* multiSubscriptionDeleteTest
*
@@ -2719,6 +2879,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 +3305,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 +3330,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 +3377,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 );
}
@@ -3061,6 +3417,11 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
epicsEnvSet ( "EPICS_CA_MAX_ARRAY_BYTES", tmpString );
}
/*
* this test creates, and then destroys, a private CA context
*/
multiSubscrDestroyNoLateCallbackTest ( pName, interestLevel );
status = ca_context_create ( select );
SEVCHK ( status, NULL );
@@ -3123,6 +3484,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

@@ -332,13 +332,6 @@ void bhe::unregisterIIU (
}
}
void * bhe::operator new ( size_t ) // X aCC 361
{
// The HPUX compiler seems to require this even though no code
// calls it directly
throw std::logic_error ( "why is the compiler calling private operator new" );
}
void bhe::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if

View File

@@ -87,7 +87,6 @@ private:
const epicsTime & currentTime );
bhe ( const bhe & );
bhe & operator = ( const bhe & );
void * operator new ( size_t size );
epicsShareFunc void operator delete ( void * );
};

0
src/ca/ca.rc Executable file → Normal file
View File

View File

@@ -106,7 +106,7 @@ ca_client_context::ca_client_context ( bool enablePreemptiveCallback ) :
{
osiSockIoctl_t yes = true;
int status = socket_ioctl ( this->sock, // X aCC 392
int status = socket_ioctl ( this->sock,
FIONBIO, & yes);
if ( status < 0 ) {
char sockErrBuf[64];
@@ -126,7 +126,7 @@ ca_client_context::ca_client_context ( bool enablePreemptiveCallback ) :
memset ( (char *)&addr, 0 , sizeof ( addr ) );
addr.ia.sin_family = AF_INET;
addr.ia.sin_addr.s_addr = htonl ( INADDR_ANY );
addr.ia.sin_port = htons ( PORT_ANY ); // X aCC 818
addr.ia.sin_port = htons ( PORT_ANY );
int status = bind (this->sock, &addr.sa, sizeof (addr) );
if ( status < 0 ) {
char sockErrBuf[64];
@@ -159,9 +159,9 @@ ca_client_context::ca_client_context ( bool enablePreemptiveCallback ) :
this->localPort = htons ( tmpAddr.ia.sin_port );
}
epics_auto_ptr < epicsGuard < epicsMutex > > pCBGuard;
epics_auto_ptr < CallbackGuard > pCBGuard;
if ( ! enablePreemptiveCallback ) {
pCBGuard.reset ( new epicsGuard < epicsMutex > ( this->cbMutex ) );
pCBGuard.reset ( new CallbackGuard ( this->cbMutex ) );
}
// multiple steps ensure exception safety
@@ -277,7 +277,7 @@ int ca_client_context :: printFormated (
}
int ca_client_context :: varArgsPrintFormated (
const char *pformat, va_list args ) const // X aCC 361
const char *pformat, va_list args ) const
{
caPrintfFunc * pFunc;
{
@@ -751,6 +751,8 @@ epicsShareFunc int epicsShareAPI ca_clear_subscription ( evid pMon )
{
oldChannelNotify & chan = pMon->channel ();
ca_client_context & cac = chan.getClientCtx ();
// !!!! the order in which we take the mutex here prevents deadlocks
{
epicsGuard < epicsMutex > guard ( cac.mutex );
try {
// if this stalls out on a live circuit then an exception
@@ -761,7 +763,25 @@ epicsShareFunc int epicsShareAPI ca_clear_subscription ( evid pMon )
catch ( cacChannel::notConnected & ) {
// intentionally ignored
}
pMon->cancel ( guard );
}
if ( cac.pCallbackGuard.get() &&
cac.createdByThread == epicsThreadGetIdSelf () ) {
epicsGuard < epicsMutex > guard ( cac.mutex );
pMon->cancel ( *cac.pCallbackGuard.get(), guard );
}
else {
//
// we will definately stall out here if all of the
// following are true
//
// o user creates non-preemtive mode client library context
// o user doesnt periodically call a ca function
// o user calls this function from an auxiillary thread
//
CallbackGuard cbGuard ( cac.cbMutex );
epicsGuard < epicsMutex > guard ( cac.mutex );
pMon->cancel ( cbGuard, guard );
}
return ECA_NORMAL;
}

View File

@@ -568,7 +568,7 @@ bool cac::findOrCreateVirtCircuit (
}
void cac::transferChanToVirtCircuit (
unsigned cid, unsigned sid, // X aCC 431
unsigned cid, unsigned sid,
ca_uint16_t typeCode, arrayElementCount count,
unsigned minorVersionNumber, const osiSockAddr & addr,
const epicsTime & currentTime )
@@ -711,6 +711,7 @@ netReadNotifyIO & cac::readNotifyRequest (
}
bool cac::destroyIO (
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & guard,
const cacChannel::ioid & idIn, nciu & chan )
{
@@ -787,7 +788,7 @@ void cac::recycleSubscription (
netSubscription & cac::subscriptionRequest (
epicsGuard < epicsMutex > & guard,
nciu & chan, privateInterfaceForIO & privChan,
unsigned type, // X aCC 361
unsigned type,
arrayElementCount nElem, unsigned mask,
cacStateNotify & notifyIn,
bool chanIsInstalled )
@@ -1021,7 +1022,7 @@ bool cac::readExcep ( callbackManager &, tcpiiu &,
}
bool cac::writeExcep (
callbackManager & mgr, // X aCC 431
callbackManager & mgr,
tcpiiu &, const caHdrLargeArray & hdr,
const char * pCtx, unsigned status )
{
@@ -1093,7 +1094,7 @@ bool cac::exceptionRespAction ( callbackManager & cbMutexIn, tcpiiu & iiu,
}
bool cac::accessRightsRespAction (
callbackManager & mgr, tcpiiu &, // X aCC 431
callbackManager & mgr, tcpiiu &,
const epicsTime &, const caHdrLargeArray & hdr, void * /* pMsgBody */ )
{
epicsGuard < epicsMutex > guard ( this->mutex );
@@ -1110,7 +1111,7 @@ bool cac::accessRightsRespAction (
}
bool cac::createChannelRespAction (
callbackManager & mgr, tcpiiu & iiu, // X aCC 431
callbackManager & mgr, tcpiiu & iiu,
const epicsTime &, const caHdrLargeArray & hdr, void * /* pMsgBody */ )
{
epicsGuard < epicsMutex > guard ( this->mutex );
@@ -1157,7 +1158,7 @@ bool cac::verifyAndDisconnectChan (
}
void cac::disconnectChannel (
epicsGuard < epicsMutex > & cbGuard, // X aCC 431
epicsGuard < epicsMutex > & cbGuard,
epicsGuard < epicsMutex > & guard, nciu & chan )
{
guard.assertIdenticalMutex ( this->mutex );

View File

@@ -55,7 +55,7 @@ class netSubscription;
// used to control access to cac's recycle routines which
// should only be indirectly invoked by CAC when its lock
// is applied
class cacRecycle { // X aCC 655
class cacRecycle {
public:
virtual void recycleReadNotifyIO (
epicsGuard < epicsMutex > &, netReadNotifyIO &io ) = 0;
@@ -155,7 +155,8 @@ public:
unsigned type, arrayElementCount nElem, unsigned mask,
cacStateNotify &, bool channelIsInstalled );
bool destroyIO (
epicsGuard < epicsMutex > & guard,
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard,
const cacChannel::ioid & idIn,
nciu & chan );
void disconnectAllIO (
@@ -167,11 +168,6 @@ public:
epicsGuard < epicsMutex > & guard,
const cacChannel::ioid &id, unsigned level ) const;
// sync group routines
CASG * lookupCASG ( epicsGuard < epicsMutex > &, unsigned id );
void installCASG ( epicsGuard < epicsMutex > &, CASG & );
void uninstallCASG ( epicsGuard < epicsMutex > &, CASG & );
// exception generation
void exception (
epicsGuard < epicsMutex > & cbGuard,
@@ -266,8 +262,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

@@ -69,7 +69,7 @@ typedef unsigned long arrayElementCount;
// 1) this should not be passing caerr.h status to the exception callback
// 2) needless-to-say the data should be passed here using the new data access API
class epicsShareClass cacWriteNotify { // X aCC 655
class epicsShareClass cacWriteNotify {
public:
virtual ~cacWriteNotify () = 0;
virtual void completion ( epicsGuard < epicsMutex > & ) = 0;
@@ -82,7 +82,7 @@ public:
// 1) this should not be passing caerr.h status to the exception callback
// 2) needless-to-say the data should be passed here using the new data access API
class epicsShareClass cacReadNotify { // X aCC 655
class epicsShareClass cacReadNotify {
public:
virtual ~cacReadNotify () = 0;
virtual void completion (
@@ -97,7 +97,7 @@ public:
// 1) this should not be passing caerr.h status to the exception callback
// 2) needless-to-say the data should be passed here using the new data access API
class epicsShareClass cacStateNotify { // X aCC 655
class epicsShareClass cacStateNotify {
public:
virtual ~cacStateNotify () = 0;
virtual void current (
@@ -131,7 +131,7 @@ private:
bool f_operatorConfirmationRequest:1;
};
class epicsShareClass cacChannelNotify { // X aCC 655
class epicsShareClass cacChannelNotify {
public:
virtual ~cacChannelNotify () = 0;
virtual void connectNotify ( epicsGuard < epicsMutex > & ) = 0;
@@ -152,6 +152,16 @@ public:
unsigned type, arrayElementCount count ) = 0;
};
class CallbackGuard :
public epicsGuard < epicsMutex > {
public:
CallbackGuard ( epicsMutex & mutex ) :
epicsGuard < epicsMutex > ( mutex ) {}
private:
CallbackGuard ( const CallbackGuard & );
CallbackGuard & operator = ( const CallbackGuard & );
};
//
// Notes
// 1) This interface assumes that when a channel is deleted then all
@@ -174,6 +184,7 @@ public:
cacChannel ( cacChannelNotify & );
virtual void destroy (
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard ) = 0;
cacChannelNotify & notify () const; // required ?????
virtual unsigned getName (
@@ -207,7 +218,15 @@ public:
epicsGuard < epicsMutex > &, unsigned type,
arrayElementCount count, unsigned mask, cacStateNotify &,
ioid * = 0 ) = 0;
// The primary mutex must be released when calling the user's
// callback, and therefore a finite interval exists when we are
// moving forward with the intent to call the users callback
// but the users IO could be deleted during this interval.
// To prevent the user's callback from being called after
// destroying his IO we must past a guard for the callback
// mutex here.
virtual void ioCancel (
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard,
const ioid & ) = 0;
virtual void ioShow (
@@ -258,7 +277,7 @@ private:
cacChannel & operator = ( const cacChannel & );
};
class epicsShareClass cacContext { // X aCC 655
class epicsShareClass cacContext {
public:
virtual ~cacContext ();
virtual cacChannel & createChannel (
@@ -277,7 +296,7 @@ public:
epicsGuard < epicsMutex > &, unsigned level ) const = 0;
};
class epicsShareClass cacContextNotify { // X aCC 655
class epicsShareClass cacContextNotify {
public:
virtual ~cacContextNotify () = 0;
virtual cacContext & createNetworkContext (
@@ -297,7 +316,7 @@ public:
// **** Lock Hierarchy ****
// callbackControl must be taken before mutualExclusion if both are held at
// the same time
class epicsShareClass cacService { // X aCC 655
class epicsShareClass cacService {
public:
virtual ~cacService () = 0;
virtual cacContext & contextCreate (

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

@@ -131,7 +131,7 @@ int main ( int argc, char ** argv )
}
osiSockIoctl_t yes = true;
status = socket_ioctl ( sock, FIONBIO, &yes ); // X aCC 392
status = socket_ioctl ( sock, FIONBIO, &yes );
if ( status < 0 ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
@@ -166,7 +166,7 @@ int main ( int argc, char ** argv )
}
osiSockIoctl_t no = false;
status = socket_ioctl ( sock, FIONBIO, &no ); // X aCC 392
status = socket_ioctl ( sock, FIONBIO, &no );
if ( status < 0 ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString (

View File

@@ -44,7 +44,7 @@ public:
virtual void release ( void * ) = 0;
};
class wireSendAdapter { // X aCC 655
class wireSendAdapter {
public:
virtual unsigned sendBytes ( const void * pBuf,
unsigned nBytesInBuf,
@@ -65,7 +65,7 @@ struct statusWireIO {
swioCircuitState circuitState;
};
class wireRecvAdapter { // X aCC 655
class wireRecvAdapter {
public:
virtual void recvBytes ( void * pBuf,
unsigned nBytesInBuf, statusWireIO & ) = 0;
@@ -114,7 +114,6 @@ private:
unsigned nextWriteIndex;
unsigned nextReadIndex;
epicsUInt8 buf [ comBufSize ];
void * operator new ( size_t size );
void operator delete ( void * );
template < class T >
bool push ( const T * ); // disabled

View File

@@ -155,7 +155,7 @@ epicsUInt32 comQueRecv::multiBufferPopUInt32 ()
unsigned byte3 = this->popUInt8();
unsigned byte4 = this->popUInt8();
tmp = static_cast <epicsUInt32>
( ( byte1 << 24u ) | ( byte2 << 16u ) | //X aCC 392
( ( byte1 << 24u ) | ( byte2 << 16u ) |
( byte3 << 8u ) | byte4 );
}
else {

View File

@@ -368,7 +368,7 @@ void comQueSend::insertRequestWithPayLoad (
// the above checks verify that the total size
// is lest that 0xffffffff
size = static_cast < ca_uint32_t >
( dbr_size_n ( dataType, nElem ) ); // X aCC 392
( dbr_size_n ( dataType, nElem ) );
payloadSize = CA_MESSAGE_ALIGN ( size );
this->insertRequestHeader ( request, payloadSize,
static_cast <ca_uint16_t> ( dataType ),

View File

@@ -65,7 +65,7 @@ void disconnectGovernorTimer::shutdown (
}
epicsTimerNotify::expireStatus disconnectGovernorTimer::expire (
const epicsTime & /* currentTime */ ) // X aCC 361
const epicsTime & /* currentTime */ )
{
epicsGuard < epicsMutex > guard ( this->mutex );
while ( nciu * pChan = chanList.get () ) {

View File

@@ -43,7 +43,7 @@
#include "caProto.h"
#include "netiiu.h"
class disconnectGovernorNotify { // X aCC 655
class disconnectGovernorNotify {
public:
virtual ~disconnectGovernorNotify () = 0;
virtual void govExpireNotify (

View File

@@ -90,13 +90,6 @@ void getCallback::exception (
}
}
void * getCallback::operator new ( size_t ) // X aCC 361
{
// The HPUX compiler seems to require this even though no code
// calls it directly
throw std::logic_error ( "why is the compiler calling private operator new" );
}
void getCallback::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if

View File

@@ -105,13 +105,6 @@ void getCopy::show ( unsigned level ) const
}
}
void * getCopy::operator new ( size_t ) // X aCC 361
{
// The HPUX compiler seems to require this even though no code
// calls it directly
throw std::logic_error ( "why is the compiler calling private operator new" );
}
void getCopy::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if

View File

@@ -22,12 +22,12 @@
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include "envDefs.h"
#include "epicsAssert.h"
#include "epicsStdioRedirect.h"
#include "errlog.h"
#include "osiWireFormat.h"
@@ -133,7 +133,7 @@ extern "C" void epicsShareAPI removeDuplicateAddresses
if ( pNode->addr.sa.sa_family == AF_INET ) {
pTmpNode = (osiSockAddrNode *) ellFirst (pDestList); // X aCC 749
pTmpNode = (osiSockAddrNode *) ellFirst (pDestList);
while ( pTmpNode ) {
if (pTmpNode->addr.sa.sa_family == AF_INET) {
if ( pNode->addr.ia.sin_addr.s_addr == pTmpNode->addr.ia.sin_addr.s_addr &&
@@ -149,7 +149,7 @@ extern "C" void epicsShareAPI removeDuplicateAddresses
break;
}
}
pTmpNode = (osiSockAddrNode *) ellNext (&pTmpNode->node); // X aCC 749
pTmpNode = (osiSockAddrNode *) ellNext (&pTmpNode->node);
}
if (pNode) {
ellAdd (pDestList, &pNode->node);
@@ -168,12 +168,12 @@ static void forcePort ( ELLLIST *pList, unsigned short port )
{
osiSockAddrNode *pNode;
pNode = ( osiSockAddrNode * ) ellFirst ( pList ); // X aCC 749
pNode = ( osiSockAddrNode * ) ellFirst ( pList );
while ( pNode ) {
if ( pNode->addr.sa.sa_family == AF_INET ) {
pNode->addr.ia.sin_port = htons ( port );
}
pNode = ( osiSockAddrNode * ) ellNext ( &pNode->node ); // X aCC 749
pNode = ( osiSockAddrNode * ) ellNext ( &pNode->node );
}
}
@@ -192,9 +192,9 @@ extern "C" void epicsShareAPI configureChannelAccessAddressList
/*
* dont load the list twice
*/
assert ( ellCount (pList) == 0 ); // X aCC 392
assert ( ellCount (pList) == 0 );
ellInit ( &tmpList ); // X aCC 392
ellInit ( &tmpList );
/*
* Check to see if the user has disabled
@@ -217,12 +217,12 @@ extern "C" void epicsShareAPI configureChannelAccessAddressList
if (yes) {
ELLLIST bcastList;
osiSockAddr addr;
ellInit ( &bcastList ); // X aCC 392
ellInit ( &bcastList );
addr.ia.sin_family = AF_UNSPEC;
osiSockDiscoverBroadcastAddresses ( &bcastList, sock, &addr );
forcePort ( &bcastList, port );
removeDuplicateAddresses ( &tmpList, &bcastList, 1 );
if ( ellCount ( &tmpList ) == 0 ) { // X aCC 392
if ( ellCount ( &tmpList ) == 0 ) {
osiSockAddrNode *pNewNode;
pNewNode = (osiSockAddrNode *) calloc ( 1, sizeof (*pNewNode) );
if ( pNewNode ) {
@@ -254,11 +254,11 @@ extern "C" void epicsShareAPI printChannelAccessAddressList ( const ELLLIST *pLi
osiSockAddrNode *pNode;
::printf ( "Channel Access Address List\n" );
pNode = (osiSockAddrNode *) ellFirst ( pList ); // X aCC 749
pNode = (osiSockAddrNode *) ellFirst ( pList );
while (pNode) {
char buf[64];
ipAddrToA ( &pNode->addr.ia, buf, sizeof ( buf ) );
::printf ( "%s\n", buf );
pNode = (osiSockAddrNode *) ellNext ( &pNode->node ); // X aCC 749
pNode = (osiSockAddrNode *) ellNext ( &pNode->node );
}
}

View File

@@ -73,13 +73,6 @@ void msgForMultiplyDefinedPV::operator delete ( void *pCadaver,
}
#endif
void * msgForMultiplyDefinedPV::operator new ( size_t ) // X aCC 361
{
// The HPUX compiler seems to require this even though no code
// calls it directly
throw std::logic_error ( "why is the compiler calling private operator new" );
}
void msgForMultiplyDefinedPV::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if

View File

@@ -39,7 +39,7 @@
# define epicsExportSharedSymbols
#endif
class callbackForMultiplyDefinedPV { // X aCC 655
class callbackForMultiplyDefinedPV {
public:
virtual ~callbackForMultiplyDefinedPV () = 0;
virtual void pvMultiplyDefinedNotify (
@@ -64,7 +64,6 @@ private:
void transactionComplete ( const char * pHostName );
msgForMultiplyDefinedPV ( const msgForMultiplyDefinedPV & );
msgForMultiplyDefinedPV & operator = ( const msgForMultiplyDefinedPV & );
void * operator new ( size_t size );
void operator delete ( void * );
};

View File

@@ -76,29 +76,24 @@ nciu::~nciu ()
// channels are created by the user, and only destroyed by the user
// using this routine
void nciu::destroy (
epicsGuard < epicsMutex > & guard )
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExcusionGuard )
{
while ( baseNMIU * pNetIO = this->eventq.first () ) {
bool success = this->cacCtx.destroyIO ( guard, pNetIO->getId (), *this );
bool success = this->cacCtx.destroyIO ( callbackGuard, mutualExcusionGuard,
pNetIO->getId (), *this );
assert ( success );
}
// if the claim reply has not returned yet then we will issue
// the clear channel request to the server when the claim reply
// arrives and there is no matching nciu in the client
if ( this->channelNode::isInstalledInServer ( guard ) ) {
this->getPIIU(guard)->clearChannelRequest (
guard, this->sid, this->id );
if ( this->channelNode::isInstalledInServer ( mutualExcusionGuard ) ) {
this->getPIIU(mutualExcusionGuard)->clearChannelRequest (
mutualExcusionGuard, this->sid, this->id );
}
this->piiu->uninstallChan ( guard, *this );
this->cacCtx.destroyChannel ( guard, *this );
}
void * nciu::operator new ( size_t ) // X aCC 361
{
// The HPUX compiler seems to require this even though no code
// calls it directly
throw std::logic_error ( "why is the compiler calling private operator new" );
this->piiu->uninstallChan ( mutualExcusionGuard, *this );
this->cacCtx.destroyChannel ( mutualExcusionGuard, *this );
}
void nciu::operator delete ( void * )
@@ -387,9 +382,12 @@ void nciu::subscribe (
}
void nciu::ioCancel (
epicsGuard < epicsMutex > & guard, const ioid & idIn )
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard,
const ioid & idIn )
{
this->cacCtx.destroyIO ( guard, idIn, *this );
this->cacCtx.destroyIO ( callbackGuard,
mutualExclusionGuard, idIn, *this );
}
void nciu::ioShow (

View File

@@ -121,7 +121,7 @@ private:
friend class disconnectGovernorTimer;
};
class privateInterfaceForIO { // X aCC 655
class privateInterfaceForIO {
public:
virtual void ioCompletionNotify (
epicsGuard < epicsMutex > &, class baseNMIU & ) = 0;
@@ -220,6 +220,7 @@ private:
ca_uint16_t typeCode;
ca_uint8_t priority;
virtual void destroy (
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard );
void initiateConnect (
epicsGuard < epicsMutex > & );
@@ -243,7 +244,15 @@ private:
epicsGuard < epicsMutex > & guard,
unsigned type, arrayElementCount nElem,
unsigned mask, cacStateNotify &notify, ioid * );
// The primary mutex must be released when calling the user's
// callback, and therefore a finite interval exists when we are
// moving forward with the intent to call the users callback
// but the users IO could be deleted during this interval.
// To prevent the user's callback from being called after
// destroying his IO we must past a guard for the callback
// mutex here.
virtual void ioCancel (
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard,
const ioid & );
void ioShow (
@@ -270,7 +279,6 @@ private:
epicsGuard < epicsMutex > & guard ) const throw ();
nciu ( const nciu & );
nciu & operator = ( const nciu & );
void * operator new ( size_t );
void operator delete ( void * );
};

View File

@@ -42,7 +42,7 @@
class privateInterfaceForIO;
class baseNMIU : public tsDLNode < baseNMIU >, // X aCC 655
class baseNMIU : public tsDLNode < baseNMIU >,
public chronIntIdRes < baseNMIU > {
public:
virtual void destroy (
@@ -106,7 +106,6 @@ private:
const unsigned mask;
bool subscribed;
class netSubscription * isSubscription ();
void * operator new ( size_t );
void operator delete ( void * );
void * operator new ( size_t,
tsFreeList < class netSubscription, 1024, epicsMutexNOOP > & );
@@ -147,7 +146,6 @@ protected:
private:
cacReadNotify & notify;
class privateInterfaceForIO & privateChanForIO;
void * operator new ( size_t );
void operator delete ( void * );
void * operator new ( size_t,
tsFreeList < class netReadNotifyIO, 1024, epicsMutexNOOP > & );
@@ -190,7 +188,6 @@ protected:
private:
cacWriteNotify & notify;
privateInterfaceForIO & privateChanForIO;
void * operator new ( size_t );
void operator delete ( void * );
void * operator new ( size_t,
tsFreeList < class netWriteNotifyIO, 1024, epicsMutexNOOP > & );
@@ -237,12 +234,12 @@ inline netSubscription * netSubscription::factory (
class privateInterfaceForIO & chan, unsigned type, arrayElementCount count,
unsigned mask, cacStateNotify &notify )
{
return new ( freeList ) netSubscription ( chan, type, // X aCC 930
return new ( freeList ) netSubscription ( chan, type,
count, mask, notify );
}
inline arrayElementCount netSubscription::getCount (
epicsGuard < epicsMutex > & guard, bool allow_zero ) const // X aCC 361
epicsGuard < epicsMutex > & guard, bool allow_zero ) const
{
//guard.assertIdenticalMutex ( this->mutex );
arrayElementCount nativeCount = this->privateChanForIO.nativeElementCount ( guard );
@@ -268,7 +265,7 @@ inline netReadNotifyIO * netReadNotifyIO::factory (
tsFreeList < class netReadNotifyIO, 1024, epicsMutexNOOP > & freeList,
privateInterfaceForIO & ioComplNotifIntf, cacReadNotify & notify )
{
return new ( freeList ) netReadNotifyIO ( ioComplNotifIntf, notify ); // X aCC 930
return new ( freeList ) netReadNotifyIO ( ioComplNotifIntf, notify );
}
inline void * netReadNotifyIO::operator new ( size_t size,
@@ -289,7 +286,7 @@ inline netWriteNotifyIO * netWriteNotifyIO::factory (
tsFreeList < class netWriteNotifyIO, 1024, epicsMutexNOOP > & freeList,
privateInterfaceForIO & ioComplNotifyIntf, cacWriteNotify & notify )
{
return new ( freeList ) netWriteNotifyIO ( ioComplNotifyIntf, notify ); // X aCC 930
return new ( freeList ) netWriteNotifyIO ( ioComplNotifyIntf, notify );
}
inline void * netWriteNotifyIO::operator new ( size_t size,

View File

@@ -119,13 +119,6 @@ void netReadNotifyIO::forceSubscriptionUpdate (
{
}
void * netReadNotifyIO::operator new ( size_t ) // X aCC 361
{
// The HPUX compiler seems to require this even though no code
// calls it directly
throw std::logic_error ( "why is the compiler calling private operator new" );
}
void netReadNotifyIO::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if

View File

@@ -170,13 +170,6 @@ void netSubscription::forceSubscriptionUpdate (
guard, chan, *this );
}
void * netSubscription::operator new ( size_t ) // X aCC 361
{
// The HPUX compiler seems to require this even though no code
// calls it directly
throw std::logic_error ( "why is the compiler calling private operator new" );
}
void netSubscription::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if

View File

@@ -117,14 +117,6 @@ void netWriteNotifyIO::forceSubscriptionUpdate (
{
}
void * netWriteNotifyIO::operator new ( size_t ) // X aCC 361
{
// The HPUX compiler seems to require this even though no code
// calls it directly
throw std::logic_error (
"why is the compiler calling private operator new" );
}
void netWriteNotifyIO::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if

View File

@@ -35,7 +35,7 @@ union osiSockAddr;
class cac;
class nciu;
class netiiu { // X aCC 655
class netiiu {
public:
virtual ~netiiu () = 0;
virtual unsigned getHostName (

View File

@@ -53,7 +53,8 @@ public:
const char * pName, caCh * pConnCallBackIn,
void * pPrivateIn, capri priority );
void destructor (
epicsGuard < epicsMutex > & guard );
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & mutexGuard );
// legacy C API
friend unsigned epicsShareAPI ca_get_host_name (
@@ -122,6 +123,7 @@ public:
unsigned type, arrayElementCount count, const void *pValue,
cacWriteNotify &, cacChannel::ioid *pId = 0 );
void ioCancel (
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard,
const cacChannel::ioid & );
void ioShow (
@@ -162,7 +164,6 @@ private:
unsigned type, arrayElementCount count );
oldChannelNotify ( const oldChannelNotify & );
oldChannelNotify & operator = ( const oldChannelNotify & );
void * operator new ( size_t size );
void operator delete ( void * );
};
@@ -195,7 +196,6 @@ private:
const char *pContext, unsigned type, arrayElementCount count );
getCopy ( const getCopy & );
getCopy & operator = ( const getCopy & );
void * operator new ( size_t size );
void operator delete ( void * );
};
@@ -221,7 +221,6 @@ private:
const char * pContext, unsigned type, arrayElementCount count );
getCallback ( const getCallback & );
getCallback & operator = ( const getCallback & );
void * operator new ( size_t size );
void operator delete ( void * );
};
@@ -245,7 +244,6 @@ private:
unsigned type, arrayElementCount count );
putCallback ( const putCallback & );
putCallback & operator = ( const putCallback & );
void * operator new ( size_t size );
void operator delete ( void * );
};
@@ -259,8 +257,16 @@ public:
evid * );
~oldSubscription ();
oldChannelNotify & channel () const;
// The primary mutex must be released when calling the user's
// callback, and therefore a finite interval exists when we are
// moving forward with the intent to call the users callback
// but the users IO could be deleted during this interval.
// To prevent the user's callback from being called after
// destroying his IO we must past a guard for the callback
// mutex here.
void cancel (
epicsGuard < epicsMutex > & guard );
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard );
void * operator new ( size_t size,
tsFreeList < struct oldSubscription, 1024, epicsMutexNOOP > & );
epicsPlacementDeleteOperator (( void *,
@@ -278,7 +284,6 @@ private:
const char *pContext, unsigned type, arrayElementCount count );
oldSubscription ( const oldSubscription & );
oldSubscription & operator = ( const oldSubscription & );
void * operator new ( size_t size );
void operator delete ( void * );
};
@@ -341,6 +346,8 @@ public:
void destroySubscription ( epicsGuard < epicsMutex > &, oldSubscription & );
epicsMutex & mutexRef () const;
template < class T >
void whenThereIsAnExceptionDestroySyncGroupIO ( epicsGuard < epicsMutex > &, T & );
// legacy C API
friend int epicsShareAPI ca_create_channel (
@@ -368,6 +375,17 @@ public:
friend int epicsShareAPI ca_sg_block ( const CA_SYNC_GID gid, ca_real timeout );
friend int epicsShareAPI ca_sg_reset ( const CA_SYNC_GID gid );
friend int epicsShareAPI ca_sg_test ( const CA_SYNC_GID gid );
friend int epicsShareAPI ca_sg_array_get ( const CA_SYNC_GID gid,
chtype type, arrayElementCount count,
chid pChan, void *pValue );
friend int epicsShareAPI ca_sg_array_put ( const CA_SYNC_GID gid,
chtype type, arrayElementCount count,
chid pChan, const void *pValue );
friend int ca_sync_group_destroy ( CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard,
ca_client_context & cac, const CA_SYNC_GID gid );
friend void sync_group_reset ( ca_client_context & client,
CASG & sg );
// exceptions
class noSocket {};
@@ -384,7 +402,7 @@ private:
epicsEvent ioDone;
epicsEvent callbackThreadActivityComplete;
epicsThreadId createdByThread;
epics_auto_ptr < epicsGuard < epicsMutex > > pCallbackGuard;
epics_auto_ptr < CallbackGuard > pCallbackGuard;
epics_auto_ptr < cacContext > pServiceContext;
caExceptionHandler * ca_exception_func;
void * ca_exception_arg;
@@ -444,10 +462,11 @@ inline void oldChannelNotify::initiateConnect (
}
inline void oldChannelNotify::ioCancel (
epicsGuard < epicsMutex > & guard,
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard,
const cacChannel::ioid & id )
{
this->io.ioCancel ( guard, id );
this->io.ioCancel ( callbackGuard, mutualExclusionGuard, id );
}
inline void oldChannelNotify::ioShow (
@@ -492,9 +511,10 @@ inline void oldSubscription::operator delete ( void *pCadaver,
#endif
inline void oldSubscription::cancel (
epicsGuard < epicsMutex > & guard )
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard )
{
this->chan.ioCancel ( guard, this->id );
this->chan.ioCancel ( callbackGuard, mutualExclusionGuard, this->id );
}
inline oldChannelNotify & oldSubscription::channel () const
@@ -560,5 +580,32 @@ inline unsigned ca_client_context::sequenceNumberOfOutstandingIO (
// perhaps on SMP systems THERE should be lock/unlock around this
return this->ioSeqNo;
}
template < class T >
void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO (
epicsGuard < epicsMutex > & guard, T & io )
{
if ( this->pCallbackGuard.get() &&
this->createdByThread == epicsThreadGetIdSelf () ) {
io.destroy ( *this->pCallbackGuard.get(), guard );
}
else {
// dont reverse the lock hierarchy
epicsGuardRelease < epicsMutex > guardRelease ();
{
//
// we will definately stall out here if all of the
// following are true
//
// o user creates non-preemtive mode client library context
// o user doesnt periodically call a ca function
// o user calls this function from an auxiillary thread
//
CallbackGuard cbGuard ( this->cbMutex );
epicsGuard < epicsMutex > guard ( this->mutex );
io.destroy ( cbGuard, guard );
}
}
}
#endif // ifndef oldAccessh

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