Compare commits
110 Commits
R7.0.5
...
PSI-7.0.5-
| Author | SHA1 | Date | |
|---|---|---|---|
| bef27939c7 | |||
| 8697c7741a | |||
| 3ac831802c | |||
|
|
504191441d | ||
|
|
3ba778c08b | ||
|
|
1fbbae73de | ||
|
|
4baf7912e1 | ||
|
|
bbb4d86f78 | ||
|
|
f41276bef8 | ||
|
|
f9e3e86401 | ||
|
|
3c46542630 | ||
|
|
f8eb0be7a4 | ||
|
|
ff5df5fbf3 | ||
|
|
236bb2c671 | ||
|
|
372e937717 | ||
|
|
56f05d722d | ||
|
|
85822f3051 | ||
|
|
27fe3e4468 | ||
|
|
4ab9808180 | ||
| d795dd76a6 | |||
|
|
45924d28e0 | ||
|
|
b1d0a0d036 | ||
|
|
45e9cf9a94 | ||
|
|
a8dcff2f0d | ||
| 53a7d25923 | |||
|
|
c701e7e98e | ||
|
|
bf8e097756 | ||
|
|
837a2bbdde | ||
|
|
6fb361a965 | ||
| 1db2cba81d | |||
| ce43a67cbd | |||
| 7ac8f056ed | |||
| d157e96aac | |||
| 1d1e3e9527 | |||
| 48d37e6b45 | |||
| 5d03f20831 | |||
| 9e72edb544 | |||
| 4476c71f62 | |||
| e9471b3072 | |||
| 4082cb27c3 | |||
| 88cdffddb6 | |||
| b27d1416b5 | |||
| ab97b5fe54 | |||
| bbaa207603 | |||
|
|
605937bbac | ||
|
|
594fcb9a0d | ||
|
|
e033c0cfb2 | ||
|
|
53ebbab941 | ||
| 86adc529ef | |||
| 3a774d37f8 | |||
| 5f6b1e2b16 | |||
| 584caf54b2 | |||
| d602c1cdcb | |||
| 12ce14b6e5 | |||
| e02709b3a4 | |||
| b19709039d | |||
| 3c4ffbf267 | |||
| 4942da0c88 | |||
| 5f547257ac | |||
| 1b99366887 | |||
| 871af36ac5 | |||
| 0ad6d2aec9 | |||
| 8837d2f275 | |||
| 09a17127a9 | |||
| 3699c5bc4c | |||
| 157b0867fa | |||
| 56529964f3 | |||
| c28e240fce | |||
| b04b2dab22 | |||
| 8edcd7b07f | |||
| ca78451122 | |||
| 4cc44e3dce | |||
| e81d3a1d7d | |||
| 53dd61b80a | |||
| 5b754d320f | |||
| 2be2658cfc | |||
| 2b157096e6 | |||
| 71eaddfd84 | |||
| 5589deb3ad | |||
| 0bb80e373b | |||
| 4acdd83984 | |||
| d12d38f970 | |||
| 74d9749255 | |||
| 3276ada78a | |||
| de378eec34 | |||
| dbb2d875fb | |||
| c7f966a1f5 | |||
| 7889dda6f8 | |||
| a2ccf3b631 | |||
| 57db34b303 | |||
| 4f790758af | |||
| ce9dfc6bb4 | |||
| 4f40ad1927 | |||
| a42a4010d6 | |||
| a2aa17fafc | |||
| 5bf2784db2 | |||
| 7a4e7b7600 | |||
| 70aa23513f | |||
| 71ded2f25f | |||
| 11103351b2 | |||
| 146a413977 | |||
| 4e44550f62 | |||
| 9952470486 | |||
| 02d30dedbc | |||
| 5ed0fe52a0 | |||
| 42b1f774da | |||
| 7738b68320 | |||
| 1199fabe90 | |||
| 1aefc5f2f0 | |||
| 6f666c6c22 |
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -26,3 +26,6 @@
|
||||
path = .ci
|
||||
url = https://github.com/epics-base/ci-scripts
|
||||
branch = master
|
||||
[submodule "modules/pcas"]
|
||||
path = modules/pcas
|
||||
url = https://github.com/epics-modules/pcas
|
||||
|
||||
7
Makefile
7
Makefile
@@ -23,3 +23,10 @@ DIRS += modules
|
||||
modules_DEPEND_DIRS = src
|
||||
|
||||
include $(TOP)/configure/RULES_TOP
|
||||
|
||||
UNINSTALL_DIRS += $(INSTALL_LOCATION)/src
|
||||
copysrc:
|
||||
tar cf - --exclude-vcs --exclude-backups --exclude=O.* modules/*/src | tar xf - -C $(INSTALL_LOCATION)
|
||||
|
||||
tar:
|
||||
tar cfjP epics_base-$(EPICS_VERSION_NUMBER).tar.bz2 $(INSTALL_LOCATION)
|
||||
|
||||
@@ -33,7 +33,7 @@ CODE_CFLAGS = $(PROF_CFLAGS_$(PROFILE)) $(GPROF_CFLAGS_$(GPROF))
|
||||
CODE_CFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
|
||||
WARN_CFLAGS_YES = -Wall -Werror-implicit-function-declaration
|
||||
WARN_CFLAGS_NO = -w
|
||||
OPT_CFLAGS_YES = -O3
|
||||
OPT_CFLAGS_YES = -O3 -g
|
||||
OPT_CFLAGS_NO = -g
|
||||
|
||||
PROF_CXXFLAGS_YES = -p
|
||||
@@ -42,7 +42,7 @@ CODE_CXXFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
|
||||
CODE_CXXFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
|
||||
WARN_CXXFLAGS_YES = -Wall
|
||||
WARN_CXXFLAGS_NO = -w
|
||||
OPT_CXXFLAGS_YES = -O3
|
||||
OPT_CXXFLAGS_YES = -O3 -g
|
||||
OPT_CXXFLAGS_NO = -g
|
||||
|
||||
CODE_LDFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
|
||||
|
||||
@@ -52,11 +52,11 @@ EPICS_MODIFICATION = 5
|
||||
|
||||
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
|
||||
# Not included in the official EPICS version number if zero
|
||||
EPICS_PATCH_LEVEL = 0
|
||||
EPICS_PATCH_LEVEL = 1
|
||||
|
||||
# Immediately after an official release the EPICS_PATCH_LEVEL is incremented
|
||||
# and the -DEV suffix is added (similar to the Maven -SNAPSHOT versions)
|
||||
EPICS_DEV_SNAPSHOT=
|
||||
EPICS_DEV_SNAPSHOT=-DEV
|
||||
|
||||
# No changes should be needed below here
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
EPICS_CA_MAJOR_VERSION = 4
|
||||
EPICS_CA_MINOR_VERSION = 13
|
||||
EPICS_CA_MAINTENANCE_VERSION = 8
|
||||
EPICS_CA_MAINTENANCE_VERSION = 9
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
EPICS_CA_DEVELOPMENT_FLAG = 0
|
||||
EPICS_CA_DEVELOPMENT_FLAG = 1
|
||||
|
||||
# Immediately after a release the MAINTENANCE_VERSION
|
||||
# will be incremented and the DEVELOPMENT_FLAG set to 1
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
EPICS_DATABASE_MAJOR_VERSION = 3
|
||||
EPICS_DATABASE_MINOR_VERSION = 19
|
||||
EPICS_DATABASE_MAINTENANCE_VERSION = 0
|
||||
EPICS_DATABASE_MAINTENANCE_VERSION = 1
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
EPICS_DATABASE_DEVELOPMENT_FLAG = 0
|
||||
EPICS_DATABASE_DEVELOPMENT_FLAG = 1
|
||||
|
||||
# Immediately after a release the MAINTENANCE_VERSION
|
||||
# will be incremented and the DEVELOPMENT_FLAG set to 1
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
EPICS_LIBCOM_MAJOR_VERSION = 3
|
||||
EPICS_LIBCOM_MINOR_VERSION = 19
|
||||
EPICS_LIBCOM_MAINTENANCE_VERSION = 0
|
||||
EPICS_LIBCOM_MAINTENANCE_VERSION = 1
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
EPICS_LIBCOM_DEVELOPMENT_FLAG = 0
|
||||
EPICS_LIBCOM_DEVELOPMENT_FLAG = 1
|
||||
|
||||
# Immediately after a release the MAINTENANCE_VERSION
|
||||
# will be incremented and the DEVELOPMENT_FLAG set to 1
|
||||
|
||||
@@ -157,7 +157,9 @@ USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES
|
||||
|
||||
# Site version number, if set will append '-' and this string to the
|
||||
# EPICS version number string that is reported by many tools.
|
||||
EPICS_SITE_VERSION =
|
||||
ifeq ($(INSTALL_LOCATION),$(EPICS_BASE))
|
||||
EPICS_SITE_VERSION=$(shell $(PERL) -MPOSIX -e 'print strftime "%Y-%m-%d", localtime')
|
||||
endif
|
||||
|
||||
# For GNU compiler, use pipes rather than temporary files for
|
||||
# communication between the various stages of compilation.
|
||||
|
||||
@@ -100,6 +100,23 @@ include $(CONFIG)/RULES_FILE_TYPE
|
||||
|
||||
include $(CONFIG)/RULES.Db
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Do not build anything if current path matches SKIP_BUILD
|
||||
|
||||
ifneq (,$(strip $(SKIP_BUILDS)))
|
||||
CURRENT_MODULE=$(subst $(realpath $(TOP)/..)/,,$(subst $(realpath $(dir $(lastword $(MAKEFILE_LIST)))..)/,,$(realpath ..)))
|
||||
ifneq ($(filter $(SKIP_BUILDS) $(addsuffix /%,$(SKIP_BUILDS)),$(CURRENT_MODULE)),)
|
||||
$(info Skipping $(CURRENT_MODULE) for $(T_A))
|
||||
PROD=
|
||||
TESTPROD=
|
||||
LIBRARY=
|
||||
TESTLIBRARY=
|
||||
LOADABLE_LIBRARY=
|
||||
TESTS=
|
||||
SRC_FILES=
|
||||
endif
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Include defines and rules for prod, library and test* targets
|
||||
|
||||
@@ -222,9 +239,9 @@ $(LOADABLE_SHRLIBNAME): FINAL_DIR=$(INSTALL_SHRLIB)
|
||||
|
||||
$(TESTPRODNAME) $(PRODNAME): $(PRODUCT_OBJS) $(PROD_RESS) $(PROD_DEPLIBS)
|
||||
|
||||
$(TESTPRODNAME) $(PRODNAME): %$(EXE): | $(INSTALL_LIB)
|
||||
$(TESTPRODNAME) $(PRODNAME): %$(EXE):
|
||||
@$(RM) $@
|
||||
$(LINK.cpp)
|
||||
$(DEBUGCMD) $(LINK.cpp)
|
||||
$(MT_EXE_COMMAND)
|
||||
|
||||
%_ctdt$(OBJ): %_ctdt.c
|
||||
@@ -325,10 +342,6 @@ $(LOADABLE_SHRLIBNAME): $(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX):
|
||||
$(LINK.shrlib)
|
||||
$(MT_DLL_COMMAND)
|
||||
|
||||
$(LIBNAME) $(SHRLIBNAME) $(LOADABLE_SHRLIBNAME): | $(INSTALL_LIB)
|
||||
$(INSTALL_LIB):
|
||||
@$(MKDIR) $@
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# C++ munching for VxWorks
|
||||
|
||||
@@ -507,11 +520,9 @@ $(INSTALL_TCLLIB)/%: ../%
|
||||
@$(INSTALL) -d -m $(BIN_PERMISSIONS) $< $(INSTALL_TCLLIB)
|
||||
endif
|
||||
|
||||
ifneq ($(TCLINDEX),)
|
||||
$(INSTALL_TCLLIB)/$(TCLINDEX): $(INSTALL_TCLLIBS)
|
||||
$(ECHO) "Updating $@"
|
||||
$(ECHO) eval auto_mkindex $(INSTALL_TCLLIB) "$(TCLLIBNAME)" | tclsh
|
||||
endif
|
||||
|
||||
$(INSTALL_LOADABLE_SHRLIBS): $(INSTALL_SHRLIB)/%: %
|
||||
$(ECHO) "Installing loadable shared library $@"
|
||||
|
||||
2
configure/os/CONFIG.Common.RHEL7-x86_64
Normal file
2
configure/os/CONFIG.Common.RHEL7-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
1
configure/os/CONFIG.Common.RHEL7-x86_64-clang
Normal file
1
configure/os/CONFIG.Common.RHEL7-x86_64-clang
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
6
configure/os/CONFIG.Common.SL5-x86
Normal file
6
configure/os/CONFIG.Common.SL5-x86
Normal file
@@ -0,0 +1,6 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
ARCH_DEP_CFLAGS += -march=i686
|
||||
4
configure/os/CONFIG.Common.SL5-x86_64
Normal file
4
configure/os/CONFIG.Common.SL5-x86_64
Normal file
@@ -0,0 +1,4 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
4
configure/os/CONFIG.Common.SL6-x86
Normal file
4
configure/os/CONFIG.Common.SL6-x86
Normal file
@@ -0,0 +1,4 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
|
||||
ARCH_DEP_CFLAGS += -march=i686
|
||||
2
configure/os/CONFIG.Common.SL6-x86_64
Normal file
2
configure/os/CONFIG.Common.SL6-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
1
configure/os/CONFIG.Common.SL6-x86_64-clang
Normal file
1
configure/os/CONFIG.Common.SL6-x86_64-clang
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
8
configure/os/CONFIG.Common.T2-ppc604
Normal file
8
configure/os/CONFIG.Common.T2-ppc604
Normal file
@@ -0,0 +1,8 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 5.5.1
|
||||
WIND_BASE = /afs/psi.ch/project/vxworks/Tornado2.2.1
|
||||
|
||||
#there is a problem with our ccppc and optimization
|
||||
# -O0 works, -O and -O1 and higher are buggy
|
||||
OPT_CFLAGS_YES = -O0
|
||||
OPT_CXXFLAGS_YES = -O0
|
||||
2
configure/os/CONFIG.Common.V62-ppc604
Normal file
2
configure/os/CONFIG.Common.V62-ppc604
Normal file
@@ -0,0 +1,2 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.2
|
||||
5
configure/os/CONFIG.Common.V63-ppc603
Normal file
5
configure/os/CONFIG.Common.V63-ppc603
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
|
||||
VXWORKS_VERSION = 6.3
|
||||
|
||||
# Buggy "uninitialized variable" warning produces many false positives
|
||||
ARCH_DEP_CXXFLAGS += -Wno-uninitialized
|
||||
5
configure/os/CONFIG.Common.V63-ppc604
Normal file
5
configure/os/CONFIG.Common.V63-ppc604
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.3
|
||||
|
||||
# Buggy "uninitialized variable" warning produces many false positives
|
||||
ARCH_DEP_CXXFLAGS += -Wno-uninitialized
|
||||
2
configure/os/CONFIG.Common.V66-ppc603
Normal file
2
configure/os/CONFIG.Common.V66-ppc603
Normal file
@@ -0,0 +1,2 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
|
||||
VXWORKS_VERSION = 6.6
|
||||
2
configure/os/CONFIG.Common.V66-ppc604
Normal file
2
configure/os/CONFIG.Common.V66-ppc604
Normal file
@@ -0,0 +1,2 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.6
|
||||
5
configure/os/CONFIG.Common.V67-ppc604
Normal file
5
configure/os/CONFIG.Common.V67-ppc604
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.7
|
||||
|
||||
#needed when including memPartLib.h, e.g. through moduleLib.h or loadLib.h
|
||||
ARCH_DEP_CFLAGS += -D_VSB_CONFIG_FILE='<../lib/h/config/vsbConfig.h>'
|
||||
3
configure/os/CONFIG.Common.V69-ppc32
Normal file
3
configure/os/CONFIG.Common.V69-ppc32
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc32
|
||||
VXWORKS_VERSION = 6.9
|
||||
export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
|
||||
3
configure/os/CONFIG.Common.V69-ppc604
Normal file
3
configure/os/CONFIG.Common.V69-ppc604
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.9
|
||||
export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
|
||||
22
configure/os/CONFIG.Common.eldk42-ppc4xxFP
Normal file
22
configure/os/CONFIG.Common.eldk42-ppc4xxFP
Normal file
@@ -0,0 +1,22 @@
|
||||
# DeltaTau PowerPMAC with ELDK 4.2
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
ELDK=/opt/eldk-4.2
|
||||
GNU_TARGET=ppc_4xxFP
|
||||
GNU_DIR=$(ELDK)/usr
|
||||
|
||||
# This cross tool chain is installed in a somehow weired way
|
||||
# Without the following lines it does not work on RHEL7
|
||||
# but it worked on SL6
|
||||
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2
|
||||
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/powerpc-linux
|
||||
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/backward
|
||||
|
||||
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/lib
|
||||
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/usr/lib
|
||||
14
configure/os/CONFIG.Common.eldk51-ppc4xxSF
Normal file
14
configure/os/CONFIG.Common.eldk51-ppc4xxSF
Normal file
@@ -0,0 +1,14 @@
|
||||
# Virtex FPGA embedded Processor with ELDK 5.1
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = eldk
|
||||
SDK_DIR = /opt/eldk-5.1
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
|
||||
GNU_TARGET = powerpc-4xx-softfloat
|
||||
GNU_ARCH = ppc405-linux
|
||||
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
|
||||
15
configure/os/CONFIG.Common.eldk52-e500v2
Normal file
15
configure/os/CONFIG.Common.eldk52-e500v2
Normal file
@@ -0,0 +1,15 @@
|
||||
# IOxOS IFC1210 with ELDK 5.2
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = eldk
|
||||
SDK_DIR = /opt/eldk-5.2
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
|
||||
GNU_TARGET = powerpc-e500v2
|
||||
GNU_ARCH = ppce500v2-linux-gnuspe
|
||||
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
|
||||
GNU_TARGET_INCLUDE_DIR =
|
||||
21
configure/os/CONFIG.Common.eldk53-ppc4xxFP
Normal file
21
configure/os/CONFIG.Common.eldk53-ppc4xxFP
Normal file
@@ -0,0 +1,21 @@
|
||||
# DeltaTau PowerPMAC with ELDK 5.3
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = eldk
|
||||
SDK_DIR = /opt/eldk-5.3
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
|
||||
GNU_ARCH = ppc440e-linux
|
||||
SDKTARGETSYSROOT=$(SDK_DIR)/powerpc-4xx/sysroots
|
||||
GNU_DIR = $(SDKTARGETSYSROOT)/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
|
||||
GNU_TARGET_INCLUDE_DIR =
|
||||
GNU_TARGET=powerpc-linux
|
||||
|
||||
ARCH_DEP_CPPFLAGS = -m32 -mcpu=440fp -mhard-float
|
||||
ARCH_DEP_CPPFLAGS += --sysroot=$(SDKTARGETSYSROOT)/$(GNU_ARCH)
|
||||
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)/$(GNU_ARCH)
|
||||
AS=$(GNU_BIN)/$(GNU_TARGET)-as
|
||||
23
configure/os/CONFIG.Common.fslqoriq20-e6500_64
Normal file
23
configure/os/CONFIG.Common.fslqoriq20-e6500_64
Normal file
@@ -0,0 +1,23 @@
|
||||
# IOxOS IFC1211 with Freescale QorIQ 2.0 toolchain
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = fslsdk
|
||||
SDK_DIR = /opt/fsl-qoriq/2.0
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
|
||||
SDK_TARGET = ppc64e6500-fsl-linux
|
||||
GNU_TARGET = powerpc64-fsl-linux
|
||||
SDKTARGETSYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
|
||||
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
|
||||
|
||||
ARCH_DEP_CPPFLAGS = --sysroot=$(SDKTARGETSYSROOT)
|
||||
ARCH_DEP_CFLAGS = -mcpu=e6500 -m64 -mhard-float
|
||||
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)
|
||||
|
||||
# warning -O2 and higher are broken!
|
||||
#OPT_CFLAGS_YES = -O1
|
||||
#OPT_CXXFLAGS_YES = -O1
|
||||
5
configure/os/CONFIG.Common.linux-clang
Normal file
5
configure/os/CONFIG.Common.linux-clang
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
GNU = NO
|
||||
CMPLR_CLASS = clang
|
||||
CC = clang
|
||||
CCC = clang++
|
||||
16
configure/os/CONFIG.Common.moxa42-armv6l
Normal file
16
configure/os/CONFIG.Common.moxa42-armv6l
Normal file
@@ -0,0 +1,16 @@
|
||||
# Moxa DA-66x with SDK 4.2 and ARM7 processor
|
||||
|
||||
# Include definitions common to all Linux ARM targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-arm
|
||||
|
||||
GNU_DIR=/afs/psi.ch/project/embeddedlinux/moxa/arm-linux-4.4.2-v4
|
||||
GNU_TARGET=arm
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(GNU_DIR)/arm-none-linux-gnueabi/lib
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(INSTALL_LIB)
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
# suppress note "the mangling of 'va_list' has changed in GCC 4.4"
|
||||
ARCH_DEP_CXXFLAGS += -Wno-psabi
|
||||
|
||||
ARCH_DEP_CFLAGS += -funwind-tables
|
||||
15
configure/os/CONFIG.Common.mvl40-xscale_be
Normal file
15
configure/os/CONFIG.Common.mvl40-xscale_be
Normal file
@@ -0,0 +1,15 @@
|
||||
# Moxa DA-66x with Montavista Linux 4.0
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
ARCH_CLASS = xscale
|
||||
|
||||
GNU_DIR=/afs/psi.ch/project/embeddedlinux/moxa/xscale_be/armv5teb-montavista-linuxeabi
|
||||
|
||||
ARCH_DEP_CFLAGS += -funwind-tables
|
||||
|
||||
# Cannot build PVA because of missing boost support
|
||||
SKIP_BUILDS = pv% normativeTypes
|
||||
18
configure/os/CONFIG.Common.nilrt7-armv7a
Normal file
18
configure/os/CONFIG.Common.nilrt7-armv7a
Normal file
@@ -0,0 +1,18 @@
|
||||
# National Instruments CompactRIO running LabView RT 19.5.1
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = arm
|
||||
|
||||
GNU_TARGET = arm-linux-gnu
|
||||
|
||||
SYSROOT = /opt/LabVIEW-RT-19.5.1/arm/sysroots/armv7a-vfp-neon-nilrt-linux-gnueabi
|
||||
|
||||
ARCH_DEP_CPPFLAGS += -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon
|
||||
ARCH_DEP_CPPFLAGS += --sysroot=$(SYSROOT)
|
||||
ARCH_DEP_CPPFLAGS += -I$(SYSROOT)/usr/include/c++/4.7.2/arm-nilrt-linux-gnueabi/
|
||||
ARCH_DEP_CPPFLAGS += -I$(SYSROOT)/usr/include/c++/4.7.2/
|
||||
ARCH_DEP_LDFLAGS += --sysroot=$(SYSROOT)
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
41
configure/os/CONFIG.Common.raspbian-arm
Normal file
41
configure/os/CONFIG.Common.raspbian-arm
Normal file
@@ -0,0 +1,41 @@
|
||||
# RaspberryPi with github.com/raspberrypi/tools toolchain
|
||||
# Tested on:
|
||||
# * Raspberry 3B+ Raspbian 9
|
||||
# * Raspberry 2 Raspbian 7
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
# Using readline:
|
||||
# Due to missing/messed up libs in the toolchain, readline needs copies of
|
||||
# libtinfo.so.5.9 and libreadline.so.6.2 from a Raspbian 7 rootfs
|
||||
# /lib/arm-linux-gnueabihf/ to the toolchain, e.g.
|
||||
# $(SDK_DIR)/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/
|
||||
# and manually created links libtinfo.so.5 and libreadline.so.
|
||||
# For gcc-linaro-arm-linux-gnueabihf-raspbian, an existing incompatible
|
||||
# libtinfo.so.5 is in the way. Remove it.
|
||||
# (Built with glibc 2.16 like installed on Raspbian 9 but toolchain uses glibc 2.13.)
|
||||
# Also copy /usr/include/readline/ directory from some readline 6 installation
|
||||
# to $(SDK_DIR)/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/
|
||||
|
||||
ARCH_CLASS = arm
|
||||
|
||||
SDK_DIR = /opt/raspberrypi/arm-bcm2708
|
||||
|
||||
# Available SDK_TARGETs:
|
||||
|
||||
# gcc 4.8.3 for 32 bit hosts with GLIBC 2.3 or higher
|
||||
SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian
|
||||
|
||||
# gcc 4.8.3 for 64 bit hosts with GLIBC 2.14 or higher
|
||||
# SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian-x64
|
||||
|
||||
# gcc 4.7.1 for 64 bit hosts with GLIBC 2.8 or higher
|
||||
# SDK_TARGET = arm-linux-gnueabihf
|
||||
|
||||
# gcc 4.7.1 for 32 bit hosts with GLIBC 2.4 or higher
|
||||
# SDK_TARGET = arm-bcm2708hardfp-linux-gnueabi
|
||||
# SDK_TARGET = arm-bcm2708-linux-gnueabi
|
||||
|
||||
GNU_DIR = $(SDK_DIR)/$(SDK_TARGET)
|
||||
GNU_TARGET = $(if $(filter arm-bcm2708%,SDK_TARGET),$(SDK_TARGET),arm-linux-gnueabihf)
|
||||
@@ -14,6 +14,7 @@ ARCH_CLASS = ppc
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CPPFLAGS = -DCPU=PPC32
|
||||
ARCH_DEP_CPPFLAGS = -DCPU=PPC604
|
||||
ARCH_DEP_CFLAGS = -mstrict-align
|
||||
|
||||
GNU_TARGET = powerpc-wrs-vxworks
|
||||
|
||||
@@ -13,7 +13,7 @@ CMPLR_SUFFIX = ppc
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CPPFLAGS = -DCPU=PPC603
|
||||
ARCH_DEP_CPPFLAGS = -DCPU=PPC603
|
||||
ARCH_DEP_CFLAGS = -mcpu=603 -mstrict-align
|
||||
|
||||
GNU_TARGET = powerpc-wrs-vxworks
|
||||
|
||||
@@ -14,9 +14,12 @@ ARCH_CLASS = ppc
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CPPFLAGS = -DCPU=PPC604
|
||||
ARCH_DEP_CFLAGS_2 = -mcpu=604 -mstrict-align -mno-implicit-fp
|
||||
ARCH_DEP_CFLAGS_3 = -mcpu=604 -mstrict-align -mno-implicit-fp
|
||||
ARCH_DEP_CFLAGS_4 = -mcpu=604 -mstrict-align -fno-implicit-fp
|
||||
ARCH_DEP_CFLAGS = $(ARCH_DEP_CFLAGS_$(VX_GNU_MAJOR_VERSION))
|
||||
ARCH_DEP_CFLAGS = -mcpu=604 -mstrict-align
|
||||
|
||||
CODE_CFLAGS_2 = -mno-implicit-fp
|
||||
CODE_CFLAGS_3 = -mno-implicit-fp
|
||||
CODE_CFLAGS_4 = -fno-implicit-fp
|
||||
CODE_CFLAGS += $(CODE_CFLAGS_$(VX_GNU_MAJOR_VERSION))
|
||||
|
||||
|
||||
GNU_TARGET = powerpc-wrs-vxworks
|
||||
|
||||
18
configure/os/CONFIG.Common.yocto21-aarch64
Normal file
18
configure/os/CONFIG.Common.yocto21-aarch64
Normal file
@@ -0,0 +1,18 @@
|
||||
# XILINX Zynq with Yocto 2.1 / Petalinux toolchain
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = arm64
|
||||
|
||||
SDK = petalinux
|
||||
SDK_DIR = /opt/petalinux-gfa/2017.2
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
|
||||
SDK_TARGET = aarch64-xilinx-linux
|
||||
GNU_TARGET = $(SDK_TARGET)
|
||||
SDKTARGETSYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
|
||||
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
|
||||
|
||||
ARCH_DEP_CPPFLAGS = --sysroot=$(SDKTARGETSYSROOT)
|
||||
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)
|
||||
3
configure/os/CONFIG.RHEL7-x86_64.Common
Normal file
3
configure/os/CONFIG.RHEL7-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
include $(CONFIG)/os/CONFIG.linux-x86_64.Common
|
||||
2
configure/os/CONFIG.RHEL7-x86_64.RHEL7-x86_64
Normal file
2
configure/os/CONFIG.RHEL7-x86_64.RHEL7-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
16
configure/os/CONFIG.RHEL7-x86_64.SL6-x86
Normal file
16
configure/os/CONFIG.RHEL7-x86_64.SL6-x86
Normal file
@@ -0,0 +1,16 @@
|
||||
# "cross compile" for older Linux version
|
||||
# Use older compiler and older libraries
|
||||
# Used packages:
|
||||
# compat-gcc-44-c++-4.4.7
|
||||
# compat-gcc-44-4.4.7
|
||||
# compat-glibc-headers-2.12
|
||||
# It was neccessary to install 32 bit compatibility libraries manually
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc44
|
||||
CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++44
|
||||
|
||||
TARGET_CPPFLAGS = -isystem /usr/lib/x86_64-redhat-linux6E/include
|
||||
TARGET_LDFLAGS = -B /usr/lib/x86_64-redhat-linux6E/lib
|
||||
LINK.cpp += --as-needed -lc -lm -lrt -lpthread -lreadline -ltinfo
|
||||
16
configure/os/CONFIG.RHEL7-x86_64.SL6-x86_64
Normal file
16
configure/os/CONFIG.RHEL7-x86_64.SL6-x86_64
Normal file
@@ -0,0 +1,16 @@
|
||||
# "cross compile" for older Linux version
|
||||
# Use older compiler and older libraries
|
||||
# Used packages:
|
||||
# compat-gcc-44-c++-4.4.7
|
||||
# compat-gcc-44-4.4.7
|
||||
# compat-glibc-headers-2.12
|
||||
# compat-glibc-2.12
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc44
|
||||
CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++44
|
||||
|
||||
TARGET_CPPFLAGS = -isystem /usr/lib/x86_64-redhat-linux6E/include
|
||||
TARGET_LDFLAGS = -B /usr/lib/x86_64-redhat-linux6E/lib64
|
||||
LINK.cpp += --as-needed -lc -lm -lrt -lpthread -lreadline -ltinfo
|
||||
8
configure/os/CONFIG.RHEL7-x86_64.win32-x86
Normal file
8
configure/os/CONFIG.RHEL7-x86_64.win32-x86
Normal file
@@ -0,0 +1,8 @@
|
||||
include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
|
||||
|
||||
PATH_FILTER = $(subst /,/,$(1))
|
||||
|
||||
# Silence the tr1 namespace deprecation warnings
|
||||
USR_CXXFLAGS_WIN32 += -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
|
||||
|
||||
MSVC_DIR = /opt/wine-msvc-2017/bin/x86/
|
||||
8
configure/os/CONFIG.RHEL7-x86_64.windows-x64
Normal file
8
configure/os/CONFIG.RHEL7-x86_64.windows-x64
Normal file
@@ -0,0 +1,8 @@
|
||||
include $(CONFIG)/os/CONFIG.windows-x64.windows-x64
|
||||
|
||||
PATH_FILTER = $(subst /,/,$(1))
|
||||
|
||||
# Silence the tr1 namespace deprecation warnings
|
||||
USR_CXXFLAGS_WIN32 += -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
|
||||
|
||||
MSVC_DIR = /opt/wine-msvc-2017/bin/x64/
|
||||
3
configure/os/CONFIG.SL5-x86.Common
Normal file
3
configure/os/CONFIG.SL5-x86.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.Common
|
||||
2
configure/os/CONFIG.SL5-x86.SL5-x86
Normal file
2
configure/os/CONFIG.SL5-x86.SL5-x86
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
3
configure/os/CONFIG.SL5-x86_64.Common
Normal file
3
configure/os/CONFIG.SL5-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
include $(CONFIG)/os/CONFIG.linux-x86_64.Common
|
||||
2
configure/os/CONFIG.SL5-x86_64.SL5-x86_64
Normal file
2
configure/os/CONFIG.SL5-x86_64.SL5-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
2
configure/os/CONFIG.SL6-x86.Common
Normal file
2
configure/os/CONFIG.SL6-x86.Common
Normal file
@@ -0,0 +1,2 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
2
configure/os/CONFIG.SL6-x86.SL6-x86
Normal file
2
configure/os/CONFIG.SL6-x86.SL6-x86
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
3
configure/os/CONFIG.SL6-x86_64.Common
Normal file
3
configure/os/CONFIG.SL6-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
include $(CONFIG)/os/CONFIG.linux-x86_64.Common
|
||||
2
configure/os/CONFIG.SL6-x86_64.SL6-x86
Normal file
2
configure/os/CONFIG.SL6-x86_64.SL6-x86
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
2
configure/os/CONFIG.SL6-x86_64.SL6-x86_64
Normal file
2
configure/os/CONFIG.SL6-x86_64.SL6-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
@@ -14,15 +14,15 @@ OPT_WHOLE_PROGRAM = YES
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
WINLINK = link
|
||||
WINLINK = $(MSVC_DIR)link
|
||||
|
||||
RCCMD = rc -l 0x409 $(INCLUDES) -fo $@ $<
|
||||
RCCMD = $(MSVC_DIR)rc -l 0x409 $(INCLUDES) -fo $@ $<
|
||||
|
||||
ARCMD = lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
|
||||
ARCMD = $(MSVC_DIR)lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
|
||||
|
||||
#
|
||||
# Configure OS vendor C compiler
|
||||
CC = cl
|
||||
CC = $(MSVC_DIR)cl
|
||||
|
||||
# Override CONFIG.gnuCommon settings for cross builds.
|
||||
GNU = NO
|
||||
@@ -75,14 +75,14 @@ STATIC_CFLAGS_YES= -MT$(VISC_CFLAGS_DEBUG) $(BUILD_DLL_CFLAGS)
|
||||
STATIC_CFLAGS_NO= -MD$(VISC_CFLAGS_DEBUG) $(BUILD_DLL_CFLAGS) -DEPICS_CALL_DLL
|
||||
|
||||
# OS vendor c preprocessor
|
||||
CPP = cl -nologo -C -E
|
||||
CPP = $(MSVC_DIR)cl -nologo -C -E
|
||||
|
||||
# Configure OS vendor C++ compiler
|
||||
#
|
||||
# -EHsc - generate code for exceptions
|
||||
# -GR - generate code for run time type identification
|
||||
#
|
||||
CCC = cl -EHsc -GR
|
||||
CCC = $(MSVC_DIR)cl -EHsc -GR
|
||||
|
||||
# Other compiler flags, used for CPP, C and C++
|
||||
#
|
||||
|
||||
2
configure/os/CONFIG_SITE.Common.UnixCommon
Normal file
2
configure/os/CONFIG_SITE.Common.UnixCommon
Normal file
@@ -0,0 +1,2 @@
|
||||
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
|
||||
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
|
||||
@@ -8,3 +8,12 @@
|
||||
# They must be set in the host+target specific file instead:
|
||||
# CONFIG_SITE.<linux-arch>.<linux-arch>
|
||||
|
||||
# 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
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
CODE_CPPFLAGS += -fno-strict-aliasing
|
||||
|
||||
@@ -2,24 +2,81 @@
|
||||
#
|
||||
# Site specific definitions for vxWorks target builds.
|
||||
|
||||
# Compiler options can vary with the vxWorks version number, so we
|
||||
# need to know that. Do not include any third-level digits.
|
||||
#### Fixes for CONFIG.Common.vxWorksCommon #######
|
||||
|
||||
# Note: vxWorks 5.4.x and 5.5.x (Tornado 2.x) are not supported.
|
||||
# VxWorks 6.0 through 6.5 use older, untested versions of GCC.
|
||||
|
||||
#VXWORKS_VERSION = 6.6
|
||||
#VXWORKS_VERSION = 6.7
|
||||
#VXWORKS_VERSION = 6.8
|
||||
VXWORKS_VERSION = 6.9
|
||||
VX_GNU_VERSION_7 = 4.8.1.11
|
||||
|
||||
|
||||
# Sites may override the following path for a particular host
|
||||
# architecture by adding it to an appropriate
|
||||
# CONFIG_SITE.$(EPICS_HOST_ARCH).vxWorksCommon file.
|
||||
# These are needed for vxWorks 6.x; the GNU toolset version number
|
||||
# is in the path to the compiler tools:
|
||||
VX_GNU_VERSION_5 = 2.96
|
||||
VX_GNU_VERSION_6 = $(VX_GNU_VERSION_$(VXWORKS_VERSION))
|
||||
VX_GNU_VERSION = $(VX_GNU_VERSION_$(VXWORKS_MAJOR_VERSION))
|
||||
VX_GNU_MAJOR_VERSION = $(firstword $(subst ., ,$(VX_GNU_VERSION)))
|
||||
VX_GNU_MINOR_VERSION = $(word 2,$(subst ., ,$(VX_GNU_VERSION)))
|
||||
|
||||
# gcc version before 3.4 are "old" and need special treatment
|
||||
VX_OLD_GCC_2 = OLD
|
||||
VX_OLD_GCC_3.3 = OLD
|
||||
VX_OLD_GCC_3 = $(VX_OLD_GCC_3.$(VX_GNU_MINOR_VERSION))
|
||||
VX_OLD_GCC = $(VX_OLD_GCC_$(VX_GNU_MAJOR_VERSION))
|
||||
|
||||
# vxWorks directory definitions
|
||||
VX_DIR_5 = $(WIND_BASE)
|
||||
VX_DIR_6 = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)
|
||||
VX_DIR_7 = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)/pkgs/os
|
||||
VX_DIR = $(VX_DIR_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
VX_INCLUDE_DIRS_5 = $(VX_DIR)/target/h
|
||||
VX_INCLUDE_DIRS_6 = $(VX_DIR)/target/h
|
||||
VX_INCLUDE_DIRS_6 += $(VX_DIR)/target/h/wrn/coreip
|
||||
VX_INCLUDE_DIRS_7 = $(VX_DIR)/core/kernel-1.2.8.0/h
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/lang-lib/libc-1.0.0.1/libc-kernel-1.0.8.0/h
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/utils/ostools-1.0.5.0/h
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/utils/ostools-1.0.5.0/shareh
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/arch/ppc-1.3.4.0/kernel/base/h/
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/arch/ppc-1.3.4.0/kernel/60x/h/arch/ppc/
|
||||
VX_INCLUDE_DIRS_7 += $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)/samples/prebuilt_projects/vsb_vxsim_linux/krnl/h/public
|
||||
GNU_TARGET_INCLUDE_DIR = $(VX_INCLUDE_DIRS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
TARGET_CPPFLAGS_5 = -isystem $(VX_DIR)/target/h
|
||||
TARGET_CPPFLAGS_6 = -isystem $(VX_DIR)/target/h
|
||||
TARGET_CPPFLAGS_7 = -isystem $(VX_DIR)/core/kernel-1.2.8.0/h -D_VSB_CONFIG_FILE='<$(WIND_BASE)/vxworks-$(VXWORKS_VERSION)/samples/prebuilt_projects/vsb_vxsim_linux/h/config/vsbConfig.h>'
|
||||
TARGET_CPPFLAGS = $(TARGET_CPPFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
# vxWorks GNU directories
|
||||
|
||||
GNU_DIR_5 = $(WIND_BASE)/host/$(WIND_HOST_TYPE)
|
||||
GNU_DIR_6 = $(WIND_BASE)/gnu/$(VX_GNU_VERSION)-vxworks-$(VXWORKS_VERSION)/$(WIND_HOST_TYPE)
|
||||
GNU_DIR_7 = $(WIND_BASE)/compilers/gnu-$(VX_GNU_VERSION)/$(WIND_HOST_TYPE)
|
||||
GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_CFLAGS += -fno-strict-aliasing
|
||||
|
||||
OP_SYS_INCLUDE_CPPFLAGS_5 += -include $(VX_DIR)/target/h/vxWorks.h
|
||||
OP_SYS_INCLUDE_CPPFLAGS_6 += -include $(VX_DIR)/target/h/vxWorks.h
|
||||
OP_SYS_INCLUDE_CPPFLAGS_7 += -include vxWorks.h
|
||||
OP_SYS_INCLUDE_CPPFLAGS = $(OP_SYS_INCLUDE_CPPFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
# For gcc versions before 3.4 we need this g++ compiler flag
|
||||
# However WindRiver says gcc 3.3 does not need it any more
|
||||
# which would allow to build vxWorks 6 without this flag.
|
||||
# Maybe we can live without it at the penalty of larger code.
|
||||
# See vxWorks 5 docs/gnu2.96+ppc/gcc.html
|
||||
# chapter 4.5 "Where's the Template?"
|
||||
CODE_CXXFLAGS_OLD = -fno-implicit-templates
|
||||
CODE_CXXFLAGS = $(CODE_CXXFLAGS_$(VX_OLD_GCC))
|
||||
|
||||
# WIND_BASE is where you installed the Wind River software.
|
||||
WIND_BASE = /afs/psi.ch/project/vxworks/VxWorks$(VXWORKS_VERSION)
|
||||
|
||||
#--------------------------------------------------
|
||||
# Modules we cannot build with old compiler
|
||||
|
||||
PV_MODULES = pv% normativeTypes
|
||||
SKIP_BUILDS_5 = $(PV_MODULES)
|
||||
SKIP_BUILDS_OLD = $(PV_MODULES)
|
||||
SKIP_BUILDS_6 = $(SKIP_BUILDS_$(VX_OLD_GCC))
|
||||
SKIP_BUILDS = $(SKIP_BUILDS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
#WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
|
||||
WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
|
||||
#WIND_BASE = /ade/vxWorks/$(VXWORKS_VERSION)
|
||||
|
||||
21
configure/os/CONFIG_SITE.RHEL7-x86_64.Common
Normal file
21
configure/os/CONFIG_SITE.RHEL7-x86_64.Common
Normal file
@@ -0,0 +1,21 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
|
||||
|
||||
# Build 32 bit version as a cross architecture
|
||||
#CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86
|
||||
|
||||
# Improved error checking with clang
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86_64-clang
|
||||
|
||||
# Build for old SL6 64 bit
|
||||
CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64
|
||||
|
||||
# Build for old SL6 32 bit
|
||||
#CROSS_COMPILER_TARGET_ARCHS += SL6-x86
|
||||
|
||||
# WINE MSVC
|
||||
CROSS_COMPILER_TARGET_ARCHS += win32-x86 windows-x64
|
||||
|
||||
# NI Linux Real-Time 7.x
|
||||
# requires RPM gcc-c++-arm-linux-gnu
|
||||
CROSS_COMPILER_TARGET_ARCHS += nilrt7-armv7a
|
||||
|
||||
1
configure/os/CONFIG_SITE.SL5-x86.Common
Normal file
1
configure/os/CONFIG_SITE.SL5-x86.Common
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
|
||||
3
configure/os/CONFIG_SITE.SL5-x86_64.Common
Normal file
3
configure/os/CONFIG_SITE.SL5-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
|
||||
# Build 32 bit version as a cross architecture
|
||||
CROSS_COMPILER_TARGET_ARCHS += SL5-x86
|
||||
1
configure/os/CONFIG_SITE.SL6-x86.Common
Normal file
1
configure/os/CONFIG_SITE.SL6-x86.Common
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
|
||||
7
configure/os/CONFIG_SITE.SL6-x86_64.Common
Normal file
7
configure/os/CONFIG_SITE.SL6-x86_64.Common
Normal file
@@ -0,0 +1,7 @@
|
||||
# Build 32 bit version as a cross architecture
|
||||
#CROSS_COMPILER_TARGET_ARCHS += SL6-x86
|
||||
|
||||
# Improved error checking with clang
|
||||
#CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64-clang
|
||||
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
|
||||
@@ -1,9 +1,46 @@
|
||||
# CONFIG_SITE.linux-x86.Common
|
||||
#
|
||||
# Site override definitions for linux-x86 host builds
|
||||
#-------------------------------------------------------
|
||||
INSTALL_LOCATION=/usr/local/epics/base-$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
|
||||
|
||||
# JBA test override values
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100 RTEMS-pc386 # RTEMS-mvme5500 RTEMS-mvme167
|
||||
GNU_HOST_ARCH=i686
|
||||
GNU_HOST_OS=linux
|
||||
|
||||
# LD_LIBRARY_PATH may cause problems for eldk53-ppc4xxFP
|
||||
LD_LIBRARY_PATH=
|
||||
|
||||
# vxWorks 5.5 for MVxxxx boards
|
||||
CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
|
||||
|
||||
# vxWorks 6.7 for MVxxxx boards
|
||||
CROSS_COMPILER_TARGET_ARCHS += V67-ppc604
|
||||
|
||||
# vxWorks 6.9 for MVxxxx boards
|
||||
CROSS_COMPILER_TARGET_ARCHS += V69-ppc604
|
||||
CROSS_COMPILER_TARGET_ARCHS += V69-ppc32
|
||||
|
||||
# NI compact RIO
|
||||
CROSS_COMPILER_TARGET_ARCHS += V63-ppc603
|
||||
|
||||
# MOXA montavista linux (No PVA because of missing boost support)
|
||||
CROSS_COMPILER_TARGET_ARCHS += mvl40-xscale_be
|
||||
|
||||
# MOXA SDK 4.2
|
||||
CROSS_COMPILER_TARGET_ARCHS += moxa42-armv6l
|
||||
|
||||
# Virtex embedded PPC
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk51-ppc4xxSF
|
||||
|
||||
# IOxOS IFC1210
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk52-e500v2
|
||||
|
||||
# DeltaTau PowerPMAC
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk42-ppc4xxFP
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk53-ppc4xxFP
|
||||
|
||||
# Test other vxWorks versions
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V66-ppc603
|
||||
CROSS_COMPILER_TARGET_ARCHS += V66-ppc604
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V63-ppc604
|
||||
# (No PVA because of old compiler)
|
||||
CROSS_COMPILER_TARGET_ARCHS += V62-ppc604
|
||||
|
||||
# Raspberry Pi
|
||||
CROSS_COMPILER_TARGET_ARCHS += raspbian-arm
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# CONFIG_SITE.linux-x86_64.Common
|
||||
#
|
||||
# Site override definitions for linux-x86_64 host builds
|
||||
#-------------------------------------------------------
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
|
||||
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100
|
||||
GNU_HOST_ARCH_64=x86_64
|
||||
|
||||
# IOxOS IFC1211
|
||||
CROSS_COMPILER_TARGET_ARCHS += fslqoriq20-e6500_64
|
||||
|
||||
# Zynq
|
||||
CROSS_COMPILER_TARGET_ARCHS += yocto21-aarch64
|
||||
|
||||
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
|
||||
# will be relative from the directory where doxygen is started.
|
||||
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
|
||||
|
||||
STRIP_FROM_PATH = \
|
||||
STRIP_FROM_PATH = @TOP@/include \
|
||||
../
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
|
||||
@@ -172,7 +172,8 @@ STRIP_FROM_PATH = \
|
||||
# specify the list of include paths that are normally passed to the compiler
|
||||
# using the -I flag.
|
||||
|
||||
STRIP_FROM_INC_PATH = ../
|
||||
STRIP_FROM_INC_PATH = @TOP@/include \
|
||||
../
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
|
||||
# less readable) file names. This can be useful is your file systems doesn't
|
||||
@@ -241,12 +242,6 @@ TAB_SIZE = 4
|
||||
|
||||
ALIASES =
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
# will allow you to use the command class in the itcl::class meaning.
|
||||
|
||||
TCL_SUBST =
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C. For
|
||||
# instance, some of the names that are used will be different. The list of all
|
||||
@@ -767,7 +762,8 @@ WARN_LOGFILE =
|
||||
INPUT = ../mainpage.dox \
|
||||
../RELEASE_NOTES.md \
|
||||
../README.md \
|
||||
../RecordReference.md
|
||||
../RecordReference.md \
|
||||
@TOP@/include
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
@@ -787,48 +783,10 @@ INPUT_ENCODING = UTF-8
|
||||
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
|
||||
# *.qsf, *.as and *.js.
|
||||
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
*.cpp \
|
||||
*.c++ \
|
||||
*.java \
|
||||
*.ii \
|
||||
*.ixx \
|
||||
*.ipp \
|
||||
*.i++ \
|
||||
*.inl \
|
||||
*.idl \
|
||||
*.ddl \
|
||||
*.odl \
|
||||
*.h \
|
||||
*.hh \
|
||||
*.hxx \
|
||||
FILE_PATTERNS = *.h \
|
||||
*.hpp \
|
||||
*.h++ \
|
||||
*.cs \
|
||||
*.d \
|
||||
*.php \
|
||||
*.php4 \
|
||||
*.php5 \
|
||||
*.phtml \
|
||||
*.inc \
|
||||
*.m \
|
||||
*.markdown \
|
||||
*.md \
|
||||
*.mm \
|
||||
*.dox \
|
||||
*.py \
|
||||
*.f90 \
|
||||
*.f \
|
||||
*.for \
|
||||
*.tcl \
|
||||
*.vhd \
|
||||
*.vhdl \
|
||||
*.ucf \
|
||||
*.qsf \
|
||||
*.as \
|
||||
*.js
|
||||
*.dox
|
||||
|
||||
# The RECURSIVE tag can be used to specify whether or not subdirectories should
|
||||
# be searched for input files as well.
|
||||
@@ -843,7 +801,8 @@ RECURSIVE = YES
|
||||
# Note that relative paths are relative to the directory from which doxygen is
|
||||
# run.
|
||||
|
||||
EXCLUDE =
|
||||
EXCLUDE = @TOP@/include/pv \
|
||||
@TOP@/include/pva
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
@@ -2094,12 +2053,6 @@ EXTERNAL_GROUPS = YES
|
||||
|
||||
EXTERNAL_PAGES = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of 'which perl').
|
||||
# The default file (with absolute path) is: /usr/bin/perl.
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2113,15 +2066,6 @@ PERL_PATH = /usr/bin/perl
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see:
|
||||
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
|
||||
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
TOP = ..
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
ifdef T_A
|
||||
ifeq ($(T_A),$(EPICS_HOST_ARCH))
|
||||
|
||||
DOXYGEN=doxygen
|
||||
|
||||
EXPAND = Doxyfile
|
||||
EXPAND = Doxyfile@
|
||||
|
||||
EXPAND_ME += EPICS_VERSION
|
||||
EXPAND_ME += EPICS_REVISION
|
||||
EXPAND_ME += EPICS_MODIFICATION
|
||||
EXPAND_ME += EPICS_PATCH_LEVEL
|
||||
EXPAND_ME += OS_CLASS CMPLR_CLASS
|
||||
|
||||
ME = documentation/O.$(T_A)/html
|
||||
GH_FILES = $(ME)/ $(ME)/.nojekyll $(ME)/*.* $(ME)/*/*.*
|
||||
|
||||
install: doxygen
|
||||
|
||||
doxygen: Doxyfile
|
||||
doxygen: Doxyfile ../mainpage.dox
|
||||
$(DOXYGEN)
|
||||
rsync -av $(TOP)/html/ html/
|
||||
|
||||
@@ -24,10 +26,10 @@ doxygen: Doxyfile
|
||||
|
||||
commit: doxygen
|
||||
$(TOUCH) html/.nojekyll
|
||||
(cd $(TOP) && $(CURDIR)/../commit-gh.sh $(ME)/ $(ME)/.nojekyll $(ME)/*.* $(ME)/*/*.*)
|
||||
(cd $(TOP) && $(CURDIR)/../commit-gh.sh $(GH_FILES))
|
||||
|
||||
.PHONY: commit
|
||||
|
||||
endif # T_A
|
||||
endif # EPICS_HOST_ARCH
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
@@ -11,6 +11,15 @@ release.
|
||||
The PVA submodules each have their own individual sets of release notes which
|
||||
should also be read to understand what has changed since earlier releases.
|
||||
|
||||
**This version of EPICS has not been released yet.**
|
||||
|
||||
## Changes made on the 7.0 branch since 7.0.5
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
|
||||
-----
|
||||
|
||||
## EPICS Release 7.0.5
|
||||
|
||||
### Fix aai's Device Support Initialization
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
Documentation index
|
||||
|
||||
@ul
|
||||
@li @ref releasenotes
|
||||
@li @ref install
|
||||
@li @ref recordrefmanual
|
||||
|
||||
@@ -37,6 +37,9 @@ pva2pva_DEPEND_DIRS = pvAccess
|
||||
SUBMODULES += example
|
||||
example_DEPEND_DIRS = pva2pva pvaClient
|
||||
|
||||
SUBMODULES += pcas
|
||||
pcas_DEPEND_DIRS = ca
|
||||
|
||||
# Allow sites to add extra submodules
|
||||
-include Makefile.local
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ LIBSRCS += comQueSend.cpp
|
||||
LIBSRCS += comBuf.cpp
|
||||
LIBSRCS += hostNameCache.cpp
|
||||
LIBSRCS += msgForMultiplyDefinedPV.cpp
|
||||
LIBSRCS_vxWorks += templateInstances.cpp
|
||||
|
||||
API_HEADER = libCaAPI.h
|
||||
ca_API = libCa
|
||||
|
||||
66
modules/ca/src/client/templateInstances.cpp
Normal file
66
modules/ca/src/client/templateInstances.cpp
Normal file
@@ -0,0 +1,66 @@
|
||||
/*************************************************************************\
|
||||
* 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 Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#include "cac.h"
|
||||
#include "oldAccess.h"
|
||||
#include "repeaterClient.h"
|
||||
|
||||
template class chronIntIdResTable < nciu >;
|
||||
template class chronIntIdResTable < baseNMIU >;
|
||||
template class chronIntIdResTable < CASG >;
|
||||
template class resTable < nciu, chronIntId >;
|
||||
template class resTable < baseNMIU, chronIntId >;
|
||||
template class resTable < CASG, chronIntId >;
|
||||
template class resTable < bhe, inetAddrID >;
|
||||
template class resTable < tcpiiu, caServerID >;
|
||||
template class tsFreeList < bhe, 0x100 >;
|
||||
template class tsFreeList < tcpiiu, 32, epicsMutexNOOP >;
|
||||
template class tsFreeList < netReadNotifyIO, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < netWriteNotifyIO, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < netSubscription, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < CASG, 128, epicsMutexNOOP >;
|
||||
template class tsFreeList < syncGroupReadNotify, 128, epicsMutexNOOP >;
|
||||
template class tsFreeList < syncGroupWriteNotify, 128, epicsMutexNOOP >;
|
||||
template class tsFreeList < comBuf, 0x20 >;
|
||||
template class tsFreeList < getCallback, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < getCopy, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < msgForMultiplyDefinedPV, 16 >;
|
||||
template class tsFreeList < nciu, 1024, epicsMutexNOOP>;
|
||||
template class tsFreeList < oldChannelNotify, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < oldSubscription, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < putCallback, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < repeaterClient, 0x20 >;
|
||||
template class epicsSingleton < localHostName >;
|
||||
template unsigned comBuf :: push ( const double * pValue, unsigned nElem );
|
||||
template unsigned comBuf :: push ( const float * pValue, unsigned nElem );
|
||||
template unsigned comBuf :: push ( const int * pValue, unsigned nElem );
|
||||
template unsigned comBuf :: push ( const short * pValue, unsigned nElem );
|
||||
template comBuf :: popStatus comBuf :: pop ( unsigned int & returnVal );
|
||||
template comBuf :: popStatus comBuf :: pop ( unsigned short & returnVal );
|
||||
template comBuf :: popStatus comBuf :: pop ( unsigned char & returnVal );
|
||||
template void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO
|
||||
(epicsGuard < epicsMutex > &, syncGroupWriteNotify & );
|
||||
template void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO
|
||||
( epicsGuard < epicsMutex > &, syncGroupReadNotify & );
|
||||
@@ -42,6 +42,7 @@ INC += dbState.h
|
||||
INC += db_access_routines.h
|
||||
INC += db_convert.h
|
||||
INC += dbUnitTest.h
|
||||
INC += dbCaPvt.h
|
||||
|
||||
# Generate menuGlobal.dbd, not really by concatenation, see RULES
|
||||
DBDCAT += menuGlobal.dbd
|
||||
@@ -99,3 +100,4 @@ dbCore_SRCS += chfPlugin.c
|
||||
dbCore_SRCS += dbState.c
|
||||
dbCore_SRCS += dbUnitTest.c
|
||||
dbCore_SRCS += dbServer.c
|
||||
dbCore_SRCS_vxWorks += templateInstances.cpp
|
||||
|
||||
@@ -339,7 +339,7 @@ static void getOptions(DBADDR *paddr, char **poriginal, long *options,
|
||||
dbCommon *pcommon;
|
||||
char *pbuffer = *poriginal;
|
||||
|
||||
if (!pfl || pfl->type == dbfl_type_rec)
|
||||
if (!pfl)
|
||||
field_type = paddr->field_type;
|
||||
else
|
||||
field_type = pfl->field_type;
|
||||
@@ -349,7 +349,7 @@ static void getOptions(DBADDR *paddr, char **poriginal, long *options,
|
||||
if( (*options) & DBR_STATUS ) {
|
||||
unsigned short *pushort = (unsigned short *)pbuffer;
|
||||
|
||||
if (!pfl || pfl->type == dbfl_type_rec) {
|
||||
if (!pfl) {
|
||||
*pushort++ = pcommon->stat;
|
||||
*pushort++ = pcommon->sevr;
|
||||
} else {
|
||||
@@ -383,7 +383,7 @@ static void getOptions(DBADDR *paddr, char **poriginal, long *options,
|
||||
if( (*options) & DBR_TIME ) {
|
||||
epicsUInt32 *ptime = (epicsUInt32 *)pbuffer;
|
||||
|
||||
if (!pfl || pfl->type == dbfl_type_rec) {
|
||||
if (!pfl) {
|
||||
*ptime++ = pcommon->time.secPastEpoch;
|
||||
*ptime++ = pcommon->time.nsec;
|
||||
} else {
|
||||
@@ -904,22 +904,23 @@ long dbGet(DBADDR *paddr, short dbrType,
|
||||
if (nRequest && *nRequest == 0)
|
||||
return 0;
|
||||
|
||||
if (!pfl || pfl->type == dbfl_type_rec) {
|
||||
if (!pfl) {
|
||||
field_type = paddr->field_type;
|
||||
no_elements = capacity = paddr->no_elements;
|
||||
|
||||
/* Update field info from record
|
||||
* may modify paddr->pfield
|
||||
*/
|
||||
if (paddr->pfldDes->special == SPC_DBADDR &&
|
||||
(prset = dbGetRset(paddr)) &&
|
||||
prset->get_array_info) {
|
||||
status = prset->get_array_info(paddr, &no_elements, &offset);
|
||||
} else
|
||||
offset = 0;
|
||||
} else {
|
||||
field_type = pfl->field_type;
|
||||
no_elements = capacity = pfl->no_elements;
|
||||
}
|
||||
|
||||
/* Update field info from record (if neccessary);
|
||||
* may modify paddr->pfield.
|
||||
*/
|
||||
if (!dbfl_has_copy(pfl) &&
|
||||
paddr->pfldDes->special == SPC_DBADDR &&
|
||||
(prset = dbGetRset(paddr)) &&
|
||||
prset->get_array_info) {
|
||||
status = prset->get_array_info(paddr, &no_elements, &offset);
|
||||
} else {
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
@@ -951,7 +952,7 @@ long dbGet(DBADDR *paddr, short dbrType,
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!pfl || pfl->type == dbfl_type_rec) {
|
||||
if (!dbfl_has_copy(pfl)) {
|
||||
status = dbFastGetConvertRoutine[field_type][dbrType]
|
||||
(paddr->pfield, pbuf, paddr);
|
||||
} else {
|
||||
@@ -964,11 +965,9 @@ long dbGet(DBADDR *paddr, short dbrType,
|
||||
|
||||
localAddr.field_type = pfl->field_type;
|
||||
localAddr.field_size = pfl->field_size;
|
||||
/* not used by dbFastConvert: */
|
||||
localAddr.no_elements = pfl->no_elements;
|
||||
if (pfl->type == dbfl_type_val)
|
||||
localAddr.pfield = (char *) &pfl->u.v.field;
|
||||
else
|
||||
localAddr.pfield = (char *) pfl->u.r.field;
|
||||
localAddr.pfield = dbfl_pfield(pfl);
|
||||
status = dbFastGetConvertRoutine[field_type][dbrType]
|
||||
(localAddr.pfield, pbuf, &localAddr);
|
||||
}
|
||||
@@ -979,6 +978,8 @@ long dbGet(DBADDR *paddr, short dbrType,
|
||||
if (nRequest) {
|
||||
if (no_elements < *nRequest)
|
||||
*nRequest = no_elements;
|
||||
if (capacity < *nRequest)
|
||||
*nRequest = capacity;
|
||||
n = *nRequest;
|
||||
} else {
|
||||
n = 1;
|
||||
@@ -995,8 +996,8 @@ long dbGet(DBADDR *paddr, short dbrType,
|
||||
}
|
||||
/* convert data into the caller's buffer */
|
||||
if (n <= 0) {
|
||||
;/*do nothing*/
|
||||
} else if (!pfl || pfl->type == dbfl_type_rec) {
|
||||
; /*do nothing */
|
||||
} else if (!dbfl_has_copy(pfl)) {
|
||||
status = convert(paddr, pbuf, n, capacity, offset);
|
||||
} else {
|
||||
DBADDR localAddr = *paddr; /* Structure copy */
|
||||
@@ -1008,11 +1009,9 @@ long dbGet(DBADDR *paddr, short dbrType,
|
||||
|
||||
localAddr.field_type = pfl->field_type;
|
||||
localAddr.field_size = pfl->field_size;
|
||||
/* not used by dbConvert, it uses the passed capacity instead: */
|
||||
localAddr.no_elements = pfl->no_elements;
|
||||
if (pfl->type == dbfl_type_val)
|
||||
localAddr.pfield = (char *) &pfl->u.v.field;
|
||||
else
|
||||
localAddr.pfield = (char *) pfl->u.r.field;
|
||||
localAddr.pfield = dbfl_pfield(pfl);
|
||||
status = convert(&localAddr, pbuf, n, capacity, offset);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,14 +52,12 @@ typedef struct parseContext {
|
||||
|
||||
static void *dbChannelFreeList;
|
||||
static void *chFilterFreeList;
|
||||
static void *dbchStringFreeList;
|
||||
|
||||
void dbChannelExit(void)
|
||||
{
|
||||
freeListCleanup(dbChannelFreeList);
|
||||
freeListCleanup(chFilterFreeList);
|
||||
freeListCleanup(dbchStringFreeList);
|
||||
dbChannelFreeList = chFilterFreeList = dbchStringFreeList = NULL;
|
||||
dbChannelFreeList = chFilterFreeList = NULL;
|
||||
}
|
||||
|
||||
void dbChannelInit (void)
|
||||
@@ -69,7 +67,6 @@ void dbChannelInit (void)
|
||||
|
||||
freeListInitPvt(&dbChannelFreeList, sizeof(dbChannel), 128);
|
||||
freeListInitPvt(&chFilterFreeList, sizeof(chFilter), 64);
|
||||
freeListInitPvt(&dbchStringFreeList, sizeof(epicsOldString), 128);
|
||||
db_init_event_freelists();
|
||||
}
|
||||
|
||||
@@ -449,28 +446,6 @@ static long parseArrayRange(dbChannel* chan, const char *pname, const char **ppn
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Stolen from dbAccess.c: */
|
||||
static short mapDBFToDBR[DBF_NTYPES] =
|
||||
{
|
||||
/* DBF_STRING => */DBR_STRING,
|
||||
/* DBF_CHAR => */DBR_CHAR,
|
||||
/* DBF_UCHAR => */DBR_UCHAR,
|
||||
/* DBF_SHORT => */DBR_SHORT,
|
||||
/* DBF_USHORT => */DBR_USHORT,
|
||||
/* DBF_LONG => */DBR_LONG,
|
||||
/* DBF_ULONG => */DBR_ULONG,
|
||||
/* DBF_INT64 => */DBR_INT64,
|
||||
/* DBF_UINT64 => */DBR_UINT64,
|
||||
/* DBF_FLOAT => */DBR_FLOAT,
|
||||
/* DBF_DOUBLE => */DBR_DOUBLE,
|
||||
/* DBF_ENUM, => */DBR_ENUM,
|
||||
/* DBF_MENU, => */DBR_ENUM,
|
||||
/* DBF_DEVICE => */DBR_ENUM,
|
||||
/* DBF_INLINK => */DBR_STRING,
|
||||
/* DBF_OUTLINK => */DBR_STRING,
|
||||
/* DBF_FWDLINK => */DBR_STRING,
|
||||
/* DBF_NOACCESS => */DBR_NOACCESS };
|
||||
|
||||
dbChannel * dbChannelCreate(const char *name)
|
||||
{
|
||||
const char *pname = name;
|
||||
@@ -743,37 +718,24 @@ void dbChannelDelete(dbChannel *chan)
|
||||
freeListFree(dbChannelFreeList, chan);
|
||||
}
|
||||
|
||||
static void freeArray(db_field_log *pfl) {
|
||||
if (pfl->field_type == DBF_STRING && pfl->no_elements == 1) {
|
||||
freeListFree(dbchStringFreeList, pfl->u.r.field);
|
||||
} else {
|
||||
free(pfl->u.r.field);
|
||||
}
|
||||
}
|
||||
|
||||
void dbChannelMakeArrayCopy(void *pvt, db_field_log *pfl, dbChannel *chan)
|
||||
/*
|
||||
* Helper function to adjust no_elements, offset, and pfield
|
||||
* when copying an array from a record.
|
||||
*/
|
||||
void dbChannelGetArrayInfo(dbChannel *chan,
|
||||
void **pfield, long *no_elements, long *offset)
|
||||
{
|
||||
void *p;
|
||||
struct dbCommon *prec = dbChannelRecord(chan);
|
||||
|
||||
if (pfl->type != dbfl_type_rec) return;
|
||||
|
||||
pfl->type = dbfl_type_ref;
|
||||
pfl->stat = prec->stat;
|
||||
pfl->sevr = prec->sevr;
|
||||
pfl->time = prec->time;
|
||||
pfl->field_type = chan->addr.field_type;
|
||||
pfl->no_elements = chan->addr.no_elements;
|
||||
pfl->field_size = chan->addr.field_size;
|
||||
pfl->u.r.dtor = freeArray;
|
||||
pfl->u.r.pvt = pvt;
|
||||
if (pfl->field_type == DBF_STRING && pfl->no_elements == 1) {
|
||||
p = freeListCalloc(dbchStringFreeList);
|
||||
} else {
|
||||
p = calloc(pfl->no_elements, pfl->field_size);
|
||||
rset *prset;
|
||||
if (dbChannelSpecial(chan) == SPC_DBADDR &&
|
||||
(prset = dbGetRset(&chan->addr)) &&
|
||||
prset->get_array_info)
|
||||
{
|
||||
void *pfieldsave = dbChannelField(chan);
|
||||
/* it is expected that this call always succeeds */
|
||||
prset->get_array_info(&chan->addr, no_elements, offset);
|
||||
*pfield = dbChannelField(chan);
|
||||
dbChannelField(chan) = pfieldsave;
|
||||
}
|
||||
if (p) dbGet(&chan->addr, mapDBFToDBR[pfl->field_type], p, NULL, &pfl->no_elements, NULL);
|
||||
pfl->u.r.field = p;
|
||||
}
|
||||
|
||||
/* FIXME: Do these belong in a different file? */
|
||||
|
||||
@@ -65,8 +65,8 @@ typedef struct dbChannel {
|
||||
/* Prototype for the channel event function that is called in filter stacks
|
||||
*
|
||||
* When invoked the scan lock for the record associated with 'chan' _may_ be locked.
|
||||
* If pLog->type==dbfl_type_rec then dbScanLock() must be called before copying
|
||||
* data out of the associated record.
|
||||
* Unless dbfl_has_copy(pLog), it must call dbScanLock before accessing the data,
|
||||
* as this indicates the data is still owned by the record.
|
||||
*
|
||||
* This function has ownership of the field log pLog, if it wishes to discard
|
||||
* this update it should free the field log with db_delete_field_log() and
|
||||
@@ -225,7 +225,8 @@ DBCORE_API void dbRegisterFilter(const char *key, const chFilterIf *fif, void *p
|
||||
DBCORE_API db_field_log* dbChannelRunPreChain(dbChannel *chan, db_field_log *pLogIn);
|
||||
DBCORE_API db_field_log* dbChannelRunPostChain(dbChannel *chan, db_field_log *pLogIn);
|
||||
DBCORE_API const chFilterPlugin * dbFindFilter(const char *key, size_t len);
|
||||
DBCORE_API void dbChannelMakeArrayCopy(void *pvt, db_field_log *pfl, dbChannel *chan);
|
||||
DBCORE_API void dbChannelGetArrayInfo(dbChannel *chan,
|
||||
void **pfield, long *no_elements, long *offset);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -668,27 +668,21 @@ int db_post_extra_labor (dbEventCtx ctx)
|
||||
return DB_EVENT_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* DB_CREATE_EVENT_LOG()
|
||||
*
|
||||
* NOTE: This assumes that the db scan lock is already applied
|
||||
* (as it copies data from the record)
|
||||
*/
|
||||
db_field_log* db_create_event_log (struct evSubscrip *pevent)
|
||||
static db_field_log* db_create_field_log (struct dbChannel *chan, int use_val)
|
||||
{
|
||||
db_field_log *pLog = (db_field_log *) freeListCalloc(dbevFieldLogFreeList);
|
||||
|
||||
if (pLog) {
|
||||
struct dbChannel *chan = pevent->chan;
|
||||
struct dbCommon *prec = dbChannelRecord(chan);
|
||||
pLog->ctx = dbfl_context_event;
|
||||
if (pevent->useValque) {
|
||||
pLog->stat = prec->stat;
|
||||
pLog->sevr = prec->sevr;
|
||||
pLog->time = prec->time;
|
||||
pLog->field_type = dbChannelFieldType(chan);
|
||||
pLog->field_size = dbChannelFieldSize(chan);
|
||||
pLog->no_elements = dbChannelElements(chan);
|
||||
|
||||
if (use_val) {
|
||||
pLog->type = dbfl_type_val;
|
||||
pLog->stat = prec->stat;
|
||||
pLog->sevr = prec->sevr;
|
||||
pLog->time = prec->time;
|
||||
pLog->field_type = dbChannelFieldType(chan);
|
||||
pLog->no_elements = dbChannelElements(chan);
|
||||
/*
|
||||
* use memcpy to avoid a bus error on
|
||||
* union copy of char in the db at an odd
|
||||
@@ -698,23 +692,46 @@ db_field_log* db_create_event_log (struct evSubscrip *pevent)
|
||||
dbChannelField(chan),
|
||||
dbChannelFieldSize(chan));
|
||||
} else {
|
||||
pLog->type = dbfl_type_rec;
|
||||
pLog->type = dbfl_type_ref;
|
||||
|
||||
/* don't make a copy yet, just reference the field value */
|
||||
pLog->u.r.field = dbChannelField(chan);
|
||||
/* indicate field value still owned by record */
|
||||
pLog->u.r.dtor = NULL;
|
||||
/* no private data yet, may be set by a filter */
|
||||
pLog->u.r.pvt = NULL;
|
||||
}
|
||||
}
|
||||
return pLog;
|
||||
}
|
||||
|
||||
/*
|
||||
* DB_CREATE_EVENT_LOG()
|
||||
*
|
||||
* NOTE: This assumes that the db scan lock is already applied
|
||||
* (as it calls rset->get_array_info)
|
||||
*/
|
||||
db_field_log* db_create_event_log (struct evSubscrip *pevent)
|
||||
{
|
||||
db_field_log *pLog = db_create_field_log(pevent->chan, pevent->useValque);
|
||||
if (pLog) {
|
||||
pLog->ctx = dbfl_context_event;
|
||||
}
|
||||
return pLog;
|
||||
}
|
||||
|
||||
/*
|
||||
* DB_CREATE_READ_LOG()
|
||||
*
|
||||
*/
|
||||
db_field_log* db_create_read_log (struct dbChannel *chan)
|
||||
{
|
||||
db_field_log *pLog = (db_field_log *) freeListCalloc(dbevFieldLogFreeList);
|
||||
|
||||
db_field_log *pLog = db_create_field_log(chan,
|
||||
dbChannelElements(chan) == 1 &&
|
||||
dbChannelSpecial(chan) != SPC_DBADDR &&
|
||||
dbChannelFieldSize(chan) <= sizeof(union native_value));
|
||||
if (pLog) {
|
||||
pLog->ctx = dbfl_context_read;
|
||||
pLog->type = dbfl_type_rec;
|
||||
}
|
||||
return pLog;
|
||||
}
|
||||
@@ -737,20 +754,6 @@ static void db_queue_event_log (evSubscrip *pevent, db_field_log *pLog)
|
||||
|
||||
LOCKEVQUE (ev_que);
|
||||
|
||||
/*
|
||||
* if we have an event on the queue and both the last
|
||||
* event on the queue and the current event are emtpy
|
||||
* (i.e. of type dbfl_type_rec), simply ignore duplicate
|
||||
* events (saving empty events serves no purpose)
|
||||
*/
|
||||
if (pevent->npend > 0u &&
|
||||
(*pevent->pLastLog)->type == dbfl_type_rec &&
|
||||
pLog->type == dbfl_type_rec) {
|
||||
db_delete_field_log(pLog);
|
||||
UNLOCKEVQUE (ev_que);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* add to task local event que
|
||||
*/
|
||||
|
||||
@@ -14,11 +14,12 @@
|
||||
/*
|
||||
* Author: Ralph Lange <Ralph.Lange@bessy.de>
|
||||
*
|
||||
* based on dbConvert.c
|
||||
* based on dbConvert.c, see copyNoConvert
|
||||
* written by: Bob Dalesio, Marty Kraimer
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "epicsTypes.h"
|
||||
|
||||
@@ -26,61 +27,30 @@
|
||||
#include "dbAddr.h"
|
||||
#include "dbExtractArray.h"
|
||||
|
||||
void dbExtractArrayFromRec(const dbAddr *paddr, void *pto,
|
||||
long nRequest, long no_elements, long offset, long increment)
|
||||
void dbExtractArray(const void *pfrom, void *pto, short field_size,
|
||||
long nRequest, long no_elements, long offset, long increment)
|
||||
{
|
||||
char *pdst = (char *) pto;
|
||||
char *psrc = (char *) paddr->pfield;
|
||||
long nUpperPart;
|
||||
int i;
|
||||
short srcSize = paddr->field_size;
|
||||
short dstSize = srcSize;
|
||||
char isString = (paddr->field_type == DBF_STRING);
|
||||
const char *psrc = (char *) pfrom;
|
||||
|
||||
if (nRequest > no_elements) nRequest = no_elements;
|
||||
if (isString && srcSize > MAX_STRING_SIZE) dstSize = MAX_STRING_SIZE;
|
||||
|
||||
if (increment == 1 && dstSize == srcSize) {
|
||||
nUpperPart = nRequest < no_elements - offset ? nRequest : no_elements - offset;
|
||||
memcpy(pdst, &psrc[offset * srcSize], dstSize * nUpperPart);
|
||||
if (nRequest > nUpperPart)
|
||||
memcpy(&pdst[dstSize * nUpperPart], psrc, dstSize * (nRequest - nUpperPart));
|
||||
if (isString)
|
||||
for (i = 1; i <= nRequest; i++)
|
||||
pdst[dstSize*i-1] = '\0';
|
||||
} else {
|
||||
for (; nRequest > 0; nRequest--, pdst += dstSize, offset += increment) {
|
||||
offset %= no_elements;
|
||||
memcpy(pdst, &psrc[offset*srcSize], dstSize);
|
||||
if (isString) pdst[dstSize-1] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dbExtractArrayFromBuf(const void *pfrom, void *pto,
|
||||
short field_size, short field_type,
|
||||
long nRequest, long no_elements, long offset, long increment)
|
||||
{
|
||||
char *pdst = (char *) pto;
|
||||
char *psrc = (char *) pfrom;
|
||||
int i;
|
||||
short srcSize = field_size;
|
||||
short dstSize = srcSize;
|
||||
char isString = (field_type == DBF_STRING);
|
||||
|
||||
if (nRequest > no_elements) nRequest = no_elements;
|
||||
if (offset > no_elements - 1) offset = no_elements - 1;
|
||||
if (isString && dstSize >= MAX_STRING_SIZE) dstSize = MAX_STRING_SIZE - 1;
|
||||
/* assert preconditions */
|
||||
assert(nRequest >= 0);
|
||||
assert(no_elements >= 0);
|
||||
assert(increment > 0);
|
||||
assert(0 <= offset);
|
||||
assert(offset < no_elements);
|
||||
|
||||
if (increment == 1) {
|
||||
memcpy(pdst, &psrc[offset * srcSize], dstSize * nRequest);
|
||||
if (isString)
|
||||
for (i = 1; i <= nRequest; i++)
|
||||
pdst[dstSize*i] = '\0';
|
||||
long nUpperPart =
|
||||
nRequest < no_elements - offset ? nRequest : no_elements - offset;
|
||||
memcpy(pdst, psrc + (offset * field_size), field_size * nUpperPart);
|
||||
if (nRequest > nUpperPart)
|
||||
memcpy(pdst + (field_size * nUpperPart), psrc,
|
||||
field_size * (nRequest - nUpperPart));
|
||||
} else {
|
||||
for (; nRequest > 0; nRequest--, pdst += srcSize, offset += increment) {
|
||||
memcpy(pdst, &psrc[offset*srcSize], dstSize);
|
||||
if (isString) pdst[dstSize] = '\0';
|
||||
for (; nRequest > 0; nRequest--, pdst += field_size, offset += increment) {
|
||||
offset %= no_elements;
|
||||
memcpy(pdst, psrc + (offset * field_size), field_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,36 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc void dbExtractArrayFromRec(const DBADDR *paddr, void *pto,
|
||||
long nRequest, long no_elements, long offset, long increment);
|
||||
epicsShareFunc void dbExtractArrayFromBuf(const void *pfrom, void *pto,
|
||||
short field_size, short field_type,
|
||||
long nRequest, long no_elements, long offset, long increment);
|
||||
/** @brief Make a copy of parts of an array.
|
||||
*
|
||||
* The source array may or may not be a record field.
|
||||
*
|
||||
* The increment parameter is used to support array filters; it
|
||||
* means: copy only every increment'th element, starting at offset.
|
||||
*
|
||||
* The offset and no_elements parameters are used to support the
|
||||
* circular buffer feature of record fields: elements before offset
|
||||
* are treated as if they came right after no_elements.
|
||||
*
|
||||
* This function does not do any conversion on the array elements.
|
||||
*
|
||||
* Preconditions:
|
||||
* nRequest >= 0, no_elements >= 0, increment > 0
|
||||
* 0 <= offset < no_elements
|
||||
* pto points to a buffer with at least field_size*nRequest bytes
|
||||
* pfrom points to a buffer with exactly field_size*no_elements bytes
|
||||
*
|
||||
* @param pfrom Pointer to source array.
|
||||
* @param pto Pointer to target array.
|
||||
* @param field_size Size of an array element.
|
||||
* @param nRequest Number of elements to copy.
|
||||
* @param no_elements Number of elements in source array.
|
||||
* @param offset Wrap-around point in source array.
|
||||
* @param increment Copy only every increment'th element.
|
||||
*/
|
||||
epicsShareFunc void dbExtractArray(const void *pfrom, void *pto,
|
||||
short field_size, long nRequest, long no_elements, long offset,
|
||||
long increment);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -57,20 +57,31 @@ union native_value {
|
||||
struct db_field_log;
|
||||
typedef void (dbfl_freeFunc)(struct db_field_log *pfl);
|
||||
|
||||
/* Types of db_field_log: rec = use record, val = val inside, ref = reference inside */
|
||||
/*
|
||||
* A db_field_log has one of two types:
|
||||
*
|
||||
* dbfl_type_ref - Reference to value
|
||||
* Used for variable size (array) data types. Meta-data
|
||||
* is stored in the field log, but value data is stored externally.
|
||||
* Only the dbfl_ref side of the data union is valid.
|
||||
*
|
||||
* dbfl_type_val - Internal value
|
||||
* Used to store small scalar data. Meta-data and value are
|
||||
* present in this structure and no external references are used.
|
||||
* Only the dbfl_val side of the data union is valid.
|
||||
*/
|
||||
typedef enum dbfl_type {
|
||||
dbfl_type_rec = 0,
|
||||
dbfl_type_val,
|
||||
dbfl_type_ref
|
||||
} dbfl_type;
|
||||
|
||||
/* Context of db_field_log: event = subscription update, read = read reply */
|
||||
typedef enum dbfl_context {
|
||||
dbfl_context_read = 0,
|
||||
dbfl_context_read,
|
||||
dbfl_context_event
|
||||
} dbfl_context;
|
||||
|
||||
#define dbflTypeStr(t) (t==dbfl_type_val?"val":t==dbfl_type_rec?"rec":"ref")
|
||||
#define dbflTypeStr(t) (t==dbfl_type_val?"val":"ref")
|
||||
|
||||
struct dbfl_val {
|
||||
union native_value field; /* Field value */
|
||||
@@ -82,6 +93,8 @@ struct dbfl_val {
|
||||
* db_delete_field_log(). Any code which changes a dbfl_type_ref
|
||||
* field log to another type, or to reference different data,
|
||||
* must explicitly call the dtor function.
|
||||
* If the dtor is NULL and no_elements > 0, then this means the array
|
||||
* data is still owned by a record. See the macro dbfl_has_copy below.
|
||||
*/
|
||||
struct dbfl_ref {
|
||||
dbfl_freeFunc *dtor; /* Callback to free filter-allocated resources */
|
||||
@@ -89,8 +102,11 @@ struct dbfl_ref {
|
||||
void *field; /* Field value */
|
||||
};
|
||||
|
||||
/*
|
||||
* Note that field_size may be larger than MAX_STRING_SIZE.
|
||||
*/
|
||||
typedef struct db_field_log {
|
||||
unsigned int type:2; /* type (union) selector */
|
||||
unsigned int type:1; /* type (union) selector */
|
||||
/* ctx is used for all types */
|
||||
unsigned int ctx:1; /* context (operation type) */
|
||||
/* the following are used for value and reference types */
|
||||
@@ -98,8 +114,8 @@ typedef struct db_field_log {
|
||||
unsigned short stat; /* Alarm Status */
|
||||
unsigned short sevr; /* Alarm Severity */
|
||||
short field_type; /* DBF type of data */
|
||||
short field_size; /* Data size */
|
||||
long no_elements; /* No of array elements */
|
||||
short field_size; /* Size of a single element */
|
||||
long no_elements; /* No of valid array elements */
|
||||
union {
|
||||
struct dbfl_val v;
|
||||
struct dbfl_ref r;
|
||||
@@ -107,27 +123,19 @@ typedef struct db_field_log {
|
||||
} db_field_log;
|
||||
|
||||
/*
|
||||
* A db_field_log will in one of three types:
|
||||
*
|
||||
* dbfl_type_rec - Reference to record
|
||||
* The field log stores no data itself. Data must instead be taken
|
||||
* via the dbChannel* which must always be provided when along
|
||||
* with the field log.
|
||||
* For this type only the 'type' and 'ctx' members are used.
|
||||
*
|
||||
* dbfl_type_ref - Reference to outside value
|
||||
* Used for variable size (array) data types. Meta-data
|
||||
* is stored in the field log, but value data is stored externally
|
||||
* (see struct dbfl_ref).
|
||||
* For this type all meta-data members are used. The dbfl_ref side of the
|
||||
* data union is used.
|
||||
*
|
||||
* dbfl_type_val - Internal value
|
||||
* Used to store small scalar data. Meta-data and value are
|
||||
* present in this structure and no external references are used.
|
||||
* For this type all meta-data members are used. The dbfl_val side of the
|
||||
* data union is used.
|
||||
* Whether a db_field_log* owns the field data. If this is the case, then the
|
||||
* db_field_log is fully decoupled from the record: there is no need to lock
|
||||
* the record when accessing the data, nor to call any rset methods (like
|
||||
* get_array_info) because this has already been done when we made the copy. A
|
||||
* special case here is that of no (remaining) data (i.e. no_elements==0). In
|
||||
* this case, making a copy is redundant, so we have no dtor. But conceptually
|
||||
* the db_field_log still owns the (empty) data.
|
||||
*/
|
||||
#define dbfl_has_copy(p)\
|
||||
((p) && ((p)->type==dbfl_type_val || (p)->u.r.dtor || (p)->no_elements==0))
|
||||
|
||||
#define dbfl_pfield(p)\
|
||||
((p)->type==dbfl_type_val ? &p->u.v.field : p->u.r.field)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
9
modules/database/src/ioc/db/templateInstances.cpp
Normal file
9
modules/database/src/ioc/db/templateInstances.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "dbCAC.h"
|
||||
#include "dbChannelIO.h"
|
||||
#include "dbPutNotifyBlocker.h"
|
||||
|
||||
template class tsFreeList < dbSubscriptionIO, 256, epicsMutexNOOP >;
|
||||
template class tsFreeList < dbChannelIO, 256, epicsMutexNOOP >;
|
||||
template class tsFreeList < dbPutNotifyBlocker, 64, epicsMutexNOOP >;
|
||||
template class resTable < dbBaseIO, chronIntId >;
|
||||
template class chronIntIdResTable < dbBaseIO >;
|
||||
@@ -16,6 +16,7 @@ caserverio_INCLUDES = -I$(SRC)/ca/client
|
||||
camessage_INCLUDES = -I$(SRC)/ca/client
|
||||
|
||||
INC += rsrv.h
|
||||
INC += server.h
|
||||
|
||||
DBD += rsrv.dbd
|
||||
|
||||
|
||||
@@ -13,16 +13,14 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <freeList.h>
|
||||
#include <dbAccess.h>
|
||||
#include <dbExtractArray.h>
|
||||
#include <db_field_log.h>
|
||||
#include <dbLock.h>
|
||||
#include <recSup.h>
|
||||
#include <epicsExit.h>
|
||||
#include <special.h>
|
||||
#include <chfPlugin.h>
|
||||
#include <epicsExport.h>
|
||||
#include "chfPlugin.h"
|
||||
#include "dbAccessDefs.h"
|
||||
#include "dbExtractArray.h"
|
||||
#include "db_field_log.h"
|
||||
#include "dbLock.h"
|
||||
#include "epicsExit.h"
|
||||
#include "freeList.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
typedef struct myStruct {
|
||||
epicsInt32 start;
|
||||
@@ -46,6 +44,8 @@ static void * allocPvt(void)
|
||||
myStruct *my = (myStruct*) freeListCalloc(myStructFreeList);
|
||||
if (!my) return NULL;
|
||||
|
||||
/* defaults */
|
||||
my->start = 0;
|
||||
my->incr = 1;
|
||||
my->end = -1;
|
||||
return (void *) my;
|
||||
@@ -77,8 +77,6 @@ static void freeArray(db_field_log *pfl)
|
||||
static long wrapArrayIndices(long *start, const long increment, long *end,
|
||||
const long no_elements)
|
||||
{
|
||||
long len = 0;
|
||||
|
||||
if (*start < 0) *start = no_elements + *start;
|
||||
if (*start < 0) *start = 0;
|
||||
if (*start > no_elements) *start = no_elements;
|
||||
@@ -87,85 +85,53 @@ static long wrapArrayIndices(long *start, const long increment, long *end,
|
||||
if (*end < 0) *end = 0;
|
||||
if (*end >= no_elements) *end = no_elements - 1;
|
||||
|
||||
if (*end - *start >= 0) len = 1 + (*end - *start) / increment;
|
||||
return len;
|
||||
if (*end - *start >= 0)
|
||||
return 1 + (*end - *start) / increment;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl)
|
||||
{
|
||||
myStruct *my = (myStruct*) pvt;
|
||||
struct dbCommon *prec;
|
||||
rset *prset;
|
||||
int must_lock;
|
||||
long start = my->start;
|
||||
long end = my->end;
|
||||
long nTarget = 0;
|
||||
long nTarget;
|
||||
void *pTarget;
|
||||
long offset = 0;
|
||||
long nSource = dbChannelElements(chan);
|
||||
long capacity = nSource;
|
||||
void *pdst;
|
||||
long nSource = pfl->no_elements;
|
||||
void *pSource = pfl->u.r.field;
|
||||
|
||||
switch (pfl->type) {
|
||||
case dbfl_type_val:
|
||||
/* Only filter arrays */
|
||||
/* TODO Treat scalars as arrays with 1 element */
|
||||
break;
|
||||
|
||||
case dbfl_type_rec:
|
||||
/* Extract from record */
|
||||
if (dbChannelSpecial(chan) == SPC_DBADDR &&
|
||||
nSource > 1 &&
|
||||
(prset = dbGetRset(&chan->addr)) &&
|
||||
prset->get_array_info)
|
||||
{
|
||||
void *pfieldsave = dbChannelField(chan);
|
||||
prec = dbChannelRecord(chan);
|
||||
dbScanLock(prec);
|
||||
prset->get_array_info(&chan->addr, &nSource, &offset);
|
||||
nTarget = wrapArrayIndices(&start, my->incr, &end, nSource);
|
||||
pfl->type = dbfl_type_ref;
|
||||
pfl->stat = prec->stat;
|
||||
pfl->sevr = prec->sevr;
|
||||
pfl->time = prec->time;
|
||||
pfl->field_type = dbChannelFieldType(chan);
|
||||
pfl->field_size = dbChannelFieldSize(chan);
|
||||
pfl->no_elements = nTarget;
|
||||
if (nTarget) {
|
||||
pdst = freeListCalloc(my->arrayFreeList);
|
||||
if (pdst) {
|
||||
pfl->u.r.dtor = freeArray;
|
||||
pfl->u.r.pvt = my->arrayFreeList;
|
||||
offset = (offset + start) % dbChannelElements(chan);
|
||||
dbExtractArrayFromRec(&chan->addr, pdst, nTarget, capacity,
|
||||
offset, my->incr);
|
||||
pfl->u.r.field = pdst;
|
||||
}
|
||||
}
|
||||
dbScanUnlock(prec);
|
||||
dbChannelField(chan) = pfieldsave;
|
||||
}
|
||||
break;
|
||||
|
||||
/* Extract from buffer */
|
||||
case dbfl_type_ref:
|
||||
pdst = NULL;
|
||||
nSource = pfl->no_elements;
|
||||
nTarget = wrapArrayIndices(&start, my->incr, &end, nSource);
|
||||
pfl->no_elements = nTarget;
|
||||
if (nTarget) {
|
||||
/* Copy the data out */
|
||||
void *psrc = pfl->u.r.field;
|
||||
|
||||
pdst = freeListCalloc(my->arrayFreeList);
|
||||
if (!pdst) break;
|
||||
offset = start;
|
||||
dbExtractArrayFromBuf(psrc, pdst, pfl->field_size, pfl->field_type,
|
||||
nTarget, nSource, offset, my->incr);
|
||||
must_lock = !pfl->u.r.dtor;
|
||||
if (must_lock) {
|
||||
dbScanLock(dbChannelRecord(chan));
|
||||
dbChannelGetArrayInfo(chan, &pSource, &nSource, &offset);
|
||||
}
|
||||
if (pfl->u.r.dtor) pfl->u.r.dtor(pfl);
|
||||
if (nTarget) {
|
||||
nTarget = wrapArrayIndices(&start, my->incr, &end, nSource);
|
||||
if (nTarget > 0) {
|
||||
/* copy the data */
|
||||
pTarget = freeListCalloc(my->arrayFreeList);
|
||||
if (!pTarget) break;
|
||||
/* must do the wrap-around with the original no_elements */
|
||||
offset = (offset + start) % pfl->no_elements;
|
||||
dbExtractArray(pSource, pTarget, pfl->field_size,
|
||||
nTarget, pfl->no_elements, offset, my->incr);
|
||||
if (pfl->u.r.dtor) pfl->u.r.dtor(pfl);
|
||||
pfl->u.r.field = pTarget;
|
||||
pfl->u.r.dtor = freeArray;
|
||||
pfl->u.r.pvt = my->arrayFreeList;
|
||||
pfl->u.r.field = pdst;
|
||||
}
|
||||
/* adjust no_elements (even if zero elements remain) */
|
||||
pfl->no_elements = nTarget;
|
||||
if (must_lock)
|
||||
dbScanUnlock(dbChannelRecord(chan));
|
||||
break;
|
||||
}
|
||||
return pfl;
|
||||
|
||||
@@ -12,21 +12,44 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <chfPlugin.h>
|
||||
#include <dbLock.h>
|
||||
#include <db_field_log.h>
|
||||
#include <epicsExport.h>
|
||||
#include "chfPlugin.h"
|
||||
#include "db_field_log.h"
|
||||
#include "dbExtractArray.h"
|
||||
#include "dbLock.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
/*
|
||||
* The size of the data is different for each channel, and can even
|
||||
* change at runtime, so a freeList doesn't make much sense here.
|
||||
*/
|
||||
static void freeArray(db_field_log *pfl) {
|
||||
free(pfl->u.r.field);
|
||||
}
|
||||
|
||||
static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
|
||||
epicsTimeStamp now;
|
||||
epicsTimeGetCurrent(&now);
|
||||
|
||||
/* If string or array, must make a copy (to ensure coherence between time and data) */
|
||||
if (pfl->type == dbfl_type_rec) {
|
||||
dbScanLock(dbChannelRecord(chan));
|
||||
dbChannelMakeArrayCopy(pvt, pfl, chan);
|
||||
dbScanUnlock(dbChannelRecord(chan));
|
||||
/* If reference and not already copied,
|
||||
must make a copy (to ensure coherence between time and data) */
|
||||
if (pfl->type == dbfl_type_ref && !pfl->u.r.dtor) {
|
||||
void *pTarget = calloc(pfl->no_elements, pfl->field_size);
|
||||
void *pSource = pfl->u.r.field;
|
||||
if (pTarget) {
|
||||
long offset = 0;
|
||||
long nSource = pfl->no_elements;
|
||||
dbScanLock(dbChannelRecord(chan));
|
||||
dbChannelGetArrayInfo(chan, &pSource, &nSource, &offset);
|
||||
dbExtractArray(pSource, pTarget, pfl->field_size,
|
||||
nSource, pfl->no_elements, offset, 1);
|
||||
pfl->u.r.field = pTarget;
|
||||
pfl->u.r.dtor = freeArray;
|
||||
pfl->u.r.pvt = pvt;
|
||||
dbScanUnlock(dbChannelRecord(chan));
|
||||
}
|
||||
}
|
||||
|
||||
pfl->time = now;
|
||||
|
||||
@@ -12,6 +12,8 @@ SRC_DIRS += $(STDDIR)/softIoc
|
||||
PROD_IOC_DEFAULT = softIoc
|
||||
PROD_IOC_iOS = -nil-
|
||||
|
||||
PROD_LDFLAGS_vxWorks = --whole-archive
|
||||
|
||||
DBD += base.dbd
|
||||
DBD += asSub.dbd
|
||||
DBD += softIoc.dbd
|
||||
|
||||
@@ -184,8 +184,8 @@ dbTestHarness_SRCS_RTEMS += rtemsTestHarness.c
|
||||
|
||||
PROD_SRCS_RTEMS += rtemsTestData.c
|
||||
|
||||
PROD_vxWorks = dbTestHarness
|
||||
PROD_RTEMS = dbTestHarness
|
||||
TESTPROD_vxWorks = dbTestHarness
|
||||
TESTPROD_RTEMS = dbTestHarness
|
||||
|
||||
TESTSPEC_vxWorks = dbTestHarness.munch; epicsRunDbTests
|
||||
TESTSPEC_RTEMS = dbTestHarness.boot; epicsRunDbTests
|
||||
|
||||
@@ -131,7 +131,7 @@ static void check(short dbr_type) {
|
||||
memset(buf, 0, sizeof(buf)); \
|
||||
(void) dbPutField(&offaddr, DBR_LONG, &off, 1); \
|
||||
pfl = db_create_read_log(pch); \
|
||||
testOk(pfl && pfl->type == dbfl_type_rec, "Valid pfl, type = rec"); \
|
||||
testOk(pfl && pfl->type == dbfl_type_ref, "Valid pfl, type = ref"); \
|
||||
testOk(!dbChannelGetField(pch, DBR_LONG, buf, NULL, &req, pfl), "Got Field value"); \
|
||||
testOk(req == Size, "Got %ld elements (expected %d)", req, Size); \
|
||||
if (!testOk(!memcmp(buf, Expected, sizeof(Expected)), "Data correct")) \
|
||||
|
||||
@@ -73,8 +73,8 @@ filterTestHarness_SRCS_RTEMS += rtemsTestHarness.c
|
||||
|
||||
PROD_SRCS_RTEMS += rtemsTestData.c
|
||||
|
||||
PROD_vxWorks = filterTestHarness
|
||||
PROD_RTEMS = filterTestHarness
|
||||
TESTPROD_vxWorks = filterTestHarness
|
||||
TESTPROD_RTEMS = filterTestHarness
|
||||
|
||||
TESTSPEC_vxWorks = filterTestHarness.munch; epicsRunFilterTests
|
||||
TESTSPEC_RTEMS = filterTestHarness.boot; epicsRunFilterTests
|
||||
|
||||
@@ -73,9 +73,9 @@ static int fl_equals_array(short type, const db_field_log *pfl1, void *p2) {
|
||||
}
|
||||
break;
|
||||
case DBR_STRING:
|
||||
if (strtol(&((const char*)pfl1->u.r.field)[i*MAX_STRING_SIZE], NULL, 0) != ((epicsInt32*)p2)[i]) {
|
||||
if (strtol(&((const char*)pfl1->u.r.field)[i*pfl1->field_size], NULL, 0) != ((epicsInt32*)p2)[i]) {
|
||||
testDiag("at index=%d: field log has '%s', should be '%d'",
|
||||
i, &((const char*)pfl1->u.r.field)[i*MAX_STRING_SIZE], ((epicsInt32*)p2)[i]);
|
||||
i, &((const char*)pfl1->u.r.field)[i*pfl1->field_size], ((epicsInt32*)p2)[i]);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
@@ -120,7 +120,7 @@ static void testHead (const char *title, const char *typ = "") {
|
||||
off = Offset; \
|
||||
(void) dbPutField(&offaddr, DBR_LONG, &off, 1); \
|
||||
pfl = db_create_read_log(pch); \
|
||||
testOk(pfl->type == dbfl_type_rec, "original field log has type rec"); \
|
||||
testOk(pfl->type == dbfl_type_ref, "original field log has type ref"); \
|
||||
pfl2 = dbChannelRunPostChain(pch, pfl); \
|
||||
testOk(pfl2 == pfl, "call does not drop or replace field_log"); \
|
||||
testOk(pfl->type == dbfl_type_ref, "filtered field log has type ref"); \
|
||||
|
||||
@@ -130,7 +130,7 @@ MAIN(dbndTest)
|
||||
dbEventCtx evtctx;
|
||||
int logsFree, logsFinal;
|
||||
|
||||
testPlan(77);
|
||||
testPlan(72);
|
||||
|
||||
testdbPrepare();
|
||||
|
||||
@@ -171,12 +171,9 @@ MAIN(dbndTest)
|
||||
"dbnd has one filter with argument in pre chain");
|
||||
testOk((ellCount(&pch->post_chain) == 0), "dbnd has no filter in post chain");
|
||||
|
||||
/* Field logs of type ref and rec: pass any update */
|
||||
|
||||
testHead("Field logs of type ref and rec");
|
||||
fl1.type = dbfl_type_rec;
|
||||
mustPassTwice(pch, &fl1, "abs field_log=rec", 0., 0);
|
||||
/* Field logs of type ref: pass any update */
|
||||
|
||||
testHead("Field logs of type ref");
|
||||
fl1.type = dbfl_type_ref;
|
||||
mustPassTwice(pch, &fl1, "abs field_log=ref", 0., 0);
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ testHarness_SRCS += epicsRunLinkTests.c
|
||||
linkTestHarness_SRCS += $(testHarness_SRCS)
|
||||
linkTestHarness_SRCS_RTEMS += rtemsTestHarness.c
|
||||
|
||||
PROD_SRCS_RTEMS += rtemsTestData.c
|
||||
|
||||
PROD_vxWorks = linkTestHarness
|
||||
PROD_RTEMS = linkTestHarness
|
||||
|
||||
@@ -54,9 +56,16 @@ TESTSPEC_vxWorks = linkTestHarness.munch; epicsRunLinkTests
|
||||
TESTSPEC_RTEMS = linkTestHarness.boot; epicsRunLinkTests
|
||||
|
||||
TESTSCRIPTS_HOST += $(TESTS:%=%.t)
|
||||
ifneq ($(filter $(T_A),$(CROSS_COMPILER_RUNTEST_ARCHS)),)
|
||||
TESTPROD = $(TESTPROD_HOST)
|
||||
TESTSCRIPTS_RTEMS += $(TESTS:%=%.t)
|
||||
endif
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
ioRecord$(DEP): $(COMMON_DIR)/ioRecord.h
|
||||
lnkStateTest$(DEP): $(COMMON_DIR)/ioRecord.h
|
||||
lnkCalcTest$(DEP): $(COMMON_DIR)/ioRecord.h
|
||||
|
||||
rtemsTestData.c : $(TESTFILES) $(TOOLS)/epicsMakeMemFs.pl
|
||||
$(PERL) $(TOOLS)/epicsMakeMemFs.pl $@ epicsRtemsFSImage $(TESTFILES)
|
||||
|
||||
@@ -157,7 +157,7 @@ static void testCalc()
|
||||
|
||||
MAIN(lnkCalcTest)
|
||||
{
|
||||
testPlan(0);
|
||||
testPlan(30);
|
||||
|
||||
testCalc();
|
||||
|
||||
|
||||
@@ -185,8 +185,8 @@ recordTestHarness_SRCS_RTEMS += rtemsTestHarness.c
|
||||
|
||||
PROD_SRCS_RTEMS += rtemsTestData.c
|
||||
|
||||
PROD_vxWorks = recordTestHarness
|
||||
PROD_RTEMS = recordTestHarness
|
||||
TESTPROD_vxWorks = recordTestHarness
|
||||
TESTPROD_RTEMS = recordTestHarness
|
||||
|
||||
TESTSPEC_vxWorks = recordTestHarness.munch; epicsRunRecordTests
|
||||
TESTSPEC_RTEMS = recordTestHarness.boot; epicsRunRecordTests
|
||||
|
||||
@@ -217,6 +217,7 @@ LIBCOM_API long
|
||||
int cond_count = 0;
|
||||
char * const pdest = pout;
|
||||
char *pnext;
|
||||
const char* psrc_orig = psrc;
|
||||
|
||||
if (psrc == NULL || *psrc == '\0' ||
|
||||
pout == NULL || perror == NULL) {
|
||||
@@ -471,8 +472,12 @@ LIBCOM_API long
|
||||
*pout = END_EXPRESSION;
|
||||
|
||||
if (cond_count != 0) {
|
||||
fprintf(stderr, "Deprecated CALC \"%s\": %s\n",
|
||||
psrc_orig, calcErrorStr(CALC_ERR_CONDITIONAL));
|
||||
/*
|
||||
*perror = CALC_ERR_CONDITIONAL;
|
||||
goto bad;
|
||||
*/
|
||||
}
|
||||
if (operand_needed || runtime_depth != 1) {
|
||||
*perror = CALC_ERR_INCOMPLETE;
|
||||
|
||||
@@ -568,6 +568,186 @@ static MAC_ENTRY *create( MAC_HANDLE *handle, const char *name, int special )
|
||||
return entry;
|
||||
}
|
||||
|
||||
#define SUCCESS 0
|
||||
#define NOVALUE 1
|
||||
#define UNTERMINATED 2
|
||||
#define DIVZERO 3
|
||||
|
||||
static int parseExpr( const char** pp, int* v, int level );
|
||||
|
||||
/* Value is a number or an expression in () */
|
||||
static int parseValue( const char** pp, int* v )
|
||||
{
|
||||
int status;
|
||||
int val;
|
||||
const char *p = *pp;
|
||||
int neg = 0;
|
||||
|
||||
while (isspace((unsigned char)*p)) p++;
|
||||
if (*p == '+' || *p == '-') neg = *p++ == '-';
|
||||
while (isspace((unsigned char)*p)) p++;
|
||||
if (*p == '(')
|
||||
{
|
||||
p++;
|
||||
if ((status = parseExpr(&p, &val, 0)) != SUCCESS) return status;
|
||||
if (*p++ != ')')
|
||||
{
|
||||
printf("macLib: missing ) after '%s'\n", *pp);
|
||||
return UNTERMINATED;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
char* e;
|
||||
val = strtol(p, &e, 0);
|
||||
if (e == p) return NOVALUE;
|
||||
p = e;
|
||||
}
|
||||
if (neg) val = -val;
|
||||
*pp = p;
|
||||
*v = val;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* Expr is a sum or product of Values or a conditional */
|
||||
static int parseExpr( const char** pp, int* v, int level )
|
||||
{
|
||||
const char *p = *pp;
|
||||
int o = 0;
|
||||
int val0, val1, val2;
|
||||
int status = SUCCESS;
|
||||
int stat1, stat2;
|
||||
|
||||
val0 = 0;
|
||||
/* handle sums and differences */
|
||||
do {
|
||||
if ((stat1 = parseValue(&p, &val1)) != SUCCESS)
|
||||
{
|
||||
if (o && stat1 == NOVALUE)
|
||||
printf ("macLib: missing operand after '%c'\n", o);
|
||||
return stat1;
|
||||
}
|
||||
while (isspace((unsigned char)*p)) p++;
|
||||
o = *p;
|
||||
/* handle products and quotients */
|
||||
while (o == '*' || o == '/' || o == '%')
|
||||
{
|
||||
p++;
|
||||
if ((stat2 = parseValue(&p, &val2)) != SUCCESS)
|
||||
{
|
||||
if (stat2 == NOVALUE)
|
||||
printf ("macLib: missing operand after '%c'\n", o);
|
||||
return stat2;
|
||||
}
|
||||
if (o == '*') val1 *= val2;
|
||||
else if (val2 == 0)
|
||||
{
|
||||
status = DIVZERO;
|
||||
val1 = 1;
|
||||
}
|
||||
else if (o == '/') val1 /= val2;
|
||||
else val1 %= val2;
|
||||
while (isspace((unsigned char)*p)) p++;
|
||||
o = *p;
|
||||
}
|
||||
val0 += val1;
|
||||
} while (o == '+' || o == '-');
|
||||
|
||||
/* handle comparisons */
|
||||
o = *p;
|
||||
if (o == '<' || o == '>')
|
||||
{
|
||||
p++;
|
||||
if ((stat1 = parseExpr(&p, &val1, 1)) != SUCCESS)
|
||||
{
|
||||
if (stat1 == NOVALUE)
|
||||
printf ("macLib: missing expression after '%c'\n", o);
|
||||
return stat1;
|
||||
}
|
||||
if (o == '<')
|
||||
val0 = (val0 < val1);
|
||||
else
|
||||
val0 = (val0 > val1);
|
||||
}
|
||||
|
||||
/* handle conditionals */
|
||||
if (*p == '?' && level == 0)
|
||||
{
|
||||
p++;
|
||||
while (isspace((unsigned char)*p)) p++;
|
||||
if (*p != ':')
|
||||
{
|
||||
stat1 = parseExpr(&p, &val1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
val1 = val0;
|
||||
stat1 = status;
|
||||
}
|
||||
if (*p != ':')
|
||||
{
|
||||
printf("macLib: missing : after '%s'\n", *pp);
|
||||
return UNTERMINATED;
|
||||
}
|
||||
p++;
|
||||
stat2 = parseExpr(&p, &val2, 0);
|
||||
status = val0 ? stat1 : stat2;
|
||||
val0 = val0 ? val1 : val2;
|
||||
}
|
||||
|
||||
*v = val0;
|
||||
*pp = p;
|
||||
return status;
|
||||
}
|
||||
|
||||
static MAC_ENTRY *evalExpr( MAC_HANDLE *handle, const char *expr )
|
||||
{
|
||||
MAC_ENTRY *entry = NULL;
|
||||
int status;
|
||||
const char* p = expr;
|
||||
int value;
|
||||
char valuestr[40];
|
||||
char format[20] = "%d";
|
||||
|
||||
while (isspace((unsigned char)*p)) p++;
|
||||
if (*p == '%')
|
||||
{
|
||||
int i = 1;
|
||||
p++;
|
||||
while (i < sizeof(format) && strchr(" #-+0", *p))
|
||||
format[i++] = *p++;
|
||||
while (i < sizeof(format) && strchr("0123456789", *p))
|
||||
format[i++] = *p++;
|
||||
if (i < sizeof(format) && strchr("diouxXc", *p))
|
||||
{
|
||||
format[i++] = *p++;
|
||||
format[i] = 0;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
status = parseExpr(&p, &value, 0);
|
||||
if (status == DIVZERO)
|
||||
printf ("macLib: division by zero\n");
|
||||
if (status != SUCCESS)
|
||||
return NULL;
|
||||
while (isspace((unsigned char)*p)) p++;
|
||||
if (*p)
|
||||
{
|
||||
printf("macLib: rubbish at end of expression: %s\n", p);
|
||||
return NULL;
|
||||
}
|
||||
sprintf(valuestr, format, value);
|
||||
entry = create( handle, expr, TRUE );
|
||||
if ( entry )
|
||||
{
|
||||
entry->type = "calculation";
|
||||
if ( rawval( handle, entry, valuestr ) == NULL )
|
||||
return NULL;
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
||||
/*
|
||||
* Look up macro entry with matching "special" attribute by name
|
||||
*/
|
||||
@@ -579,6 +759,10 @@ static MAC_ENTRY *lookup( MAC_HANDLE *handle, const char *name, int special )
|
||||
printf( "lookup-> level = %d, name = %s, special = %d\n",
|
||||
handle->level, name, special );
|
||||
|
||||
if ( (special == FALSE) ) {
|
||||
entry = evalExpr( handle, name );
|
||||
if (entry) return entry;
|
||||
}
|
||||
/* search backwards so scoping works */
|
||||
for ( entry = last( handle ); entry != NULL; entry = previous( entry ) ) {
|
||||
if ( entry->special != special )
|
||||
@@ -698,6 +882,7 @@ static void trans( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
|
||||
/* return immediately if raw value is NULL */
|
||||
if ( *rawval == NULL ) return;
|
||||
|
||||
|
||||
/* discard quotes and escapes if level is > 0 (i.e. if these aren't
|
||||
the user's quotes and escapes) */
|
||||
discard = ( level > 0 );
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
# error compiler/gcc/compilerSpecific.h is not for use with the clang compiler
|
||||
#endif
|
||||
|
||||
#define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
|
||||
#if __GNUC__ > 2
|
||||
# define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
|
||||
#else
|
||||
# define EPICS_ALWAYS_INLINE __inline__
|
||||
#endif
|
||||
|
||||
/* Expands to a 'const char*' which describes the name of the current function scope */
|
||||
#define EPICS_FUNCTION __PRETTY_FUNCTION__
|
||||
@@ -42,7 +46,9 @@
|
||||
/*
|
||||
* CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
|
||||
*/
|
||||
#define CXX_PLACEMENT_DELETE
|
||||
#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 96 )
|
||||
# define CXX_PLACEMENT_DELETE
|
||||
#endif
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -54,7 +60,9 @@
|
||||
/*
|
||||
* Deprecation marker
|
||||
*/
|
||||
#define EPICS_DEPRECATED __attribute__((deprecated))
|
||||
#if (__GNUC__ > 2)
|
||||
# define EPICS_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unused marker
|
||||
|
||||
@@ -639,7 +639,7 @@ epicsFindAddr(void *addr, epicsSymbol *sym_p)
|
||||
|
||||
if ( nearest.raw && ( (idx = ARR(c,nearest,0,st_name)) < es->strMap->max ) ) {
|
||||
sym_p->s_nam = strtab + idx;
|
||||
sym_p->s_val = (char*) ARR(c, nearest, 0, st_value) + es->addr;
|
||||
sym_p->s_val = (char*)(size_t) ARR(c, nearest, 0, st_value) + es->addr;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -51,7 +51,7 @@ LIBCOM_API epicsEventId epicsEventCreate(epicsEventInitialState init)
|
||||
epicsEventId pevent = malloc(sizeof(*pevent));
|
||||
|
||||
if (pevent) {
|
||||
int status = osdPosixMutexInit(&pevent->mutex, 0);
|
||||
int status = osdPosixMutexInit(&pevent->mutex, PTHREAD_MUTEX_DEFAULT);
|
||||
|
||||
pevent->isFull = (init == epicsEventFull);
|
||||
if (status) {
|
||||
|
||||
@@ -194,6 +194,7 @@ void epicsMutexOsdShow(struct epicsMutexOSD * pmutex, unsigned int level)
|
||||
|
||||
void epicsMutexOsdShowAll(void)
|
||||
{
|
||||
#if defined _POSIX_THREAD_PRIO_INHERIT
|
||||
int proto = -1;
|
||||
int ret = pthread_mutexattr_getprotocol(&globalAttrRecursive, &proto);
|
||||
if(ret) {
|
||||
@@ -201,4 +202,7 @@ void epicsMutexOsdShowAll(void)
|
||||
} else {
|
||||
printf("PI is%s enabled\n", proto==PTHREAD_PRIO_INHERIT ? "" : " not");
|
||||
}
|
||||
#else
|
||||
printf("PI not supported\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* Returns ENOTSUP if requested mutextype is not supported */
|
||||
/* At the moment, only 0 (default non recursive mutex) and PTHREAD_MUTEX_RECURSIVE are supported */
|
||||
/* At the moment, only PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_RECURSIVE are supported */
|
||||
int osdPosixMutexInit(pthread_mutex_t *,int mutextype);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user