Merged changes from 3.14 branch
Fixed issues building on Solaris. Up to revno 12497.
This commit is contained in:
@@ -631,7 +631,7 @@ standard out for each CA client beacon anomaly detect event.</p>
|
||||
<p>See also <a href="#Client1">When a Client Does not See the Server's
|
||||
Beacon</a>.</p>
|
||||
|
||||
<h3><a name="Configurin3" id="Configurin3">Configuring the Maximum Search
|
||||
<h3><a name="Configurin3">Configuring the Maximum Search
|
||||
Period</a></h3>
|
||||
|
||||
<p>The rate at which name resolution (search) requests are sent exponentially
|
||||
@@ -896,9 +896,9 @@ feature.</em></p>
|
||||
<p>See also <a href="#Routing">Routing Restrictions on vxWorks Systems</a>.</p>
|
||||
<hr>
|
||||
|
||||
<h2><a name="Building" id="Building">Building an Application</a></h2>
|
||||
<h2><a name="Building">Building an Application</a></h2>
|
||||
|
||||
<h3><a name="Required1" id="Required1">Required Header (.h) Files</a></h3>
|
||||
<h3><a name="Required1">Required Header (.h) Files</a></h3>
|
||||
|
||||
<p>An application that uses the CA client library functions described in this
|
||||
document will need to include the cadef.h header files as follows.</p>
|
||||
@@ -910,7 +910,7 @@ many other header files (operating system specific and otherwise), and
|
||||
therefore the application must also specify "<EPICS
|
||||
base>/include/os/<arch>" in its header file search path.</p>
|
||||
|
||||
<h3><a name="Required" id="Required">Required Libraries</a></h3>
|
||||
<h3><a name="Required">Required Libraries</a></h3>
|
||||
|
||||
<p>An application that uses the Channel Access Client Library functions
|
||||
described in this document will need to link with the EPICS CA Client Library
|
||||
@@ -956,7 +956,7 @@ and Windows systems.</p>
|
||||
<p>The above libraries are located in "<EPICS
|
||||
base>/lib/<architechture>".</p>
|
||||
|
||||
<h3><a name="Compiler" id="Compiler">Compiler and System Specific Build
|
||||
<h3><a name="Compiler">Compiler and System Specific Build
|
||||
Options</a></h3>
|
||||
|
||||
<p>If you do not use the EPICS build environment (layered make files) then it
|
||||
@@ -1641,7 +1641,7 @@ etc.</p>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3><a name="excas" id="excas">excas</a></h3>
|
||||
<h3><a name="excas">excas</a></h3>
|
||||
|
||||
<p>excas [options]</p>
|
||||
|
||||
@@ -1933,7 +1933,7 @@ made to build a new circuit. This behavior could result in undesirable resource
|
||||
consumption resulting from periodic circuit setup and teardown overhead
|
||||
(thrashing) during periods of CPU / network / IP kernel buffer congestion.</p>
|
||||
|
||||
<h3><a name="Requests" id="Requests">Put Requests Just Prior to Process
|
||||
<h3><a name="Requests">Put Requests Just Prior to Process
|
||||
Termination Appear to be Ignored</a></h3>
|
||||
|
||||
<p>Short lived CA client applications that issue a CA put request and then
|
||||
@@ -2555,7 +2555,7 @@ questionable practice for the following reasons.</p>
|
||||
is the same behavior as on all other OS.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="Calling1" id="Calling1">Calling CA Functions from POSIX signal
|
||||
<h3><a name="Calling1">Calling CA Functions from POSIX signal
|
||||
handlers</a></h3>
|
||||
|
||||
<p>As you might expect, it isnt safe to call the CA client library from a POSIX
|
||||
|
||||
@@ -57,9 +57,9 @@ void getCallback::completion (
|
||||
// fetch client context and destroy prior to releasing
|
||||
// the lock and calling cb in case they destroy channel there
|
||||
this->chan.getClientCtx().destroyGetCallback ( guard, *this );
|
||||
{
|
||||
if ( pFuncTmp ) {
|
||||
epicsGuardRelease < epicsMutex > unguard ( guard );
|
||||
( *pFuncTmp ) ( args );
|
||||
pFuncTmp ( args );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -343,6 +343,9 @@ int epicsShareAPI ca_array_get_callback ( chtype type,
|
||||
if ( type < 0 ) {
|
||||
return ECA_BADTYPE;
|
||||
}
|
||||
if ( pfunc == NULL ) {
|
||||
return ECA_BADFUNCPTR;
|
||||
}
|
||||
unsigned tmpType = static_cast < unsigned > ( type );
|
||||
|
||||
epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () );
|
||||
@@ -416,6 +419,9 @@ int epicsShareAPI ca_array_put_callback ( chtype type, arrayElementCount count,
|
||||
if ( type < 0 ) {
|
||||
return ECA_BADTYPE;
|
||||
}
|
||||
if ( pfunc == NULL ) {
|
||||
return ECA_BADFUNCPTR;
|
||||
}
|
||||
epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () );
|
||||
pChan->eliminateExcessiveSendBacklog ( guard );
|
||||
unsigned tmpType = static_cast < unsigned > ( type );
|
||||
|
||||
@@ -638,7 +638,7 @@ not follow this pattern, but are still printable strings.
|
||||
|
||||
=item [1] R3.14 Channel Access Reference Manual by Jeffrey O. Hill
|
||||
|
||||
L<http://www.aps.anl.gov/epics/base/R3-14/11-docs/CAref.html>
|
||||
L<http://www.aps.anl.gov/epics/base/R3-14/12-docs/CAref.html>
|
||||
|
||||
=back
|
||||
|
||||
@@ -649,7 +649,7 @@ Andrew Johnson, E<lt>anj@aps.anl.govE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2008 UChicago Argonne LLC, as Operator of Argonne National
|
||||
Copyright (C) 2008-2014 UChicago Argonne LLC, as Operator of Argonne National
|
||||
Laboratory.
|
||||
|
||||
This software is distributed under the terms of the EPICS Open License.
|
||||
|
||||
@@ -57,9 +57,9 @@ void putCallback::completion ( epicsGuard < epicsMutex > & guard )
|
||||
// fetch client context and destroy prior to releasing
|
||||
// the lock and calling cb in case they destroy channel there
|
||||
this->chan.getClientCtx().destroyPutCallback ( guard, *this );
|
||||
{
|
||||
if ( pFuncTmp ) {
|
||||
epicsGuardRelease < epicsMutex > unguard ( guard );
|
||||
( *pFuncTmp ) ( args );
|
||||
pFuncTmp ( args );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,9 +30,11 @@ INC += dbMapper.h
|
||||
INC += gddAppTable.h
|
||||
INC += gddAppFuncTable.h
|
||||
INC += smartGDDPointer.h
|
||||
INC += gddApps.h
|
||||
INC += gddEnumStringTable.h
|
||||
|
||||
# Can't put this in INC, it causes a circular build dependency
|
||||
TARGETS += $(INSTALL_INCLUDE)/gddApps.h
|
||||
|
||||
HTMLS += gdd.html
|
||||
HTMLS += gddref.html
|
||||
HTMLS += gddref2.html
|
||||
|
||||
@@ -63,7 +63,7 @@ rtems_task Init (rtems_task_argument argument);
|
||||
* appropriate conditionals to use.
|
||||
* The new general time support makes including the RTC driverr less important.
|
||||
*/
|
||||
#if !defined(mpc604) && !defined(__mc68040__) && !defined(__mcf5200__) && !defined(mpc7455) && !defined(__arm__) /* don't have RTC code */
|
||||
#if !defined(mpc604) && !defined(__mc68040__) && !defined(__mcf5200__) && !defined(mpc7455) && !defined(__arm__) && !defined(__nios2__)/* don't have RTC code */
|
||||
#define CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
|
||||
#endif
|
||||
|
||||
|
||||
@@ -279,11 +279,45 @@ initialize_remote_filesystem(char **argv, int hasLocalFilesystem)
|
||||
LogFatal("\"%s\" is not a valid command pathname.\n", rtems_bsdnet_bootp_cmdline);
|
||||
cp = mustMalloc(l + 20, "NFS mount paths");
|
||||
server_path = cp;
|
||||
server_name = rtems_bsdnet_bootp_server_name;
|
||||
if (rtems_bsdnet_bootp_cmdline[0] == '/') {
|
||||
mount_point = server_path;
|
||||
strncpy(mount_point, rtems_bsdnet_bootp_cmdline, l);
|
||||
mount_point[l] = '\0';
|
||||
argv[1] = rtems_bsdnet_bootp_cmdline;
|
||||
/*
|
||||
* Its probably common to embed the mount point in the server
|
||||
* name so, when this is occurring, dont clobber the mount point
|
||||
* by appending the first node from the command path. This allows
|
||||
* the mount point to be a different path then the server's mount
|
||||
* path.
|
||||
*
|
||||
* This allows for example a line similar to as follows the DHCP
|
||||
* configuration file.
|
||||
*
|
||||
* server-name "159.233@192.168.0.123:/vol/vol0/bootRTEMS";
|
||||
*/
|
||||
if ( server_name ) {
|
||||
const size_t allocSize = strlen ( server_name ) + 2;
|
||||
char * const pServerName = mustMalloc( allocSize,
|
||||
"NFS mount paths");
|
||||
char * const pServerPath = mustMalloc ( allocSize,
|
||||
"NFS mount paths");
|
||||
const int scanfStatus = sscanf (
|
||||
server_name,
|
||||
"%[^:] : / %s",
|
||||
pServerName,
|
||||
pServerPath + 1u );
|
||||
if ( scanfStatus == 2 ) {
|
||||
pServerPath[0u]= '/';
|
||||
server_name = pServerName;
|
||||
server_path = pServerPath;
|
||||
}
|
||||
else {
|
||||
free ( pServerName );
|
||||
free ( pServerPath );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
char *abspath = mustMalloc(strlen(rtems_bsdnet_bootp_cmdline)+2,"Absolute command path");
|
||||
@@ -296,7 +330,6 @@ initialize_remote_filesystem(char **argv, int hasLocalFilesystem)
|
||||
strcat(abspath, rtems_bsdnet_bootp_cmdline);
|
||||
argv[1] = abspath;
|
||||
}
|
||||
server_name = rtems_bsdnet_bootp_server_name;
|
||||
}
|
||||
nfsMount(server_name, server_path, mount_point);
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ void epicsThreadRunable::run () {}
|
||||
void epicsThreadRunable::show ( unsigned int ) const {}
|
||||
|
||||
class epicsThread :: unableToCreateThread :
|
||||
public exception {
|
||||
public std :: exception {
|
||||
public:
|
||||
const char * what () const throw ();
|
||||
};
|
||||
@@ -90,7 +90,7 @@ extern "C" void epicsThreadCallEntryPoint ( void * pPvt )
|
||||
}
|
||||
catch ( const epicsThread::exitException & ) {
|
||||
}
|
||||
catch ( std::exception & except ) {
|
||||
catch ( std :: exception & except ) {
|
||||
if ( ! waitRelease ) {
|
||||
pThread->printLastChanceExceptionMessage (
|
||||
typeid ( except ).name (), except.what () );
|
||||
|
||||
@@ -281,39 +281,45 @@ epicsShareFunc osiSockAddr epicsShareAPI osiLocalAddr (SOCKET socket)
|
||||
|
||||
for ( pifreq = ifconf.ifc_req; pifreq <= pIfreqListEnd; pifreq = pnextifreq ) {
|
||||
osiSockAddr addrCpy;
|
||||
uint32_t current_ifreqsize;
|
||||
|
||||
/*
|
||||
* find the next if req
|
||||
*/
|
||||
pnextifreq = ifreqNext ( pifreq );
|
||||
|
||||
if ( pifreq->ifr_addr.sa_family != AF_INET ) {
|
||||
ifDepenDebugPrintf ( ("osiLocalAddr(): interface %s was not AF_INET\n", pifreq->ifr_name) );
|
||||
/* determine ifreq size */
|
||||
current_ifreqsize = ifreqSize ( pifreq );
|
||||
/* copy current ifreq to aligned bufferspace (to start of pIfreqList buffer) */
|
||||
memmove(pIfreqList, pifreq, current_ifreqsize);
|
||||
|
||||
if ( pIfreqList->ifr_addr.sa_family != AF_INET ) {
|
||||
ifDepenDebugPrintf ( ("osiLocalAddr(): interface %s was not AF_INET\n", pIfreqList->ifr_name) );
|
||||
continue;
|
||||
}
|
||||
|
||||
addrCpy.sa = pifreq->ifr_addr;
|
||||
addrCpy.sa = pIfreqList->ifr_addr;
|
||||
|
||||
status = socket_ioctl ( socket, SIOCGIFFLAGS, pifreq );
|
||||
status = socket_ioctl ( socket, SIOCGIFFLAGS, pIfreqList );
|
||||
if ( status < 0 ) {
|
||||
errlogPrintf ( "osiLocalAddr(): net intf flags fetch for %s failed\n", pifreq->ifr_name );
|
||||
errlogPrintf ( "osiLocalAddr(): net intf flags fetch for %s failed\n", pIfreqList->ifr_name );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! ( pifreq->ifr_flags & IFF_UP ) ) {
|
||||
ifDepenDebugPrintf ( ("osiLocalAddr(): net intf %s was down\n", pifreq->ifr_name) );
|
||||
if ( ! ( pIfreqList->ifr_flags & IFF_UP ) ) {
|
||||
ifDepenDebugPrintf ( ("osiLocalAddr(): net intf %s was down\n", pIfreqList->ifr_name) );
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* dont use the loop back interface
|
||||
*/
|
||||
if ( pifreq->ifr_flags & IFF_LOOPBACK ) {
|
||||
ifDepenDebugPrintf ( ("osiLocalAddr(): ignoring loopback interface: %s\n", pifreq->ifr_name) );
|
||||
if ( pIfreqList->ifr_flags & IFF_LOOPBACK ) {
|
||||
ifDepenDebugPrintf ( ("osiLocalAddr(): ignoring loopback interface: %s\n", pIfreqList->ifr_name) );
|
||||
continue;
|
||||
}
|
||||
|
||||
ifDepenDebugPrintf ( ("osiLocalAddr(): net intf %s found\n", pifreq->ifr_name) );
|
||||
ifDepenDebugPrintf ( ("osiLocalAddr(): net intf %s found\n", pIfreqList->ifr_name) );
|
||||
|
||||
init = 1;
|
||||
addr = addrCpy;
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
/* same as (!isnan(x) && !finite(x)) */
|
||||
#endif
|
||||
|
||||
#ifndef isnan
|
||||
# define isnan(x) ((x) != (x))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -311,7 +311,7 @@ MAIN(epicsCalcTest)
|
||||
testExpr(exp(1.));
|
||||
testExpr(floor(1.5));
|
||||
|
||||
testExpr(finite(0));
|
||||
testExpr(finite(0.));
|
||||
testExpr(finite(Inf));
|
||||
testExpr(finite(-Inf));
|
||||
testExpr(finite(NaN));
|
||||
@@ -325,11 +325,11 @@ MAIN(epicsCalcTest)
|
||||
testCalc("finite(0,1,-Inf)", 0);
|
||||
testCalc("finite(0,-Inf,2)", 0);
|
||||
testCalc("finite(-Inf,1,2)", 0);
|
||||
testExpr(isinf(0));
|
||||
testExpr(isinf(0.));
|
||||
testExpr(isinf(Inf));
|
||||
testExpr(!!isinf(-Inf)); // Some GCCs return -1/0/+1 rather than 0/+1
|
||||
testExpr(isinf(NaN));
|
||||
testExpr(isnan(0));
|
||||
testExpr(isnan(0.));
|
||||
testExpr(isnan(Inf));
|
||||
testExpr(isnan(-Inf));
|
||||
testExpr(isnan(NaN));
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "alarm.h"
|
||||
#include "dbDefs.h"
|
||||
#include "dbAccess.h"
|
||||
#include "epicsMath.h"
|
||||
#include "recGbl.h"
|
||||
#include "devSup.h"
|
||||
#include "aiRecord.h"
|
||||
@@ -78,7 +79,7 @@ static long read_ai(aiRecord *prec)
|
||||
if (!dbGetLink(&prec->inp, DBR_DOUBLE, &val, 0, 0)) {
|
||||
|
||||
/* Apply smoothing algorithm */
|
||||
if (prec->smoo != 0.0 && prec->dpvt)
|
||||
if (prec->smoo != 0.0 && prec->dpvt && finite(prec->val))
|
||||
prec->val = val * (1.00 - prec->smoo) + (prec->val * prec->smoo);
|
||||
else
|
||||
prec->val = val;
|
||||
|
||||
@@ -444,7 +444,7 @@ static void convert(aiRecord *prec)
|
||||
}
|
||||
|
||||
/* apply smoothing algorithm */
|
||||
if (prec->smoo != 0.0){
|
||||
if (prec->smoo != 0.0 && finite(prec->val)){
|
||||
if (prec->init) prec->val = val; /* initial condition */
|
||||
prec->val = val * (1.00 - prec->smoo) + (prec->val * prec->smoo);
|
||||
}else{
|
||||
|
||||
@@ -1,25 +1,18 @@
|
||||
TOP=../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
# ADD MACRO DEFINITIONS BELOW HERE
|
||||
|
||||
#----------------------------------------------------
|
||||
# Optimization of db files using dbst (DEFAULT: NO)
|
||||
#DB_OPT = YES
|
||||
|
||||
#----------------------------------------------------
|
||||
# Create and install (or just install)
|
||||
# databases, templates, substitutions like this
|
||||
# Install databases, templates & substitutions like this
|
||||
DB += dbExample1.db
|
||||
DB += dbExample2.db
|
||||
DB += dbSubExample.db
|
||||
DB += user.substitutions
|
||||
|
||||
#----------------------------------------------------
|
||||
# If <anyname>.db template is not named <anyname>*.template add
|
||||
# <anyname>_TEMPLATE = <templatename>
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
# ADD EXTRA GNUMAKE RULES BELOW HERE
|
||||
|
||||
|
||||
@@ -2,38 +2,37 @@ TOP=../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
|
||||
#=============================
|
||||
# Build the IOC support library
|
||||
|
||||
LIBRARY_IOC += _APPNAME_Support
|
||||
# ADD MACRO DEFINITIONS BELOW HERE
|
||||
|
||||
# xxxRecord.h will be created from xxxRecord.dbd
|
||||
DBDINC += xxxRecord
|
||||
# Install devXxxSoft.dbd into <top>/dbd
|
||||
|
||||
# Install xxxSupport.dbd into <top>/dbd
|
||||
DBD += xxxSupport.dbd
|
||||
|
||||
# Build an IOC support library
|
||||
LIBRARY_IOC += _APPNAME_Support
|
||||
|
||||
# Compile and add the code to the support library
|
||||
_APPNAME_Support_SRCS += xxxRecord.c
|
||||
_APPNAME_Support_SRCS += devXxxSoft.c
|
||||
|
||||
# Link locally-provided code into the support library,
|
||||
# rather than directly into the IOC application.
|
||||
# This is required for Windows DLL builds.
|
||||
_APPNAME_Support_SRCS += dbSubExample.c
|
||||
_APPNAME_Support_SRCS += _APPNAME_Hello.c
|
||||
_APPNAME_Support_SRCS += initTrace.c
|
||||
|
||||
_APPNAME_Support_LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||
|
||||
#=============================
|
||||
# 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 will include these files:
|
||||
_APPNAME__DBD += base.dbd
|
||||
_APPNAME__DBD += xxxSupport.dbd
|
||||
_APPNAME__DBD += dbSubExample.dbd
|
||||
@@ -43,19 +42,18 @@ _APPNAME__DBD += initTrace.dbd
|
||||
# _APPNAME__registerRecordDeviceDriver.cpp derives from _APPNAME_.dbd
|
||||
_APPNAME__SRCS += _APPNAME__registerRecordDeviceDriver.cpp
|
||||
|
||||
# Build the main IOC entry point on workstation OSs.
|
||||
# Build the main IOC entry point where needed
|
||||
_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
|
||||
|
||||
# Link in the code from the support library
|
||||
# Link in the code from our support library
|
||||
_APPNAME__LIBS += _APPNAME_Support
|
||||
|
||||
# NOTE: To build SNL programs, SNCSEQ must be defined
|
||||
# To build SNL programs, SNCSEQ must be defined
|
||||
# in the <top>/configure/RELEASE file
|
||||
|
||||
ifneq ($(SNCSEQ),)
|
||||
# Build sncExample into _APPNAME_Support
|
||||
sncExample_SNCFLAGS += +r
|
||||
@@ -72,12 +70,10 @@ ifneq ($(SNCSEQ),)
|
||||
sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
|
||||
endif
|
||||
|
||||
# Finally link to the EPICS Base libraries
|
||||
# Finally link IOC to the EPICS Base libraries
|
||||
_APPNAME__LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||
|
||||
#=============================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
# ADD EXTRA GNUMAKE RULES BELOW HERE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user