From 0f9e8903142ca419e4858ea6c868b4f10eb9b1c0 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 7 Mar 2001 16:14:57 +0000 Subject: [PATCH] removed --- src/ca/ioCounter.cpp | 86 ------------------------------------------- src/ca/ioCounter_IL.h | 77 -------------------------------------- 2 files changed, 163 deletions(-) delete mode 100644 src/ca/ioCounter.cpp delete mode 100644 src/ca/ioCounter_IL.h diff --git a/src/ca/ioCounter.cpp b/src/ca/ioCounter.cpp deleted file mode 100644 index 6e1ba18a9..000000000 --- a/src/ca/ioCounter.cpp +++ /dev/null @@ -1,86 +0,0 @@ - -/* - * $Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * - * Author Jeffrey O. Hill - * johill@lanl.gov - * 505 665 1831 - */ - -#include "iocinf.h" - -void ioCounter::decrementOutstandingIO () -{ - bool signalNeeded; - this->mutex.lock (); - if ( this->pndrecvcnt > 0u ) { - this->pndrecvcnt--; - if ( this->pndrecvcnt == 0u ) { - signalNeeded = true; - } - else { - signalNeeded = false; - } - } - else { - signalNeeded = true; - } - this->mutex.unlock (); - - if ( signalNeeded ) { - this->ioDone.signal (); - } -} - -void ioCounter::decrementOutstandingIO ( unsigned seqNumber ) -{ - bool signalNeeded; - - this->mutex.lock (); - if ( this->readSeq == seqNumber ) { - if ( this->pndrecvcnt > 0u ) { - this->pndrecvcnt--; - if ( this->pndrecvcnt == 0u ) { - signalNeeded = true; - } - else { - signalNeeded = false; - } - } - else { - signalNeeded = true; - } - } - else { - signalNeeded = false; - } - this->mutex.unlock (); - - if ( signalNeeded ) { - this->ioDone.signal (); - } -} - -void ioCounter::showOutstandingIO ( unsigned level ) const -{ - printf ( "ioCounter at %p\n", - static_cast ( this ) ); - printf ( "\tthere are %u unsatisfied IO operations blocking ca_pend_io()\n", - this->pndrecvcnt ); - if ( level > 0u ) { - printf ( "\tthe current read sequence number is %u\n", - this->readSeq ); - } - if ( level > 1u ) { - printf ( "IO done event:\n"); - this->ioDone.show ( level - 2u ); - } -} diff --git a/src/ca/ioCounter_IL.h b/src/ca/ioCounter_IL.h deleted file mode 100644 index aed34a76a..000000000 --- a/src/ca/ioCounter_IL.h +++ /dev/null @@ -1,77 +0,0 @@ - - -/* - * $Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * - * Author Jeffrey O. Hill - * johill@lanl.gov - * 505 665 1831 - */ - -#ifndef ioCounter_ILh -#define ioCounter_ILh - -inline ioCounter::ioCounter () : pndrecvcnt ( 0u ), readSeq ( 0u ) -{ -} - -inline void ioCounter::incrementOutstandingIO () -{ - this->mutex.lock (); - if ( this->pndrecvcnt < UINT_MAX ) { - this->pndrecvcnt++; - } - else { - throwWithLocation ( caErrorCode (ECA_INTERNAL) ); - } - this->mutex.unlock (); -} - -inline void ioCounter::incrementOutstandingIO ( unsigned readSeqIn ) -{ - this->mutex.lock (); - if ( readSeqIn == this->readSeq ) { - if ( this->pndrecvcnt < UINT_MAX ) { - this->pndrecvcnt++; - } - else { - throwWithLocation ( caErrorCode (ECA_INTERNAL) ); - } - } - this->mutex.unlock (); -} - -inline unsigned ioCounter::readSequenceOfOutstandingIO () const -{ - return this->readSeq; -} - -inline unsigned ioCounter::currentOutstandingIOCount () const -{ - return this->pndrecvcnt; -} - -inline void ioCounter::waitForCompletionOfIO ( double delaySec ) -{ - this->ioDone.wait ( delaySec ); -} - -inline void ioCounter::cleanUpOutstandingIO () -{ - this->mutex.lock (); - - this->readSeq++; - this->pndrecvcnt = 0u; - - this->mutex.unlock (); -} - -#endif // ioCounter_ILh