Fix spelling in comments
Should be non-functional, except for some error message strings.
This commit is contained in:
@@ -88,7 +88,7 @@ const char * ca_message_text []
|
||||
"Bad event subscription (monitor) identifier",
|
||||
"Remote channel has new network address",
|
||||
"New or resumed network connection",
|
||||
"Specified task isnt a member of a CA context",
|
||||
"Specified task isn't a member of a CA context",
|
||||
"Attempt to use defunct CA feature failed",
|
||||
|
||||
"The supplied string is empty",
|
||||
@@ -324,7 +324,7 @@ int epicsStdCall ca_create_channel (
|
||||
*chanptr = pChanNotify;
|
||||
pChanNotify->initiateConnect ( guard );
|
||||
// no need to worry about a connect preempting here because
|
||||
// the connect sequence will not start untill initiateConnect()
|
||||
// the connect sequence will not start until initiateConnect()
|
||||
// is called
|
||||
}
|
||||
catch ( cacChannel::badString & ) {
|
||||
@@ -384,9 +384,9 @@ int epicsStdCall ca_clear_channel ( chid pChan )
|
||||
// we will definately stall out here if all of the
|
||||
// following are true
|
||||
//
|
||||
// o user creates non-preemtive mode client library context
|
||||
// o user creates non-preemptive mode client library context
|
||||
// o user doesnt periodically call a ca function
|
||||
// o user calls this function from an auxiillary thread
|
||||
// o user calls this function from an auxiliary thread
|
||||
//
|
||||
CallbackGuard cbGuard ( cac.cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( cac.mutex );
|
||||
@@ -720,7 +720,7 @@ int epicsStdCall ca_context_status ( ca_client_context * pcac, unsigned level )
|
||||
/*
|
||||
* ca_current_context ()
|
||||
*
|
||||
* used when an auxillary thread needs to join a CA client context started
|
||||
* used when an auxiliary thread needs to join a CA client context started
|
||||
* by another thread
|
||||
*/
|
||||
// extern "C"
|
||||
@@ -740,7 +740,7 @@ struct ca_client_context * epicsStdCall ca_current_context ()
|
||||
/*
|
||||
* ca_attach_context ()
|
||||
*
|
||||
* used when an auxillary thread needs to join a CA client context started
|
||||
* used when an auxiliary thread needs to join a CA client context started
|
||||
* by another thread
|
||||
*/
|
||||
// extern "C"
|
||||
|
||||
@@ -494,7 +494,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount,
|
||||
/*
|
||||
* verifyBlockingConnect ()
|
||||
*
|
||||
* 1) verify that we dont print a disconnect message when
|
||||
* 1) verify that we don't print a disconnect message when
|
||||
* we delete the last channel
|
||||
*
|
||||
* 2) verify that we delete the connection to the IOC
|
||||
@@ -645,7 +645,7 @@ void verifyBlockingConnect ( appChan *pChans, unsigned chanCount,
|
||||
status = ca_pend_io ( 1e-16 );
|
||||
if ( status == ECA_TIMEOUT ) {
|
||||
/*
|
||||
* we end up here if the channel isnt on the same host
|
||||
* we end up here if the channel isn't on the same host
|
||||
*/
|
||||
epicsThreadSleep ( 0.1 );
|
||||
ca_poll ();
|
||||
@@ -1112,7 +1112,7 @@ void verifyHighThroughputRead ( chid chan, unsigned interestLevel )
|
||||
unsigned i;
|
||||
|
||||
/*
|
||||
* verify we dont jam up on many uninterrupted
|
||||
* verify we don't jam up on many uninterrupted
|
||||
* solicitations
|
||||
*/
|
||||
if ( ca_read_access (chan) ) {
|
||||
@@ -1152,7 +1152,7 @@ void verifyHighThroughputWrite ( chid chan, unsigned interestLevel )
|
||||
}
|
||||
|
||||
/*
|
||||
* verify we dont jam up on many uninterrupted
|
||||
* verify we don't jam up on many uninterrupted
|
||||
* get callback requests
|
||||
*/
|
||||
void verifyHighThroughputReadCallback ( chid chan, unsigned interestLevel )
|
||||
@@ -1181,7 +1181,7 @@ void verifyHighThroughputReadCallback ( chid chan, unsigned interestLevel )
|
||||
}
|
||||
|
||||
/*
|
||||
* verify we dont jam up on many uninterrupted
|
||||
* verify we don't jam up on many uninterrupted
|
||||
* put callback request
|
||||
*/
|
||||
void verifyHighThroughputWriteCallback ( chid chan, unsigned interestLevel )
|
||||
@@ -1239,7 +1239,7 @@ void verifyBadString ( chid chan, unsigned interestLevel )
|
||||
verify ( status == ECA_NORMAL );
|
||||
if ( strcmp ( stimStr, respStr ) ) {
|
||||
printf (
|
||||
"Test fails if stim \"%s\" isnt roughly equiv to resp \"%s\"\n",
|
||||
"Test fails if stim \"%s\" isn't roughly equiv to resp \"%s\"\n",
|
||||
stimStr, respStr);
|
||||
}
|
||||
showProgressEnd ( interestLevel );
|
||||
@@ -1395,7 +1395,7 @@ static void multiSubscrDestroyNoLateCallbackThread ( void * pParm )
|
||||
|
||||
/*
|
||||
* raise the priority of the current thread hoping to improve our
|
||||
* likelyhood of detecting a bug
|
||||
* likelihood of detecting a bug
|
||||
*/
|
||||
priorityOfTestThread = epicsThreadGetPrioritySelf ();
|
||||
epicsThreadSetPriority ( epicsThreadGetIdSelf(), epicsThreadPriorityHigh );
|
||||
@@ -1445,7 +1445,7 @@ static void multiSubscrDestroyNoLateCallbackThread ( void * pParm )
|
||||
}
|
||||
|
||||
/*
|
||||
* verify that, in a preemtive callback mode client, a subscription callback never
|
||||
* verify that, in a preemptive callback mode client, a subscription callback never
|
||||
* comes after the subscription is destroyed
|
||||
*/
|
||||
static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned interestLevel )
|
||||
@@ -1563,7 +1563,7 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
|
||||
/*
|
||||
* singleSubscriptionDeleteTest
|
||||
*
|
||||
* verify that we dont fail when we repeatedly create
|
||||
* verify that we don't fail when we repeatedly create
|
||||
* and delete only one subscription with a high level of
|
||||
* traffic on it
|
||||
*/
|
||||
@@ -1617,7 +1617,7 @@ void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
|
||||
/*
|
||||
* channelClearWithEventTrafficTest
|
||||
*
|
||||
* verify that we can delete a channel that has subcriptions
|
||||
* verify that we can delete a channel that has subscriptions
|
||||
* attached with heavy update traffic
|
||||
*/
|
||||
void channelClearWithEventTrafficTest ( const char *pName, unsigned interestLevel )
|
||||
@@ -2481,7 +2481,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
|
||||
showProgress ( interestLevel );
|
||||
|
||||
/*
|
||||
* attempt to uncover problems where the last event isnt sent
|
||||
* attempt to uncover problems where the last event isn't sent
|
||||
* and hopefully get into a flow control situation
|
||||
*/
|
||||
prevPassCount = 0u;
|
||||
@@ -2522,7 +2522,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
|
||||
ca_poll (); /* emulate typical GUI */
|
||||
for ( j = 0; j < NELEMENTS ( test ); j++ ) {
|
||||
/*
|
||||
* we shouldnt see old monitors because
|
||||
* we shouldn't see old monitors because
|
||||
* we resubscribed
|
||||
*/
|
||||
verify ( test[j].count <= i + 2 );
|
||||
@@ -3016,7 +3016,7 @@ void testMultithreadSubscr ( void * pParm )
|
||||
}
|
||||
|
||||
/*
|
||||
* test installation of subscriptions similar to usage paterns
|
||||
* test installation of subscriptions similar to usage patterns
|
||||
* employed by modern versions of the sequencer
|
||||
*/
|
||||
void verifyMultithreadSubscr ( const char * pName, unsigned interestLevel )
|
||||
@@ -3111,7 +3111,7 @@ void fdManagerVerify ( const char * pName, unsigned interestLevel )
|
||||
status = ca_flush_io ();
|
||||
verify ( status == ECA_NORMAL );
|
||||
|
||||
/* look for infinite loop in fd manager schedualing */
|
||||
/* look for infinite loop in fd manager scheduling */
|
||||
epicsTimeGetCurrent ( & begin );
|
||||
eventCount = 0u;
|
||||
while ( 1 ) {
|
||||
@@ -3175,7 +3175,7 @@ void verifyConnectWithDisconnectedChannels (
|
||||
* we should be able to connect to a valid
|
||||
* channel within a reasonable delay even
|
||||
* though there is one permanently
|
||||
* diasconnected channel
|
||||
* disconnected channel
|
||||
*/
|
||||
status = ca_pend_io ( timeoutToPendIO );
|
||||
verify ( status == ECA_NORMAL );
|
||||
@@ -3491,7 +3491,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
|
||||
|
||||
/*
|
||||
* CA pend event delay accuracy test
|
||||
* (CA asssumes that search requests can be sent
|
||||
* (CA assumes that search requests can be sent
|
||||
* at least every 25 mS on all supported os)
|
||||
*/
|
||||
printf ( "\n" );
|
||||
|
||||
@@ -130,8 +130,8 @@ bool bhe::updatePeriod (
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
|
||||
//
|
||||
// this block is enetered if the beacon was created as a side effect of
|
||||
// creating a connection and so we dont yet know the first beacon time
|
||||
// this block is entered if the beacon was created as a side effect of
|
||||
// creating a connection and so we don't yet know the first beacon time
|
||||
// and sequence number
|
||||
//
|
||||
if ( this->timeStamp == epicsTime () ) {
|
||||
@@ -154,7 +154,7 @@ bool bhe::updatePeriod (
|
||||
return false;
|
||||
}
|
||||
|
||||
// 1) detect beacon duplications due to redundant routes
|
||||
// 1) detect beacon duplication due to redundant routes
|
||||
// 2) detect lost beacons due to input queue overrun or damage
|
||||
if ( CA_V410 ( protocolRevision ) ) {
|
||||
unsigned beaconSeqAdvance;
|
||||
@@ -175,7 +175,7 @@ bool bhe::updatePeriod (
|
||||
|
||||
// throw out sequence numbers that jump forward by only a few numbers
|
||||
// (this situation is probably caused by a duplicate route
|
||||
// or a beacon due to input queue overun)
|
||||
// or a beacon due to input queue overrun)
|
||||
if ( beaconSeqAdvance > 1 && beaconSeqAdvance < 4 ) {
|
||||
logBeaconDiscard ( beaconSeqAdvance, currentTime );
|
||||
return false;
|
||||
@@ -244,8 +244,8 @@ bool bhe::updatePeriod (
|
||||
/*
|
||||
* Is this an IOC seen because of an IOC reboot
|
||||
* (beacon come at a higher rate just after the
|
||||
* IOC reboots). Lower tolarance here because we
|
||||
* dont have to worry about lost beacons.
|
||||
* IOC reboots). Lower tolerance here because we
|
||||
* don't have to worry about lost beacons.
|
||||
*
|
||||
* It may be possible to get false triggers here
|
||||
* if the client is busy, but this does not cause
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
#define CA_REPEATER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u+1u)
|
||||
|
||||
/*
|
||||
* 1500 (max of ethernet and 802.{2,3} MTU) - 20(IP) - 8(UDP)
|
||||
* (the MTU of Ethernet is currently independent of its speed varient)
|
||||
* 1500 (max of Ethernet and 802.{2,3} MTU) - 20(IP) - 8(UDP)
|
||||
* (the MTU of Ethernet is currently independent of its speed variant)
|
||||
*/
|
||||
#define ETHERNET_MAX_UDP ( 1500u - 20u - 8u )
|
||||
#define MAX_UDP_RECV ( 0xffff + 16u ) /* allow large frames to be received in the future */
|
||||
@@ -117,7 +117,7 @@ typedef ca_uint32_t caResId;
|
||||
|
||||
/*
|
||||
* for use with search and not_found (if search fails and
|
||||
* its not a broadcast tell the client to look elesewhere)
|
||||
* its not a broadcast tell the client to look elsewhere)
|
||||
*/
|
||||
#define DOREPLY 10u
|
||||
#define DONTREPLY 5u
|
||||
@@ -176,7 +176,7 @@ typedef struct ca_hdr {
|
||||
struct mon_info {
|
||||
ca_float32_t m_lval; /* low delta */
|
||||
ca_float32_t m_hval; /* high delta */
|
||||
ca_float32_t m_toval; /* period btween samples */
|
||||
ca_float32_t m_toval; /* period between samples */
|
||||
ca_uint16_t m_mask; /* event select mask */
|
||||
ca_uint16_t m_pad; /* extend to 32 bits */
|
||||
};
|
||||
|
||||
@@ -224,7 +224,7 @@ void ca_client_context::changeExceptionEvent (
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
this->ca_exception_func = pfunc;
|
||||
this->ca_exception_arg = arg;
|
||||
// should block here until releated callback in progress completes
|
||||
// should block here until related callback in progress completes
|
||||
}
|
||||
|
||||
void ca_client_context::replaceErrLogHandler (
|
||||
@@ -237,7 +237,7 @@ void ca_client_context::replaceErrLogHandler (
|
||||
else {
|
||||
this->pVPrintfFunc = epicsVprintf;
|
||||
}
|
||||
// should block here until releated callback in progress completes
|
||||
// should block here until related callback in progress completes
|
||||
}
|
||||
|
||||
void ca_client_context::registerForFileDescriptorCallBack (
|
||||
@@ -252,7 +252,7 @@ void ca_client_context::registerForFileDescriptorCallBack (
|
||||
// w/o having sent the wakeup message
|
||||
this->_sendWakeupMsg ();
|
||||
}
|
||||
// should block here until releated callback in progress completes
|
||||
// should block here until related callback in progress completes
|
||||
}
|
||||
|
||||
int ca_client_context :: printFormated (
|
||||
@@ -768,9 +768,9 @@ LIBCA_API int epicsStdCall ca_clear_subscription ( evid pMon )
|
||||
// we will definately stall out here if all of the
|
||||
// following are true
|
||||
//
|
||||
// o user creates non-preemtive mode client library context
|
||||
// o user creates non-preemptive mode client library context
|
||||
// o user doesnt periodically call a ca function
|
||||
// o user calls this function from an auxiillary thread
|
||||
// o user calls this function from an auxiliary thread
|
||||
//
|
||||
CallbackGuard cbGuard ( cac.cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( cac.mutex );
|
||||
|
||||
@@ -285,7 +285,7 @@ cac::~cac ()
|
||||
// this blocks until the UDP thread exits so that
|
||||
// it will not sneak in any new clients
|
||||
//
|
||||
// lock intentionally not held here so that we dont deadlock
|
||||
// lock intentionally not held here so that we don't deadlock
|
||||
// waiting for the UDP thread to exit while it is waiting to
|
||||
// get the lock.
|
||||
{
|
||||
@@ -312,7 +312,7 @@ cac::~cac ()
|
||||
//
|
||||
// wait for all tcp threads to exit
|
||||
//
|
||||
// this will block for oustanding sends to go out so dont
|
||||
// this will block for outstanding sends to go out so don't
|
||||
// hold a lock while waiting
|
||||
//
|
||||
{
|
||||
@@ -411,7 +411,7 @@ void cac::show (
|
||||
|
||||
::printf ( "Channel Access Client Context at %p for user %s\n",
|
||||
static_cast <const void *> ( this ), this->pUserName );
|
||||
// this also supresses the "defined, but not used"
|
||||
// this also suppresses the "defined, but not used"
|
||||
// warning message
|
||||
::printf ( "\trevision \"%s\"\n", pVersionCAC );
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ typedef unsigned CA_SYNC_GID;
|
||||
#define CA_OP_CONN_UP 6
|
||||
#define CA_OP_CONN_DOWN 7
|
||||
|
||||
/* depricated */
|
||||
/* deprecated */
|
||||
#define CA_OP_SEARCH 2
|
||||
|
||||
/*
|
||||
@@ -464,7 +464,7 @@ LIBCA_API int epicsStdCall ca_array_get_callback
|
||||
/* Specify a function to be executed whenever significant changes */
|
||||
/* occur to a channel. */
|
||||
/* NOTES: */
|
||||
/* 1) Evid may be omited by passing a NULL pointer */
|
||||
/* 1) Evid may be omitted by passing a NULL pointer */
|
||||
/* */
|
||||
/* 2) An array count of zero specifies the native db count */
|
||||
/* */
|
||||
@@ -837,7 +837,7 @@ LIBCA_API double epicsStdCall ca_beacon_period (chid chan);
|
||||
LIBCA_API double epicsStdCall ca_receive_watchdog_delay (chid chan);
|
||||
|
||||
/*
|
||||
* used when an auxillary thread needs to join a CA client context started
|
||||
* used when an auxiliary thread needs to join a CA client context started
|
||||
* by another thread
|
||||
*/
|
||||
LIBCA_API struct ca_client_context * epicsStdCall ca_current_context ();
|
||||
|
||||
@@ -224,7 +224,7 @@ int main ( int argc, char ** argv )
|
||||
* always set this field to INADDR_ANY
|
||||
*
|
||||
* clients always assume that if this
|
||||
* field is set to something that isnt INADDR_ANY
|
||||
* field is set to something that isn't INADDR_ANY
|
||||
* then it is the overriding IP address of the server.
|
||||
*/
|
||||
ina.sin_family = AF_INET;
|
||||
@@ -235,7 +235,7 @@ int main ( int argc, char ** argv )
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* old servers dont supply this and the
|
||||
* old servers don't supply this and the
|
||||
* default port must be assumed
|
||||
*/
|
||||
ina.sin_port = htons ( serverPort );
|
||||
|
||||
@@ -45,7 +45,7 @@ bool comBuf::flushToWire ( wireSendAdapter & wire, const epicsTime & currentTime
|
||||
return true;
|
||||
}
|
||||
|
||||
// throwing the exception from a function that isnt inline
|
||||
// throwing the exception from a function that isn't inline
|
||||
// shrinks the GNU compiled object code
|
||||
void comBuf::throwInsufficentBytesException ()
|
||||
{
|
||||
|
||||
@@ -196,7 +196,7 @@ epicsUInt16 comQueRecv::popUInt16 ()
|
||||
if ( ! pComBuf ) {
|
||||
comBuf::throwInsufficentBytesException ();
|
||||
}
|
||||
// try first for all in one buffer efficent version
|
||||
// try first for all in one buffer efficient version
|
||||
epicsUInt16 tmp = 0;
|
||||
comBuf::popStatus status = pComBuf->pop ( tmp );
|
||||
if ( status.success ) {
|
||||
@@ -215,7 +215,7 @@ epicsUInt32 comQueRecv::popUInt32 ()
|
||||
if ( ! pComBuf ) {
|
||||
comBuf::throwInsufficentBytesException ();
|
||||
}
|
||||
// try first for all in one buffer efficent version
|
||||
// try first for all in one buffer efficient version
|
||||
epicsUInt32 tmp = 0;
|
||||
comBuf::popStatus status = pComBuf->pop ( tmp );
|
||||
if ( status.success ) {
|
||||
@@ -230,7 +230,7 @@ epicsUInt32 comQueRecv::popUInt32 ()
|
||||
|
||||
bool comQueRecv::popOldMsgHeader ( caHdrLargeArray & msg )
|
||||
{
|
||||
// try first for all in one buffer efficent version
|
||||
// try first for all in one buffer efficient version
|
||||
comBuf * pComBuf = this->bufs.first ();
|
||||
if ( ! pComBuf ) {
|
||||
return false;
|
||||
|
||||
@@ -27,17 +27,17 @@
|
||||
// 1) Allow sufficent headroom so that users will be able to perform
|
||||
// a reasonable amount of IO within CA callbacks without experiencing
|
||||
// a push/pull deadlock. If a potential push/pull deadlock situation
|
||||
// occurs then detect and avoid it and provide diagnotic to the user
|
||||
// occurs then detect and avoid it and provide diagnostic to the user
|
||||
// via special status.
|
||||
// 2) Return status to the user when there is insufficent memory to
|
||||
// 2) Return status to the user when there is insufficient memory to
|
||||
// queue a complete message.
|
||||
// 3) return status to the user when a message cant be flushed because
|
||||
// a connection dropped.
|
||||
// 4) Do not allocate too much memory in exception situatons (such as
|
||||
// 4) Do not allocate too much memory in exception situations (such as
|
||||
// after a circuit disconnect).
|
||||
// 5) Avoid allocating more memory than is absolutely necessary to meet
|
||||
// the above requirements.
|
||||
// 6) Message fragments must never be sent to the IOC when there isnt
|
||||
// 6) Message fragments must never be sent to the IOC when there isn't
|
||||
// enough memory to queue part of a message (we also must not force
|
||||
// a disconnect because the client is starved for memory).
|
||||
// 7) avoid the need to check status for each byte pushed into the
|
||||
@@ -45,7 +45,7 @@
|
||||
//
|
||||
// Implementation:
|
||||
// 1) When queuing a complete message, first test to see if a flush is
|
||||
// required. If it is a receive thread scheduals the flush with the
|
||||
// required. If it is a receive thread schedules the flush with the
|
||||
// send thread, and otherwise directly execute the system call. The
|
||||
// send thread must run at a higher priority than the receive thread
|
||||
// if we are to minimize memory consumption.
|
||||
@@ -58,9 +58,9 @@
|
||||
// a) A user is queuing more requests that demand a response from a
|
||||
// callback than are removed by the response that initiated the
|
||||
// callback, and this situation persists for many callbacks until
|
||||
// all buffering in the system is exausted.
|
||||
// all buffering in the system is exhausted.
|
||||
// b) A user is queuing many requests that demand a response from one
|
||||
// callback until all buffering in the system is exausted.
|
||||
// callback until all buffering in the system is exhausted.
|
||||
// c) Some combination of both (a) nad (b).
|
||||
//
|
||||
//
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "caerr.h"
|
||||
|
||||
/*
|
||||
* NOOP if this isnt required
|
||||
* NOOP if this isn't required
|
||||
*/
|
||||
#ifdef EPICS_CONVERSION_REQUIRED
|
||||
|
||||
@@ -326,7 +326,7 @@ arrayElementCount num /* number of values */
|
||||
** int encode; boolean, if true vax to ieee
|
||||
** else ieee to vax
|
||||
**
|
||||
** converts fields ofstruct in HOST format to ieee format
|
||||
** converts fields of struct in HOST format to ieee format
|
||||
** or
|
||||
** converts fields of struct in NET format to fields with HOST
|
||||
** format
|
||||
@@ -1022,7 +1022,7 @@ arrayElementCount num /* number of values */
|
||||
** int encode; boolean, if true vax to ieee
|
||||
** else ieee to vax
|
||||
**
|
||||
** converts fields ofstruct in HOST format to ieee format
|
||||
** converts fields of struct in HOST format to ieee format
|
||||
** or
|
||||
** converts fields of struct in NET format to fields with HOST
|
||||
** format
|
||||
@@ -1056,7 +1056,7 @@ arrayElementCount num /* number of values */
|
||||
/****************************************************************************
|
||||
** cvrt_sts_long(s,d)
|
||||
**
|
||||
** converts fields ofstruct in HOST format to ieee format
|
||||
** converts fields of struct in HOST format to ieee format
|
||||
** or
|
||||
** converts fields of struct in NET format to fields with HOST
|
||||
** format
|
||||
@@ -1118,7 +1118,7 @@ arrayElementCount num /* number of values */
|
||||
/****************************************************************************
|
||||
** cvrt_time_short(s,d)
|
||||
**
|
||||
** converts fields ofstruct in HOST format to ieee format
|
||||
** converts fields of struct in HOST format to ieee format
|
||||
** or
|
||||
** converts fields of struct in NET format to fields with HOST
|
||||
** format
|
||||
@@ -1239,7 +1239,7 @@ arrayElementCount num /* number of values */
|
||||
/****************************************************************************
|
||||
** cvrt_sts_char(s,d)
|
||||
**
|
||||
** converts fields ofstruct in HOST format to ieee format
|
||||
** converts fields of struct in HOST format to ieee format
|
||||
** or
|
||||
** converts fields of struct in NET format to fields with HOST
|
||||
** format
|
||||
@@ -1274,7 +1274,7 @@ arrayElementCount num /* number of values */
|
||||
/****************************************************************************
|
||||
** cvrt_time_long(s,d)
|
||||
**
|
||||
** converts fields ofstruct in HOST format to ieee format
|
||||
** converts fields of struct in HOST format to ieee format
|
||||
** or
|
||||
** converts fields of struct in NET format to fields with HOST
|
||||
** format
|
||||
@@ -1325,7 +1325,7 @@ arrayElementCount num /* number of values */
|
||||
for(i=0; i<num; i++){
|
||||
*pDest = dbr_ntohs( *pSrc );
|
||||
/*
|
||||
* dont increment these inside the MACRO
|
||||
* don't increment these inside the MACRO
|
||||
*/
|
||||
pDest++;
|
||||
pSrc++;
|
||||
|
||||
@@ -123,7 +123,7 @@ typedef epicsOldString dbr_class_name_t;
|
||||
LIBCA_API extern const int epicsTypeToDBR_XXXX [lastEpicsType+1];
|
||||
|
||||
/*
|
||||
* The DBR_XXXX types are indicies into this array
|
||||
* The DBR_XXXX types are indices into this array
|
||||
*/
|
||||
LIBCA_API extern const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1];
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ void hostNameCache::transactionComplete ( const char * pHostNameIn )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
// a few legacy clients have a direct pointer to this buffer so we
|
||||
// set the entrire string to nill terminators before we start copying
|
||||
// set the entire string to nill terminators before we start copying
|
||||
// in the name (this reduces the chance that another thread will see
|
||||
// garbage characters).
|
||||
size_t newNameLen = strlen ( pHostNameIn );
|
||||
|
||||
@@ -189,7 +189,7 @@ extern "C" void epicsStdCall configureChannelAccessAddressList
|
||||
int yes;
|
||||
|
||||
/*
|
||||
* dont load the list twice
|
||||
* don't load the list twice
|
||||
*/
|
||||
assert ( ellCount (pList) == 0 );
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ static const double CA_CONN_VERIFY_PERIOD = 30.0; /* (sec) how often to request
|
||||
* monitor flow control
|
||||
*
|
||||
* turning this down effects maximum throughput
|
||||
* because we dont get an optimal number of bytes
|
||||
* because we don't get an optimal number of bytes
|
||||
* per network frame
|
||||
*/
|
||||
static const unsigned contiguousMsgCountWhichTriggersFlowControl = 10u;
|
||||
|
||||
@@ -57,7 +57,7 @@ void msgForMultiplyDefinedPV::transactionComplete ( const char * pHostNameRej )
|
||||
// calls into cac for the notification
|
||||
// the msg object (= this) is being deleted as part of the notification
|
||||
this->cb.pvMultiplyDefinedNotify ( *this, this->channel, this->acc, pHostNameRej );
|
||||
// !! dont touch 'this' pointer after this point because object has been deleted !!
|
||||
// !! don't touch 'this' pointer after this point because object has been deleted !!
|
||||
}
|
||||
|
||||
void * msgForMultiplyDefinedPV::operator new ( size_t size,
|
||||
|
||||
@@ -147,14 +147,14 @@ void nciu::connect ( unsigned nativeType,
|
||||
guard, this->accessRightState );
|
||||
}
|
||||
|
||||
// channel uninstal routine grabs the callback lock so
|
||||
// channel uninstall routine grabs the callback lock so
|
||||
// a channel will not be deleted while a call back is
|
||||
// in progress
|
||||
//
|
||||
// the callback lock is also taken when a channel
|
||||
// disconnects to prevent a race condition with the
|
||||
// code below - ie we hold the callback lock here
|
||||
// so a chanel cant be destroyed out from under us.
|
||||
// so a channel cant be destroyed out from under us.
|
||||
this->notify().connectNotify ( guard );
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
// destructor is virtual (therefore it is protected).
|
||||
// I assume that SUNPRO will fix this in future versions.
|
||||
// With other compilers we get warnings (and
|
||||
// potential problems) if we dont make the baseNMIU
|
||||
// potential problems) if we don't make the baseNMIU
|
||||
// destructor virtual.
|
||||
#if defined ( __SUNPRO_CC ) && ( __SUNPRO_CC <= 0x540 )
|
||||
# define NETIO_VIRTUAL_DESTRUCTOR
|
||||
|
||||
@@ -591,16 +591,16 @@ void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO (
|
||||
io.destroy ( *this->pCallbackGuard.get(), guard );
|
||||
}
|
||||
else {
|
||||
// dont reverse the lock hierarchy
|
||||
// don't reverse the lock hierarchy
|
||||
epicsGuardRelease < epicsMutex > guardRelease ( guard );
|
||||
{
|
||||
//
|
||||
// we will definately stall out here if all of the
|
||||
// following are true
|
||||
//
|
||||
// o user creates non-preemtive mode client library context
|
||||
// o user creates non-preemptive mode client library context
|
||||
// o user doesnt periodically call a ca function
|
||||
// o user calls this function from an auxiillary thread
|
||||
// o user calls this function from an auxiliary thread
|
||||
//
|
||||
CallbackGuard cbGuard ( this->cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
|
||||
@@ -571,7 +571,7 @@ int epicsStdCall ca_create_subscription (
|
||||
oldSubscription (
|
||||
guard, *pChan, pChan->io, tmpType, count, mask,
|
||||
pCallBack, pCallBackArg, monixptr );
|
||||
// dont touch object created after above new because
|
||||
// don't touch object created after above new because
|
||||
// the first callback might have canceled, and therefore
|
||||
// destroyed, it
|
||||
return ECA_NORMAL;
|
||||
|
||||
@@ -41,7 +41,7 @@ oldSubscription::oldSubscription (
|
||||
*pEventId = this;
|
||||
}
|
||||
io.subscribe ( guard, type, nElem, mask, *this, &this->id );
|
||||
// Dont touch this pointer after this point because the
|
||||
// Don't touch this pointer after this point because the
|
||||
// 1st update callback might cancel the subscription and
|
||||
// thereby destroy this object.
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
/*
|
||||
* these can be external since there is only one instance
|
||||
* per machine so we dont care about reentrancy
|
||||
* per machine so we don't care about reentrancy
|
||||
*/
|
||||
static tsDLList < repeaterClient > client_list;
|
||||
|
||||
@@ -335,7 +335,7 @@ static void fanOut ( const osiSockAddr & from, const void * pMsg,
|
||||
|
||||
while ( ( pclient = client_list.get () ) ) {
|
||||
theClients.add ( *pclient );
|
||||
/* Dont reflect back to sender */
|
||||
/* Don't reflect back to sender */
|
||||
if ( pclient->identicalAddress ( from ) ) {
|
||||
continue;
|
||||
}
|
||||
@@ -392,7 +392,7 @@ static void register_new_client ( osiSockAddr & from,
|
||||
* repeater would not always allow the loopback address
|
||||
* as a local client address so current clients alternate
|
||||
* between the address of the first non-loopback interface
|
||||
* found and the loopback addresss when subscribing with
|
||||
* found and the loopback address when subscribing with
|
||||
* the CA repeater until all CA repeaters have been updated
|
||||
* to current code.
|
||||
*/
|
||||
@@ -452,7 +452,7 @@ static void register_new_client ( osiSockAddr & from,
|
||||
}
|
||||
|
||||
/*
|
||||
* send a noop message to all other clients so that we dont
|
||||
* send a noop message to all other clients so that we don't
|
||||
* accumulate sockets when there are no beacons
|
||||
*/
|
||||
caHdr noop;
|
||||
|
||||
@@ -317,7 +317,7 @@ void searchTimer :: show ( unsigned level ) const
|
||||
|
||||
//
|
||||
// Reset the delay to the next search request if we get
|
||||
// at least one response. However, dont reset this delay if we
|
||||
// at least one response. However, don't reset this delay if we
|
||||
// get a delayed response to an old search request.
|
||||
//
|
||||
void searchTimer::uninstallChanDueToSuccessfulSearchResponse (
|
||||
|
||||
@@ -82,8 +82,8 @@ private:
|
||||
double framesPerTry; /* # of UDP frames per search try */
|
||||
double framesPerTryCongestThresh; /* one half N tries w congest */
|
||||
unsigned retry;
|
||||
unsigned searchAttempts; /* num search tries after last timer experation */
|
||||
unsigned searchResponses; /* num search resp after last timer experation */
|
||||
unsigned searchAttempts; /* num search tries after last timer expiration */
|
||||
unsigned searchResponses; /* num search resp after last timer expiration */
|
||||
const unsigned index;
|
||||
ca_uint32_t dgSeqNoAtTimerExpireBegin;
|
||||
ca_uint32_t dgSeqNoAtTimerExpireEnd;
|
||||
|
||||
@@ -82,9 +82,9 @@ extern "C" int epicsStdCall ca_sg_delete ( const CA_SYNC_GID gid )
|
||||
// we will definately stall out here if all of the
|
||||
// following are true
|
||||
//
|
||||
// o user creates non-preemtive mode client library context
|
||||
// o user creates non-preemptive mode client library context
|
||||
// o user doesnt periodically call a ca function
|
||||
// o user calls this function from an auxiillary thread
|
||||
// o user calls this function from an auxiliary thread
|
||||
//
|
||||
CallbackGuard cbGuard ( pcac->cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( pcac->mutex );
|
||||
@@ -106,9 +106,9 @@ void sync_group_reset ( ca_client_context & client, CASG & sg )
|
||||
// we will definately stall out here if all of the
|
||||
// following are true
|
||||
//
|
||||
// o user creates non-preemtive mode client library context
|
||||
// o user creates non-preemptive mode client library context
|
||||
// o user doesnt periodically call a ca function
|
||||
// o user calls this function from an auxiillary thread
|
||||
// o user calls this function from an auxiliary thread
|
||||
//
|
||||
CallbackGuard cbGuard ( client.cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( client.mutex );
|
||||
@@ -219,9 +219,9 @@ extern "C" int epicsStdCall ca_sg_test ( const CA_SYNC_GID gid )
|
||||
// we will definately stall out here if all of the
|
||||
// following are true
|
||||
//
|
||||
// o user creates non-preemtive mode client library context
|
||||
// o user creates non-preemptive mode client library context
|
||||
// o user doesnt periodically call a ca function
|
||||
// o user calls this function from an auxiillary thread
|
||||
// o user calls this function from an auxiliary thread
|
||||
//
|
||||
CallbackGuard cbGuard ( pcac->cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( pcac->mutex );
|
||||
|
||||
@@ -176,7 +176,7 @@ void tcpRecvWatchdog::sendBacklogProgressNotify (
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
|
||||
// We dont set "beaconAnomaly" to be false here because, after we see a
|
||||
// We don't set "beaconAnomaly" to be false here because, after we see a
|
||||
// beacon anomaly (which could be transiently detecting a reboot) we will
|
||||
// not trust the beacon as an indicator of a healthy server until we
|
||||
// receive at least one message from the server.
|
||||
|
||||
@@ -81,7 +81,7 @@ void tcpSendThread::run ()
|
||||
|
||||
while ( true ) {
|
||||
|
||||
// dont wait if there is still labor to be done below
|
||||
// don't wait if there is still labor to be done below
|
||||
if ( ! laborPending ) {
|
||||
epicsGuardRelease < epicsMutex > unguard ( guard );
|
||||
this->iiu.sendThreadFlushEvent.wait ();
|
||||
@@ -124,7 +124,7 @@ void tcpSendThread::run ()
|
||||
}
|
||||
else {
|
||||
// This wakes up the resp thread so that it can call
|
||||
// the connect callback. This isnt maximally efficent
|
||||
// the connect callback. This isn't maximally efficient
|
||||
// but it has the excellent side effect of not requiring
|
||||
// that the UDP thread take the callback lock. There are
|
||||
// almost no V42 servers left at this point.
|
||||
@@ -204,7 +204,7 @@ void tcpSendThread::run ()
|
||||
|
||||
while ( ! this->iiu.recvThread.exitWait ( 30.0 ) ) {
|
||||
// it is possible to get stuck here if the user calls
|
||||
// ca_context_destroy() when a circuit isnt known to
|
||||
// ca_context_destroy() when a circuit isn't known to
|
||||
// be unresponsive, but is. That situation is probably
|
||||
// rare, and the IP kernel might have a timeout for
|
||||
// such situations, nevertheless we will attempt to deal
|
||||
@@ -322,7 +322,7 @@ void tcpiiu::recvBytes (
|
||||
return;
|
||||
}
|
||||
|
||||
// if the circuit was locally aborted then supress
|
||||
// if the circuit was locally aborted then suppress
|
||||
// warning messages about bad file descriptor etc
|
||||
if ( this->state != iiucs_connected &&
|
||||
this->state != iiucs_clean_shutdown ) {
|
||||
@@ -358,9 +358,9 @@ void tcpiiu::recvBytes (
|
||||
epicsSocketConvertErrnoToString (
|
||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
|
||||
// the replacable printf handler isnt called here
|
||||
// because it reqires a callback lock which probably
|
||||
// isnt appropriate here
|
||||
// the replaceable printf handler isn't called here
|
||||
// because it requires a callback lock which probably
|
||||
// isn't appropriate here
|
||||
char name[64];
|
||||
this->hostNameCacheInstance.getName (
|
||||
name, sizeof ( name ) );
|
||||
@@ -535,11 +535,11 @@ void tcpRecvThread::run ()
|
||||
}
|
||||
|
||||
//
|
||||
// we dont feel comfortable calling this with a lock applied
|
||||
// we don't feel comfortable calling this with a lock applied
|
||||
// (it might block for longer than we like)
|
||||
//
|
||||
// we would prefer to improve efficency by trying, first, a
|
||||
// recv with the new MSG_DONTWAIT flag set, but there isnt
|
||||
// we would prefer to improve efficiency by trying, first, a
|
||||
// recv with the new MSG_DONTWAIT flag set, but there isn't
|
||||
// universal support
|
||||
//
|
||||
bool bytesArePending = this->iiu.bytesArePendingInOS ();
|
||||
@@ -1002,7 +1002,7 @@ void tcpiiu::initiateAbortShutdown (
|
||||
};
|
||||
|
||||
//
|
||||
// wake up the send thread if it isnt blocking in send()
|
||||
// wake up the send thread if it isn't blocking in send()
|
||||
//
|
||||
this->sendThreadFlushEvent.signal ();
|
||||
this->flushBlockEvent.signal ();
|
||||
@@ -1580,7 +1580,7 @@ void tcpiiu::subscriptionRequest (
|
||||
maxBytes = MAX_TCP;
|
||||
}
|
||||
unsigned dataType = subscr.getType ( guard );
|
||||
// data type bounds checked when sunscription created
|
||||
// data type bounds checked when subscription created
|
||||
arrayElementCount maxElem = ( maxBytes - dbr_size[dataType] ) / dbr_value_size[dataType];
|
||||
if ( nElem > maxElem ) {
|
||||
throw cacChannel::msgBodyCacheTooSmall ();
|
||||
@@ -1633,7 +1633,7 @@ void tcpiiu::subscriptionUpdateRequest (
|
||||
throw cacChannel::msgBodyCacheTooSmall ();
|
||||
}
|
||||
comQueSendMsgMinder minder ( this->sendQue, guard );
|
||||
// nElem boounds checked above
|
||||
// nElem bounds checked above
|
||||
this->sendQue.insertRequestHeader (
|
||||
CA_PROTO_READ_NOTIFY, 0u,
|
||||
static_cast < ca_uint16_t > ( dataType ),
|
||||
@@ -1712,7 +1712,7 @@ void tcpiiu :: flush ( epicsGuard < epicsMutex > & guard )
|
||||
this->flushRequest ( guard );
|
||||
// the process thread is not permitted to flush as this
|
||||
// can result in a push / pull deadlock on the TCP pipe.
|
||||
// Instead, the process thread scheduals the flush with the
|
||||
// Instead, the process thread schedules the flush with the
|
||||
// send thread which runs at a higher priority than the
|
||||
// receive thread. The same applies to the UDP thread for
|
||||
// locking hierarchy reasons.
|
||||
@@ -1817,7 +1817,7 @@ void tcpiiu::disconnectAllChannels (
|
||||
}
|
||||
|
||||
while ( nciu * pChan = this->createRespPend.get () ) {
|
||||
// we dont yet know the server's id so we cant
|
||||
// we don't 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
|
||||
// when the circuit disconnects
|
||||
@@ -1848,7 +1848,7 @@ void tcpiiu::disconnectAllChannels (
|
||||
|
||||
while ( nciu * pChan = this->unrespCircuit.get () ) {
|
||||
// if we know that the circuit is unresponsive
|
||||
// then we dont send a channel delete request and
|
||||
// then we don't send a channel delete request and
|
||||
// will instead trust that the server can do the
|
||||
// proper cleanup when the circuit disconnects
|
||||
pChan->disconnectAllIO ( cbGuard, guard );
|
||||
@@ -1883,7 +1883,7 @@ void tcpiiu::unlinkAllChannels (
|
||||
while ( nciu * pChan = this->createRespPend.get () ) {
|
||||
pChan->channelNode::listMember =
|
||||
channelNode::cs_none;
|
||||
// we dont yet know the server's id so we cant
|
||||
// we don't 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
|
||||
// when the circuit disconnects
|
||||
@@ -1921,7 +1921,7 @@ void tcpiiu::unlinkAllChannels (
|
||||
channelNode::cs_none;
|
||||
pChan->disconnectAllIO ( cbGuard, guard );
|
||||
// if we know that the circuit is unresponsive
|
||||
// then we dont send a channel delete request and
|
||||
// then we don't send a channel delete request and
|
||||
// will instead trust that the server can do the
|
||||
// proper cleanup when the circuit disconnects
|
||||
pChan->serviceShutdownNotify ( cbGuard, guard );
|
||||
@@ -1951,7 +1951,7 @@ void tcpiiu::installChannel (
|
||||
this->channelCountTot++;
|
||||
chan.channelNode::listMember = channelNode::cs_createReqPend;
|
||||
chan.searchReplySetUp ( *this, sidIn, typeIn, countIn, guard );
|
||||
// The tcp send thread runs at apriority below the udp thread
|
||||
// The tcp send thread runs at a priority below the udp thread
|
||||
// so that this will not send small packets
|
||||
this->sendThreadFlushEvent.signal ();
|
||||
}
|
||||
@@ -2060,7 +2060,7 @@ bool tcpiiu::bytesArePendingInOS () const
|
||||
}
|
||||
return false;
|
||||
#else
|
||||
osiSockIoctl_t bytesPending = 0; /* shut up purifys yapping */
|
||||
osiSockIoctl_t bytesPending = 0; /* shut up Purify's yapping */
|
||||
int status = socket_ioctl ( this->sock,
|
||||
FIONREAD, & bytesPending );
|
||||
if ( status >= 0 ) {
|
||||
|
||||
@@ -279,7 +279,7 @@ skip_rest:
|
||||
|
||||
/*
|
||||
* wait for the operation to complete
|
||||
* (outstabnding decrements to zero)
|
||||
* (outstanding decrements to zero)
|
||||
*/
|
||||
while(ntries){
|
||||
ca_pend_event(1.0);
|
||||
|
||||
@@ -536,9 +536,9 @@ void epicsStdCall caRepeaterRegistrationMessage (
|
||||
if ( status < 0 ) {
|
||||
int errnoCpy = SOCKERRNO;
|
||||
/*
|
||||
* Different OS return different codes when the repeater isnt running.
|
||||
* Its ok to supress these messages because I print another warning message
|
||||
* if we time out registerring with the repeater.
|
||||
* Different OS return different codes when the repeater isn't running.
|
||||
* Its ok to suppress these messages because I print another warning message
|
||||
* if we time out registering with the repeater.
|
||||
*
|
||||
* Linux returns SOCK_ECONNREFUSED
|
||||
* Windows 2000 returns SOCK_ECONNRESET
|
||||
@@ -673,7 +673,7 @@ bool udpiiu :: searchRespAction (
|
||||
const epicsTime & currentTime )
|
||||
{
|
||||
/*
|
||||
* we dont currently know what to do with channel's
|
||||
* we don't currently know what to do with channel's
|
||||
* found to be at non-IP type addresses
|
||||
*/
|
||||
if ( addr.sa.sa_family != AF_INET ) {
|
||||
@@ -762,7 +762,7 @@ bool udpiiu::beaconAction (
|
||||
* always set this field to INADDR_ANY
|
||||
*
|
||||
* clients always assume that if this
|
||||
* field is set to something that isnt INADDR_ANY
|
||||
* field is set to something that isn't INADDR_ANY
|
||||
* then it is the overriding IP address of the server.
|
||||
*/
|
||||
ina.sin_family = AF_INET;
|
||||
@@ -772,7 +772,7 @@ bool udpiiu::beaconAction (
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* old servers dont supply this and the
|
||||
* old servers don't supply this and the
|
||||
* default port must be assumed
|
||||
*/
|
||||
ina.sin_port = htons ( this->serverPort );
|
||||
@@ -874,7 +874,7 @@ void udpiiu::postMsg (
|
||||
size = pCurMsg->m_postsize + sizeof ( *pCurMsg );
|
||||
|
||||
/*
|
||||
* dont allow msg body extending beyond frame boundary
|
||||
* don't allow msg body extending beyond frame boundary
|
||||
*/
|
||||
if ( size > blockSize ) {
|
||||
char buf[64];
|
||||
@@ -1044,7 +1044,7 @@ void udpiiu :: SearchRespCallback :: notify (
|
||||
const osiSockAddr & addr, const epicsTime & currentTime )
|
||||
{
|
||||
/*
|
||||
* we dont currently know what to do with channel's
|
||||
* we don't currently know what to do with channel's
|
||||
* found to be at non-IP type addresses
|
||||
*/
|
||||
if ( addr.sa.sa_family != AF_INET ) {
|
||||
@@ -1119,7 +1119,7 @@ bool udpiiu :: datagramFlush (
|
||||
{
|
||||
guard.assertIdenticalMutex ( cacMutex );
|
||||
|
||||
// dont send the version header by itself
|
||||
// don't send the version header by itself
|
||||
if ( this->nBytesInXmitBuf <= sizeof ( caHdr ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user