Compare commits
145 Commits
7.0
...
PSI-7.0.5.
| Author | SHA1 | Date | |
|---|---|---|---|
| bb89d5d24e | |||
| ad7a2ddf65 | |||
| 19031a7d11 | |||
| 1c9887bd45 | |||
| 209b979e56 | |||
| 34ce5c1d21 | |||
| 605aff2461 | |||
| ba1c40df7c | |||
| e25dafa9ca | |||
| ce78836328 | |||
| 8225c313b9 | |||
| be78b33570 | |||
| 9926fe3036 | |||
|
|
718390cfba | ||
|
|
6f864fc10e | ||
|
|
4b6cb2bcdd | ||
|
|
c866609f24 | ||
|
|
ee193edd42 | ||
|
|
40c55d65b3 | ||
|
|
a83b3a5331 | ||
|
|
65098a4120 | ||
|
|
0650fba936 | ||
|
|
16244acd3c | ||
|
|
fe52b0aa1a | ||
|
|
2af0fe894e | ||
|
|
387481799b | ||
|
|
d606155f17 | ||
|
|
c4d639e72a | ||
|
|
19d10b3161 | ||
|
|
220e2f9b12 | ||
|
|
3661874c92 | ||
|
|
a9a3ce535c | ||
|
|
6a81b2c6a0 | ||
|
|
139fac2928 | ||
| dcc6a36bf7 | |||
| 3b7fd004b8 | |||
| 2796764905 | |||
| 4c27619ee9 | |||
| a40737c06b | |||
| 34aebf7eea | |||
| da350d0d54 | |||
| 243807cbe5 | |||
| b3c18ebc4e | |||
| f25f067e9c | |||
| 74d269304c | |||
| c949cb5c8c | |||
| 2495919611 | |||
| 7ed4f6c704 | |||
| eb828f3807 | |||
| a98708302b | |||
| 0dae3e206f | |||
| 505e6f45c1 | |||
| 424de7d9c4 | |||
| 1a0de528e1 | |||
| 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 |
@@ -111,7 +111,7 @@ test_script:
|
||||
|
||||
on_finish:
|
||||
- ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||
- cmd: python .ci/cue.py build test-results -s
|
||||
- cmd: python .ci/cue.py -T 5M test-results
|
||||
|
||||
on_failure:
|
||||
- cmd: python -m ci_core_dumper report
|
||||
|
||||
@@ -113,11 +113,11 @@ build_script:
|
||||
|
||||
test_script:
|
||||
- cmd: python -m ci_core_dumper install
|
||||
- cmd: python .ci/cue.py test
|
||||
- cmd: python .ci/cue.py -T 20M test
|
||||
|
||||
on_finish:
|
||||
- ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||
- cmd: python .ci/cue.py build test-results -s
|
||||
- cmd: python .ci/cue.py -T 5M test-results
|
||||
|
||||
on_failure:
|
||||
- cmd: python -m ci_core_dumper report
|
||||
|
||||
2
.ci
2
.ci
Submodule .ci updated: 2464284271...7d9d426629
8
.github/workflows/ci-scripts-build.yml
vendored
8
.github/workflows/ci-scripts-build.yml
vendored
@@ -134,6 +134,11 @@ jobs:
|
||||
configuration: static
|
||||
name: "Win2019 MSC-19, static"
|
||||
|
||||
- os: windows-2019
|
||||
cmp: vs2019
|
||||
configuration: debug
|
||||
name: "Win2019 MSC-19, debug"
|
||||
|
||||
- os: windows-2019
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
@@ -171,4 +176,5 @@ jobs:
|
||||
name: tapfiles ${{ matrix.name }}
|
||||
path: '**/O.*/*.tap'
|
||||
- name: Collect and show test results
|
||||
run: python .ci/cue.py test-results
|
||||
if: ${{ always() }}
|
||||
run: python .ci/cue.py -T 5M test-results
|
||||
|
||||
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))
|
||||
|
||||
@@ -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_BUILDS
|
||||
|
||||
ifneq (,$(strip $(SKIP_BUILDS)))
|
||||
CURRENT_MODULE=$(subst modules/,,$(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
|
||||
|
||||
@@ -226,7 +243,7 @@ $(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)
|
||||
$(MT_EXE_COMMAND)
|
||||
@@ -329,10 +346,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
|
||||
|
||||
|
||||
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
|
||||
2
configure/os/CONFIG.Common.RHEL8-x86_64
Normal file
2
configure/os/CONFIG.Common.RHEL8-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.RHEL8-x86_64-clang
Normal file
1
configure/os/CONFIG.Common.RHEL8-x86_64-clang
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
7
configure/os/CONFIG.Common.SL6-x86
Normal file
7
configure/os/CONFIG.Common.SL6-x86
Normal file
@@ -0,0 +1,7 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86
|
||||
|
||||
ARCH_DEP_CFLAGS += -march=i686
|
||||
|
||||
# have no full C++11
|
||||
STD_CXXFLAGS = -std=c++0x
|
||||
5
configure/os/CONFIG.Common.SL6-x86_64
Normal file
5
configure/os/CONFIG.Common.SL6-x86_64
Normal file
@@ -0,0 +1,5 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
# have no full C++11
|
||||
STD_CXXFLAGS = -std=c++0x
|
||||
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
|
||||
8
configure/os/CONFIG.Common.V67-ppc604
Normal file
8
configure/os/CONFIG.Common.V67-ppc604
Normal file
@@ -0,0 +1,8 @@
|
||||
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>'
|
||||
|
||||
# compiler tries to access license server (even though no license isneeded)
|
||||
export LM_LICENSE_FILE=37000@lic-windriver.psi.ch
|
||||
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
|
||||
25
configure/os/CONFIG.Common.eldk42-ppc4xxFP
Normal file
25
configure/os/CONFIG.Common.eldk42-ppc4xxFP
Normal file
@@ -0,0 +1,25 @@
|
||||
# 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
|
||||
|
||||
# have no C++11
|
||||
STD_CXXFLAGS =
|
||||
17
configure/os/CONFIG.Common.eldk51-ppc4xxSF
Normal file
17
configure/os/CONFIG.Common.eldk51-ppc4xxSF
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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)
|
||||
|
||||
# have no full C++11
|
||||
STD_CXXFLAGS = -std=c++0x
|
||||
18
configure/os/CONFIG.Common.eldk52-e500v2
Normal file
18
configure/os/CONFIG.Common.eldk52-e500v2
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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 =
|
||||
|
||||
# have no full C++11
|
||||
STD_CXXFLAGS = -std=c++0x
|
||||
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++
|
||||
19
configure/os/CONFIG.Common.moxa42-armv6l
Normal file
19
configure/os/CONFIG.Common.moxa42-armv6l
Normal file
@@ -0,0 +1,19 @@
|
||||
# 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
|
||||
|
||||
# have no full C++11
|
||||
STD_CXXFLAGS = -std=c++0x
|
||||
18
configure/os/CONFIG.Common.mvl40-xscale_be
Normal file
18
configure/os/CONFIG.Common.mvl40-xscale_be
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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
|
||||
|
||||
# have no C++11
|
||||
STD_CXXFLAGS =
|
||||
|
||||
# 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
|
||||
|
||||
@@ -132,13 +132,6 @@ OPT_CXXFLAGS_YES = -O2
|
||||
#--------------------------------------------------
|
||||
# code flags
|
||||
CODE_CFLAGS =
|
||||
#
|
||||
# For vxWorks versions before 6.3 we need this g++ compiler flag
|
||||
CODE_CXXFLAGS_6.0 = -fno-implicit-templates
|
||||
CODE_CXXFLAGS_6.1 = -fno-implicit-templates
|
||||
CODE_CXXFLAGS_6.2 = -fno-implicit-templates
|
||||
CODE_CXXFLAGS_6 = $(CODE_CXXFLAGS_$(VXWORKS_VERSION))
|
||||
CODE_CXXFLAGS = $(CODE_CXXFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
#--------------------------------------------------
|
||||
# no shared libs for 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
|
||||
6
configure/os/CONFIG.RHEL7-x86_64.SL6-x86
Normal file
6
configure/os/CONFIG.RHEL7-x86_64.SL6-x86
Normal file
@@ -0,0 +1,6 @@
|
||||
# "cross compile" for older Linux version (32 bit)
|
||||
# It was neccessary to install 32 bit compatibility libraries manually
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/CONFIG.RHEL7-x86_64.SL6-x86_64
|
||||
TARGET_LDFLAGS = -B /usr/lib/x86_64-redhat-linux6E/lib
|
||||
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.RHEL8-x86_64.Common
Normal file
3
configure/os/CONFIG.RHEL8-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.RHEL8-x86_64.RHEL8-x86_64
Normal file
2
configure/os/CONFIG.RHEL8-x86_64.RHEL8-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
8
configure/os/CONFIG.RHEL8-x86_64.win32-x86
Normal file
8
configure/os/CONFIG.RHEL8-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.RHEL8-x86_64.windows-x64
Normal file
8
configure/os/CONFIG.RHEL8-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/
|
||||
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,7 @@
|
||||
# They must be set in the host+target specific file instead:
|
||||
# CONFIG_SITE.<linux-arch>.<linux-arch>
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
CODE_CPPFLAGS += -fno-strict-aliasing
|
||||
USR_CXXFLAGS += $(STD_CXXFLAGS)
|
||||
STD_CXXFLAGS = -std=c++11
|
||||
|
||||
@@ -2,24 +2,75 @@
|
||||
#
|
||||
# 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))
|
||||
|
||||
OP_SYS_LDFLAGS += $(OP_SYS_LDFLAGS_$@)
|
||||
OP_SYS_LDFLAGS_softIoc = -whole-archive
|
||||
OP_SYS_LDFLAGS_softIocPVA = -whole-archive
|
||||
|
||||
# WIND_BASE is where you installed the Wind River software.
|
||||
WIND_BASE = /afs/psi.ch/project/vxworks/VxWorks$(VXWORKS_VERSION)
|
||||
|
||||
#WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
|
||||
WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
|
||||
#WIND_BASE = /ade/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))
|
||||
|
||||
20
configure/os/CONFIG_SITE.RHEL7-x86_64.Common
Normal file
20
configure/os/CONFIG_SITE.RHEL7-x86_64.Common
Normal file
@@ -0,0 +1,20 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
|
||||
|
||||
# Improved error checking with clang
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86_64-clang
|
||||
CROSS_COMPILER_RUNTEST_ARCHS += RHEL7-x86_64-clang
|
||||
|
||||
# Build for old SL6 64 bit
|
||||
CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64
|
||||
CROSS_COMPILER_RUNTEST_ARCHS += SL6-x86_64
|
||||
|
||||
# Build for old SL6 32 bit
|
||||
CROSS_COMPILER_TARGET_ARCHS += SL6-x86
|
||||
CROSS_COMPILER_RUNTEST_ARCHS += SL6-x86
|
||||
|
||||
# NI Linux Real-Time 7.x
|
||||
# requires RPM gcc-c++-arm-linux-gnu
|
||||
CROSS_COMPILER_TARGET_ARCHS += nilrt7-armv7a
|
||||
|
||||
# Windows cross builds using Wine
|
||||
CROSS_COMPILER_TARGET_ARCHS += win32-x86 windows-x64
|
||||
21
configure/os/CONFIG_SITE.RHEL8-x86_64.Common
Normal file
21
configure/os/CONFIG_SITE.RHEL8-x86_64.Common
Normal file
@@ -0,0 +1,21 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
|
||||
|
||||
# Improved error checking with clang
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL8-x86_64-clang
|
||||
|
||||
# Build for old RHEL7 64 bit
|
||||
#CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86_64
|
||||
|
||||
# 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
|
||||
|
||||
# NI Linux Real-Time 7.x
|
||||
# requires RPM gcc-c++-arm-linux-gnu
|
||||
# not available yet for RHEL8
|
||||
#CROSS_COMPILER_TARGET_ARCHS += nilrt7-armv7a
|
||||
|
||||
# Windows cross builds using Wine
|
||||
CROSS_COMPILER_TARGET_ARCHS += win32-x86 windows-x64
|
||||
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
|
||||
|
||||
@@ -17,12 +17,66 @@ should also be read to understand what has changed since earlier releases.
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
### epicsEnvShow accepts glob pattern
|
||||
|
||||
The optional argument to epicsEnvShow can now be a glob pattern.
|
||||
|
||||
### New function `epicsStrnGlobMatch()`
|
||||
|
||||
The function `epicsStrnGlobMatch(char* str, size_t len, char* pattern)`
|
||||
works exactly the same as `epicsStrGlobMatch()` but takes an additional
|
||||
length arguments which limits the number of characters of `str` to match.
|
||||
|
||||
### Glob pattern allowed in `var` command
|
||||
|
||||
When used with one argument, the `var` command can be used with a glob pattern
|
||||
for printing matching variables.
|
||||
|
||||
### Fix for input links marked "special"
|
||||
|
||||
The calcout record (and a number of synApps record types) marks its input
|
||||
link fields with the attribute `special(SPC_MOD)` and provides code in
|
||||
the record's `special()` routine to reinitialize the related value field
|
||||
whenever the input link field is set to a numeric constant. Unfortunately the
|
||||
changes to the link handling code broke this behaviour (reported as Launchpad
|
||||
[bug #1824277](https://bugs.launchpad.net/epics-base/+bug/1824277))
|
||||
back in the Base 3.16.1 release. This issue has been fixed in Base, although
|
||||
external record types may require some fixing to ensure they are correctly
|
||||
checking for and initializing the link in their `special()` routine.
|
||||
|
||||
### IOCsh sets `${PWD}`
|
||||
|
||||
IOC shell will now ensure `${PWD}` is set on startup,
|
||||
and updated by the `cd` iocsh function.
|
||||
|
||||
|
||||
### Timeouts for Unit Test Programs
|
||||
|
||||
The unit test programs that are run by the `make runtests` or `make tapfiles`
|
||||
commands get executed by a `.t` wrapper script which is normally generated by
|
||||
the EPICS `makeTestfile.pl` program. Those generated wrapper scripts now
|
||||
impose a time-limit on the test program they execute, and will kill it if it
|
||||
runs for longer than 500 seconds (8 minutes 20) without exiting. That
|
||||
time-limit can be changed for any such test by modifying the Makefile which
|
||||
creates and runs the `.t` wrapper script.
|
||||
|
||||
Setting the environment variable `EPICS_UNITTEST_TIMEOUT` to the desired
|
||||
number of seconds while the Makefile is generating the test script changes the
|
||||
timeout in that script. For example:
|
||||
|
||||
```
|
||||
TESTSCRIPTS_HOST += hourLongTest.t
|
||||
hourLongTest.t: export EPICS_UNITTEST_TIMEOUT=3600
|
||||
```
|
||||
|
||||
When selecting such a timeout remember that different Continuous Integration
|
||||
systems such as GitHub Actions and Appveyor run on processors with different
|
||||
speeds, so allow enough head-room for slower systems to complete the test.
|
||||
|
||||
Test programs written directly in Perl as a `.plt` script should implement a
|
||||
similar timeout for themselves. The "netget" test in Base does this in a way
|
||||
that works on Windows as well as Unix-like hosts.
|
||||
|
||||
-----
|
||||
|
||||
## EPICS Release 7.0.5
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -263,7 +263,9 @@ void callbackCleanup(void)
|
||||
|
||||
assert(epicsAtomicGetIntT(&mySet->threadsRunning)==0);
|
||||
epicsEventDestroy(mySet->semWakeUp);
|
||||
mySet->semWakeUp = NULL;
|
||||
epicsRingPointerDelete(mySet->queue);
|
||||
mySet->queue = NULL;
|
||||
}
|
||||
|
||||
epicsTimerQueueRelease(timerQueue);
|
||||
@@ -333,6 +335,10 @@ int callbackRequest(epicsCallback *pcallback)
|
||||
return S_db_badChoice;
|
||||
}
|
||||
mySet = &callbackQueue[priority];
|
||||
if (!mySet->queue) {
|
||||
epicsInterruptContextMessage("callbackRequest: Callbacks not initialized\n");
|
||||
return S_db_notInit;
|
||||
}
|
||||
if (mySet->queueOverflow) return S_db_bufFull;
|
||||
|
||||
pushOK = epicsRingPointerPush(mySet->queue, pcallback);
|
||||
|
||||
@@ -1158,7 +1158,44 @@ static long dbPutFieldLink(DBADDR *paddr,
|
||||
|
||||
if (!status) status = dbSetLink(plink, &link_info, new_devsup);
|
||||
|
||||
if (!status && special) status = dbPutSpecial(paddr, 1);
|
||||
if (status) {
|
||||
if (isDevLink) {
|
||||
precord->dset = NULL;
|
||||
precord->pact = TRUE;
|
||||
}
|
||||
goto postScanEvent;
|
||||
}
|
||||
|
||||
/* We need to initialize any links with a link support layer, i.e.
|
||||
* any CONSTANT, JSON_LINK, or PV_LINK types. However for a PV_LINK
|
||||
* when isDevLink is set (i.e. this is the record's INP or OUT link)
|
||||
* we must wait until after calling dsxt->add_record(). This allows
|
||||
* the Async Soft Channel input supports to change it to a PN_LINK.
|
||||
* For other cases we initialize the link before the second call to
|
||||
* dbPutSpecial() because some record types such as calcout need to
|
||||
* be able to call link support methods from prset->special().
|
||||
*/
|
||||
|
||||
switch (plink->type) { /* New type */
|
||||
case PV_LINK:
|
||||
if (isDevLink)
|
||||
break;
|
||||
/* else fall through */
|
||||
case CONSTANT:
|
||||
case JSON_LINK:
|
||||
dbAddLink(&locker, plink, pfldDes->field_type, chan);
|
||||
chan = NULL; /* we used it, don't clean it up */
|
||||
}
|
||||
|
||||
if (special) status = dbPutSpecial(paddr, 1);
|
||||
|
||||
if (!status && isDevLink) {
|
||||
precord->dpvt = NULL;
|
||||
precord->dset = new_dset;
|
||||
precord->pact = FALSE;
|
||||
|
||||
status = new_dsxt->add_record(precord);
|
||||
}
|
||||
|
||||
if (status) {
|
||||
if (isDevLink) {
|
||||
@@ -1168,29 +1205,21 @@ static long dbPutFieldLink(DBADDR *paddr,
|
||||
goto postScanEvent;
|
||||
}
|
||||
|
||||
if (isDevLink) {
|
||||
precord->dpvt = NULL;
|
||||
precord->dset = new_dset;
|
||||
precord->pact = FALSE;
|
||||
|
||||
status = new_dsxt->add_record(precord);
|
||||
if (status) {
|
||||
precord->dset = NULL;
|
||||
precord->pact = TRUE;
|
||||
goto postScanEvent;
|
||||
}
|
||||
}
|
||||
|
||||
switch (plink->type) { /* New link type */
|
||||
case PV_LINK:
|
||||
case CONSTANT:
|
||||
case CA_LINK:
|
||||
case DB_LINK:
|
||||
case PN_LINK:
|
||||
case JSON_LINK:
|
||||
dbAddLink(&locker, plink, pfldDes->field_type, chan);
|
||||
chan = NULL; /* don't clean it up */
|
||||
break;
|
||||
|
||||
case DB_LINK:
|
||||
case CA_LINK:
|
||||
case PV_LINK:
|
||||
if (isDevLink) {
|
||||
dbAddLink(&locker, plink, pfldDes->field_type, chan);
|
||||
chan = NULL; /* we used it, don't clean it up */
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_LINK:
|
||||
break; /* should never get here */
|
||||
|
||||
@@ -1199,7 +1228,6 @@ static long dbPutFieldLink(DBADDR *paddr,
|
||||
status = S_db_badHWaddr;
|
||||
goto postScanEvent;
|
||||
}
|
||||
break;
|
||||
}
|
||||
db_post_events(precord, plink, DBE_VALUE | DBE_LOG);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ static long add_record(dbCommon *pcommon)
|
||||
devPvt *pdevPvt;
|
||||
processNotify *ppn;
|
||||
|
||||
if (dbLinkIsDefined(plink) && dbLinkIsConstant(plink))
|
||||
if (plink->type == CONSTANT)
|
||||
return 0;
|
||||
|
||||
if (plink->type != PV_LINK) {
|
||||
|
||||
@@ -79,7 +79,7 @@ static long add_record(dbCommon *pcommon)
|
||||
devPvt *pdevPvt;
|
||||
processNotify *ppn;
|
||||
|
||||
if (dbLinkIsDefined(plink) && dbLinkIsConstant(plink))
|
||||
if (plink->type == CONSTANT)
|
||||
return 0;
|
||||
|
||||
if (plink->type != PV_LINK) {
|
||||
|
||||
@@ -79,7 +79,7 @@ static long add_record(dbCommon *pcommon)
|
||||
devPvt *pdevPvt;
|
||||
processNotify *ppn;
|
||||
|
||||
if (dbLinkIsDefined(plink) && dbLinkIsConstant(plink))
|
||||
if (plink->type == CONSTANT)
|
||||
return 0;
|
||||
|
||||
if (plink->type != PV_LINK) {
|
||||
|
||||
@@ -79,7 +79,7 @@ static long add_record(dbCommon *pcommon)
|
||||
devPvt *pdevPvt;
|
||||
processNotify *ppn;
|
||||
|
||||
if (dbLinkIsDefined(plink) && dbLinkIsConstant(plink))
|
||||
if (plink->type == CONSTANT)
|
||||
return 0;
|
||||
|
||||
if (plink->type != PV_LINK) {
|
||||
|
||||
@@ -79,7 +79,7 @@ static long add_record(dbCommon *pcommon)
|
||||
devPvt *pdevPvt;
|
||||
processNotify *ppn;
|
||||
|
||||
if (dbLinkIsDefined(plink) && dbLinkIsConstant(plink))
|
||||
if (plink->type == CONSTANT)
|
||||
return 0;
|
||||
|
||||
if (plink->type != PV_LINK) {
|
||||
|
||||
@@ -79,7 +79,7 @@ static long add_record(dbCommon *pcommon)
|
||||
devPvt *pdevPvt;
|
||||
processNotify *ppn;
|
||||
|
||||
if (dbLinkIsDefined(plink) && dbLinkIsConstant(plink))
|
||||
if (plink->type == CONSTANT)
|
||||
return 0;
|
||||
|
||||
if (plink->type != PV_LINK) {
|
||||
|
||||
@@ -81,7 +81,7 @@ static long add_record(dbCommon *pcommon)
|
||||
devPvt *pdevPvt;
|
||||
processNotify *ppn;
|
||||
|
||||
if (dbLinkIsDefined(plink) && dbLinkIsConstant(plink))
|
||||
if (plink->type == CONSTANT)
|
||||
return 0;
|
||||
|
||||
if (plink->type != PV_LINK) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -49,8 +49,8 @@ linkTestHarness_SRCS_RTEMS += rtemsTestHarness.c
|
||||
|
||||
PROD_SRCS_RTEMS += rtemsTestData.c
|
||||
|
||||
PROD_vxWorks = linkTestHarness
|
||||
PROD_RTEMS = linkTestHarness
|
||||
TESTPROD_vxWorks = linkTestHarness
|
||||
TESTPROD_RTEMS = linkTestHarness
|
||||
|
||||
TESTSPEC_vxWorks = linkTestHarness.munch; epicsRunLinkTests
|
||||
TESTSPEC_RTEMS = linkTestHarness.boot; epicsRunLinkTests
|
||||
|
||||
@@ -126,8 +126,8 @@ regressTest_DBD += base.dbd
|
||||
TESTPROD_HOST += regressTest
|
||||
regressTest_SRCS += regressTest.c
|
||||
regressTest_SRCS += regressTest_registerRecordDeviceDriver.cpp
|
||||
TESTFILES += $(COMMON_DIR)/regressTest.dbd ../regressArray1.db ../regressHex.db ../regressLinkMS.db
|
||||
TESTFILES += ../badCaLink.db
|
||||
TESTFILES += $(COMMON_DIR)/regressTest.dbd ../regressArray1.db ../regressHex.db
|
||||
TESTFILES += ../regressLinkMS.db ../badCaLink.db ../regressCalcout.db
|
||||
TESTS += regressTest
|
||||
|
||||
TARGETS += $(COMMON_DIR)/simmTest.dbd
|
||||
@@ -175,8 +175,12 @@ dbHeaderTestxx_SRCS += dbHeaderTestxx.cpp
|
||||
|
||||
ifeq ($(T_A),$(EPICS_HOST_ARCH))
|
||||
# Host-only tests of softIoc/softIocPVA, caget and pvget (if present)
|
||||
# Unfortunately hangs too often on CI systems:
|
||||
ifndef CI
|
||||
TESTS += netget
|
||||
endif
|
||||
endif
|
||||
|
||||
# epicsRunRecordTests runs all the test programs in a known working order.
|
||||
testHarness_SRCS += epicsRunRecordTests.c
|
||||
|
||||
@@ -185,8 +189,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
|
||||
|
||||
@@ -3,13 +3,16 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use if $^O eq 'MSWin32', "Win32::Process";
|
||||
use if $^O eq 'MSWin32', "Win32";
|
||||
|
||||
use lib '@TOP@/lib/perl';
|
||||
|
||||
use Test::More tests => 3;
|
||||
use EPICS::IOC;
|
||||
|
||||
# Set to 1 to echo all IOC and client communications
|
||||
my $debug = 1;
|
||||
my $debug = 0;
|
||||
|
||||
$ENV{HARNESS_ACTIVE} = 1 if scalar @ARGV && shift eq '-tap';
|
||||
|
||||
@@ -35,7 +38,7 @@ $ioc->debug($debug);
|
||||
|
||||
$SIG{__DIE__} = $SIG{INT} = $SIG{QUIT} = sub {
|
||||
$ioc->exit;
|
||||
BAIL_OUT('Caught signal');
|
||||
BAIL_OUT("Caught signal: $_[0]");
|
||||
};
|
||||
|
||||
|
||||
@@ -50,11 +53,21 @@ sub kill_bail {
|
||||
}
|
||||
|
||||
sub watchdog (&$$) {
|
||||
my ($do, $timeout, $abort) = @_;
|
||||
$SIG{ALRM} = $abort;
|
||||
alarm $timeout;
|
||||
&$do;
|
||||
alarm 0;
|
||||
my ($code, $timeout, $fail) = @_;
|
||||
my $bark = "Woof $$\n";
|
||||
my $result;
|
||||
eval {
|
||||
local $SIG{__DIE__};
|
||||
local $SIG{ALRM} = sub { die $bark };
|
||||
alarm $timeout;
|
||||
$result = &$code;
|
||||
alarm 0;
|
||||
};
|
||||
if ($@) {
|
||||
die if $@ ne $bark;
|
||||
$result = &$fail;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,19 +103,6 @@ like($version, qr/^ \d+ \. \d+ \. \d+ /x,
|
||||
"Got BaseVersion '$version' from iocsh");
|
||||
|
||||
|
||||
# Client Tests
|
||||
|
||||
my $client = EPICS::IOC->new;
|
||||
$client->debug($debug);
|
||||
|
||||
sub close_client {
|
||||
my $doing = shift;
|
||||
return sub {
|
||||
diag("Timeout $doing");
|
||||
$client->close;
|
||||
}
|
||||
}
|
||||
|
||||
# Channel Access
|
||||
|
||||
SKIP: {
|
||||
@@ -119,17 +119,9 @@ SKIP: {
|
||||
|
||||
# CA Client test
|
||||
|
||||
watchdog {
|
||||
$client->start($caget, '-w5', $pv);
|
||||
my $caVersion = $client->_getline;
|
||||
like($caVersion, qr/^ $pv \s+ \Q$version\E $/x,
|
||||
'Got same BaseVersion from caget');
|
||||
my @errors = $client->_geterrors;
|
||||
note("Errors from caget:\n",
|
||||
map(" $_\n", @errors))
|
||||
if scalar @errors;
|
||||
$client->close;
|
||||
} 15, close_client('doing caget');
|
||||
my $caVersion = qx_timeout(15, "$caget -w5 $pv");
|
||||
like($caVersion, qr/^ $pv \s+ \Q$version\E $/x,
|
||||
'Got same BaseVersion from caget');
|
||||
}
|
||||
|
||||
|
||||
@@ -152,17 +144,71 @@ SKIP: {
|
||||
|
||||
# PVA Client test
|
||||
|
||||
watchdog {
|
||||
$client->start($pvget, '-w5', $pv);
|
||||
my $pvaVersion = $client->_getline;
|
||||
like($pvaVersion, qr/^ $pv \s .* \Q$version\E \s* $/x,
|
||||
'Got same BaseVersion from pvget');
|
||||
my @errors = $client->_geterrors;
|
||||
note("Errors from pvget:\n",
|
||||
map(" $_\n", @errors))
|
||||
if scalar @errors;
|
||||
$client->close;
|
||||
} 10, close_client('doing pvget');
|
||||
my $pvaVersion = qx_timeout(15, "$pvget -w5 $pv");
|
||||
like($pvaVersion, qr/^ $pv \s .* \Q$version\E \s* $/x,
|
||||
'Got same BaseVersion from pvget');
|
||||
}
|
||||
|
||||
$ioc->exit;
|
||||
|
||||
|
||||
# Process timeout utilities
|
||||
|
||||
sub system_timeout {
|
||||
my ($timeout, $cmdline) = @_;
|
||||
my $status;
|
||||
if ($^O eq 'MSWin32') {
|
||||
my $proc;
|
||||
(my $app) = split ' ', $cmdline;
|
||||
if (! Win32::Process::Create($proc, $app, $cmdline,
|
||||
1, &Win32::Process::NORMAL_PRIORITY_CLASS, '.')) {
|
||||
my $err = Win32::FormatMessage(Win32::GetLastError());
|
||||
die "Can't create Process for '$cmdline': $err\n";
|
||||
}
|
||||
if (! $proc->Wait(1000 * $timeout)) {
|
||||
$proc->Kill(1);
|
||||
note("Timed out '$cmdline' after $timeout seconds\n");
|
||||
}
|
||||
my $status;
|
||||
$proc->GetExitCode($status);
|
||||
return $status;
|
||||
}
|
||||
else {
|
||||
my $pid;
|
||||
$status = watchdog {
|
||||
$pid = fork();
|
||||
die "Can't fork: $!\n"
|
||||
unless defined $pid;
|
||||
exec $cmdline
|
||||
or die "Can't exec: $!\n"
|
||||
unless $pid;
|
||||
waitpid $pid, 0;
|
||||
return $? >> 8;
|
||||
} $timeout, sub {
|
||||
kill 9, $pid if $pid;
|
||||
note("Timed out '$cmdline' after $timeout seconds\n");
|
||||
return -2;
|
||||
};
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
|
||||
sub qx_timeout {
|
||||
my ($timeout, $cmdline) = @_;
|
||||
open(my $stdout, '>&STDOUT')
|
||||
or die "Can't save STDOUT: $!\n";
|
||||
my $outfile = "stdout-$$.txt";
|
||||
unlink $outfile;
|
||||
open STDOUT, '>', $outfile;
|
||||
my $text;
|
||||
if (system_timeout($timeout, $cmdline) == 0 && -r $outfile) {
|
||||
open(my $file, '<', $outfile)
|
||||
or die "Can't open $outfile: $!\n";
|
||||
$text = join '', <$file>;
|
||||
close $file;
|
||||
}
|
||||
open(STDOUT, '>&', $stdout)
|
||||
or die "Can't restore STDOUT: $!\n";
|
||||
unlink $outfile;
|
||||
return $text;
|
||||
}
|
||||
|
||||
27
modules/database/test/std/rec/regressCalcout.db
Normal file
27
modules/database/test/std/rec/regressCalcout.db
Normal file
@@ -0,0 +1,27 @@
|
||||
record(calcout, "cout") {
|
||||
field(INPA, "99")
|
||||
field(INPB, "99")
|
||||
field(INPC, "99")
|
||||
field(INPD, "99")
|
||||
}
|
||||
record(ai, "ain") {
|
||||
field(DTYP, "Async Soft Channel")
|
||||
}
|
||||
record(bi, "bin") {
|
||||
field(DTYP, "Async Soft Channel")
|
||||
}
|
||||
record(int64in, "iin") {
|
||||
field(DTYP, "Async Soft Channel")
|
||||
}
|
||||
record(longin, "lin") {
|
||||
field(DTYP, "Async Soft Channel")
|
||||
}
|
||||
record(mbbi, "min") {
|
||||
field(DTYP, "Async Soft Channel")
|
||||
}
|
||||
record(mbbiDirect, "din") {
|
||||
field(DTYP, "Async Soft Channel")
|
||||
}
|
||||
record(stringin, "sin") {
|
||||
field(DTYP, "Async Soft Channel")
|
||||
}
|
||||
@@ -134,15 +134,63 @@ void testCADisconn(void)
|
||||
testdbPutFieldFail(-1, "ai:disconn.PROC", DBF_LONG, 1);
|
||||
testdbGetFieldEqual("ai:disconn.SEVR", DBF_LONG, INVALID_ALARM);
|
||||
testdbGetFieldEqual("ai:disconn.STAT", DBF_LONG, LINK_ALARM);
|
||||
|
||||
testIocShutdownOk();
|
||||
testdbCleanup();
|
||||
}
|
||||
|
||||
/* lp:1824277 Regression in calcout, setting links at runtime */
|
||||
static void
|
||||
testSpecialLinks(void)
|
||||
{
|
||||
testDiag("In testSpecialLinks()");
|
||||
|
||||
startRegressTestIoc("regressCalcout.db");
|
||||
|
||||
testdbPutFieldOk("cout.INPA", DBF_STRING, "10");
|
||||
testdbGetFieldEqual("cout.A", DBF_LONG, 10);
|
||||
testdbGetFieldEqual("cout.INAV", DBF_LONG, calcoutINAV_CON);
|
||||
testdbPutFieldOk("cout.A", DBF_LONG, 15);
|
||||
testdbPutFieldOk("cout.INPB", DBF_STRING, "{\"const\":20}");
|
||||
testdbGetFieldEqual("cout.B", DBF_LONG, 20);
|
||||
testdbGetFieldEqual("cout.INBV", DBF_LONG, calcoutINAV_CON);
|
||||
testdbPutFieldOk("cout.B", DBF_LONG, 25);
|
||||
testdbPutFieldOk("cout.INPC", DBF_STRING, "cout.A");
|
||||
testdbGetFieldEqual("cout.C", DBF_LONG, 99);
|
||||
testdbGetFieldEqual("cout.INCV", DBF_LONG, calcoutINAV_LOC);
|
||||
testdbPutFieldOk("cout.INPD", DBF_STRING, "no-such-pv");
|
||||
testdbGetFieldEqual("cout.D", DBF_LONG, 99);
|
||||
testdbGetFieldEqual("cout.INDV", DBF_LONG, calcoutINAV_EXT_NC);
|
||||
|
||||
eltc(0);
|
||||
testdbPutFieldOk("ain.INP", DBF_STRING, "cout");
|
||||
testdbPutFieldFail(S_db_badField, "ain.INP", DBF_STRING, "{\"const\":1}");
|
||||
testdbPutFieldOk("bin.INP", DBF_STRING, "cout");
|
||||
testdbPutFieldFail(S_db_badField, "bin.INP", DBF_STRING, "{\"const\":1}");
|
||||
testdbPutFieldOk("iin.INP", DBF_STRING, "cout");
|
||||
testdbPutFieldFail(S_db_badField, "iin.INP", DBF_STRING, "{\"const\":1}");
|
||||
testdbPutFieldOk("lin.INP", DBF_STRING, "cout");
|
||||
testdbPutFieldFail(S_db_badField, "lin.INP", DBF_STRING, "{\"const\":1}");
|
||||
testdbPutFieldOk("min.INP", DBF_STRING, "cout");
|
||||
testdbPutFieldFail(S_db_badField, "min.INP", DBF_STRING, "{\"const\":1}");
|
||||
testdbPutFieldOk("din.INP", DBF_STRING, "cout");
|
||||
testdbPutFieldFail(S_db_badField, "din.INP", DBF_STRING, "{\"const\":1}");
|
||||
testdbPutFieldOk("sin.INP", DBF_STRING, "cout");
|
||||
testdbPutFieldFail(S_db_badField, "sin.INP", DBF_STRING, "{\"const\":1}");
|
||||
eltc(1);
|
||||
|
||||
testIocShutdownOk();
|
||||
testdbCleanup();
|
||||
}
|
||||
|
||||
|
||||
MAIN(regressTest)
|
||||
{
|
||||
testPlan(34);
|
||||
testPlan(62);
|
||||
testArrayLength1();
|
||||
testHexConstantLinks();
|
||||
testLinkMS();
|
||||
testCADisconn();
|
||||
testSpecialLinks();
|
||||
return testDone();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
1
modules/libcom/src/env/envDefs.h
vendored
1
modules/libcom/src/env/envDefs.h
vendored
@@ -76,6 +76,7 @@ LIBCOM_API extern const ENV_PARAM EPICS_IOC_LOG_FILE_COMMAND;
|
||||
LIBCOM_API extern const ENV_PARAM IOCSH_PS1;
|
||||
LIBCOM_API extern const ENV_PARAM IOCSH_HISTSIZE;
|
||||
LIBCOM_API extern const ENV_PARAM IOCSH_HISTEDIT_DISABLE;
|
||||
LIBCOM_API extern const ENV_PARAM EPICS_MUTEX_USE_PRIORITY_INHERITANCE;
|
||||
LIBCOM_API extern const ENV_PARAM *env_param_list[];
|
||||
|
||||
struct in_addr;
|
||||
|
||||
@@ -41,4 +41,3 @@ LIBCOM_API size_t epicsStdCall freeListItemsAvail(void *pvt);
|
||||
#endif
|
||||
|
||||
#endif /*INCfreeListh*/
|
||||
|
||||
@@ -1126,17 +1126,26 @@ static void varHandler(const iocshVarDef *v, const char *setString)
|
||||
static void varCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
struct iocshVariable *v;
|
||||
if(args[0].sval == NULL) {
|
||||
const char *name = args[0].sval;
|
||||
const char *value = args[1].sval;
|
||||
|
||||
if (!value) {
|
||||
int found = 0;
|
||||
for (v = iocshVariableHead ; v != NULL ; v = v->next)
|
||||
varHandler(v->pVarDef, args[1].sval);
|
||||
if (!name || epicsStrGlobMatch(v->pVarDef->name, name) != 0) {
|
||||
varHandler(v->pVarDef, NULL);
|
||||
found = 1;
|
||||
}
|
||||
if (!found && name != NULL)
|
||||
fprintf(epicsGetStderr(), "No var matching %s found.\n", name);
|
||||
}
|
||||
else {
|
||||
v = (iocshVariable *)registryFind(iocshVarID, args[0].sval);
|
||||
if (v == NULL) {
|
||||
fprintf(epicsGetStderr(), "Var %s not found.\n", args[0].sval);
|
||||
fprintf(epicsGetStderr(), "Var %s not found.\n", name);
|
||||
}
|
||||
else {
|
||||
varHandler(v->pVarDef, args[1].sval);
|
||||
varHandler(v->pVarDef, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -23,6 +23,15 @@
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef vxWorks
|
||||
#include <stdint.h>
|
||||
#else
|
||||
/* VxWorks automaticaly includes stdint.h defining SIZE_MAX in 6.9 but not earlier */
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX (size_t)-1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "epicsAssert.h"
|
||||
#include "epicsStdio.h"
|
||||
#include "cantProceed.h"
|
||||
@@ -259,30 +268,31 @@ size_t epicsStrnLen(const char *s, size_t maxlen)
|
||||
return i;
|
||||
}
|
||||
|
||||
int epicsStrGlobMatch(const char *str, const char *pattern)
|
||||
int epicsStrnGlobMatch(const char *str, size_t len, const char *pattern)
|
||||
{
|
||||
const char *cp = NULL, *mp = NULL;
|
||||
const char *mp = NULL;
|
||||
size_t cp = 0, i = 0;
|
||||
|
||||
while ((*str) && (*pattern != '*')) {
|
||||
if ((*pattern != *str) && (*pattern != '?'))
|
||||
while ((i < len) && (str[i]) && (*pattern != '*')) {
|
||||
if ((*pattern != str[i]) && (*pattern != '?'))
|
||||
return 0;
|
||||
pattern++;
|
||||
str++;
|
||||
i++;
|
||||
}
|
||||
while (*str) {
|
||||
while ((i < len) && str[i]) {
|
||||
if (*pattern == '*') {
|
||||
if (!*++pattern)
|
||||
return 1;
|
||||
mp = pattern;
|
||||
cp = str+1;
|
||||
cp = i+1;
|
||||
}
|
||||
else if ((*pattern == *str) || (*pattern == '?')) {
|
||||
else if ((*pattern == str[i]) || (*pattern == '?')) {
|
||||
pattern++;
|
||||
str++;
|
||||
i++;
|
||||
}
|
||||
else {
|
||||
pattern = mp;
|
||||
str = cp++;
|
||||
i = cp++;
|
||||
}
|
||||
}
|
||||
while (*pattern == '*')
|
||||
@@ -290,6 +300,10 @@ int epicsStrGlobMatch(const char *str, const char *pattern)
|
||||
return !*pattern;
|
||||
}
|
||||
|
||||
int epicsStrGlobMatch(const char *str, const char *pattern) {
|
||||
return epicsStrnGlobMatch(str, SIZE_MAX, pattern);
|
||||
}
|
||||
|
||||
char * epicsStrtok_r(char *s, const char *delim, char **lasts)
|
||||
{
|
||||
const char *spanp;
|
||||
|
||||
@@ -36,7 +36,30 @@ LIBCOM_API char * epicsStrnDup(const char *s, size_t len);
|
||||
LIBCOM_API int epicsStrPrintEscaped(FILE *fp, const char *s, size_t n);
|
||||
#define epicsStrSnPrintEscaped epicsStrnEscapedFromRaw
|
||||
LIBCOM_API size_t epicsStrnLen(const char *s, size_t maxlen);
|
||||
|
||||
/** Matches a string against a pattern.
|
||||
*
|
||||
* Checks if str matches the glob style pattern, which may contain ? or * wildcards.
|
||||
* A ? matches any single character.
|
||||
* A * matched any sub-string.
|
||||
*
|
||||
* @returns 1 if str matches the pattern, 0 if not.
|
||||
*
|
||||
* @since EPICS 3.14.7
|
||||
*/
|
||||
LIBCOM_API int epicsStrGlobMatch(const char *str, const char *pattern);
|
||||
|
||||
/** Matches a string against a pattern.
|
||||
*
|
||||
* Like epicsStrGlobMatch but with limited string length.
|
||||
* If the length of str is less than len, the full string is matched.
|
||||
*
|
||||
* @returns 1 if the first len characters of str match the pattern, 0 if not.
|
||||
*
|
||||
* @since UNRELEASED
|
||||
*/
|
||||
LIBCOM_API int epicsStrnGlobMatch(const char *str, size_t len, const char *pattern);
|
||||
|
||||
LIBCOM_API char * epicsStrtok_r(char *s, const char *delim, char **lasts);
|
||||
LIBCOM_API unsigned int epicsStrHash(const char *str, unsigned int seed);
|
||||
LIBCOM_API unsigned int epicsMemHash(const char *str, size_t length,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "epicsStdio.h"
|
||||
#include "epicsString.h"
|
||||
#include "errlog.h"
|
||||
#include "envDefs.h"
|
||||
#include "osiUnistd.h"
|
||||
@@ -61,18 +61,10 @@ LIBCOM_API void epicsStdCall epicsEnvUnset (const char *name)
|
||||
*/
|
||||
LIBCOM_API void epicsStdCall epicsEnvShow (const char *name)
|
||||
{
|
||||
if (name == NULL) {
|
||||
extern char **environ;
|
||||
char **sp;
|
||||
char **sp;
|
||||
|
||||
for (sp = environ ; (sp != NULL) && (*sp != NULL) ; sp++)
|
||||
for (sp = environ ; (sp != NULL) && (*sp != NULL) ; sp++) {
|
||||
if (!name || epicsStrnGlobMatch(*sp, strchr(*sp, '=') - *sp, name))
|
||||
printf ("%s\n", *sp);
|
||||
}
|
||||
else {
|
||||
const char *cp = getenv (name);
|
||||
if (cp == NULL)
|
||||
printf ("%s is not an environment variable.\n", name);
|
||||
else
|
||||
printf ("%s=%s\n", name, cp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "epicsStdio.h"
|
||||
#include "epicsString.h"
|
||||
#include "epicsVersion.h"
|
||||
#include "errlog.h"
|
||||
#include "envDefs.h"
|
||||
@@ -68,18 +68,11 @@ LIBCOM_API void epicsStdCall epicsEnvUnset (const char *name)
|
||||
*/
|
||||
LIBCOM_API void epicsStdCall epicsEnvShow (const char *name)
|
||||
{
|
||||
if (name == NULL) {
|
||||
extern char **environ;
|
||||
char **sp;
|
||||
extern char **environ;
|
||||
char **sp;
|
||||
|
||||
for (sp = environ ; (sp != NULL) && (*sp != NULL) ; sp++)
|
||||
for (sp = environ ; (sp != NULL) && (*sp != NULL) ; sp++) {
|
||||
if (!name || epicsStrnGlobMatch(*sp, strchr(*sp, '=') - *sp, name))
|
||||
printf ("%s\n", *sp);
|
||||
}
|
||||
else {
|
||||
const char *cp = getenv (name);
|
||||
if (cp == NULL)
|
||||
printf ("%s is not an environment variable.\n", name);
|
||||
else
|
||||
printf ("%s=%s\n", name, cp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -23,26 +23,29 @@
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define EPICS_PRIVATE_API
|
||||
|
||||
#include "epicsMutex.h"
|
||||
#include "osdPosixMutexPriv.h"
|
||||
#include "epicsThread.h"
|
||||
#include "cantProceed.h"
|
||||
#include "epicsTime.h"
|
||||
#include "errlog.h"
|
||||
#include "epicsStdio.h"
|
||||
#include "epicsAssert.h"
|
||||
#include "envDefs.h"
|
||||
|
||||
#define checkStatus(status,message) \
|
||||
if((status)) { \
|
||||
errlogPrintf("epicsMutex %s failed: error %s\n", \
|
||||
(message), strerror((status))); \
|
||||
errlogPrintf("%s: epicsMutex %s failed: error %s\n", \
|
||||
epicsThreadGetNameSelf(), (message), strerror((status))); \
|
||||
}
|
||||
#define checkStatusQuit(status,message,method) \
|
||||
if(status) { \
|
||||
errlogPrintf("epicsMutex %s failed: error %s\n", \
|
||||
(message), strerror((status))); \
|
||||
errlogPrintf("%s: epicsMutex %s failed: error %s\n", \
|
||||
epicsThreadGetNameSelf(), (message), strerror((status))); \
|
||||
cantProceed((method)); \
|
||||
}
|
||||
|
||||
@@ -68,21 +71,27 @@ static void globalAttrInit()
|
||||
status = pthread_mutexattr_settype(&globalAttrRecursive, PTHREAD_MUTEX_RECURSIVE);
|
||||
checkStatusQuit(status, "pthread_mutexattr_settype(&globalAttrRecursive, PTHREAD_MUTEX_RECURSIVE)", "globalAttrInit");
|
||||
#if defined _POSIX_THREAD_PRIO_INHERIT
|
||||
status = pthread_mutexattr_setprotocol(&globalAttrDefault, PTHREAD_PRIO_INHERIT);
|
||||
if (errVerbose) checkStatus(status, "pthread_mutexattr_setprotocol(&globalAttrDefault, PTHREAD_PRIO_INHERIT)");
|
||||
status = pthread_mutexattr_setprotocol(&globalAttrRecursive, PTHREAD_PRIO_INHERIT);
|
||||
if (errVerbose) checkStatus(status, "pthread_mutexattr_setprotocol(&globalAttrRecursive, PTHREAD_PRIO_INHERIT)");
|
||||
if (status == 0) {
|
||||
/* Can we really use PTHREAD_PRIO_INHERIT? */
|
||||
pthread_mutex_t temp;
|
||||
status = pthread_mutex_init(&temp, &globalAttrRecursive);
|
||||
if (errVerbose) checkStatus(status, "pthread_mutex_init(&temp, &globalAttrRecursive)");
|
||||
if (status != 0) {
|
||||
/* No, PTHREAD_PRIO_INHERIT does not work, fall back to PTHREAD_PRIO_NONE */;
|
||||
pthread_mutexattr_setprotocol(&globalAttrDefault, PTHREAD_PRIO_NONE);
|
||||
pthread_mutexattr_setprotocol(&globalAttrRecursive, PTHREAD_PRIO_NONE);
|
||||
} else {
|
||||
pthread_mutex_destroy(&temp);
|
||||
{
|
||||
const char *p = envGetConfigParamPtr(&EPICS_MUTEX_USE_PRIORITY_INHERITANCE);
|
||||
char c = p ? toupper(p[0]) : 'N';
|
||||
if ( 'T' == c || 'Y' == c || '1' == c ) {
|
||||
status = pthread_mutexattr_setprotocol(&globalAttrDefault, PTHREAD_PRIO_INHERIT);
|
||||
if (errVerbose) checkStatus(status, "pthread_mutexattr_setprotocol(&globalAttrDefault, PTHREAD_PRIO_INHERIT)");
|
||||
status = pthread_mutexattr_setprotocol(&globalAttrRecursive, PTHREAD_PRIO_INHERIT);
|
||||
if (errVerbose) checkStatus(status, "pthread_mutexattr_setprotocol(&globalAttrRecursive, PTHREAD_PRIO_INHERIT)");
|
||||
if (status == 0) {
|
||||
/* Can we really use PTHREAD_PRIO_INHERIT? */
|
||||
pthread_mutex_t temp;
|
||||
status = pthread_mutex_init(&temp, &globalAttrRecursive);
|
||||
if (errVerbose) checkStatus(status, "pthread_mutex_init(&temp, &globalAttrRecursive)");
|
||||
if (status != 0) {
|
||||
/* No, PTHREAD_PRIO_INHERIT does not work, fall back to PTHREAD_PRIO_NONE */;
|
||||
pthread_mutexattr_setprotocol(&globalAttrDefault, PTHREAD_PRIO_NONE);
|
||||
pthread_mutexattr_setprotocol(&globalAttrRecursive, PTHREAD_PRIO_NONE);
|
||||
} else {
|
||||
pthread_mutex_destroy(&temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -144,7 +153,7 @@ void epicsMutexOsdDestroy(struct epicsMutexOSD * pmutex)
|
||||
int status;
|
||||
|
||||
status = pthread_mutex_destroy(&pmutex->lock);
|
||||
checkStatus(status, "pthread_mutex_destroy");
|
||||
checkStatusQuit(status, "pthread_mutex_destroy", "epicsMutexOsdDestroy");
|
||||
free(pmutex);
|
||||
}
|
||||
|
||||
@@ -153,7 +162,7 @@ void epicsMutexOsdUnlock(struct epicsMutexOSD * pmutex)
|
||||
int status;
|
||||
|
||||
status = pthread_mutex_unlock(&pmutex->lock);
|
||||
checkStatus(status, "pthread_mutex_unlock epicsMutexOsdUnlock");
|
||||
checkStatusQuit(status, "pthread_mutex_unlock", "epicsMutexOsdUnlock");
|
||||
}
|
||||
|
||||
epicsMutexLockStatus epicsMutexOsdLock(struct epicsMutexOSD * pmutex)
|
||||
|
||||
@@ -982,11 +982,13 @@ LIBCOM_API void epicsStdCall *epicsThreadPrivateGet(epicsThreadPrivateId id)
|
||||
|
||||
LIBCOM_API double epicsStdCall epicsThreadSleepQuantum ()
|
||||
{
|
||||
double hz;
|
||||
hz = sysconf ( _SC_CLK_TCK );
|
||||
if(hz<=0)
|
||||
return 0.0;
|
||||
return 1.0 / hz;
|
||||
#ifdef CLOCK_REALTIME
|
||||
struct timespec res;
|
||||
if (clock_getres(CLOCK_REALTIME, &res) == 0)
|
||||
return res.tv_sec + 1e-9 * res.tv_nsec;
|
||||
else
|
||||
#endif
|
||||
return 1e-3;
|
||||
}
|
||||
|
||||
LIBCOM_API int epicsThreadGetCPUs(void)
|
||||
|
||||
@@ -24,6 +24,33 @@
|
||||
#include "vxWorks.h" /* obtain the version of vxWorks */
|
||||
#include "epicsAssert.h"
|
||||
|
||||
#include "vxLib.h"
|
||||
#include "intLib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef EPICS_ATOMIC_LOCK
|
||||
#define EPICS_ATOMIC_LOCK
|
||||
|
||||
typedef struct EpicsAtomicLockKey { int m_key; } EpicsAtomicLockKey;
|
||||
|
||||
EPICS_ATOMIC_INLINE void epicsAtomicLock ( EpicsAtomicLockKey * pKey )
|
||||
{
|
||||
pKey->m_key = intLock ();
|
||||
}
|
||||
|
||||
EPICS_ATOMIC_INLINE void epicsAtomicUnlock ( EpicsAtomicLockKey * pKey )
|
||||
{
|
||||
intUnlock ( pKey->m_key );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* With vxWorks 6.6 and later we need to use vxAtomicLib
|
||||
* to implement this functionality correctly on SMP systems
|
||||
@@ -123,26 +150,6 @@ EPICS_ATOMIC_INLINE size_t epicsAtomicSubSizeT ( size_t * pTarget, size_t delta
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef EPICS_ATOMIC_CAS_SIZET
|
||||
#define EPICS_ATOMIC_CAS_SIZET
|
||||
EPICS_ATOMIC_INLINE size_t epicsAtomicCmpAndSwapSizeT ( size_t * pTarget,
|
||||
size_t oldVal, size_t newVal )
|
||||
{
|
||||
atomic_t * const pTarg = ( atomic_t * ) ( pTarget );
|
||||
return ( size_t ) vxCas ( pTarg, (atomic_t) oldVal, (atomic_t) newVal );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef EPICS_ATOMIC_CAS_PTRT
|
||||
#define EPICS_ATOMIC_CAS_PTRT
|
||||
EPICS_ATOMIC_INLINE EpicsAtomicPtrT epicsAtomicCmpAndSwapPtrT ( EpicsAtomicPtrT * pTarget,
|
||||
EpicsAtomicPtrT oldVal, EpicsAtomicPtrT newVal )
|
||||
{
|
||||
atomic_t * const pTarg = ( atomic_t * ) ( pTarget );
|
||||
return (EpicsAtomicPtrT) vxCas ( pTarg, (atomic_t) oldVal, (atomic_t) newVal );
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* ULONG_MAX == UINT_MAX */
|
||||
|
||||
/*
|
||||
@@ -190,15 +197,6 @@ EPICS_ATOMIC_INLINE int epicsAtomicAddIntT ( int * pTarget, int delta )
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef EPICS_ATOMIC_CAS_INTT
|
||||
#define EPICS_ATOMIC_CAS_INTT
|
||||
EPICS_ATOMIC_INLINE int epicsAtomicCmpAndSwapIntT ( int * pTarget,
|
||||
int oldVal, int newVal )
|
||||
{
|
||||
atomic_t * const pTarg = ( atomic_t * ) ( pTarget );
|
||||
return ( int ) vxCas ( pTarg, (atomic_t) oldVal, (atomic_t) newVal );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
@@ -215,22 +213,6 @@ EPICS_ATOMIC_INLINE int epicsAtomicCmpAndSwapIntT ( int * pTarget,
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef EPICS_ATOMIC_LOCK
|
||||
#define EPICS_ATOMIC_LOCK
|
||||
|
||||
typedef struct EpicsAtomicLockKey { int m_key; } EpicsAtomicLockKey;
|
||||
|
||||
EPICS_ATOMIC_INLINE void epicsAtomicLock ( EpicsAtomicLockKey * pKey )
|
||||
{
|
||||
pKey->m_key = intLock ();
|
||||
}
|
||||
|
||||
EPICS_ATOMIC_INLINE void epicsAtomicUnlock ( EpicsAtomicLockKey * pKey )
|
||||
{
|
||||
intUnlock ( pKey->m_key );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef EPICS_ATOMIC_READ_MEMORY_BARRIER
|
||||
#define EPICS_ATOMIC_READ_MEMORY_BARRIER
|
||||
/*
|
||||
|
||||
@@ -16,17 +16,18 @@
|
||||
/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */
|
||||
#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <envLib.h>
|
||||
|
||||
#include "epicsFindSymbol.h"
|
||||
#include "epicsStdio.h"
|
||||
#include "epicsString.h"
|
||||
#include "errlog.h"
|
||||
#include "iocsh.h"
|
||||
|
||||
|
||||
/*
|
||||
* Set the value of an environment variable
|
||||
* Leaks memory, but the assumption is that this routine won't be
|
||||
@@ -86,14 +87,12 @@ LIBCOM_API void epicsStdCall epicsEnvUnset (const char *name)
|
||||
*/
|
||||
LIBCOM_API void epicsStdCall epicsEnvShow (const char *name)
|
||||
{
|
||||
if (name == NULL) {
|
||||
envShow (0);
|
||||
}
|
||||
else {
|
||||
const char *cp = getenv (name);
|
||||
if (cp == NULL)
|
||||
printf ("%s is not an environment variable.\n", name);
|
||||
else
|
||||
printf ("%s=%s\n", name, cp);
|
||||
extern char **ppGlobalEnviron; /* Used in 'environ' macro but not declared in envLib.h */
|
||||
char **sp;
|
||||
|
||||
for (sp = environ ; (sp != NULL) && (*sp != NULL) ; sp++) {
|
||||
if (!**sp) continue; /* skip unset environment variables */
|
||||
if (!name || epicsStrnGlobMatch(*sp, strchr(*sp, '=') - *sp, name))
|
||||
printf ("%s\n", *sp);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user