move sleep quantum cache to proper place in the fdManager class

This commit is contained in:
Jeff Hill
2003-03-26 22:16:04 +00:00
parent e3fb337b70
commit 5f1c656aed
3 changed files with 13 additions and 14 deletions
+11 -12
View File
@@ -44,20 +44,21 @@ const unsigned uSecPerSec = 1000u * mSecPerSec;
//
// fdManager::fdManager()
//
epicsShareFunc fdManager::fdManager () : pTimerQueue ( 0 )
// hopefully its a reasonable guess that select() and epicsThreadSleep()
// will have the same sleep quantum
//
epicsShareFunc fdManager::fdManager () :
sleepQuantum ( epicsThreadSleepQuantum () ), pTimerQueue ( 0 ),
maxFD ( 0 ), processInProg ( false ), pCBReg ( 0 )
{
size_t i;
int status;
status = osiSockAttach ();
int status = osiSockAttach ();
assert (status);
for ( i=0u; i < sizeof (this->fdSets) / sizeof ( this->fdSets[0u] ); i++ ) {
for ( size_t i = 0u;
i < sizeof (this->fdSets) / sizeof ( this->fdSets[0u] );
i++ ) {
FD_ZERO ( &this->fdSets[i] ); // X aCC 392
}
this->maxFD = 0;
this->processInProg = false;
this->pCBReg = 0;
}
//
@@ -317,9 +318,7 @@ void fdManager::reschedule ()
double fdManager::quantum ()
{
// hopefully its a reasonable guess that select() and epicsThreadSleep()
// will have the same sleep quantum
return epicsThreadSleepQuantum ();
return this->sleepQuantum;
}
//
+1 -1
View File
@@ -91,7 +91,7 @@ private:
tsDLList < fdReg > activeList;
resTable < fdReg, fdRegId > fdTbl;
fd_set fdSets[fdrNEnums];
double sleepQuantum;
const double sleepQuantum;
epicsTimerQueuePassive * pTimerQueue;
SOCKET maxFD;
bool processInProg;
+1 -1
View File
@@ -137,7 +137,7 @@ private:
epicsEvent rescheduleEvent;
epicsEvent exitEvent;
epicsThread thread;
double sleepQuantum;
const double sleepQuantum;
bool okToShare;
bool exitFlag;
bool terminateFlag;