Merge changes committed to R3.14 branch since April.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Saskatchewan
|
||||
* 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.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
@@ -93,6 +92,17 @@ static struct rtems_bsdnet_ifconfig bsp_driver_config = {
|
||||
# define MY_DO_BOOTP rtems_bsdnet_do_bootp
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Allow site- and BSP-specific network buffer space configuration.
|
||||
* The macro values are specified in KBytes.
|
||||
*/
|
||||
#ifndef RTEMS_NETWORK_CONFIG_MBUF_SPACE
|
||||
# define RTEMS_NETWORK_CONFIG_MBUF_SPACE 180
|
||||
#endif
|
||||
#ifndef RTEMS_NETWORK_CONFIG_CLUSTER_SPACE
|
||||
# define RTEMS_NETWORK_CONFIG_CLUSTER_SPACE 350
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Network configuration
|
||||
*/
|
||||
@@ -104,8 +114,8 @@ struct rtems_bsdnet_config rtems_bsdnet_config = {
|
||||
/* EPICS scan thread. */
|
||||
/* If non-zero then the network daemons will run */
|
||||
/* at this *RTEMS* priority */
|
||||
180*1024, /* MBUF space */
|
||||
350*1024, /* MBUF cluster space */
|
||||
RTEMS_NETWORK_CONFIG_MBUF_SPACE*1024,
|
||||
RTEMS_NETWORK_CONFIG_CLUSTER_SPACE*1024,
|
||||
NULL, /* Host name */
|
||||
MY_DOMAINNAME, /* Domain name */
|
||||
};
|
||||
|
||||
@@ -266,8 +266,8 @@ private:
|
||||
// **** lock hierarchy ****
|
||||
// 1) callback lock must always be acquired before
|
||||
// the primary mutex if both locks are needed
|
||||
mutable epicsMutex & mutex;
|
||||
mutable epicsMutex & cbMutex;
|
||||
epicsMutex & mutex;
|
||||
epicsMutex & cbMutex;
|
||||
epicsEvent iiuUninstall;
|
||||
ipAddrToAsciiEngine & ipToAEngine;
|
||||
epicsTimerQueueActive & timerQueue;
|
||||
|
||||
@@ -149,8 +149,8 @@ private:
|
||||
double rtteMean;
|
||||
double rtteMeanDev;
|
||||
cac & cacRef;
|
||||
mutable epicsMutex & cbMutex;
|
||||
mutable epicsMutex & cacMutex;
|
||||
epicsMutex & cbMutex;
|
||||
epicsMutex & cacMutex;
|
||||
epics_auto_ptr < epics_auto_ptr < class searchTimer >, eapt_array > ppSearchTmr;
|
||||
unsigned nBytesInXmitBuf;
|
||||
unsigned nTimers;
|
||||
|
||||
@@ -391,7 +391,7 @@ int main (int argc, char *argv[])
|
||||
int nPvs; /* Number of PVs */
|
||||
pv* pvs = 0; /* Array of PV structures */
|
||||
|
||||
setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */
|
||||
LINE_BUFFER(stdout); /* Configure stdout buffering */
|
||||
|
||||
while ((opt = getopt(argc, argv, ":taicnhsSe:f:g:l:#:d:0:w:p:F:")) != -1) {
|
||||
switch (opt) {
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* Copyright (c) 2002 Berliner Elektronenspeicherringgesellschaft fuer
|
||||
* Synchrotronstrahlung.
|
||||
* 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.
|
||||
\*************************************************************************/
|
||||
|
||||
@@ -136,7 +135,7 @@ int main (int argc, char *argv[])
|
||||
int nPvs; /* Number of PVs */
|
||||
pv* pvs = 0; /* Array of PV structures */
|
||||
|
||||
setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */
|
||||
LINE_BUFFER(stdout); /* Configure stdout buffering */
|
||||
|
||||
while ((opt = getopt(argc, argv, ":nhw:s:p:")) != -1) {
|
||||
switch (opt) {
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* Copyright (c) 2002 Berliner Elektronenspeicherringgesellschaft fuer
|
||||
* Synchrotronstrahlung.
|
||||
* 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.
|
||||
\*************************************************************************/
|
||||
|
||||
@@ -214,7 +213,7 @@ int main (int argc, char *argv[])
|
||||
int nPvs; /* Number of PVs */
|
||||
pv* pvs = 0; /* Array of PV structures */
|
||||
|
||||
setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */
|
||||
LINE_BUFFER(stdout); /* Configure stdout buffering */
|
||||
|
||||
while ((opt = getopt(argc, argv, ":nhm:sSe:f:g:l:#:0:w:t:p:F:")) != -1) {
|
||||
switch (opt) {
|
||||
|
||||
@@ -275,8 +275,8 @@ int main (int argc, char *argv[])
|
||||
int nPvs; /* Number of PVs */
|
||||
pv* pvs = 0; /* Array of PV structures */
|
||||
|
||||
setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */
|
||||
putenv("POSIXLY_CORRECT="); /* Behave correct on GNU getopt systems */
|
||||
LINE_BUFFER(stdout); /* Configure stdout buffering */
|
||||
putenv("POSIXLY_CORRECT="); /* Behave correct on GNU getopt systems */
|
||||
|
||||
while ((opt = getopt(argc, argv, ":cnlhatsS#:w:p:F:")) != -1) {
|
||||
switch (opt) {
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* Copyright (c) 2002 Berliner Elektronenspeicherringgesellschaft fuer
|
||||
* Synchrotronstrahlung.
|
||||
* 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.
|
||||
\*************************************************************************/
|
||||
|
||||
@@ -50,6 +49,13 @@
|
||||
#define DEFAULT_CA_PRIORITY 0 /* Default CA priority */
|
||||
#define DEFAULT_TIMEOUT 1.0 /* Default CA timeout */
|
||||
|
||||
#ifndef _WIN32
|
||||
# define LINE_BUFFER(stream) setvbuf(stream, NULL, _IOLBF, BUFSIZ)
|
||||
#else
|
||||
/* Windows doesn't support line mode, turn buffering off completely */
|
||||
# define LINE_BUFFER(stream) setvbuf(stream, NULL, _IONBF, 0)
|
||||
#endif
|
||||
|
||||
|
||||
/* Type of timestamp */
|
||||
typedef enum { absolute, relative, incremental, incrementalByChan } TimeT;
|
||||
|
||||
@@ -196,8 +196,8 @@ private:
|
||||
dbContextReadNotifyCache readNotifyCache;
|
||||
dbEventCtx ctx;
|
||||
unsigned long stateNotifyCacheSize;
|
||||
mutable epicsMutex & mutex;
|
||||
mutable epicsMutex & cbMutex;
|
||||
epicsMutex & mutex;
|
||||
epicsMutex & cbMutex;
|
||||
cacContextNotify & notify;
|
||||
epics_auto_ptr < cacContext > pNetContext;
|
||||
char * pStateNotifyCache;
|
||||
|
||||
@@ -495,9 +495,7 @@ static void errlogThread(void)
|
||||
epicsAtExit(exitHandler,0);
|
||||
while (TRUE) {
|
||||
epicsEventMustWait(pvtData.waitForWork);
|
||||
if (pvtData.atExit) break;
|
||||
while ((pmessage = msgbufGetSend(&noConsoleMessage))) {
|
||||
if (pvtData.atExit) break;
|
||||
epicsMutexMustLock(pvtData.listenerLock);
|
||||
if (pvtData.toConsole && !noConsoleMessage) {
|
||||
fprintf(stderr,"%s",pmessage);
|
||||
|
||||
@@ -798,6 +798,8 @@ iocshBody (const char *pathname, const char *commandLine)
|
||||
int epicsShareAPI
|
||||
iocsh (const char *pathname)
|
||||
{
|
||||
if (pathname)
|
||||
epicsEnvSet("IOCSH_STARTUP_SCRIPT", pathname);
|
||||
return iocshBody(pathname, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -224,6 +224,14 @@ static inline double MIN(double a, double b, double c, double d, double e,
|
||||
return MIN(MIN(a,b,c,d,e,f,g,h,i,j,k),l);
|
||||
}
|
||||
|
||||
/* The test code below generates lots of spurious warnings because
|
||||
* it's making sure that our operator priorities match those of C.
|
||||
* Disable them to quieten the compilation process where possible.
|
||||
*/
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
|
||||
# pragma GCC diagnostic ignored "-Wparentheses"
|
||||
#endif
|
||||
|
||||
MAIN(epicsCalcTest)
|
||||
{
|
||||
int repeat;
|
||||
|
||||
@@ -58,20 +58,21 @@ epicsTimerQueueActiveForC & timerQueueActiveMgr ::
|
||||
void timerQueueActiveMgr ::
|
||||
release ( epicsTimerQueueActiveForC & queue )
|
||||
{
|
||||
timerQueueActiveMgrPrivate * pPriv = & queue;
|
||||
{
|
||||
epicsGuard < epicsMutex > locker ( this->mutex );
|
||||
assert ( queue.timerQueueActiveMgrPrivate::referenceCount > 0u );
|
||||
queue.timerQueueActiveMgrPrivate::referenceCount--;
|
||||
if ( queue.timerQueueActiveMgrPrivate::referenceCount == 0u ) {
|
||||
if ( queue.sharingOK () ) {
|
||||
this->sharedQueueList.remove ( queue );
|
||||
}
|
||||
if ( queue.timerQueueActiveMgrPrivate::referenceCount > 0u ) {
|
||||
return;
|
||||
}
|
||||
else if ( queue.sharingOK () ) {
|
||||
this->sharedQueueList.remove ( queue );
|
||||
}
|
||||
}
|
||||
// delete only after we release the guard in case the embedded
|
||||
// reference is the last one and this object is destroyed
|
||||
// as a side effect
|
||||
timerQueueActiveMgrPrivate * pPriv = & queue;
|
||||
delete pPriv;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,6 @@ put into a file. It converts paths from the Unix form that Perl understands to
|
||||
any necessary external representation, and also removes automounter prefixes to
|
||||
put the path into its canonical form.
|
||||
|
||||
On cygwin we convert cygdrive paths to their equivalent Windows drive specs.
|
||||
Before Leopard, the Mac OS X automounter inserted a verbose prefix, and in case
|
||||
anyone is still using SunOS it adds its own prefix as well.
|
||||
|
||||
@@ -72,9 +71,7 @@ anyone is still using SunOS it adds its own prefix as well.
|
||||
|
||||
sub LocalPath {
|
||||
my ($newpath) = @_;
|
||||
if ($^O eq 'cygwin') {
|
||||
$newpath =~ s{^/cygdrive/([a-zA-Z])/}{$1:/};
|
||||
} elsif ($^O eq 'darwin') {
|
||||
if ($^O eq 'darwin') {
|
||||
# Darwin automounter
|
||||
$newpath =~ s{^/private/var/auto\.}{/};
|
||||
} elsif ($^O eq 'sunos') {
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* iocLogServer.c */
|
||||
/* base/src/util $Revision-Id$ */
|
||||
/* $Revision-Id$ */
|
||||
|
||||
/*
|
||||
* archive logMsg() from several IOC's to a common rotating file
|
||||
* archive logMsg() from several IOC's to a common rotating file
|
||||
*
|
||||
*
|
||||
* Author: Jeffrey O. Hill
|
||||
@@ -903,40 +902,35 @@ static void serviceSighupRequest(void *pParam)
|
||||
}
|
||||
|
||||
/*
|
||||
* If it's changed, open the new file.
|
||||
* Try (re)opening the file.
|
||||
*/
|
||||
if (strcmp(ioc_log_file_name, pserver->outfile) == 0) {
|
||||
status = openLogFile(pserver);
|
||||
if(status<0){
|
||||
fprintf(stderr,
|
||||
"iocLogServer: log file name unchanged; not re-opened\n");
|
||||
}
|
||||
else {
|
||||
"File access problems to `%s' because `%s'\n",
|
||||
ioc_log_file_name,
|
||||
strerror(errno));
|
||||
/* Revert to old filename */
|
||||
strcpy(ioc_log_file_name, pserver->outfile);
|
||||
status = openLogFile(pserver);
|
||||
if(status<0){
|
||||
fprintf(stderr,
|
||||
"File access problems to `%s' because `%s'\n",
|
||||
"File access problems to `%s' because `%s'\n",
|
||||
ioc_log_file_name,
|
||||
strerror(errno));
|
||||
strcpy(ioc_log_file_name, pserver->outfile);
|
||||
status = openLogFile(pserver);
|
||||
if(status<0){
|
||||
fprintf(stderr,
|
||||
"File access problems to `%s' because `%s'\n",
|
||||
ioc_log_file_name,
|
||||
strerror(errno));
|
||||
return;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,
|
||||
"iocLogServer: re-opened old log file %s\n",
|
||||
ioc_log_file_name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,
|
||||
"iocLogServer: opened new log file %s\n",
|
||||
"iocLogServer: re-opened old log file %s\n",
|
||||
ioc_log_file_name);
|
||||
}
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,
|
||||
"iocLogServer: opened new log file %s\n",
|
||||
ioc_log_file_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user