Compare commits
34 Commits
R3.14.10-r
...
R3.14.10-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6e9b9a266 | ||
|
|
570825f693 | ||
|
|
2c020ffac4 | ||
|
|
bf829e0f48 | ||
|
|
9239b50615 | ||
|
|
2eb849b91c | ||
|
|
0fff507aea | ||
|
|
49687e27b2 | ||
|
|
98e09831fa | ||
|
|
36af6418db | ||
|
|
cd84a4cfd0 | ||
|
|
76af265f0d | ||
|
|
7558e0a468 | ||
|
|
925dcfd634 | ||
|
|
1d6bea83de | ||
|
|
2dad57f1da | ||
|
|
2e4d1f0d60 | ||
|
|
708b0be486 | ||
|
|
f58002e1fd | ||
|
|
980d790638 | ||
|
|
d579e30210 | ||
|
|
48257aec7c | ||
|
|
af2b7a3ef2 | ||
|
|
fd9867e973 | ||
|
|
e97439c7df | ||
|
|
150c4ff002 | ||
|
|
86740c98d7 | ||
|
|
d14713d675 | ||
|
|
11180d0c9c | ||
|
|
ec8761185d | ||
|
|
67e9d89ebd | ||
|
|
d3eb8170ff | ||
|
|
80eca1fafa | ||
|
|
3947594fe3 |
@@ -36,8 +36,9 @@ EPICS_PATCH_LEVEL = 0
|
||||
#EPICS_CVS_SNAPSHOT=-CVS
|
||||
#EPICS_CVS_SNAPSHOT=-pre1
|
||||
#EPICS_CVS_SNAPSHOT=-pre1-CVS
|
||||
EPICS_CVS_SNAPSHOT=-RC1
|
||||
#EPICS_CVS_SNAPSHOT=-RC1
|
||||
#EPICS_CVS_SNAPSHOT=-RC1-CVS
|
||||
EPICS_CVS_SNAPSHOT=-RC2
|
||||
#EPICS_CVS_SNAPSHOT=
|
||||
|
||||
# No changes should be needed below here
|
||||
|
||||
@@ -231,10 +231,12 @@ CONFORM_CFLAGS = $(CONFORM_CFLAGS_$(CMPLR))
|
||||
CONFORM_CXXFLAGS = $(CONFORM_CXXFLAGS_$(CXXCMPLR))
|
||||
|
||||
# Warnings flags
|
||||
WARN_CPPFLAGS = $(WARN_CPPFLAGS_$($(BUILD_CLASS)_WARN))
|
||||
WARN_CFLAGS = $(WARN_CFLAGS_$($(BUILD_CLASS)_WARN))
|
||||
WARN_CXXFLAGS = $(WARN_CXXFLAGS_$($(BUILD_CLASS)_WARN))
|
||||
|
||||
# Optimization flags
|
||||
OPT_CPPFLAGS = $(OPT_CPPFLAGS_$($(BUILD_CLASS)_OPT))
|
||||
OPT_CFLAGS = $(OPT_CFLAGS_$($(BUILD_CLASS)_OPT))
|
||||
OPT_CXXFLAGS = $(OPT_CXXFLAGS_$($(BUILD_CLASS)_OPT))
|
||||
|
||||
@@ -267,15 +269,15 @@ OP_SYS_LDFLAGS += $(LDFLAGS_$(COMMANDLINE_LIBRARY))
|
||||
INCLUDES = -I. $(SRC_INCLUDES) $(INSTALL_INCLUDES) $(RELEASE_INCLUDES)\
|
||||
$(TARGET_INCLUDES) $(USR_INCLUDES) $(OP_SYS_INCLUDES) $($(BUILD_CLASS)_INCLUDES)
|
||||
|
||||
CFLAGS = $(CONFORM_CFLAGS) $($(BUILD_CLASS)_CFLAGS) $(OPT_CFLAGS) $(DEBUG_CFLAGS)\
|
||||
CFLAGS = $(CONFORM_CFLAGS) $($(BUILD_CLASS)_CFLAGS) $(POSIX_CFLAGS) $(OPT_CFLAGS) $(DEBUG_CFLAGS)\
|
||||
$(PIPE_CFLAGS) $(WARN_CFLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS)\
|
||||
$(CODE_CFLAGS) $(STATIC_CFLAGS) $(OP_SYS_CFLAGS) $(LIBRARY_SRC_CFLAGS)
|
||||
|
||||
CXXFLAGS = $(CONFORM_CXXFLAGS) $($(BUILD_CLASS)_CXXFLAGS) $(OPT_CXXFLAGS) $(DEBUG_CXXFLAGS)\
|
||||
CXXFLAGS = $(CONFORM_CXXFLAGS) $($(BUILD_CLASS)_CXXFLAGS) $(POSIX_CXXFLAGS) $(OPT_CXXFLAGS) $(DEBUG_CXXFLAGS)\
|
||||
$(PIPE_CFLAGS) $(WARN_CXXFLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS)\
|
||||
$(CODE_CXXFLAGS) $(STATIC_CXXCFLAGS) $(OP_SYS_CXXFLAGS) $(LIBRARY_SRC_CFLAGS)
|
||||
|
||||
LDFLAGS = $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) \
|
||||
LDFLAGS = $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(POSIX_LDFLAGS) \
|
||||
$(ARCH_DEP_LDFLAGS) $(DEBUG_LDFLAGS) $(OP_SYS_LDFLAGS) $($(BUILD_CLASS)_LDFLAGS)\
|
||||
$(RUNTIME_LDFLAGS) $(CODE_LDFLAGS)
|
||||
|
||||
@@ -283,6 +285,7 @@ LDLIBS = $(STATIC_LDLIBS)\
|
||||
$(POSIX_LDLIBS) $(ARCH_DEP_LDLIBS) $(DEBUG_LDLIBS) $(OP_SYS_LDLIBS) $(GNU_LDLIBS_$(GNU))
|
||||
|
||||
CPPFLAGS += $(CONFORM_CPPFLAGS) $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS)\
|
||||
$(OPT_CPPFLAGS) $(DEBUG_CPPFLAGS) $(WARN_CPPFLAGS)\
|
||||
$(BASE_CPPFLAGS) $(TARGET_CPPFLAGS) $(USR_CPPFLAGS) $(ARCH_DEP_CPPFLAGS)\
|
||||
$(OP_SYS_CPPFLAGS) $(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS)
|
||||
|
||||
|
||||
@@ -56,9 +56,6 @@ INSTALL_CFG = $(INSTALL_LOCATION)/cfg
|
||||
FILE_TYPE += EDL
|
||||
INSTALL_EDL = $(INSTALL_LOCATION)/edl
|
||||
|
||||
FILE_TYPE += IDL
|
||||
INSTALL_IDL = $(INSTALL_LOCATION_LIB)/idl
|
||||
|
||||
FILE_TYPE += PERL_MODULES
|
||||
INSTALL_PERL_MODULES = $(INSTALL_LOCATION_LIB)/perl
|
||||
|
||||
|
||||
@@ -30,15 +30,14 @@
|
||||
# linux-x86 (GNU compiler used for host builds)
|
||||
# linux-x86_64 (GNU compiler used for host builds)
|
||||
# linux-x86-borland (Borland C++ compiler used for host builds)
|
||||
# solaris-sparc (sun compiler used for host builds)
|
||||
# solaris-sparc (Sun compiler used for host builds)
|
||||
# solaris-sparc-gnu (GNU compiler used for host builds)
|
||||
# solaris-sparc64 (sun compiler used for host builds)
|
||||
# solaris-sparc64 (Sun compiler used for host builds)
|
||||
# solaris-sparc64-gnu (GNU compiler used for host builds)
|
||||
# solaris-x86 (sun compiler used for host builds)
|
||||
# solaris-x86 (Sun compiler used for host builds)
|
||||
# solaris-x86-gnu (GNU compiler used for host builds)
|
||||
# win32-x86 (MS Visual C++ compiler used for host builds)
|
||||
# win32-x86-mingw (MinGW compiler used for host builds)
|
||||
# win32-x86-borland (Borland C++ compiler used for host builds)
|
||||
# win32-x86-cygwin (WIN32 API with cygwin GNU compiler used for host builds)
|
||||
|
||||
# Debugging builds
|
||||
@@ -56,15 +55,18 @@
|
||||
# The cross-compiler architectures to build EPICS for
|
||||
#
|
||||
# Currently Supporting:
|
||||
# linux-386 (linux-x86 host)
|
||||
# linux-486 (linux-x86 host)
|
||||
# linux-586 (linux-x86 host)
|
||||
# linux-686 (linux-x86 host)
|
||||
# linux-athlon (linux-x86 host)
|
||||
# linux-cris (Axis GNU crosscompiler on linux-x86 host)
|
||||
# linux-cris_v10 (Axis GNU crosscompiler on linux-x86 host)
|
||||
# linux-cris_v32 (Axis GNU crosscompiler on linux-x86 host)
|
||||
# linux-386 (linux-x86 host)
|
||||
# linux-486 (linux-x86 host)
|
||||
# linux-586 (linux-x86 host)
|
||||
# linux-686 (linux-x86 host)
|
||||
# linux-arm
|
||||
# linux-arm_eb
|
||||
# linux-arm_el
|
||||
# linux-athlon (linux-x86 host)
|
||||
# linux-cris (Axis GNU crosscompiler on linux-x86 host)
|
||||
# linux-cris_v10 (Axis GNU crosscompiler on linux-x86 host)
|
||||
# linux-cris_v32 (Axis GNU crosscompiler on linux-x86 host)
|
||||
# linux-xscale_be
|
||||
# vxWorks-486
|
||||
# vxWorks-68040
|
||||
# vxWorks-68040lc
|
||||
@@ -76,10 +78,13 @@
|
||||
# vxWorks-ppc604_long
|
||||
# vxWorks-ppc604_altivec
|
||||
# vxWorks-mpc8540
|
||||
# RTEMS-at91rm9200ek
|
||||
# RTEMS-beatnik
|
||||
# RTEMS-gen68360
|
||||
# RTEMS-mcp750
|
||||
# RTEMS-mvme167
|
||||
# RTEMS-mvme2100
|
||||
# RTEMS-mvme3100
|
||||
# RTEMS-mvme5500
|
||||
# RTEMS-pc386
|
||||
# RTEMS-psim
|
||||
|
||||
@@ -33,15 +33,15 @@
|
||||
# where the start and end are mmddhh - that is month,day,hour
|
||||
# eg EPICS_TIMEZONE=CUS::360:033102:102802
|
||||
#
|
||||
# DST for 2007 US: Mar 11 - Nov 04
|
||||
# EU: Mar 25 - Oct 28
|
||||
# DST for 2008 US: Mar 09 - Nov 02
|
||||
# EU: Mar 30 - Oct 26
|
||||
# (see: http://www.worldtimezone.org/daylight.html)
|
||||
#
|
||||
# EPICS_TS_NTP_INET
|
||||
# NTP or Unix time server ip address. Uses boot host if not set.
|
||||
|
||||
EPICS_TIMEZONE=CUS::360:031102:110402
|
||||
#EPICS_TIMEZONE=MET::-60:032502:102802
|
||||
EPICS_TIMEZONE=CUS::360:030902:110202
|
||||
#EPICS_TIMEZONE=MET::-60:033002:102602
|
||||
EPICS_TS_NTP_INET=
|
||||
|
||||
# IOC Shell:
|
||||
|
||||
@@ -16,7 +16,8 @@ ARCH_CLASS = alpha
|
||||
CODE_CPPFLAGS =
|
||||
|
||||
POSIX_CPPFLAGS += -pthread -ieee
|
||||
POSIX_LDFLAGS += -pthread -ieee
|
||||
# Unknown reason why this doesn't work in POSIX_LDFLAGS:
|
||||
POSIX_LDLIBS += -pthread -ieee
|
||||
|
||||
OP_SYS_CPPFLAGS += -D_OSF_SOURCE
|
||||
OP_SYS_LDLIBS += -lrt
|
||||
|
||||
@@ -48,10 +48,11 @@ USE_STLPORT=NO
|
||||
OP_SYS_CFLAGS+=$(STLPORT_CFLAGS_$(USE_STLPORT))
|
||||
OP_SYS_LDFLAGS+=$(STLPORT_CFLAGS_$(USE_STLPORT))
|
||||
|
||||
# OS libraries used when generating shared libraries or static binaries
|
||||
OP_SYS_LDLIBS += -lsocket -lnsl
|
||||
OP_SYS_LDLIBS_8 += -lCrun -lc
|
||||
OP_SYS_LDLIBS_9 += -lCrun -lc
|
||||
OP_SYS_LDLIBS_10 += -lCrun -lc
|
||||
OP_SYS_LDLIBS_9 += -lumem -lCrun -lc
|
||||
OP_SYS_LDLIBS_10 += -lumem -lCrun -lc
|
||||
OP_SYS_LDLIBS += $(OP_SYS_LDLIBS_$(SOLARIS_VERSION))
|
||||
OP_SYS_LDLIBS += $(STLPORT_LDLIBS_$(USE_STLPORT))
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
# Sites may override these definitions in CONFIG_SITE.darwin-ppc.darwin-ppc-debug
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/CONFIG.Common.darwin-ppc
|
||||
include $(CONFIG)/os/CONFIG.darwin-ppc.darwin-ppc
|
||||
-include $(CONFIG)/os/CONFIG.Common.darwin-ppc
|
||||
-include $(CONFIG)/os/CONFIG.darwin-ppc.darwin-ppc
|
||||
|
||||
# This will cause build failure when used with make -j option
|
||||
#BUILD_CLASS = HOST
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
# Sites may override these definitions in CONFIG_SITE.darwin-x86.darwin-x86-debug
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/CONFIG.Common.darwin-x86
|
||||
include $(CONFIG)/os/CONFIG.darwin-x86.darwin-x86
|
||||
-include $(CONFIG)/os/CONFIG.Common.darwin-x86
|
||||
-include $(CONFIG)/os/CONFIG.darwin-x86.darwin-x86
|
||||
|
||||
# This will cause build failure when used with make -j option
|
||||
#BUILD_CLASS = HOST
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# Sites may override these definitions in CONFIG_SITE.solaris-x86.solaris-x86-debug
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/Common.solaris-x86
|
||||
include $(CONFIG)/os/CONFIG.Common.solaris-x86
|
||||
include $(CONFIG)/os/CONFIG.solaris-x86.solaris-x86
|
||||
|
||||
#BUILD_CLASS = HOST
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# CONFIG.solaris-x86-debug.solaris-x86-debug
|
||||
# CONFIG.win32-x86-debug.win32-x86-debug
|
||||
#
|
||||
# $Id$
|
||||
# This file is maintained by the build community.
|
||||
#
|
||||
# Definitions for solaris-x86 debug compiler host - solaris-x86 debug compiler target builds
|
||||
# Sites may override these definitions in CONFIG_SITE.solaris-x86-debug.solaris-x86-debug
|
||||
# Definitions for win32-x86 debug compiler host - win32-x86 debug compiler target builds
|
||||
# Sites may override these definitions in CONFIG_SITE.win32-x86-debug.win32-x86-debug
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# Sites may override these definitions in CONFIG_SITE.win32-x86.win32-x86-debug
|
||||
#-------------------------------------------------------
|
||||
|
||||
include $(CONFIG)/os/CONFIG.Common.win32-x86
|
||||
-include $(CONFIG)/os/CONFIG.Common.win32-x86
|
||||
include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
|
||||
|
||||
GNU = NO
|
||||
|
||||
@@ -6,16 +6,3 @@
|
||||
# Only the local epics system manager should modify this file
|
||||
#-------------------------------------------------------
|
||||
|
||||
# JBA test override values
|
||||
#CMPLR_SUFFIX=
|
||||
#GNU_TARGET=m68k-wrs-vxworks
|
||||
#CMPLR_PREFIX=$(addsuffix -,$(GNU_TARGET))
|
||||
|
||||
# ORNL SNS overrides for cross compilers
|
||||
#VX_DIR_YES = /opt/tornado20/
|
||||
#VX_CONFIG_DIR_YES = $(VX_DIR)/target/config
|
||||
#VX_INCLUDE_YES = /usr/local/crossgcc/m68k/m68k-wrs-vxworks/sys-include
|
||||
#VX_GNU_YES = /usr/local/crossgcc/m68k/
|
||||
#VX_GNU_BIN_YES = $(VX_GNU)/bin
|
||||
#VX_GNU_LIB_YES = /usr/local/crossgcc/m68k/lib/gcc-lib/m68k-wrs-vxworks/2.95.2
|
||||
|
||||
|
||||
@@ -6,9 +6,4 @@
|
||||
# Definitions for linux-x86 host - vxWorks target builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Example override lines for user built cross-compiler
|
||||
#GNU_DIR=/home/phoebus/JBA/gnu
|
||||
#GNU_TARGET_INCLUDE_DIR=$(GNU_DIR)/$(GNU_TARGET)/include
|
||||
#CMPLR_SUFFIX=
|
||||
#CMPLR_PREFIX=$(addsuffix -,$(GNU_TARGET))
|
||||
|
||||
|
||||
@@ -6,16 +6,3 @@
|
||||
# Only the local epics system manager should modify this file
|
||||
#-------------------------------------------------------
|
||||
|
||||
# JBA test override values
|
||||
#CMPLR_SUFFIX=
|
||||
#GNU_TARGET=m68k-wrs-vxworks
|
||||
#CMPLR_PREFIX=$(addsuffix -,$(GNU_TARGET))
|
||||
|
||||
# ORNL SNS overrides for cross compilers
|
||||
#VX_DIR = /opt/tornado20/
|
||||
#VX_CONFIG_DIR_YES = $(VX_DIR)/target/config
|
||||
#VX_INCLUDE_YES = /usr/local/crossgcc/m68k/m68k-wrs-vxworks/sys-include
|
||||
#VX_GNU_YES = /usr/local/crossgcc/m68k/
|
||||
#VX_GNU_BIN_YES = $(VX_GNU)/bin
|
||||
#VX_GNU_LIB_YES = /usr/local/crossgcc/m68k/lib/gcc-lib/m68k-wrs-vxworks/2.95.2
|
||||
|
||||
|
||||
@@ -4,33 +4,35 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>Known Problems R3.14.x</title>
|
||||
<meta name="GENERATOR" content="amaya 5.1" />
|
||||
<title>Known Problems R3.14.10-RC1</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 style="text-align: center">EPICS Base R3.14.9: Known Problems</h1>
|
||||
<h1 style="text-align: center">EPICS Base R3.14.10: Known Problems</h1>
|
||||
|
||||
<ul>
|
||||
<li>It is not possible to build this version of base on HP-UX due to C++
|
||||
issues which appear to be bugs in the HP-UX compiler.</li>
|
||||
<li>Parallel make (<tt>make -j</tt>) does not work on cygwin-x86 targets,
|
||||
probably due to a missing dependency in the EPICS build rules.</li>
|
||||
|
||||
<li>When shutting down an IOC on a recent version of GNU/Linux (one that
|
||||
includes the NPTL threading library) various messages may appear, such as:
|
||||
<li>Some older Perl versions do not properly install the xsubpp program. This
|
||||
will prevent the build in src/cap5 from completing — the build will
|
||||
finish with an error like this:
|
||||
|
||||
<blockquote>
|
||||
<pre>FATAL: exception not rethrown</pre></blockquote>
|
||||
<blockquote><pre>/bin/sh: /bin/xsubpp: not found
|
||||
make[3]: *** [Cap5.c] Error 1
|
||||
make[3]: Leaving directory `/home/phoebus3/ANJ/epics/base/3-14-dev/src/cap5/O.solaris-x86'
|
||||
make[2]: *** [install.solaris-x86] Error 2
|
||||
make[2]: Leaving directory `/home/phoebus3/ANJ/epics/base/3-14-dev/src/cap5'
|
||||
make[1]: *** [cap5.install] Error 2
|
||||
make[1]: Leaving directory `/home/phoebus3/ANJ/epics/base/3-14-dev/src'
|
||||
make: *** [src.install] Error 2</pre></blockquote>
|
||||
|
||||
<blockquote>
|
||||
<pre>epicsThread: Unknown C++ exception in thread "CAC-UDP" at ...</pre>
|
||||
<pre>terminate called after throwing an instance of ''</pre>
|
||||
</blockquote>
|
||||
As long as you don't intend to use the Perl5 CA interface this error is
|
||||
harmless, as cap5 is the last directory to be compiled in Base. If you need
|
||||
the Perl5 CA inteface, fix your Perl installation so that the perl binary
|
||||
and the xsubpp program (or soft links to them) are both found in the same
|
||||
directory.</li>
|
||||
|
||||
These errors are caused by the implementation of the pthread_cancel()
|
||||
mechanism in NPTL, which uses the C++ exception mechanism without providing
|
||||
any means to distinguish the cancel exception to regular C++ exception
|
||||
handlers. It is possible that they might also occur when a CA client
|
||||
application exits (or closes its connection to the CA library).</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -39,16 +39,19 @@ Supported platforms
|
||||
configuration files in the configure/os directory and then make changes
|
||||
for your new platforms.
|
||||
|
||||
Host platforms (operating system - architecture - <alternate c++ compiler>)
|
||||
Host platforms (operating system - architecture [- alternate toolset])
|
||||
|
||||
aix-ppc
|
||||
aix-ppc-gnu
|
||||
cygwin-x86
|
||||
darwin-ppc (Mac OS X)
|
||||
darwin-ppc
|
||||
darwin-x86
|
||||
darwin-ppcx86
|
||||
freebsd-x86
|
||||
freebsd-x86_64
|
||||
hpux-parisc
|
||||
hpux-parisc-gnu
|
||||
linux-ppc
|
||||
linux-ppc-bgl
|
||||
linux-x86
|
||||
linux-x86_64
|
||||
linux-x86-borland
|
||||
@@ -59,25 +62,23 @@ Supported platforms
|
||||
solaris-x86
|
||||
solaris-x86-gnu
|
||||
win32-x86
|
||||
win32-x86-borland
|
||||
win32-x86-cygwin
|
||||
win32-x86-mingw
|
||||
|
||||
Debugging builds
|
||||
|
||||
linux-x86-debug
|
||||
linux-x86_64-debug
|
||||
solaris-sparc-debug
|
||||
win32-x86-debug
|
||||
win32-x86-cygwin
|
||||
|
||||
Cross compile target platforms (operating system - architecture)
|
||||
|
||||
linux-386 (linux-x86 host)
|
||||
linux-486 (linux-x86 host)
|
||||
linux-586 (linux-x86 host)
|
||||
linux-686 (linux-x86 host)
|
||||
linux-althon (linux-x86 host)
|
||||
linuxRT-mvme2100
|
||||
linux-386
|
||||
linux-486
|
||||
linux-586
|
||||
linux-686
|
||||
linux-arm
|
||||
linux-arm_eb
|
||||
linux-arm_el
|
||||
linux-athlon
|
||||
linux-cris
|
||||
linux-cris_v10
|
||||
linux-cris_v32
|
||||
linux-xscale_be
|
||||
vxWorks-486
|
||||
vxWorks-68040
|
||||
vxWorks-68040lc
|
||||
@@ -87,19 +88,20 @@ Supported platforms
|
||||
vxWorks-ppc603_long
|
||||
vxWorks-ppc604
|
||||
vxWorks-ppc604_long
|
||||
vxWorks6-mv2100
|
||||
vxWorks6-mv5100
|
||||
vxWorks-ppc604_altivec
|
||||
vxWorks-mpc8540
|
||||
RTEMS-at91rm9200ek
|
||||
RTEMS-beatnik
|
||||
RTEMS-gen68360
|
||||
RTEMS-mcp750
|
||||
RTEMS-mvme167
|
||||
RTEMS-mvme2100
|
||||
RTEMS-mvme3100
|
||||
RTEMS-mvme5500
|
||||
RTEMS-pc386
|
||||
RTEMS-psim
|
||||
RTEMS-uC5282
|
||||
|
||||
Debugging builds
|
||||
|
||||
vxWorks-68040-debug
|
||||
|
||||
Supported compilers
|
||||
|
||||
This version of EPICS base has been built and tested using the host
|
||||
@@ -116,7 +118,7 @@ Software requirements
|
||||
path so that a gnumake version 3.81 or later is available.
|
||||
|
||||
Perl
|
||||
You must have perl version 5.6 or later installed. The configure files do
|
||||
You must have perl version 5.8 or later installed. The configure files do
|
||||
not specify the perl full pathname. You need the perl executable in
|
||||
your search path.
|
||||
|
||||
|
||||
@@ -55,86 +55,73 @@ to create and add the appropriate new configure files to the base/configure/os/d
|
||||
You can start by copying existing configuration files in the configure/os
|
||||
directory and then make changes for your new platforms.</blockquote>
|
||||
|
||||
<blockquote><b>Host platforms (operating system - architecture - <alternate
|
||||
c++ compiler>)</b>
|
||||
<blockquote>
|
||||
<h4>Host platforms (operating system - architecture [- alternate toolset])</h4>
|
||||
|
||||
<blockquote>
|
||||
<tt>aix-ppc</tt>
|
||||
<br><tt>aix-ppc-gnu</tt>
|
||||
<br><tt>cygwin-x86</tt>
|
||||
<br><tt>darwin-ppc (Mac OS X)</tt>
|
||||
<br><tt>hpux-parisc</tt>
|
||||
<br><tt>hpux-parisc-gnu</tt>
|
||||
<br><tt>linux-ppc</tt>
|
||||
<br><tt>linux-ppc-bgl</tt>
|
||||
<br><tt>linux-x86</tt>
|
||||
<br><tt>linux-x86_64</tt>
|
||||
<br><tt>linux-x86-borland</tt>
|
||||
<br><tt>solaris-sparc</tt>
|
||||
<br><tt>solaris-sparc-gnu</tt>
|
||||
<br><tt>solaris-sparc64</tt>
|
||||
<br><tt>solaris-sparc64-gnu</tt>
|
||||
<br><tt>solaris-x86</tt>
|
||||
<br><tt>solaris-x86-gnu</tt>
|
||||
<br><tt>win32-x86</tt>
|
||||
<br><tt>win32-x86-borland</tt>
|
||||
<br><tt>win32-x86-cygwin</tt>
|
||||
<br><tt>win32-x86-mingw</tt>
|
||||
</blockquote>
|
||||
<pre>aix-ppc
|
||||
aix-ppc-gnu
|
||||
cygwin-x86
|
||||
darwin-ppc
|
||||
darwin-x86
|
||||
darwin-ppcx86
|
||||
freebsd-x86
|
||||
freebsd-x86_64
|
||||
hpux-parisc
|
||||
hpux-parisc-gnu
|
||||
linux-ppc
|
||||
linux-x86
|
||||
linux-x86_64
|
||||
linux-x86-borland
|
||||
solaris-sparc
|
||||
solaris-sparc-gnu
|
||||
solaris-sparc64
|
||||
solaris-sparc64-gnu
|
||||
solaris-x86
|
||||
solaris-x86-gnu
|
||||
win32-x86
|
||||
win32-x86-mingw
|
||||
win32-x86-cygwin
|
||||
</pre></blockquote>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<blockquote><b>Debugging builds</b>
|
||||
|
||||
<blockquote>
|
||||
<tt>linux-x86-debug</tt>
|
||||
<br><tt>linux-x86_64-debug</tt>
|
||||
<br><tt>solaris-sparc-debug</tt>
|
||||
<br><tt>win32-x86-debug</tt>
|
||||
</blockquote>
|
||||
|
||||
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
<h4>
|
||||
Cross compile target platforms (operating system - architecture)</h4>
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
<blockquote>
|
||||
<tt>linux-386 (linux-x86 host)</tt>
|
||||
<br><tt>linux-486 (linux-x86 host)</tt>
|
||||
<br><tt>linux-586 (linux-x86 host)</tt>
|
||||
<br><tt>linux-686 (linux-x86 host)</tt>
|
||||
<br><tt>linux-althon (linux-x86 host)</tt>
|
||||
<br><tt>linuxRT-mvme2100</tt>
|
||||
<br><tt>vxWorks-486</tt>
|
||||
<br><tt>vxWorks-68040</tt>
|
||||
<br><tt>vxWorks-68040lc</tt>
|
||||
<br><tt>vxWorks-68060</tt>
|
||||
<br><tt>vxWorks-pentium</tt>
|
||||
<br><tt>vxWorks-ppc603</tt>
|
||||
<br><tt>vxWorks-ppc603_long</tt>
|
||||
<br><tt>vxWorks-ppc604</tt>
|
||||
<br><tt>vxWorks-ppc604_long</tt>
|
||||
<br><tt>vxWorks6-mv2100</tt>
|
||||
<br><tt>vxWorks6-mv5100</tt>
|
||||
<br><tt>RTEMS-gen68360</tt>
|
||||
<br><tt>RTEMS-mcp750</tt>
|
||||
<br><tt>RTEMS-mvme167</tt>
|
||||
<br><tt>RTEMS-pc386</tt>
|
||||
<br><tt>RTEMS-psim</tt>
|
||||
<br><tt>RTEMS-uC5282</tt>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
<blockquote><b>Debugging builds</b>
|
||||
<blockquote>
|
||||
<tt>vxWorks-68040-debug</tt>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
<pre>linux-386
|
||||
linux-486
|
||||
linux-586
|
||||
linux-686
|
||||
linux-arm
|
||||
linux-arm_eb
|
||||
linux-arm_el
|
||||
linux-athlon
|
||||
linux-cris
|
||||
linux-cris_v10
|
||||
linux-cris_v32
|
||||
linux-xscale_be
|
||||
vxWorks-486
|
||||
vxWorks-68040
|
||||
vxWorks-68040lc
|
||||
vxWorks-68060
|
||||
vxWorks-pentium
|
||||
vxWorks-ppc603
|
||||
vxWorks-ppc603_long
|
||||
vxWorks-ppc604
|
||||
vxWorks-ppc604_long
|
||||
vxWorks-ppc604_altivec
|
||||
vxWorks-mpc8540
|
||||
RTEMS-at91rm9200ek
|
||||
RTEMS-beatnik
|
||||
RTEMS-gen68360
|
||||
RTEMS-mcp750
|
||||
RTEMS-mvme167
|
||||
RTEMS-mvme2100
|
||||
RTEMS-mvme3100
|
||||
RTEMS-mvme5500
|
||||
RTEMS-pc386
|
||||
RTEMS-psim
|
||||
RTEMS-uC5282
|
||||
</pre></blockquote>
|
||||
|
||||
<h3>
|
||||
Supported compilers</h3>
|
||||
@@ -155,7 +142,7 @@ path so that a gnumake version 3.81 or later is available.
|
||||
<p><b>gcc</b>
|
||||
<br>You must have gcc version 3.4.2 or later.
|
||||
<p><b>Perl</b>
|
||||
<br>You must have perl version 5.6 or later installed. The configure files
|
||||
<br>You must have perl version 5.8 or later installed. The configure files
|
||||
do not specify the perl full pathname. You need the perl executable
|
||||
in your search path.
|
||||
<p><b>Unzip and tar (Winzip on WIN32 systems)</b>
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
<h2 align="center">Changes between 3.14.9 and 3.14.10</h2>
|
||||
<!-- Insert new items below here ... -->
|
||||
|
||||
<h4>epicsRingPointer, epicsRingBytes</h4>
|
||||
|
||||
<p>Fixed race condition exposed by compilers with more agressive optimization.</p>
|
||||
|
||||
<h4>camonitor timestamp support</h4>
|
||||
|
||||
<p>The <tt>camonitor</tt> program now supports the ability to display both
|
||||
@@ -55,11 +59,11 @@ have their own separate report commands.</p>
|
||||
providers in Base. The Unix-like architectures rely on the underlying operating
|
||||
system clock, which normally involves running something like ntpd as a separate
|
||||
process. The real-time operating systems vxWorks and RTEMS install two Current
|
||||
Time providers; the native OS Clock at the lowest priority (this provider
|
||||
includes a task to periodically reset the OS Clock from a higher priority time
|
||||
provider), and an NTP time provider which synchronizes the underlying OS' tick
|
||||
Time providers; the native operating system clock at the lowest priority (this provider
|
||||
includes a task to periodically reset the operating system clock from a higher priority time
|
||||
provider), and an NTP time provider which synchronizes the underlying operating sytem tick
|
||||
timer with an NTP server. Microsoft Windows targets using the Win32 API use a
|
||||
Windows-specific time provider which contains a built-in PLL</p>
|
||||
Windows-specific time provider which contains a built-in PLL.</p>
|
||||
|
||||
<p>There are no Event Time providers included with Base except for an optional
|
||||
"Last Resort" Event provider which can be installed if a site wants to be sure
|
||||
@@ -217,7 +221,7 @@ noticed that an empty string converts to the value 0 for all types other than
|
||||
character <tt>'0'</tt>, value 0x30. Since these types are usually used for
|
||||
storing small integers or boolean values rather than ASCII characters, it was
|
||||
decided that this conversion is wrong so it has been changed to match the other
|
||||
nmeric conversions.</p>
|
||||
numeric conversions.</p>
|
||||
|
||||
<h4>epicsShareAPI deprecated inside IOC</h4>
|
||||
|
||||
@@ -236,10 +240,10 @@ implementations have been converted from K&R to ANSI C prototypes.</p>
|
||||
<h4>Added Perl5 CA library</h4>
|
||||
|
||||
<p>Base now provides a CA client library interface for Perl5 scripts in
|
||||
<tt>src/cap5</tt> and includes some alternative implementations of the catools
|
||||
programs written in Perl (for demonstration purposes mainly). Documentation on
|
||||
how to use the library is available in html/CA.html after the build
|
||||
completes.</p>
|
||||
<tt>src/cap5</tt> and includes as examples some implementations of the catools
|
||||
programs written in Perl. Documentation on how to use the Perl library is
|
||||
available in <tt>base/html/CA.html</tt> after the build completes. This library
|
||||
cannot currently be built on Windows targets.</p>
|
||||
|
||||
<h4>IOC ignores SIGHUP</h4>
|
||||
|
||||
@@ -333,6 +337,7 @@ although the core developers lack the ability to test all of them:</p>
|
||||
<li>linux-cris_v32</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>linux-xscale_be (tested with MOXA UC-7408 Plus)
|
||||
</ul>
|
||||
|
||||
<h4>Added compile line header search directories</h4>
|
||||
@@ -402,7 +407,7 @@ settting.</p>
|
||||
|
||||
<p>The -ansi flag has been removed from CONFORM_FLAGS_STRICT and
|
||||
CONFORM_CXXFLAGS_STRICT -- there are many useful library functions whose
|
||||
prototypes are disabled when -ansi is used..</p>
|
||||
prototypes are disabled when -ansi is used.</p>
|
||||
|
||||
<h4>SEL record (Mantis #295)</h4>
|
||||
|
||||
|
||||
@@ -116,6 +116,8 @@ private:
|
||||
epicsUInt8 buf [ comBufSize ];
|
||||
void * operator new ( size_t size );
|
||||
void operator delete ( void * );
|
||||
template < class T >
|
||||
bool push ( const T * ); // disabled
|
||||
};
|
||||
|
||||
inline void * comBuf::operator new ( size_t size,
|
||||
|
||||
@@ -106,10 +106,7 @@ void comQueSend::clear ()
|
||||
|
||||
void comQueSend::copy_dbr_string ( const void * pValue )
|
||||
{
|
||||
// this extra step is required by Borland BCC 5.5
|
||||
const dbr_string_t & str =
|
||||
* static_cast <const dbr_string_t *> ( pValue );
|
||||
this->push ( str );
|
||||
this->push ( static_cast < const char * > ( pValue ), MAX_STRING_SIZE );
|
||||
}
|
||||
|
||||
void comQueSend::copy_dbr_short ( const void * pValue )
|
||||
@@ -186,7 +183,7 @@ const comQueSend::copyScalarFunc_t comQueSend::dbrCopyScalar [39] = {
|
||||
|
||||
void comQueSend::copy_dbr_string ( const void *pValue, unsigned nElem )
|
||||
{
|
||||
this->push ( static_cast <const dbr_string_t *> ( pValue ), nElem );
|
||||
this->push ( static_cast < const char * > ( pValue ), nElem * MAX_STRING_SIZE );
|
||||
}
|
||||
|
||||
void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem )
|
||||
|
||||
@@ -149,6 +149,9 @@ private:
|
||||
this->pushComBuf ( *pComBuf );
|
||||
}
|
||||
|
||||
template < class T >
|
||||
inline void push ( const T * ); // disabled
|
||||
|
||||
comQueSend ( const comQueSend & );
|
||||
comQueSend & operator = ( const comQueSend & );
|
||||
};
|
||||
|
||||
@@ -13,9 +13,6 @@ ifneq ($(findstring darwin,$(T_A)),)
|
||||
LOADABLE_SHRLIB_PREFIX =
|
||||
LOADABLE_SHRLIB_SUFFIX = .bundle
|
||||
endif
|
||||
ifneq ($(findstring win32,$(T_A)),)
|
||||
BAT = .bat
|
||||
endif
|
||||
|
||||
ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),)
|
||||
# Doesn't build on WIN32
|
||||
@@ -43,18 +40,15 @@ endif
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
ifdef T_A
|
||||
PERL5_DIR = $(dir $(shell $(PERL) ../perlConfig.pl perl5))
|
||||
XSUBPP = $(PERL5_DIR)xsubpp$(BAT)
|
||||
PODCHECKER = $(PERL5_DIR)podchecker$(BAT)
|
||||
TYPEMAP = $(shell $(PERL) ../perlConfig.pl privlib)/ExtUtils/typemap
|
||||
EXTUTILS = $(shell $(PERL) ../perlConfig.pl privlib)/ExtUtils
|
||||
|
||||
%.c: ../%.xs
|
||||
$(RM) $@ $@_new
|
||||
$(XSUBPP) -typemap $(TYPEMAP) $< > $@_new && $(MV) $@_new $@
|
||||
$(PERL) $(EXTUTILS)/xsubpp -typemap $(EXTUTILS)/typemap $< > $@_new && $(MV) $@_new $@
|
||||
|
||||
%.html: %.pm
|
||||
%.html: ../%.pm
|
||||
$(RM) $@
|
||||
$(PODCHECKER) $< && pod2html --infile=$< --outfile=$@
|
||||
podchecker $< && pod2html --infile=$< --outfile=$@
|
||||
|
||||
clean::
|
||||
$(RM) Cap5.c
|
||||
|
||||
@@ -256,8 +256,10 @@ int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
|
||||
else
|
||||
{
|
||||
if (reqElems > 1) printf(" %lu ", reqElems);
|
||||
for (i=0; i<reqElems; ++i)
|
||||
printf("%s ", val2str(pvs[n].value, pvs[n].dbrType, i));
|
||||
for (i=0; i<reqElems; ++i) {
|
||||
if (i) printf (" ");
|
||||
printf("%s", val2str(pvs[n].value, pvs[n].dbrType, i));
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
break;
|
||||
@@ -285,8 +287,10 @@ int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
|
||||
printf(" Element count: %lu\n"
|
||||
" Value: ",
|
||||
reqElems);
|
||||
for (i=0; i<reqElems; ++i) /* Print value(s) */
|
||||
printf("%s ", val2str(pvs[n].value, pvs[n].dbrType, i));
|
||||
for (i=0; i<reqElems; ++i) { /* Print value(s) */
|
||||
if (i) printf (" ");
|
||||
printf(" %s", val2str(pvs[n].value, pvs[n].dbrType, i));
|
||||
}
|
||||
printf("\n");
|
||||
if (pvs[n].dbrType > DBR_DOUBLE) /* Extended type extra info */
|
||||
printf("%s\n", dbr2str(pvs[n].value, pvs[n].dbrType));
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* callbackTest.c */
|
||||
/* $Id$ */
|
||||
|
||||
/* Author: Marty Kraimer Date: 26JAN2000 */
|
||||
|
||||
@@ -18,66 +17,107 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "epicsThread.h"
|
||||
#include "errlog.h"
|
||||
#include "callback.h"
|
||||
#include "taskwd.h"
|
||||
#include "cantProceed.h"
|
||||
#include "epicsThread.h"
|
||||
#include "epicsEvent.h"
|
||||
#include "epicsTime.h"
|
||||
#include "epicsUnitTest.h"
|
||||
#include "testMain.h"
|
||||
|
||||
|
||||
#define NCALLBACKS 168
|
||||
#define DELAY_QUANTUM 0.25
|
||||
|
||||
#define TEST_DELAY(i) ((i / NUM_CALLBACK_PRIORITIES) * DELAY_QUANTUM)
|
||||
|
||||
typedef struct myPvt {
|
||||
CALLBACK callback;
|
||||
double requestedDiff;
|
||||
CALLBACK cb1;
|
||||
CALLBACK cb2;
|
||||
epicsTimeStamp start;
|
||||
}myPvt;
|
||||
double delay;
|
||||
int pass;
|
||||
} myPvt;
|
||||
|
||||
epicsEventId finished;
|
||||
|
||||
|
||||
static void myCallback(CALLBACK *pCallback)
|
||||
{
|
||||
myPvt *pmyPvt;
|
||||
epicsTimeStamp end;
|
||||
double diff, error;
|
||||
epicsTimeStamp now;
|
||||
double delay, error;
|
||||
|
||||
callbackGetUser(pmyPvt,pCallback);
|
||||
epicsTimeGetCurrent(&end);
|
||||
diff = epicsTimeDiffInSeconds(&end,&pmyPvt->start);
|
||||
error = fabs(pmyPvt->requestedDiff - diff);
|
||||
testOk(error < 0.05, "callback time error %f", error);
|
||||
epicsTimeGetCurrent(&now);
|
||||
callbackGetUser(pmyPvt, pCallback);
|
||||
|
||||
if (pmyPvt->pass++ == 0) {
|
||||
delay = 0.0;
|
||||
error = epicsTimeDiffInSeconds(&now, &pmyPvt->start);
|
||||
pmyPvt->start = now;
|
||||
callbackRequestDelayed(&pmyPvt->cb2, pmyPvt->delay);
|
||||
} else if (pmyPvt->pass == 2) {
|
||||
double diff = epicsTimeDiffInSeconds(&now, &pmyPvt->start);
|
||||
delay = pmyPvt->delay;
|
||||
error = fabs(delay - diff);
|
||||
} else {
|
||||
testFail("pass = %d for delay = %f", pmyPvt->pass, pmyPvt->delay);
|
||||
return;
|
||||
}
|
||||
testOk(error < 0.05, "delay %f seconds, callback time error %f",
|
||||
delay, error);
|
||||
}
|
||||
|
||||
static void finalCallback(CALLBACK *pCallback)
|
||||
{
|
||||
myCallback(pCallback);
|
||||
epicsEventSignal(finished);
|
||||
}
|
||||
|
||||
#define ncallbacks 5
|
||||
|
||||
MAIN(callbackTest)
|
||||
{
|
||||
myPvt *nowait[ncallbacks];
|
||||
myPvt *wait[ncallbacks];
|
||||
epicsTimeStamp start;
|
||||
myPvt *pcbt[NCALLBACKS];
|
||||
myPvt *pfinal;
|
||||
int i;
|
||||
|
||||
testPlan(ncallbacks * 2);
|
||||
testPlan(NCALLBACKS * 2 + 2);
|
||||
|
||||
taskwdInit();
|
||||
errlogInit(4096);
|
||||
callbackInit();
|
||||
epicsThreadSleep(1.0);
|
||||
for(i=0; i<ncallbacks ; i++) {
|
||||
nowait[i] = calloc(1,sizeof(myPvt));
|
||||
callbackSetCallback(myCallback,&nowait[i]->callback);
|
||||
callbackSetUser(nowait[i],&nowait[i]->callback);
|
||||
callbackSetPriority(i%3,&nowait[i]->callback);
|
||||
epicsTimeGetCurrent(&start);
|
||||
nowait[i]->start = start;
|
||||
nowait[i]->requestedDiff = 0.0;
|
||||
callbackRequest(&nowait[i]->callback);
|
||||
wait[i] = calloc(1,sizeof(myPvt));
|
||||
callbackSetCallback(myCallback,&wait[i]->callback);
|
||||
callbackSetUser(wait[i],&wait[i]->callback);
|
||||
callbackSetPriority(i%3,&wait[i]->callback);
|
||||
epicsTimeGetCurrent(&start);
|
||||
wait[i]->start = start;
|
||||
wait[i]->requestedDiff = (double)i;
|
||||
callbackRequestDelayed(&wait[i]->callback,wait[i]->requestedDiff);
|
||||
|
||||
finished = epicsEventMustCreate(epicsEventEmpty);
|
||||
|
||||
for (i = 0; i < NCALLBACKS ; i++) {
|
||||
pcbt[i] = callocMustSucceed(1, sizeof(myPvt), "pcbt");
|
||||
callbackSetCallback(myCallback, &pcbt[i]->cb1);
|
||||
callbackSetCallback(myCallback, &pcbt[i]->cb2);
|
||||
callbackSetUser(pcbt[i], &pcbt[i]->cb1);
|
||||
callbackSetUser(pcbt[i], &pcbt[i]->cb2);
|
||||
callbackSetPriority(i % NUM_CALLBACK_PRIORITIES, &pcbt[i]->cb1);
|
||||
callbackSetPriority(i % NUM_CALLBACK_PRIORITIES, &pcbt[i]->cb2);
|
||||
pcbt[i]->delay = TEST_DELAY(i);
|
||||
pcbt[i]->pass = 0;
|
||||
}
|
||||
epicsThreadSleep((double)(ncallbacks + 2));
|
||||
|
||||
for (i = 0; i < NCALLBACKS ; i++) {
|
||||
epicsTimeGetCurrent(&pcbt[i]->start);
|
||||
callbackRequest(&pcbt[i]->cb1);
|
||||
}
|
||||
|
||||
pfinal = callocMustSucceed(1, sizeof(myPvt), "final");
|
||||
callbackSetCallback(myCallback, &pfinal->cb1);
|
||||
callbackSetCallback(finalCallback, &pfinal->cb2);
|
||||
callbackSetUser(pfinal, &pfinal->cb1);
|
||||
callbackSetUser(pfinal, &pfinal->cb2);
|
||||
callbackSetPriority(0, &pfinal->cb1);
|
||||
callbackSetPriority(0, &pfinal->cb2);
|
||||
pfinal->delay = TEST_DELAY(NCALLBACKS) + 1.0;
|
||||
pfinal->pass = 0;
|
||||
|
||||
epicsTimeGetCurrent(&pfinal->start);
|
||||
callbackRequest(&pfinal->cb1);
|
||||
|
||||
epicsEventWait(finished);
|
||||
|
||||
return testDone();
|
||||
}
|
||||
|
||||
@@ -77,26 +77,21 @@ include $(TOP)/configure/RULES
|
||||
# not have been installed if we are building for
|
||||
# the first time
|
||||
# -> use explicit reference to the uninstalled files in '..'
|
||||
aitConvert$(OBJ): ../aitConvert.cc aitConvertGenerated.cc\
|
||||
../aitConvert.h ../aitTypes.h
|
||||
|
||||
aitConvert$(OBJ): $(COMMON_DIR)/aitConvertGenerated.cc
|
||||
|
||||
dbMapper$(OBJ): ../gdd.h ../gddI.h ../gddContainer.h ../gddContainerI.h \
|
||||
../gddArray.h ../gddScalar.h ../gddAppTable.h ../dbMapper.h \
|
||||
$(INSTALL_INCLUDE)/gddApps.h ../aitTypes.h ../gddUtils.h ../gddUtilsI.h
|
||||
dbMapper$(OBJ): $(COMMON_DIR)/gddApps.h
|
||||
|
||||
# Rules for generated files
|
||||
#
|
||||
aitConvertGenerated.cc: $(INSTALL_HOST_BIN)/aitGen$(HOSTEXE) aitTypes.h
|
||||
$(INSTALL_HOST_BIN)/aitGen$(HOSTEXE)
|
||||
|
||||
$(COMMON_DIR)/aitConvertGenerated.cc: $(INSTALL_HOST_BIN)/aitGen$(HOSTEXE)
|
||||
$(INSTALL_HOST_BIN)/aitGen$(HOSTEXE) $@
|
||||
|
||||
$(COMMON_DIR)/gddApps.h : $(INSTALL_HOST_BIN)/genApps$(HOSTEXE)
|
||||
$(INSTALL_HOST_BIN)/genApps$(HOSTEXE) $@
|
||||
|
||||
clean::
|
||||
$(RM) aitConvertGenerated.cc gddApps.h
|
||||
|
||||
aitConvert$(OBJ): aitConvertGenerated.cc
|
||||
@$(RM) $(COMMON_DIR)/aitConvertGenerated.cc
|
||||
|
||||
# EOF base/src/gdd/Makefile
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ void MakeStringFuncTo(int i,int j,int k);
|
||||
void MakeFStringFuncFrom(int i,int j,int k);
|
||||
void MakeFStringFuncTo(int i,int j,int k);
|
||||
|
||||
#define FILE_NAME "aitConvertGenerated.cc"
|
||||
#define pr fprintf
|
||||
|
||||
#define AIT_TO_NET 0
|
||||
@@ -116,9 +115,15 @@ int main(int argc,char* argv[])
|
||||
|
||||
initMinMaxAIT ();
|
||||
|
||||
if((dfd=fopen(FILE_NAME,"w"))==NULL)
|
||||
if(argc<2)
|
||||
{
|
||||
pr(stderr,"file %s failed to open\n",FILE_NAME);
|
||||
fprintf(stderr,"You must enter a file name on command line\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if((dfd=fopen(argv[1],"w"))==NULL)
|
||||
{
|
||||
pr(stderr,"file %s failed to open\n",argv[1]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
|
||||
#include <exception>
|
||||
#include <typeinfo>
|
||||
#include <algorithm>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <float.h>
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "epicsAlgorithm.h"
|
||||
#include "epicsTime.h"
|
||||
#include "epicsThread.h"
|
||||
#include "epicsAssert.h"
|
||||
@@ -31,23 +31,6 @@ epicsThreadRunable::~epicsThreadRunable () {}
|
||||
void epicsThreadRunable::run () {}
|
||||
void epicsThreadRunable::show ( unsigned int ) const {}
|
||||
|
||||
// vxWorks 5.4 gcc fails during compile when I use std::exception
|
||||
using namespace std;
|
||||
|
||||
// exception payload
|
||||
class epicsThread::unableToCreateThread : public exception {
|
||||
const char * what () const throw () {
|
||||
return "epicsThread class was unable to create a new thread";
|
||||
}
|
||||
};
|
||||
|
||||
// exception payload
|
||||
class epicsThread::exitException : public exception {
|
||||
const char * what () const throw () {
|
||||
return "epicsThread class's private exit exception";
|
||||
}
|
||||
};
|
||||
|
||||
extern "C" void epicsThreadCallEntryPoint ( void * pPvt )
|
||||
{
|
||||
epicsThread * pThread =
|
||||
@@ -77,7 +60,7 @@ extern "C" void epicsThreadCallEntryPoint ( void * pPvt )
|
||||
// this should behave as the C++ implementation intends when an
|
||||
// exception isnt handled. If users dont like this behavior, they
|
||||
// can install an application specific unexpected handler.
|
||||
unexpected ();
|
||||
std::unexpected ();
|
||||
}
|
||||
}
|
||||
catch ( ... ) {
|
||||
@@ -90,11 +73,14 @@ extern "C" void epicsThreadCallEntryPoint ( void * pPvt )
|
||||
errlogPrintf (
|
||||
"epicsThread: Unknown C++ exception in thread \"%s\" at %s\n",
|
||||
name, date );
|
||||
// this should behave as the C++ implementation intends when an
|
||||
// exception isnt handled. If users dont like this behavior, they
|
||||
// can install an application specific unexpected handler.
|
||||
unexpected ();
|
||||
errlogFlush ();
|
||||
}
|
||||
// The Linux NPTL library requires us to re-throw here; it uses
|
||||
// an untyped exception object to shut down threads when we call
|
||||
// pthread_cancel() in the os/posix/osdThread.c myAtExit()
|
||||
// handler, and aborts with "FATAL: exception not rethrown" if
|
||||
// we don't re-throw it. This solution is incomplete though...
|
||||
throw;
|
||||
}
|
||||
if ( ! waitRelease ) {
|
||||
epicsGuard < epicsMutex > guard ( pThread->mutex );
|
||||
@@ -154,13 +140,13 @@ bool epicsThread::exitWait ( const double delay ) throw ()
|
||||
"epicsThread::exitWait(): Unexpected exception "
|
||||
" \"%s\"\n",
|
||||
except.what () );
|
||||
epicsThreadSleep ( std :: min ( delay, 5.0 ) );
|
||||
epicsThreadSleep ( epicsMin ( delay, 5.0 ) );
|
||||
}
|
||||
catch ( ... ) {
|
||||
errlogPrintf (
|
||||
"Non-standard unexpected exception in "
|
||||
"epicsThread::exitWait()\n" );
|
||||
epicsThreadSleep ( std :: min ( delay, 5.0 ) );
|
||||
epicsThreadSleep ( epicsMin ( delay, 5.0 ) );
|
||||
}
|
||||
return this->terminated;
|
||||
}
|
||||
@@ -283,13 +269,6 @@ void epicsThread::setOkToBlock(bool isOkToBlock) throw ()
|
||||
epicsThreadSetOkToBlock(static_cast<int>(isOkToBlock));
|
||||
}
|
||||
|
||||
class epicsThreadPrivateBase::unableToCreateThreadPrivate : public exception {
|
||||
const char * what () const throw ()
|
||||
{
|
||||
return "epicsThreadPrivate:: unable to create thread private variable";
|
||||
}
|
||||
};
|
||||
|
||||
void epicsThreadPrivateBase::throwUnableToCreateThreadPrivate ()
|
||||
{
|
||||
throw epicsThreadPrivateBase::unableToCreateThreadPrivate ();
|
||||
@@ -334,4 +313,4 @@ extern "C" {
|
||||
} // extern "C"
|
||||
|
||||
// Ensure the main thread gets a unique ID
|
||||
static epicsThreadId epicsThreadMainId = epicsThreadGetIdSelf();
|
||||
epicsThreadId epicsThreadMainId = epicsThreadGetIdSelf();
|
||||
|
||||
@@ -156,7 +156,9 @@ public:
|
||||
static const char * getNameSelf () throw ();
|
||||
static bool isOkToBlock () throw ();
|
||||
static void setOkToBlock ( bool isOkToBlock ) throw ();
|
||||
class unableToCreateThread; /* exception payload */
|
||||
|
||||
/* exceptions */
|
||||
class unableToCreateThread {};
|
||||
private:
|
||||
epicsThreadRunable & runable;
|
||||
epicsThreadId id;
|
||||
@@ -173,12 +175,13 @@ private:
|
||||
epicsThread & operator = ( const epicsThread & );
|
||||
friend void epicsThreadCallEntryPoint ( void * );
|
||||
|
||||
class exitException; /* exception payload */
|
||||
/* exceptions */
|
||||
class exitException {};
|
||||
};
|
||||
|
||||
class epicsShareClass epicsThreadPrivateBase {
|
||||
public:
|
||||
class unableToCreateThreadPrivate; /* exception */
|
||||
class unableToCreateThreadPrivate {}; /* exception */
|
||||
protected:
|
||||
static void throwUnableToCreateThreadPrivate ();
|
||||
};
|
||||
|
||||
@@ -793,13 +793,17 @@ epicsShareFunc void epicsShareAPI epicsThreadSleep ( double seconds )
|
||||
* epicsThreadSleepQuantum ()
|
||||
*/
|
||||
double epicsShareAPI epicsThreadSleepQuantum ()
|
||||
{
|
||||
{
|
||||
/*
|
||||
* Its worth noting here that the sleep quantum on windows can
|
||||
* mysteriously get better. I eventually tracked this down to
|
||||
* codes that call timeBeginPeriod(1). Calling timeBeginPeriod()
|
||||
* specifying a better timer resolution also increases the interrupt
|
||||
* load. This appears to be related to java applet activity.
|
||||
* The function timeGetDevCaps can tell us the range of periods
|
||||
* that can be specified to timeBeginPeriod, but alas there
|
||||
* appears to be no way to find out what the value of the global
|
||||
* minimum of all timeBeginPeriod calls for all processes is.
|
||||
*/
|
||||
static const double secPerTick = 100e-9;
|
||||
DWORD adjustment;
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
//
|
||||
// Default version of osdWireConfig.h that might
|
||||
// work on UNIX like systems that define <sys/param.h>
|
||||
//
|
||||
// Author Jeffrey O. Hill
|
||||
// johill@lanl.gov
|
||||
//
|
||||
/*
|
||||
* Default version of osdWireConfig.h that might
|
||||
* work on UNIX like systems that define <sys/param.h>
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
*/
|
||||
|
||||
#ifndef osdWireConfig_h
|
||||
#define osdWireConfig_h
|
||||
|
||||
// if compilation fails because this wasnt found then you may need to define an OS
|
||||
// specific osdWireConfig.h
|
||||
/* This file must be usable from both C and C++ */
|
||||
|
||||
/* if compilation fails because this wasnt found then you may need to define an OS
|
||||
specific osdWireConfig.h */
|
||||
#include <sys/param.h>
|
||||
|
||||
#ifdef __BYTE_ORDER
|
||||
@@ -53,10 +55,10 @@
|
||||
# error EPICS hasnt been ported to <sys/param.h> specified FLOAT_WORD_ORDER
|
||||
# endif
|
||||
# else
|
||||
// assume that if neither __FLOAT_WORD_ORDER nor FLOAT_WORD_ORDER are
|
||||
// defined then weird fp ordered archs like arm nwfp aren't supported
|
||||
/* assume that if neither __FLOAT_WORD_ORDER nor FLOAT_WORD_ORDER are
|
||||
defined then weird fp ordered archs like arm nwfp aren't supported */
|
||||
# define EPICS_FLOAT_WORD_ORDER EPICS_BYTE_ORDER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // ifdef osdWireConfig_h
|
||||
#endif /* ifdef osdWireConfig_h */
|
||||
|
||||
@@ -22,20 +22,28 @@
|
||||
#include "cantProceed.h"
|
||||
#include "epicsRingBytes.h"
|
||||
|
||||
/*
|
||||
* Need at least one extra byte to be able to distinguish a completely
|
||||
* full buffer from a completely empty one. Allow for a little extra
|
||||
* space to try and keep good alignment and avoid multiple calls to
|
||||
* memcpy for a single put/get operation.
|
||||
*/
|
||||
#define SLOP 16
|
||||
|
||||
typedef struct ringPvt {
|
||||
int nextPut;
|
||||
int nextGet;
|
||||
int size;
|
||||
char *buffer;
|
||||
volatile int nextPut;
|
||||
volatile int nextGet;
|
||||
int size;
|
||||
volatile char *buffer;
|
||||
}ringPvt;
|
||||
|
||||
|
||||
epicsShareFunc epicsRingBytesId epicsShareAPI epicsRingBytesCreate(int size)
|
||||
{
|
||||
ringPvt *pring = mallocMustSucceed(sizeof(ringPvt),"epicsRingBytesCreate");
|
||||
pring->size = size + 1;
|
||||
pring->size = size + SLOP;
|
||||
pring->buffer = mallocMustSucceed(pring->size,"ringCreate");
|
||||
pring->nextGet = pring->nextPut = 0;
|
||||
pring->nextGet = 0;
|
||||
pring->nextPut = 0;
|
||||
return((void *)pring);
|
||||
}
|
||||
|
||||
@@ -45,7 +53,7 @@ epicsShareFunc void epicsShareAPI epicsRingBytesDelete(epicsRingBytesId id)
|
||||
free((void *)pring->buffer);
|
||||
free((void *)pring);
|
||||
}
|
||||
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsRingBytesGet(
|
||||
epicsRingBytesId id, char *value,int nbytes)
|
||||
{
|
||||
@@ -59,19 +67,21 @@ epicsShareFunc int epicsShareAPI epicsRingBytesGet(
|
||||
count = nextPut - nextGet;
|
||||
if (count < nbytes)
|
||||
nbytes = count;
|
||||
memcpy (value, &pring->buffer[nextGet], nbytes);
|
||||
if (nbytes)
|
||||
memcpy (value, (void *)&pring->buffer[nextGet], nbytes);
|
||||
nextGet += nbytes;
|
||||
}
|
||||
else {
|
||||
count = size - nextGet;
|
||||
if (count > nbytes)
|
||||
count = nbytes;
|
||||
memcpy (value, &pring->buffer[nextGet], count);
|
||||
if ((nextGet = nextGet + count) == size) {
|
||||
memcpy (value, (void *)&pring->buffer[nextGet], count);
|
||||
nextGet += count;
|
||||
if (nextGet == size) {
|
||||
int nLeft = nbytes - count;
|
||||
if (nLeft > nextPut)
|
||||
nLeft = nextPut;
|
||||
memcpy (value+count, &pring->buffer[0], nLeft);
|
||||
memcpy (value+count, (void *)&pring->buffer[0], nLeft);
|
||||
nextGet = nLeft;
|
||||
nbytes = count + nLeft;
|
||||
}
|
||||
@@ -90,78 +100,68 @@ epicsShareFunc int epicsShareAPI epicsRingBytesPut(
|
||||
int nextGet = pring->nextGet;
|
||||
int nextPut = pring->nextPut;
|
||||
int size = pring->size;
|
||||
int count;
|
||||
int freeCount, copyCount, topCount;
|
||||
|
||||
if (nextPut < nextGet) {
|
||||
count = nextGet - nextPut - 1;
|
||||
if (nbytes > count)
|
||||
nbytes = count;
|
||||
memcpy (&pring->buffer[nextPut], value, nbytes);
|
||||
nextPut += nbytes;
|
||||
}
|
||||
else if (nextGet == 0) {
|
||||
count = size - nextPut - 1;
|
||||
if (nbytes > count)
|
||||
nbytes = count;
|
||||
memcpy (&pring->buffer[nextPut], value, nbytes);
|
||||
freeCount = nextGet - nextPut - SLOP;
|
||||
if (nbytes > freeCount)
|
||||
nbytes = freeCount;
|
||||
if (nbytes)
|
||||
memcpy ((void *)&pring->buffer[nextPut], value, nbytes);
|
||||
nextPut += nbytes;
|
||||
}
|
||||
else {
|
||||
count = size - nextPut;
|
||||
if (count > nbytes)
|
||||
count = nbytes;
|
||||
memcpy (&pring->buffer[nextPut], value, count);
|
||||
if ((nextPut = nextPut + count) == size) {
|
||||
int nLeft = nbytes - count;
|
||||
if (nLeft > (nextGet - 1))
|
||||
nLeft = nextGet - 1;
|
||||
memcpy (&pring->buffer[0], value+count, nLeft);
|
||||
freeCount = size - nextPut + nextGet - SLOP;
|
||||
if (nbytes > freeCount)
|
||||
nbytes = freeCount;
|
||||
topCount = size - nextPut;
|
||||
copyCount = (nbytes > topCount) ? topCount : nbytes;
|
||||
if (copyCount)
|
||||
memcpy ((void *)&pring->buffer[nextPut], value, copyCount);
|
||||
nextPut += copyCount;
|
||||
if (nextPut == size) {
|
||||
int nLeft = nbytes - copyCount;
|
||||
if (nLeft)
|
||||
memcpy ((void *)&pring->buffer[0], value+copyCount, nLeft);
|
||||
nextPut = nLeft;
|
||||
nbytes = count + nLeft;
|
||||
}
|
||||
else {
|
||||
nbytes = count;
|
||||
nextPut = nextPut;
|
||||
}
|
||||
}
|
||||
pring->nextPut = nextPut;
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
|
||||
epicsShareFunc void epicsShareAPI epicsRingBytesFlush(epicsRingBytesId id)
|
||||
{
|
||||
ringPvt *pring = (ringPvt *)id;
|
||||
|
||||
pring->nextGet = pring->nextPut = 0;
|
||||
pring->nextGet = 0;
|
||||
pring->nextPut = 0;
|
||||
}
|
||||
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsRingBytesFreeBytes(epicsRingBytesId id)
|
||||
{
|
||||
ringPvt *pring = (ringPvt *)id;
|
||||
int n;
|
||||
int nextGet = pring->nextGet;
|
||||
int nextPut = pring->nextPut;
|
||||
|
||||
n = pring->nextGet - pring->nextPut - 1;
|
||||
if (n < 0)
|
||||
n += pring->size;
|
||||
return n;
|
||||
if (nextPut < nextGet)
|
||||
return nextGet - nextPut - SLOP;
|
||||
else
|
||||
return pring->size - nextPut + nextGet - SLOP;
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsRingBytesUsedBytes(epicsRingBytesId id)
|
||||
{
|
||||
ringPvt *pring = (ringPvt *)id;
|
||||
int n;
|
||||
|
||||
n = pring->nextPut - pring->nextGet;
|
||||
if (n < 0)
|
||||
n += pring->size;
|
||||
return n;
|
||||
return pring->size - epicsRingBytesFreeBytes(id) - SLOP;
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsRingBytesSize(epicsRingBytesId id)
|
||||
{
|
||||
ringPvt *pring = (ringPvt *)id;
|
||||
|
||||
return pring->size - 1;
|
||||
return pring->size - SLOP;
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsRingBytesIsEmpty(epicsRingBytesId id)
|
||||
@@ -173,9 +173,5 @@ epicsShareFunc int epicsShareAPI epicsRingBytesIsEmpty(epicsRingBytesId id)
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsRingBytesIsFull(epicsRingBytesId id)
|
||||
{
|
||||
ringPvt *pring = (ringPvt *)id;
|
||||
int count;
|
||||
|
||||
count = (pring->nextPut - pring->nextGet) + 1;
|
||||
return ((count == 0) || (count == pring->size));
|
||||
return (epicsRingBytesFreeBytes(id) <= 0);
|
||||
}
|
||||
|
||||
@@ -43,10 +43,10 @@ private: /* Prevent compiler-generated member functions */
|
||||
epicsRingPointer& operator=(const epicsRingPointer &);
|
||||
|
||||
private: /* Data */
|
||||
int nextPush;
|
||||
int nextPop;
|
||||
volatile int nextPush;
|
||||
volatile int nextPop;
|
||||
int size;
|
||||
T **buffer;
|
||||
T * volatile * buffer;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
@@ -93,10 +93,11 @@ inline epicsRingPointer<T>::~epicsRingPointer()
|
||||
template <class T>
|
||||
inline bool epicsRingPointer<T>::push(T *p)
|
||||
{
|
||||
int newNext = nextPush +1;
|
||||
int next = nextPush;
|
||||
int newNext = next + 1;
|
||||
if(newNext>=size) newNext=0;
|
||||
if(newNext==nextPop) return(false);
|
||||
buffer[nextPush] = p;
|
||||
buffer[next] = p;
|
||||
nextPush = newNext;
|
||||
return(true);
|
||||
}
|
||||
@@ -104,18 +105,21 @@ inline bool epicsRingPointer<T>::push(T *p)
|
||||
template <class T>
|
||||
inline T* epicsRingPointer<T>::pop()
|
||||
{
|
||||
if(nextPop == nextPush) return(0);
|
||||
T*p = buffer[nextPop];
|
||||
int newNext= nextPop;
|
||||
++newNext;
|
||||
if(newNext >=size) newNext = 0;
|
||||
nextPop = newNext;
|
||||
int next = nextPop;
|
||||
if(next == nextPush) return(0);
|
||||
T*p = buffer[next];
|
||||
++next;
|
||||
if(next >=size) next = 0;
|
||||
nextPop = next;
|
||||
return(p);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void epicsRingPointer<T>::flush()
|
||||
{ nextPop = nextPush = 0;}
|
||||
{
|
||||
nextPop = 0;
|
||||
nextPush = 0;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline int epicsRingPointer<T>::getFree() const
|
||||
|
||||
@@ -77,6 +77,11 @@ ringPointerTest_SRCS += ringPointerTest.c
|
||||
testHarness_SRCS += ringPointerTest.c
|
||||
TESTS += ringPointerTest
|
||||
|
||||
TESTPROD_HOST += ringBytesTest
|
||||
ringBytesTest_SRCS += ringBytesTest.c
|
||||
testHarness_SRCS += ringBytesTest.c
|
||||
TESTS += ringBytesTest
|
||||
|
||||
TESTPROD_HOST += epicsEventTest
|
||||
epicsEventTest_SRCS += epicsEventTest.cpp
|
||||
testHarness_SRCS += epicsEventTest.cpp
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
#include "testMain.h"
|
||||
|
||||
static const char *msg1 = "1234567890This is a very long message.";
|
||||
static int testExit = 0;
|
||||
static volatile int testExit = 0;
|
||||
static epicsEventId finished;
|
||||
|
||||
/*
|
||||
* In Numerical Recipes in C: The Art of Scientific Computing (William H.
|
||||
@@ -105,6 +106,7 @@ receiver(void *arg)
|
||||
testDiag("Sender %d -- %d messages", sender, expectmsg[sender-1]-1);
|
||||
}
|
||||
testOk1(errors == 0);
|
||||
epicsEventSignal(finished);
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
@@ -125,7 +127,6 @@ sender(void *arg)
|
||||
|
||||
extern "C" void messageQueueTest(void *parm)
|
||||
{
|
||||
epicsEventId *pfinished = (epicsEventId *) parm;
|
||||
unsigned int i;
|
||||
char cbuf[80];
|
||||
int len;
|
||||
@@ -278,19 +279,17 @@ extern "C" void messageQueueTest(void *parm)
|
||||
epicsThreadSleep(300.0);
|
||||
|
||||
testExit = 1;
|
||||
epicsThreadSleep(1.0);
|
||||
epicsEventSignal(*pfinished);
|
||||
}
|
||||
|
||||
MAIN(epicsMessageQueueTest)
|
||||
{
|
||||
testPlan(58);
|
||||
|
||||
epicsEventId finished = epicsEventMustCreate(epicsEventEmpty);
|
||||
finished = epicsEventMustCreate(epicsEventEmpty);
|
||||
|
||||
epicsThreadCreate("messageQueueTest", epicsThreadPriorityMedium,
|
||||
epicsThreadGetStackSize(epicsThreadStackMedium),
|
||||
messageQueueTest, (void *) &finished);
|
||||
messageQueueTest, NULL);
|
||||
|
||||
epicsEventWait(finished);
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ int epicsTimeTest(void);
|
||||
int macLibTest(void);
|
||||
int macEnvExpandTest(void);
|
||||
int ringPointerTest(void);
|
||||
int ringBytesTest(void);
|
||||
int blockingSockTest(void);
|
||||
int taskwdTest(void);
|
||||
int epicsExitTest(void);
|
||||
@@ -80,6 +81,8 @@ void epicsRunLibComTests(void)
|
||||
|
||||
runTest(ringPointerTest);
|
||||
|
||||
runTest(ringBytesTest);
|
||||
|
||||
runTest(blockingSockTest);
|
||||
|
||||
runTest(taskwdTest);
|
||||
|
||||
142
src/libCom/test/ringBytesTest.c
Normal file
142
src/libCom/test/ringBytesTest.c
Normal file
@@ -0,0 +1,142 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* ringBytesTest.c */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "epicsThread.h"
|
||||
#include "epicsRingBytes.h"
|
||||
#include "errlog.h"
|
||||
#include "epicsEvent.h"
|
||||
#include "epicsUnitTest.h"
|
||||
#include "testMain.h"
|
||||
|
||||
#define RINGSIZE 10
|
||||
|
||||
static char msg[] = "This is a very long string to be sent through the ring. "
|
||||
"It will take multiple transmissions, you know.";
|
||||
|
||||
typedef struct info {
|
||||
epicsEventId consumerEvent;
|
||||
epicsRingBytesId ring;
|
||||
}info;
|
||||
|
||||
static void check(epicsRingBytesId ring, int expectedFree)
|
||||
{
|
||||
int expectedUsed = RINGSIZE - expectedFree;
|
||||
int expectedEmpty = (expectedUsed == 0);
|
||||
int expectedFull = (expectedFree == 0);
|
||||
int nFree = epicsRingBytesFreeBytes(ring);
|
||||
int nUsed = epicsRingBytesUsedBytes(ring);
|
||||
int isEmpty = epicsRingBytesIsEmpty(ring);
|
||||
int isFull = epicsRingBytesIsFull(ring);
|
||||
|
||||
testOk(nFree == expectedFree, "Free: %d == %d", nFree, expectedFree);
|
||||
testOk(nUsed == expectedUsed, "Used: %d == %d", nUsed, expectedUsed);
|
||||
testOk(isEmpty == expectedEmpty, "Empty: %d == %d", isEmpty, expectedEmpty);
|
||||
testOk(isFull == expectedFull, "Full: %d == %d", isFull, expectedFull);
|
||||
}
|
||||
|
||||
static void consumer(void *arg)
|
||||
{
|
||||
info *pinfo = (info *)arg;
|
||||
char getMsg[sizeof(msg) + RINGSIZE];
|
||||
int i = 0;
|
||||
int n;
|
||||
|
||||
testDiag("Consumer starting");
|
||||
while(1) {
|
||||
epicsEventMustWait(pinfo->consumerEvent);
|
||||
n = epicsRingBytesGet(pinfo->ring, getMsg+i, RINGSIZE);
|
||||
testOk(n != 0, "Read from ring");
|
||||
i += n;
|
||||
if (i >= sizeof(msg))
|
||||
break;
|
||||
}
|
||||
testOk(i==sizeof(msg), "Correct number of bytes received %d==%d", i, (int)sizeof(msg));
|
||||
testOk(strcmp(msg, getMsg) == 0, "Message received");
|
||||
}
|
||||
|
||||
MAIN(ringBytesTest)
|
||||
{
|
||||
int i, n;
|
||||
info *pinfo;
|
||||
epicsEventId consumerEvent;
|
||||
char put[RINGSIZE+1];
|
||||
char get[RINGSIZE+1];
|
||||
epicsRingBytesId ring;
|
||||
|
||||
testPlan(242);
|
||||
|
||||
pinfo = calloc(1,sizeof(info));
|
||||
if (!pinfo) {
|
||||
testAbort("calloc failed");
|
||||
}
|
||||
pinfo->consumerEvent = consumerEvent = epicsEventCreate(epicsEventEmpty);
|
||||
if (!consumerEvent) {
|
||||
testAbort("epicsEventCreate failed");
|
||||
}
|
||||
|
||||
pinfo->ring = ring = epicsRingBytesCreate(RINGSIZE);
|
||||
if (!ring) {
|
||||
testAbort("epicsRingBytesCreate failed");
|
||||
}
|
||||
check(ring, RINGSIZE);
|
||||
|
||||
for (i = 0 ; i < sizeof(put) ; i++)
|
||||
put[i] = i;
|
||||
for(i = 0 ; i < RINGSIZE ; i++) {
|
||||
n = epicsRingBytesPut(ring, put, i);
|
||||
testOk(n==i, "ring put %d", i);
|
||||
check(ring, RINGSIZE-i);
|
||||
n = epicsRingBytesGet(ring, get, i);
|
||||
testOk(n==i, "ring get %d", i);
|
||||
check(ring, RINGSIZE);
|
||||
testOk(memcmp(put,get,i)==0, "get matches write");
|
||||
}
|
||||
|
||||
for(i = 0 ; i < RINGSIZE ; i++) {
|
||||
n = epicsRingBytesPut(ring, put+i, 1);
|
||||
testOk(n==1, "ring put 1, %d", i);
|
||||
check(ring, RINGSIZE-1-i);
|
||||
}
|
||||
n = epicsRingBytesPut(ring, put+RINGSIZE, 1);
|
||||
testOk(n==0, "put to full ring");
|
||||
check(ring, 0);
|
||||
for(i = 0 ; i < RINGSIZE ; i++) {
|
||||
n = epicsRingBytesGet(ring, get+i, 1);
|
||||
testOk(n==1, "ring get 1, %d", i);
|
||||
check(ring, 1+i);
|
||||
}
|
||||
testOk(memcmp(put,get,RINGSIZE)==0, "get matches write");
|
||||
n = epicsRingBytesGet(ring, get+RINGSIZE, 1);
|
||||
testOk(n==0, "get from empty ring");
|
||||
check(ring, RINGSIZE);
|
||||
|
||||
epicsThreadCreate("consumer", 50,
|
||||
epicsThreadGetStackSize(epicsThreadStackSmall), consumer, pinfo);
|
||||
epicsThreadSleep(0.1);
|
||||
|
||||
for (i = 0; i < sizeof(msg) ; ) {
|
||||
n = epicsRingBytesPut(ring, msg+i, sizeof(msg)-i);
|
||||
epicsEventSignal(consumerEvent);
|
||||
epicsThreadSleep(0.2);
|
||||
i += n;
|
||||
}
|
||||
epicsThreadSleep(0.2);
|
||||
check(ring, RINGSIZE);
|
||||
|
||||
return testDone();
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#define ringSize 10
|
||||
|
||||
static int testExit = 0;
|
||||
static volatile int testExit = 0;
|
||||
|
||||
typedef struct info {
|
||||
epicsEventId consumerEvent;
|
||||
|
||||
@@ -23,7 +23,6 @@ TEMPLATES += top/iocApp/Makefile
|
||||
TEMPLATES += top/iocApp/Db/Makefile
|
||||
TEMPLATES += top/iocApp/src/Makefile
|
||||
TEMPLATES += top/iocApp/src/_APPNAME_Main.cpp
|
||||
TEMPLATES += top/iocApp/src/sncExample.stt
|
||||
|
||||
TEMPLATES += top/exampleApp/Makefile
|
||||
TEMPLATES += top/exampleApp/Db/Makefile
|
||||
|
||||
@@ -48,7 +48,7 @@ _APPNAME__SRCS_DEFAULT += _APPNAME_Main.cpp
|
||||
_APPNAME__SRCS_vxWorks += -nil-
|
||||
|
||||
# Add support from base/src/vxWorks if needed
|
||||
_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||
#_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||
|
||||
# Link in the code from the support library
|
||||
_APPNAME__LIBS += _APPNAME_Support
|
||||
@@ -58,7 +58,7 @@ _APPNAME__LIBS += _APPNAME_Support
|
||||
|
||||
ifneq ($(SNCSEQ),)
|
||||
# Build sncExample into _APPNAME_Support
|
||||
_APPNAME__SNCFLAGS += +r
|
||||
sncExample_SNCFLAGS += +r
|
||||
_APPNAME__DBD += sncExample.dbd
|
||||
_APPNAME_Support_SRCS += sncExample.stt
|
||||
_APPNAME_Support_LIBS += seq pv
|
||||
|
||||
@@ -6,45 +6,34 @@ include $(TOP)/configure/CONFIG
|
||||
#=============================
|
||||
|
||||
#=============================
|
||||
# build an ioc application
|
||||
# Build the IOC application
|
||||
|
||||
PROD_IOC = _APPNAME_
|
||||
|
||||
# _APPNAME_.dbd will be created and installed
|
||||
DBD += _APPNAME_.dbd
|
||||
|
||||
# _APPNAME_.dbd will be made up from these files:
|
||||
_APPNAME__DBD += base.dbd
|
||||
#include definitions for any other support applications needed
|
||||
|
||||
# Include dbd files from all support applications:
|
||||
#_APPNAME__DBD += xxx.dbd
|
||||
|
||||
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
|
||||
# Add all the support libraries needed by this IOC
|
||||
#_APPNAME__LIBS += xxx
|
||||
|
||||
# _APPNAME__registerRecordDeviceDriver.cpp derives from _APPNAME_.dbd
|
||||
_APPNAME__SRCS += _APPNAME__registerRecordDeviceDriver.cpp
|
||||
|
||||
# Build the main IOC entry point on workstation OSs.
|
||||
_APPNAME__SRCS_DEFAULT += _APPNAME_Main.cpp
|
||||
_APPNAME__SRCS_vxWorks += -nil-
|
||||
|
||||
#The following adds support from base/src/vxWorks
|
||||
_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||
|
||||
#add a definition for each support application used by this application
|
||||
#_APPNAME__LIBS += xxx
|
||||
|
||||
#NOTES:
|
||||
# 1)It is not possible to build sncExample both as a component of _APPNAME_
|
||||
# and standalone. You must choose only one.
|
||||
# 2)To build sncExample SNCSEQ must be defined in <top>/configure/RELEASE
|
||||
|
||||
#The following builds sncExample as a component of _APPNAME_
|
||||
#_APPNAME__SRCS += sncExample.stt
|
||||
#_APPNAME__LIBS += seq pv
|
||||
# Add support from base/src/vxWorks if needed
|
||||
#_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||
|
||||
# Finally link to the EPICS Base libraries
|
||||
_APPNAME__LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||
|
||||
#The following builds sncExample as a standalone application
|
||||
#PROD_HOST += sncExample
|
||||
#sncExample_SNCFLAGS += +m
|
||||
#sncExample_SRCS += sncExample.stt
|
||||
#sncExample_LIBS += seq pv
|
||||
#sncExample_LIBS += $(EPICS_BASE_HOST_LIBS)
|
||||
|
||||
#===========================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "epicsExit.h"
|
||||
#include "epicsThread.h"
|
||||
#include "iocsh.h"
|
||||
|
||||
@@ -17,5 +18,6 @@ int main(int argc,char *argv[])
|
||||
epicsThreadSleep(.2);
|
||||
}
|
||||
iocsh(NULL);
|
||||
epicsExit(0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
program sncExample
|
||||
float v;
|
||||
assign v to "{user}:xxxExample";
|
||||
monitor v;
|
||||
|
||||
ss ss1
|
||||
{
|
||||
state low
|
||||
{
|
||||
when(v>5.0)
|
||||
{
|
||||
printf("changing to high\n");
|
||||
} state high
|
||||
when(delay(.1))
|
||||
{
|
||||
} state low
|
||||
}
|
||||
state high
|
||||
{
|
||||
when(v<=5.0)
|
||||
{
|
||||
printf("changing to low\n");
|
||||
} state low
|
||||
when(delay(.1))
|
||||
{
|
||||
} state high
|
||||
}
|
||||
}
|
||||
@@ -8,14 +8,14 @@
|
||||
cd ${TOP}
|
||||
|
||||
## Register all support components
|
||||
dbLoadDatabase("dbd/_APPNAME_.dbd",0,0)
|
||||
_CSAFEAPPNAME__registerRecordDeviceDriver(pdbbase)
|
||||
dbLoadDatabase "dbd/_APPNAME_.dbd"
|
||||
_CSAFEAPPNAME__registerRecordDeviceDriver pdbbase
|
||||
|
||||
## Load record instances
|
||||
#dbLoadRecords("db/xxx.db","user=_USER_Host")
|
||||
|
||||
cd ${TOP}/iocBoot/${IOC}
|
||||
iocInit()
|
||||
iocInit
|
||||
|
||||
## Start any sequence programs
|
||||
#seq sncxxx,"user=_USER_Host"
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
#< envPaths
|
||||
|
||||
## Register all support components
|
||||
dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0)
|
||||
_CSAFEAPPNAME__registerRecordDeviceDriver(pdbbase)
|
||||
dbLoadDatabase "dbd/_APPNAME_.dbd"
|
||||
_CSAFEAPPNAME__registerRecordDeviceDriver pdbbase
|
||||
|
||||
## Load record instances
|
||||
dbLoadRecords("../../db/_APPNAME_.db","user=_USER_")
|
||||
#dbLoadTemplate "db/_APPNAME_.substitutions"
|
||||
#dbLoadRecords "db/_APPNAME_.db", "user=_USER_"
|
||||
|
||||
iocInit()
|
||||
iocInit
|
||||
|
||||
## Start any sequence programs
|
||||
#seq snc_APPNAME_,"user=_USER_"
|
||||
#seq sncxxx, "user=_USER_"
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
#< ../nfsCommands
|
||||
|
||||
cd topbin
|
||||
|
||||
## You may have to change _APPNAME_ to something else
|
||||
## everywhere it appears in this file
|
||||
|
||||
ld < _APPNAME_.munch
|
||||
|
||||
## Register all support components
|
||||
cd top
|
||||
dbLoadDatabase("dbd/_APPNAME_.dbd",0,0)
|
||||
_CSAFEAPPNAME__registerRecordDeviceDriver(pdbbase)
|
||||
dbLoadDatabase "dbd/_APPNAME_.dbd"
|
||||
_CSAFEAPPNAME__registerRecordDeviceDriver pdbbase
|
||||
|
||||
## Load record instances
|
||||
#dbLoadRecords("db/_APPNAME_.db","macro=value")
|
||||
#dbLoadTemplate("db/_APPNAME_.substitutions")
|
||||
#dbLoadTemplate "db/_APPNAME_.substitutions"
|
||||
#dbLoadRecords "db/_APPNAME_.db", "user=_USER_"
|
||||
|
||||
cd startup
|
||||
iocInit()
|
||||
iocInit
|
||||
|
||||
## Start any sequence programs
|
||||
#seq &sncExample,"user=_USER_"
|
||||
#seq &sncxxx, "user=_USER_"
|
||||
|
||||
Reference in New Issue
Block a user