Merge 3.14 changes from 2011-06-06 to 2011-08-17

This commit is contained in:
Andrew Johnson
2011-08-17 16:36:38 -05:00
25 changed files with 145 additions and 132 deletions
+2 -2
View File
@@ -246,7 +246,7 @@ $Date$</span></small></p>
<h3>Why Reconfigure Channel Access</h3>
<p>Typically reasons to reconfigure EPICS Channel Access:</p>
<p>Typical reasons to reconfigure EPICS Channel Access:</p>
<ul>
<li>Two independent control systems must share a network without fear of
interaction</li>
@@ -4359,7 +4359,7 @@ that use ca_context_destroy).</p>
<p><a href="#ca_context_destroy">ca_context_destroy</a>()</p>
<h3><code><a name="ca_dump_dbr">ca_dump_dbr()</a></code></h3>
<pre>void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);</pre>
<code><pre>void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);</pre></code>
<h4>Description</h4>
+10 -9
View File
@@ -81,8 +81,9 @@ udpiiu::udpiiu (
cac::lowestPriorityLevelAbove (
cac::lowestPriorityLevelAbove (
cac.getInitializingThreadsPriority () ) ) ),
m_repeaterTimerNotify ( *this ),
repeaterSubscribeTmr (
*this, timerQueue, cbMutexIn, ctxNotifyIn ),
m_repeaterTimerNotify, timerQueue, cbMutexIn, ctxNotifyIn ),
govTmr ( *this, timerQueue, cacMutexIn ),
maxPeriod ( maxSearchPeriodDefault ),
rtteMean ( minRoundTripEstimate ),
@@ -397,14 +398,14 @@ void udpRecvThread::run ()
}
/*
* udpiiu::repeaterRegistrationMessage ()
* udpiiu::M_repeaterTimerNotify::repeaterRegistrationMessage ()
*
* register with the repeater
*/
void udpiiu::repeaterRegistrationMessage ( unsigned attemptNumber )
void udpiiu :: M_repeaterTimerNotify :: repeaterRegistrationMessage ( unsigned attemptNumber )
{
epicsGuard < epicsMutex > cbGuard ( this->cacMutex );
caRepeaterRegistrationMessage ( this->sock, this->repeaterPort, attemptNumber );
epicsGuard < epicsMutex > cbGuard ( m_udpiiu.cacMutex );
caRepeaterRegistrationMessage ( m_udpiiu.sock, m_udpiiu.repeaterPort, attemptNumber );
}
/*
@@ -1233,16 +1234,16 @@ void udpiiu::govExpireNotify (
this->ppSearchTmr[0]->installChannel ( guard, chan );
}
int udpiiu :: printFormated (
epicsGuard < epicsMutex > & cbGuard,
const char * pformat, ... )
int udpiiu :: M_repeaterTimerNotify :: printFormated (
epicsGuard < epicsMutex > & cbGuard,
const char * pformat, ... )
{
va_list theArgs;
int status;
va_start ( theArgs, pformat );
status = this->cacRef.varArgsPrintFormated ( cbGuard, pformat, theArgs );
status = m_udpiiu.cacRef.varArgsPrintFormated ( cbGuard, pformat, theArgs );
va_end ( theArgs );
+16 -10
View File
@@ -88,8 +88,7 @@ static const double beaconAnomalySearchPeriod = 5.0; // seconds
class udpiiu :
private netiiu,
private searchTimerNotify,
private disconnectGovernorNotify,
private repeaterTimerNotify {
private disconnectGovernorNotify {
public:
udpiiu (
epicsGuard < epicsMutex > & cacGuard,
@@ -139,9 +138,24 @@ private:
private:
udpiiu & _udpiiu;
};
class M_repeaterTimerNotify :
public repeaterTimerNotify {
public:
M_repeaterTimerNotify ( udpiiu & iiu ) :
m_udpiiu ( iiu ) {}
// repeaterTimerNotify
void repeaterRegistrationMessage (
unsigned attemptNumber );
int printFormated (
epicsGuard < epicsMutex > & callbackControl,
const char * pformat, ... );
private:
udpiiu & m_udpiiu;
};
char xmitBuf [MAX_UDP_SEND];
char recvBuf [MAX_UDP_RECV];
udpRecvThread recvThread;
M_repeaterTimerNotify m_repeaterTimerNotify;
repeaterSubscribeTimer repeaterSubscribeTmr;
disconnectGovernorTimer govTmr;
tsDLList < SearchDest > _searchDestList;
@@ -278,14 +292,6 @@ private:
void govExpireNotify (
epicsGuard < epicsMutex > &, nciu & );
// repeaterTimerNotify
void repeaterRegistrationMessage (
unsigned attemptNumber );
int printFormated (
epicsGuard < epicsMutex > & callbackControl,
const char * pformat, ... );
udpiiu ( const udpiiu & );
udpiiu & operator = ( const udpiiu & );
+1 -1
View File
@@ -34,7 +34,7 @@ public:
void * pInstance () const;
private:
void * _pInstance;
size_t _refCount;
std :: size_t _refCount;
SingletonUntyped ( const SingletonUntyped & );
SingletonUntyped & operator = ( const SingletonUntyped & );
};
+8 -15
View File
@@ -41,7 +41,6 @@
/*Declare storage for errVerbose */
epicsShareDef int errVerbose = 0;
static void errlogCleanup(void);
static void exitHandler(void *);
static void errlogThread(void);
@@ -391,8 +390,15 @@ static void exitHandler(void *pvt)
pvtData.atExit = 1;
epicsEventSignal(pvtData.waitForWork);
epicsEventMustWait(pvtData.waitForExit);
free(pvtData.pbuffer);
epicsMutexDestroy(pvtData.flushLock);
epicsEventDestroy(pvtData.flush);
epicsEventDestroy(pvtData.waitForFlush);
epicsMutexDestroy(pvtData.listenerLock);
epicsMutexDestroy(pvtData.msgQueueLock);
epicsEventDestroy(pvtData.waitForWork);
epicsEventDestroy(pvtData.waitForExit);
return;
}
struct initArgs {
@@ -432,18 +438,6 @@ static void errlogInitPvt(void *arg)
pvtData.errlogInitFailed = FALSE;
}
}
static void errlogCleanup(void)
{
free(pvtData.pbuffer);
epicsMutexDestroy(pvtData.flushLock);
epicsEventDestroy(pvtData.flush);
epicsEventDestroy(pvtData.waitForFlush);
epicsMutexDestroy(pvtData.listenerLock);
epicsMutexDestroy(pvtData.msgQueueLock);
epicsEventDestroy(pvtData.waitForWork);
/*Note that exitHandler must destroy waitForExit*/
}
epicsShareFunc int epicsShareAPI errlogInit2(int bufsize, int maxMsgSize)
{
@@ -514,7 +508,6 @@ static void errlogThread(void)
epicsThreadSleep(.2); /*just wait an extra .2 seconds*/
epicsEventSignal(pvtData.waitForFlush);
}
errlogCleanup();
epicsEventSignal(pvtData.waitForExit);
}
+1 -1
View File
@@ -95,7 +95,7 @@
/*
* Deprecation marker
*/
#ifdef __GNUC__
#if defined( __GNUC__ ) && (__GNUC__ > 2)
# define EPICS_DEPRECATED __attribute__((deprecated))
#else
# define EPICS_DEPRECATED
+5 -3
View File
@@ -50,9 +50,9 @@ static myISR *isrFetch(unsigned vectorNumber);
/*
* this routine needs to be in the symbol table
* for this code to work correctly
* (i.e. not static) for this code to work correctly
*/
static void unsolicitedHandlerEPICS(int vectorNumber);
void unsolicitedHandlerEPICS(int vectorNumber);
/*
* this is in veclist.c
@@ -412,8 +412,10 @@ static int vxDevInterruptInUseVME (unsigned vectorNumber)
* interrupt and an interrupt arrives on the
* disconnected vector
*
* This routine needs to be in the symbol table
* (i.e. not static) for this code to work correctly
*/
static void unsolicitedHandlerEPICS(int vectorNumber)
void unsolicitedHandlerEPICS(int vectorNumber)
{
/*
* call logMsg() and not errMessage()
+14
View File
@@ -506,6 +506,7 @@ static void doCloseLinks(dbRecordType *pdbRecordType, dbCommon *precord,
devSup *pdevSup;
struct dsxt *pdsxt;
int j;
int locked = 0;
for (j = 0; j < pdbRecordType->no_links; j++) {
dbFldDes *pdbFldDes =
@@ -513,7 +514,12 @@ static void doCloseLinks(dbRecordType *pdbRecordType, dbCommon *precord,
DBLINK *plink = (DBLINK *)((char *)precord + pdbFldDes->offset);
if (plink->type == CA_LINK) {
if (!locked) {
dbScanLock(precord);
locked = 1;
}
dbCaRemoveLink(plink);
plink->type = CONSTANT;
}
}
@@ -521,8 +527,16 @@ static void doCloseLinks(dbRecordType *pdbRecordType, dbCommon *precord,
(pdevSup = dbDSETtoDevSup(pdbRecordType, precord->dset)) &&
(pdsxt = pdevSup->pdsxt) &&
pdsxt->del_record) {
if (!locked) {
dbScanLock(precord);
locked = 1;
}
pdsxt->del_record(precord);
}
if (locked) {
precord->pact = TRUE;
dbScanUnlock(precord);
}
}
static void exitDatabase(void *dummy)
+7 -5
View File
@@ -92,12 +92,14 @@ static void reset(compressRecord *prec)
static void monitor(compressRecord *prec)
{
unsigned short monitor_mask;
unsigned short alarm_mask = recGblResetAlarms(prec);
unsigned short monitor_mask = alarm_mask | DBE_LOG | DBE_VALUE;
monitor_mask = recGblResetAlarms(prec);
monitor_mask |= (DBE_LOG|DBE_VALUE);
if(monitor_mask) db_post_events(prec,prec->bptr,monitor_mask);
return;
if (alarm_mask || prec->nuse != prec->ouse) {
db_post_events(prec, &prec->nuse, monitor_mask);
prec->ouse = prec->nuse;
}
db_post_events(prec, prec->bptr, monitor_mask);
}
static void put_value(compressRecord *prec,double *psource, epicsInt32 n)
+4
View File
@@ -95,6 +95,10 @@ recordtype(compress) {
prompt("Number Used")
special(SPC_NOMOD)
}
field(OUSE,DBF_ULONG) {
prompt("Old Number Used")
special(SPC_NOMOD)
}
field(BPTR,DBF_NOACCESS) {
prompt("Buffer Pointer")
special(SPC_NOMOD)
+2 -2
View File
@@ -19,7 +19,7 @@ use strict;
use FindBin qw($Bin);
use lib ("$Bin/../../lib/perl", $Bin);
use Cwd qw(cwd abs_path);
use Cwd qw(cwd);
use Getopt::Std;
use EPICS::Path;
use EPICS::Release;
@@ -215,7 +215,7 @@ sub checkRelease {
while (my ($parent, $ppath) = each %check) {
if (exists $macros{$parent} &&
abs_path($macros{$parent}) ne abs_path($ppath)) {
AbsPath($macros{$parent}) ne AbsPath($ppath)) {
print "\n" unless ($status);
print "Definition of $parent conflicts with $app support.\n";
print "In this application a RELEASE file defines\n";
+1 -1
View File
@@ -29,7 +29,7 @@ $Getopt::Std::OUTPUT_HELP_VERSION = 1;
my $path = AbsPath(shift);
# Escape shell special characters unless on Windows, which doesn't allow them.
$path =~ s/([!"\$&'\(\)*,:;<=>?\[\\\]^`{|}])/\\\1/g unless $^O eq 'MSWin32';
$path =~ s/([!"\$&'\(\)*,:;<=>?\[\\\]^`{|}])/\\$1/g unless $^O eq 'MSWin32';
print "$path\n";
+15 -24
View File
@@ -3,31 +3,22 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
# Called from within RULES.Db in the Db directories.
# Searches .substitutions and .template files (from the command line) for
# "file xxx {" entries to create a DEPENDS file
# and
# 'include "xxx"' entries to create a DEPENDS file
# file ["']xxx["'] {
# and
# include "xxx"
# entries to include in the DEPENDS file
use strict;
$target = $ARGV[0];
shift @ARGV;
my $target = shift @ARGV;
my %depends;
foreach $file (@ARGV) {
open(IN, "<$file") or die "Cannot open $file: $!";
@infile = <IN>;
close IN or die "Cannot close $file: $!";
@depends = grep { s/^\s*file\s*(.*)\s*\{.*$/\1/ } @infile;
chomp @depends;
if (@depends) {
print "$target: @depends\n";
}
@depends2 = grep { s/^\s*include\s*\"\s*(.*)\s*\".*$/\1/ } @infile;
chomp @depends2;
if (@depends2) {
print "$target: @depends2\n";
}
while (my $line = <>) {
$depends{$2}++ if $line =~ m/^\s*file\s*(["']?)(.*)\1/;
$depends{$1}++ if $line =~ m/^\s*include\s+"(.*)"/;
}
if (%depends) {
my @depends = keys %depends;
print "$target: @depends\n";
}