patches applied

This commit is contained in:
zimoch
2011-03-22 13:27:48 +00:00
parent cbb2c166c4
commit 564430c269
18 changed files with 3832 additions and 27 deletions
+1
View File
@@ -1,2 +1,3 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-686
COMMANDLINE_LIBRARY = READLINE_NCURSES
+1 -1
View File
@@ -1,6 +1,6 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 5.5
WIND_BASE = /usr/local/Tornado2
WIND_BASE = /afs/psi.ch/project/vxworks/Tornado2.2
#there is a problem with our ccppc and optimization
# -O and -O0 work, -O1 and higher are buggy
+3
View File
@@ -1,2 +1,5 @@
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
CROSS_COMPILER_TARGET_ARCHS += embeddedlinux-xscale_be
CROSS_COMPILER_TARGET_ARCHS += embeddedlinux-ppc405
@@ -5,6 +5,6 @@
# Site specific override definitions for solaris-sparc host builds
# Only the local epics system manager should modify this file
#INSTALL_LOCATION = /home/phoebus/JBA/testBaseNew
INSTALL_LOCATION = /afs/psi.ch/group/8431/dirk/solaris/base-3.14.12
#CROSS_COMPILER_TARGET_ARCHS += vxWorks-ppc604 vxWorks-ppc603 vxWorks-68040
+17
View File
@@ -0,0 +1,17 @@
=== modified file 'src/libCom/error/errlog.c'
--- src/libCom/error/errlog.c 2010-11-15 21:46:40 +0000
+++ src/libCom/error/errlog.c 2011-01-07 16:04:56 +0000
@@ -119,10 +119,11 @@
errlogInit(0);
if (pvtData.atExit || (isOkToBlock && pvtData.toConsole)) {
va_start(pvar, pFormat);
- vfprintf(stderr, pFormat, pvar);
+ nchar = vfprintf(stderr, pFormat, pvar);
va_end (pvar);
fflush(stderr);
}
+ if (pvtData.atExit) return nchar;
pbuffer = msgbufGetFree(isOkToBlock);
if (!pbuffer) return 0;
va_start(pvar, pFormat);
+30
View File
@@ -0,0 +1,30 @@
=== modified file 'src/libCom/error/errlog.c'
--- src/libCom/error/errlog.c 2011-01-07 16:24:31 +0000
+++ src/libCom/error/errlog.c 2011-03-01 18:02:19 +0000
@@ -534,8 +534,10 @@
char *plimit = pbuffer + pvtData.buffersize;
pnextFree = plast->message + adjustToWorstCaseAlignment(plast->length);
- if (pfirst <= plast &&
- pnextFree + pvtData.msgNeeded > plimit) {
+ if (pfirst > plast) {
+ plimit = (char *)pfirst;
+ }
+ else if (pnextFree + pvtData.msgNeeded > plimit) {
pnextFree = pbuffer; /* Hit end, wrap to start */
plimit = (char *)pfirst;
}
=== modified file 'src/libCom/test/epicsErrlogTest.c'
--- src/libCom/test/epicsErrlogTest.c 2010-09-30 19:36:30 +0000
+++ src/libCom/test/epicsErrlogTest.c 2011-03-01 20:53:34 +0000
@@ -282,7 +282,7 @@
errlogFlush();
testDiag("Logged %u messages", pvt.count);
- testOk1(pvt.count == N+2);
+ testOk1(pvt.count == N+1);
/* Clean up */
errlogRemoveListener(&logClient);
+68
View File
@@ -0,0 +1,68 @@
=== modified file 'src/registry/registerRecordDeviceDriver.pl'
--- src/registry/registerRecordDeviceDriver.pl 2010-03-08 23:31:19 +0000
+++ src/registry/registerRecordDeviceDriver.pl 2010-12-16 19:43:51 +0000
@@ -9,6 +9,10 @@
# in file LICENSE that is included with this distribution.
#*************************************************************************
+use FindBin qw($Bin);
+use lib "$Bin/../../lib/perl";
+use EPICS::Path;
+
($file, $subname, $bldTop) = @ARGV;
$numberRecordType = 0;
$numberDeviceSupport = 0;
@@ -18,6 +22,10 @@
$c_bad_ident_chars = '[^0-9A-Za-z_]';
$subname =~ s/$c_bad_ident_chars/_/g;
+# Process bldTop like convertRelease.pl does
+$bldTop = LocalPath(UnixPath($bldTop));
+$bldTop =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes
+
open(INP,"$file") or die "$! opening file";
while(<INP>) {
next if m/ ^ \s* \# /x;
=== modified file 'src/tools/convertRelease.pl'
--- src/tools/convertRelease.pl 2010-10-26 14:27:47 +0000
+++ src/tools/convertRelease.pl 2010-12-16 19:45:46 +0000
@@ -144,6 +144,7 @@
my $startup = $cwd;
$startup =~ s/^$root/$iocroot/o if ($opt_t);
+ $startup =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes
print OUT "startup = \"$startup\"\n";
@@ -156,6 +157,7 @@
foreach my $app (@includes) {
my $iocpath = my $path = $macros{$app};
$iocpath =~ s/^$root/$iocroot/o if ($opt_t);
+ $iocpath =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes
my $app_lc = lc($app);
print OUT "$app_lc = \"$iocpath\"\n"
if (-d $path);
@@ -187,6 +189,7 @@
foreach my $app (@includes) {
my $iocpath = my $path = $macros{$app};
$iocpath =~ s/^$root/$iocroot/o if ($opt_t);
+ $iocpath =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes
print OUT "epicsEnvSet(\"$app\",\"$iocpath\")\n" if (-d $path);
}
close OUT;
=== modified file 'src/tools/fullPathName.pl'
--- src/tools/fullPathName.pl 2010-10-26 14:27:47 +0000
+++ src/tools/fullPathName.pl 2010-12-16 22:49:00 +0000
@@ -28,6 +28,9 @@
my $path = AbsPath(shift);
+# Escape shell special characters unless on Windows, which doesn't allow them.
+$path =~ s/([!"\$&'\(\)*,:;<=>?\[\\\]^`{|}])/\\\1/g unless $^O eq 'MSWin32';
+
print "$path\n";
+3539
View File
File diff suppressed because it is too large Load Diff
+37
View File
@@ -0,0 +1,37 @@
=== modified file 'src/rsrv/caserverio.c'
--- src/rsrv/caserverio.c 2010-08-13 17:59:50 +0000
+++ src/rsrv/caserverio.c 2011-01-13 16:22:04 +0000
@@ -33,10 +33,6 @@
#define epicsExportSharedSymbols
#include "server.h"
-/* As an optimisation, any message allocated with a large header is resized to
- * use a small header if the payload size is below this threshold. */
-#define SMALL_MESSAGE_THRESHOLD 65
-
/*
* cas_send_bs_msg()
*
@@ -357,19 +353,8 @@
if ( pMsg->m_postsize == htons ( 0xffff ) ) {
ca_uint32_t * pLW = ( ca_uint32_t * ) ( pMsg + 1 );
assert ( size <= ntohl ( *pLW ) );
- if (size < SMALL_MESSAGE_THRESHOLD) {
- /* If the message is sufficiently small it can be worth converting a
- * large message header into a small header. This saves us all of 8
- * bytes over the wire, so it's not such a big deal. */
- pMsg->m_postsize = htons((ca_uint16_t) size);
- pMsg->m_count = htons((ca_uint16_t) ntohl(pLW[1]));
- memmove(pLW, pLW + 2, size);
- size += sizeof(caHdr);
- }
- else {
- pLW[0] = htonl ( size );
- size += sizeof ( caHdr ) + 2 * sizeof ( *pLW );
- }
+ pLW[0] = htonl ( size );
+ size += sizeof ( caHdr ) + 2 * sizeof ( *pLW );
}
else {
assert ( size <= ntohs ( pMsg->m_postsize ) );
+14
View File
@@ -1866,10 +1866,14 @@ void tcpiiu::unlinkAllChannels (
guard.assertIdenticalMutex ( this->mutex );
while ( nciu * pChan = this->createReqPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->serviceShutdownNotify ( cbGuard, guard );
}
while ( nciu * pChan = this->createRespPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
// we dont yet know the server's id so we cant
// send a channel delete request and will instead
// trust that the server can do the proper cleanup
@@ -1878,12 +1882,16 @@ void tcpiiu::unlinkAllChannels (
}
while ( nciu * pChan = this->v42ConnCallbackPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
pChan->serviceShutdownNotify ( cbGuard, guard );
}
while ( nciu * pChan = this->subscripReqPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
@@ -1891,6 +1899,8 @@ void tcpiiu::unlinkAllChannels (
}
while ( nciu * pChan = this->connectedList.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
@@ -1898,6 +1908,8 @@ void tcpiiu::unlinkAllChannels (
}
while ( nciu * pChan = this->unrespCircuit.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
// if we know that the circuit is unresponsive
// then we dont send a channel delete request and
@@ -1907,6 +1919,8 @@ void tcpiiu::unlinkAllChannels (
}
while ( nciu * pChan = this->subscripUpdateReqPend.get () ) {
pChan->channelNode::listMember =
channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
+6 -3
View File
@@ -119,10 +119,11 @@ epicsShareFunc int errlogPrintf(const char *pFormat, ...)
errlogInit(0);
if (pvtData.atExit || (isOkToBlock && pvtData.toConsole)) {
va_start(pvar, pFormat);
vfprintf(stderr, pFormat, pvar);
nchar = vfprintf(stderr, pFormat, pvar);
va_end (pvar);
fflush(stderr);
}
if (pvtData.atExit) return nchar;
pbuffer = msgbufGetFree(isOkToBlock);
if (!pbuffer) return 0;
va_start(pvar, pFormat);
@@ -533,8 +534,10 @@ static msgNode *msgbufGetNode(void)
char *plimit = pbuffer + pvtData.buffersize;
pnextFree = plast->message + adjustToWorstCaseAlignment(plast->length);
if (pfirst <= plast &&
pnextFree + pvtData.msgNeeded > plimit) {
if (pfirst > plast) {
plimit = (char *)pfirst;
}
else if (pnextFree + pvtData.msgNeeded > plimit) {
pnextFree = pbuffer; /* Hit end, wrap to start */
plimit = (char *)pfirst;
}
+7 -4
View File
@@ -628,18 +628,21 @@ epicsShareFunc epicsThreadId epicsShareAPI epicsThreadCreate (const char *pName,
free ( pParmWIN32 );
return NULL;
}
EnterCriticalSection ( & pGbl->mutex );
ellAdd ( & pGbl->threadList, & pParmWIN32->node );
LeaveCriticalSection ( & pGbl->mutex );
wstat = ResumeThread ( pParmWIN32->handle );
if (wstat==0xFFFFFFFF) {
EnterCriticalSection ( & pGbl->mutex );
ellDelete ( & pGbl->threadList, & pParmWIN32->node );
LeaveCriticalSection ( & pGbl->mutex );
CloseHandle ( pParmWIN32->handle );
free ( pParmWIN32 );
return NULL;
}
EnterCriticalSection ( & pGbl->mutex );
ellAdd ( & pGbl->threadList, & pParmWIN32->node );
LeaveCriticalSection ( & pGbl->mutex );
return ( epicsThreadId ) pParmWIN32;
}
+1 -1
View File
@@ -282,7 +282,7 @@ MAIN(epicsErrlogTest)
errlogFlush();
testDiag("Logged %u messages", pvt.count);
testOk1(pvt.count == N+2);
testOk1(pvt.count == N+1);
/* Clean up */
errlogRemoveListener(&logClient);
@@ -9,6 +9,10 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
# in file LICENSE that is included with this distribution.
#*************************************************************************
use FindBin qw($Bin);
use lib "$Bin/../../lib/perl";
use EPICS::Path;
($file, $subname, $bldTop) = @ARGV;
$numberRecordType = 0;
$numberDeviceSupport = 0;
@@ -18,6 +22,10 @@ $numberDriverSupport = 0;
$c_bad_ident_chars = '[^0-9A-Za-z_]';
$subname =~ s/$c_bad_ident_chars/_/g;
# Process bldTop like convertRelease.pl does
$bldTop = LocalPath(UnixPath($bldTop));
$bldTop =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes
open(INP,"$file") or die "$! opening file";
while(<INP>) {
next if m/ ^ \s* \# /x;
+2 -17
View File
@@ -33,10 +33,6 @@
#define epicsExportSharedSymbols
#include "server.h"
/* As an optimisation, any message allocated with a large header is resized to
* use a small header if the payload size is below this threshold. */
#define SMALL_MESSAGE_THRESHOLD 65
/*
* cas_send_bs_msg()
*
@@ -357,19 +353,8 @@ void cas_commit_msg ( struct client *pClient, ca_uint32_t size )
if ( pMsg->m_postsize == htons ( 0xffff ) ) {
ca_uint32_t * pLW = ( ca_uint32_t * ) ( pMsg + 1 );
assert ( size <= ntohl ( *pLW ) );
if (size < SMALL_MESSAGE_THRESHOLD) {
/* If the message is sufficiently small it can be worth converting a
* large message header into a small header. This saves us all of 8
* bytes over the wire, so it's not such a big deal. */
pMsg->m_postsize = htons((ca_uint16_t) size);
pMsg->m_count = htons((ca_uint16_t) ntohl(pLW[1]));
memmove(pLW, pLW + 2, size);
size += sizeof(caHdr);
}
else {
pLW[0] = htonl ( size );
size += sizeof ( caHdr ) + 2 * sizeof ( *pLW );
}
pLW[0] = htonl ( size );
size += sizeof ( caHdr ) + 2 * sizeof ( *pLW );
}
else {
assert ( size <= ntohs ( pMsg->m_postsize ) );
+3
View File
@@ -144,6 +144,7 @@ sub cdCommands {
my $startup = $cwd;
$startup =~ s/^$root/$iocroot/o if ($opt_t);
$startup =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes
print OUT "startup = \"$startup\"\n";
@@ -156,6 +157,7 @@ sub cdCommands {
foreach my $app (@includes) {
my $iocpath = my $path = $macros{$app};
$iocpath =~ s/^$root/$iocroot/o if ($opt_t);
$iocpath =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes
my $app_lc = lc($app);
print OUT "$app_lc = \"$iocpath\"\n"
if (-d $path);
@@ -187,6 +189,7 @@ sub envPaths {
foreach my $app (@includes) {
my $iocpath = my $path = $macros{$app};
$iocpath =~ s/^$root/$iocroot/o if ($opt_t);
$iocpath =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes
print OUT "epicsEnvSet(\"$app\",\"$iocpath\")\n" if (-d $path);
}
close OUT;
+3
View File
@@ -28,6 +28,9 @@ $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';
print "$path\n";
+91
View File
@@ -0,0 +1,91 @@
=== modified file 'src/ca/tcpiiu.cpp'
--- src/ca/tcpiiu.cpp 2010-09-20 21:21:50 +0000
+++ src/ca/tcpiiu.cpp 2011-01-15 00:53:33 +0000
@@ -1866,10 +1866,14 @@
guard.assertIdenticalMutex ( this->mutex );
while ( nciu * pChan = this->createReqPend.get () ) {
+ pChan->channelNode::listMember =
+ channelNode::cs_none;
pChan->serviceShutdownNotify ( cbGuard, guard );
}
while ( nciu * pChan = this->createRespPend.get () ) {
+ pChan->channelNode::listMember =
+ channelNode::cs_none;
// we dont yet know the server's id so we cant
// send a channel delete request and will instead
// trust that the server can do the proper cleanup
@@ -1878,12 +1882,16 @@
}
while ( nciu * pChan = this->v42ConnCallbackPend.get () ) {
+ pChan->channelNode::listMember =
+ channelNode::cs_none;
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
pChan->serviceShutdownNotify ( cbGuard, guard );
}
while ( nciu * pChan = this->subscripReqPend.get () ) {
+ pChan->channelNode::listMember =
+ channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
@@ -1891,6 +1899,8 @@
}
while ( nciu * pChan = this->connectedList.get () ) {
+ pChan->channelNode::listMember =
+ channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
@@ -1898,6 +1908,8 @@
}
while ( nciu * pChan = this->unrespCircuit.get () ) {
+ pChan->channelNode::listMember =
+ channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
// if we know that the circuit is unresponsive
// then we dont send a channel delete request and
@@ -1907,6 +1919,8 @@
}
while ( nciu * pChan = this->subscripUpdateReqPend.get () ) {
+ pChan->channelNode::listMember =
+ channelNode::cs_none;
pChan->disconnectAllIO ( cbGuard, guard );
this->clearChannelRequest ( guard,
pChan->getSID(guard), pChan->getCID(guard) );
=== modified file 'src/libCom/osi/os/WIN32/osdThread.c'
--- src/libCom/osi/os/WIN32/osdThread.c 2011-01-15 01:00:02 +0000
+++ src/libCom/osi/os/WIN32/osdThread.c 2011-02-11 22:33:58 +0000
@@ -630,18 +630,21 @@
free ( pParmWIN32 );
return NULL;
}
+
+ EnterCriticalSection ( & pGbl->mutex );
+ ellAdd ( & pGbl->threadList, & pParmWIN32->node );
+ LeaveCriticalSection ( & pGbl->mutex );
wstat = ResumeThread ( pParmWIN32->handle );
if (wstat==0xFFFFFFFF) {
+ EnterCriticalSection ( & pGbl->mutex );
+ ellDelete ( & pGbl->threadList, & pParmWIN32->node );
+ LeaveCriticalSection ( & pGbl->mutex );
CloseHandle ( pParmWIN32->handle );
free ( pParmWIN32 );
return NULL;
}
- EnterCriticalSection ( & pGbl->mutex );
- ellAdd ( & pGbl->threadList, & pParmWIN32->node );
- LeaveCriticalSection ( & pGbl->mutex );
-
return ( epicsThreadId ) pParmWIN32;
}