CleanupWhitespace

removed spaces at end of line

replaced tabs with spaces
This commit is contained in:
2020-05-20 14:48:09 -07:00
committed by Michael Davidsaver
parent 055223dbe4
commit 36a8b51d8e
610 changed files with 19733 additions and 19733 deletions
+24 -24
View File
@@ -5,7 +5,7 @@
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* in file LICENSE that is included with this distribution.
\*************************************************************************/
//
// File descriptor management C++ class library
@@ -15,7 +15,7 @@
// johill@lanl.gov
// 505 665 1831
//
// NOTES:
// NOTES:
// 1) This library is not thread safe
//
@@ -38,19 +38,19 @@ const unsigned uSecPerSec = 1000u * mSecPerSec;
// fdManager::fdManager()
//
// hopefully its a reasonable guess that select() and epicsThreadSleep()
// will have the same sleep quantum
// will have the same sleep quantum
//
LIBCOM_API fdManager::fdManager () :
sleepQuantum ( epicsThreadSleepQuantum () ),
sleepQuantum ( epicsThreadSleepQuantum () ),
fdSetsPtr ( new fd_set [fdrNEnums] ),
pTimerQueue ( 0 ), maxFD ( 0 ), processInProg ( false ),
pTimerQueue ( 0 ), maxFD ( 0 ), processInProg ( false ),
pCBReg ( 0 )
{
int status = osiSockAttach ();
assert (status);
for ( size_t i = 0u; i < fdrNEnums; i++ ) {
FD_ZERO ( &fdSetsPtr[i] );
FD_ZERO ( &fdSetsPtr[i] );
}
}
@@ -82,7 +82,7 @@ LIBCOM_API void fdManager::process (double delay)
this->lazyInitTimerQueue ();
//
// no recursion
// no recursion
//
if (this->processInProg) {
return;
@@ -105,7 +105,7 @@ LIBCOM_API void fdManager::process (double delay)
bool ioPending = false;
tsDLIter < fdReg > iter = this->regList.firstIter ();
while ( iter.valid () ) {
FD_SET(iter->getFD(), &this->fdSetsPtr[iter->getType()]);
FD_SET(iter->getFD(), &this->fdSetsPtr[iter->getType()]);
ioPending = true;
++iter;
}
@@ -151,7 +151,7 @@ LIBCOM_API void fdManager::process (double delay)
//
// Tag current fdReg so that we
// can detect if it was deleted
// can detect if it was deleted
// during the call back
//
this->pCBReg = pReg;
@@ -159,7 +159,7 @@ LIBCOM_API void fdManager::process (double delay)
if (this->pCBReg != NULL) {
//
// check only after we see that it is non-null so
// that we dont trigger bounds-checker dangling pointer
// that we dont trigger bounds-checker dangling pointer
// error
//
assert (this->pCBReg==pReg);
@@ -176,8 +176,8 @@ LIBCOM_API void fdManager::process (double delay)
}
else if ( status < 0 ) {
int errnoCpy = SOCKERRNO;
// dont depend on flags being properly set if
// dont depend on flags being properly set if
// an error is retuned from select
for ( size_t i = 0u; i < fdrNEnums; i++ ) {
FD_ZERO ( &fdSetsPtr[i] );
@@ -188,9 +188,9 @@ LIBCOM_API void fdManager::process (double delay)
//
if ( errnoCpy != SOCK_EINTR ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
fprintf ( stderr,
fprintf ( stderr,
"fdManager: select failed because \"%s\"\n",
sockErrBuf );
}
@@ -244,7 +244,7 @@ void fdReg::show(unsigned level) const
//
void fdRegId::show ( unsigned level ) const
{
printf ( "fdRegId at %p\n",
printf ( "fdRegId at %p\n",
static_cast <const void *> ( this ) );
if ( level > 1u ) {
printf ( "\tfd = %d, type = %d\n",
@@ -258,7 +258,7 @@ void fdRegId::show ( unsigned level ) const
void fdManager::installReg (fdReg &reg)
{
this->maxFD = max ( this->maxFD, reg.getFD()+1 );
// Most applications will find that its important to push here to
// Most applications will find that its important to push here to
// the front of the list so that transient writes get executed
// first allowing incoming read protocol to find that outgoing
// buffer space is newly available.
@@ -280,7 +280,7 @@ void fdManager::removeReg (fdReg &regIn)
pItemFound = this->fdTbl.remove (regIn);
if (pItemFound!=&regIn) {
fprintf(stderr,
fprintf(stderr,
"fdManager::removeReg() bad fd registration object\n");
return;
}
@@ -292,7 +292,7 @@ void fdManager::removeReg (fdReg &regIn)
if (this->pCBReg == &regIn) {
this->pCBReg = 0;
}
switch (regIn.state) {
case fdReg::active:
this->activeList.remove (regIn);
@@ -336,19 +336,19 @@ LIBCOM_API fdReg *fdManager::lookUpFD (const SOCKET fd, const fdRegType type)
return NULL;
}
fdRegId id (fd,type);
return this->fdTbl.lookup(id);
return this->fdTbl.lookup(id);
}
//
// fdReg::fdReg()
//
fdReg::fdReg (const SOCKET fdIn, const fdRegType typIn,
const bool onceOnlyIn, fdManager &managerIn) :
fdRegId (fdIn,typIn), state (limbo),
fdReg::fdReg (const SOCKET fdIn, const fdRegType typIn,
const bool onceOnlyIn, fdManager &managerIn) :
fdRegId (fdIn,typIn), state (limbo),
onceOnly (onceOnlyIn), manager (managerIn)
{
{
if (!FD_IN_FDSET(fdIn)) {
fprintf (stderr, "%s: fd > FD_SETSIZE ignored\n",
fprintf (stderr, "%s: fd > FD_SETSIZE ignored\n",
__FILE__);
return;
}