|
CPN
Computational Process Networks
|
A version of the ThresholdQueue that provides the CPN Queue interface This queue implementation creates a memory mapped object which has as a minimum size the machine page size. So there is an effective minimum queue size. Any queue size less than the page size will be expanded to the page size. More...
#include <CPNThresholdQueue.h>
Inheritance diagram for CPN::ThresholdQueue:
Collaboration diagram for CPN::ThresholdQueue:Classes | |
| class | TQImpl |
Public Member Functions | |
| ThresholdQueue (KernelBase *k, const SimpleQueueAttr &attr, bool usembs) | |
| ThresholdQueue (KernelBase *k, const SimpleQueueAttr &attr, unsigned length, bool usembs) | |
| ~ThresholdQueue () | |
| const void * | GetRawDequeuePtr (unsigned thresh, unsigned chan) |
| void | Dequeue (unsigned count) |
| bool | RawDequeue (void *data, unsigned count, unsigned numChans, unsigned chanStride) |
| bool | RawDequeue (void *data, unsigned count) |
| void * | GetRawEnqueuePtr (unsigned thresh, unsigned chan) |
| void | Enqueue (unsigned count) |
| void | RawEnqueue (const void *data, unsigned count, unsigned numChans, unsigned chanStride) |
| void | RawEnqueue (const void *data, unsigned count) |
| void | Reset () |
| void | Flush () |
| bool | Flushed () const |
| unsigned | NumChannels () const |
| unsigned | Count () const |
| bool | Empty () const |
| unsigned | Freespace () const |
| bool | Full () const |
| unsigned | MaxThreshold () const |
| unsigned | QueueLength () const |
| unsigned | EnqueueChannelStride () const |
| unsigned | DequeueChannelStride () const |
| void | Grow (unsigned queueLen, unsigned maxThresh) |
| Key_t | GetWriterKey () const |
| Key_t | GetReaderKey () const |
| const std::string & | GetDatatype () const |
| void | ShutdownReader () |
| Called by the QueueReader when no more data will be read. More... | |
| void | ShutdownWriter () |
| Called by the QueueWriter when no more data will be written. More... | |
| void | NotifyTerminate () |
| Used to tell any waiting threads that the network is terminating. More... | |
| void | Lock () const |
| void | Unlock () const |
| unsigned | ReadRequest () |
| For unit tests. More... | |
| unsigned | WriteRequest () |
| For unit tests. More... | |
| bool | IsReaderShutdown () |
| bool | IsWriterShutdown () |
| virtual void | LogState () |
| For debugging ONLY!! Otherwise non deterministic output. More... | |
| unsigned | NumEnqueued () const |
| unsigned | NumDequeued () const |
| void | SetReaderNode (shared_ptr< Node > n) |
| void | SetWriterNode (shared_ptr< Node > n) |
| void | SignalReaderTagChanged () |
| void | SignalWriterTagChanged () |
Protected Member Functions | |
| virtual void * | InternalGetRawEnqueuePtr (unsigned thresh, unsigned chan) |
| virtual void | InternalEnqueue (unsigned count) |
| virtual const void * | InternalGetRawDequeuePtr (unsigned thresh, unsigned chan) |
| virtual void | InternalDequeue (unsigned count) |
| virtual void | InternalReset () |
| virtual unsigned | UnlockedNumChannels () const |
| virtual unsigned | UnlockedMaxThreshold () const |
| virtual unsigned | UnlockedQueueLength () const |
| virtual unsigned | UnlockedFreespace () const |
| virtual bool | UnlockedFull () const |
| virtual unsigned | UnlockedCount () const |
| virtual bool | UnlockedEmpty () const |
| virtual unsigned | UnlockedEnqueueChannelStride () const |
| virtual unsigned | UnlockedDequeueChannelStride () const |
| unsigned | UnlockedNumEnqueued () const |
| unsigned | UnlockedNumDequeued () const |
| virtual void | UnlockedGrow (unsigned queueLen, unsigned maxThresh) |
| virtual void | WaitForData () |
| virtual bool | ReadBlocked () |
| void | NotifyData () |
| virtual void | WaitForFreespace () |
| virtual bool | WriteBlocked () |
| void | NotifyFreespace () |
| virtual void | Wait () |
| virtual void | Signal () |
| virtual void | Detect () |
| virtual void | InternalFlush () |
| virtual void | UnlockedShutdownReader () |
| virtual void | UnlockedShutdownWriter () |
| void | ReadBlock () |
| void | WriteBlock (unsigned qsize) |
| virtual void | UnlockedSignalReaderTagChanged () |
| virtual void | UnlockedSignalWriterTagChanged () |
Protected Attributes | |
| TQImpl * | queue |
| TQImpl * | oldqueue |
| bool | enqueueUseOld |
| bool | dequeueUseOld |
| const Key_t | readerkey |
| const Key_t | writerkey |
| bool | readshutdown |
| bool | writeshutdown |
| unsigned | prepad |
| unsigned | postpad |
| unsigned | readrequest |
| unsigned | writerequest |
| unsigned | enqueuethresh |
| unsigned | dequeuethresh |
| bool | indequeue |
| bool | inenqueue |
| bool | flushed |
| KernelBase * | kernel |
| bool | useD4R |
| Logger | logger |
| PthreadMutex | lock |
| PthreadCondition | cond |
| std::string | datatype |
| shared_ptr< Node > | reader |
| shared_ptr< Node > | writer |
| bool | readtagchanged |
| bool | writetagchanged |
| bool | incomm |
A version of the ThresholdQueue that provides the CPN Queue interface This queue implementation creates a memory mapped object which has as a minimum size the machine page size. So there is an effective minimum queue size. Any queue size less than the page size will be expanded to the page size.
Definition at line 45 of file CPNThresholdQueue.h.
| ThresholdQueue< T >::ThresholdQueue | ( | KernelBase * | k, |
| const SimpleQueueAttr & | attr, | ||
| bool | usembs | ||
| ) |
Definition at line 32 of file CPNThresholdQueue.cc.
References CPN::SimpleQueueAttr::GetLength(), CPN::SimpleQueueAttr::GetMaxThreshold(), CPN::SimpleQueueAttr::GetNumChannels(), and queue.
Here is the call graph for this function:| ThresholdQueue< T >::ThresholdQueue | ( | KernelBase * | k, |
| const SimpleQueueAttr & | attr, | ||
| unsigned | length, | ||
| bool | usembs | ||
| ) |
Definition at line 40 of file CPNThresholdQueue.cc.
References CPN::SimpleQueueAttr::GetMaxThreshold(), CPN::SimpleQueueAttr::GetNumChannels(), and queue.
Here is the call graph for this function:| ThresholdQueue< T >::~ThresholdQueue | ( | ) |
|
inherited |
Definition at line 205 of file QueueBase.cc.
References CPN::QueueBase::UnlockedCount().
Here is the call graph for this function:
|
inherited |
This function is used to remove elements from the queue. count elements will be removed from the queue when this function is called.
| count | the number of bytes to remove from the queue |
Definition at line 92 of file QueueBase.cc.
References CPN::QueueBase::dequeuethresh, CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::indequeue, CPN::QueueBase::InternalDequeue(), CPN::QueueBase::NotifyFreespace(), CPN::QueueBase::readerkey, and CPN::QueueBase::readshutdown.
Referenced by CPN::QueueBase::RawDequeue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 240 of file QueueBase.cc.
References CPN::QueueBase::UnlockedDequeueChannelStride().
Here is the call graph for this function:
|
protectedvirtualinherited |
Called by the D4R algorithm when it has detected an artificial deadlock and this queue should be changed.
Implements D4R::QueueBase.
Definition at line 373 of file QueueBase.cc.
References CPN::KernelBase::CalculateGrowSize(), Logger::Debug(), CPN::QueueBase::kernel, CPN::QueueBase::logger, CPN::QueueBase::UnlockedCount(), CPN::QueueBase::UnlockedGrow(), CPN::QueueBase::UnlockedMaxThreshold(), CPN::QueueBase::UnlockedQueueLength(), and CPN::QueueBase::writerequest.
Here is the call graph for this function:
|
inherited |
Definition at line 210 of file QueueBase.cc.
References CPN::QueueBase::UnlockedEmpty().
Here is the call graph for this function:
|
inherited |
This function is used to release the buffer obtained with GetRawEnqueuePtr. The count specifies the number of entries that we want to be placed in the buffer.
| count | the number of bytes to be placed in the buffer |
Definition at line 160 of file QueueBase.cc.
References CPN::QueueBase::enqueuethresh, CPN::QueueBase::inenqueue, CPN::QueueBase::InternalEnqueue(), CPN::QueueBase::NotifyData(), CPN::QueueBase::writerkey, and CPN::QueueBase::writeshutdown.
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), and CPN::QueueBase::RawEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 235 of file QueueBase.cc.
References CPN::QueueBase::UnlockedEnqueueChannelStride().
Here is the call graph for this function:
|
inherited |
Definition at line 186 of file QueueBase.cc.
References CPN::QueueBase::InternalFlush().
Here is the call graph for this function:
|
inherited |
Definition at line 191 of file QueueBase.cc.
References CPN::QueueBase::flushed.
|
inherited |
Definition at line 215 of file QueueBase.cc.
References CPN::QueueBase::UnlockedFreespace().
Here is the call graph for this function:
|
inherited |
Definition at line 220 of file QueueBase.cc.
References CPN::QueueBase::UnlockedFull().
Here is the call graph for this function:
|
inlineinherited |
|
inherited |
Get a pointer to a buffer containing elements.
| thresh | the number of bytes to get |
| chan | the channel to use |
Definition at line 63 of file QueueBase.cc.
References ASSERT, CPN::KernelBase::CheckTerminated(), CPN::QueueBase::dequeuethresh, CPN::QueueBase::flushed, CPN::KernelBase::GrowQueueMaxThreshold(), CPN::QueueBase::indequeue, CPN::QueueBase::InternalGetRawDequeuePtr(), CPN::QueueBase::kernel, CPN::QueueBase::readerkey, CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, CPN::QueueBase::Signal(), CPN::QueueBase::UnlockedGrow(), CPN::QueueBase::UnlockedMaxThreshold(), CPN::QueueBase::WaitForData(), CPN::QueueBase::WriteBlocked(), CPN::QueueBase::writerequest, and CPN::QueueBase::writeshutdown.
Referenced by CPN::QueueBase::Dequeue(), and CPN::QueueBase::RawDequeue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Return a pointer to a buffer of memory that contains thresh entries that we can write into.
| thresh | the number bytes we need in the returned buffer. |
| chan | the channel to use |
Definition at line 121 of file QueueBase.cc.
References ASSERT, CPN::KernelBase::CheckTerminated(), CPN::QueueBase::enqueuethresh, CPN::QueueBase::flushed, CPN::KernelBase::GrowQueueMaxThreshold(), CPN::QueueBase::inenqueue, CPN::QueueBase::InternalGetRawEnqueuePtr(), CPN::QueueBase::kernel, CPN::QueueBase::ReadBlocked(), CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, CPN::QueueBase::Signal(), CPN::QueueBase::UnlockedGrow(), CPN::QueueBase::UnlockedMaxThreshold(), CPN::QueueBase::useD4R, CPN::QueueBase::Wait(), CPN::QueueBase::WaitForFreespace(), D4R::QueueBase::WriteBlock(), CPN::QueueBase::writerequest, CPN::QueueBase::writerkey, and CPN::QueueBase::writeshutdown.
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), and CPN::QueueBase::RawEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
|
inlineinherited |
|
inherited |
Ensure that this queue has at least queueLen bytes of space and can support at least maxThresh as the maxThreshold the new queue length will be max(queueLen, QueueLength()) and the new max threshold will be max(maxThresh, MaxThreshold())
| queueLen | the next queue length |
| maxThresh | the next max threshold |
Definition at line 245 of file QueueBase.cc.
References CPN::QueueBase::UnlockedGrow().
Here is the call graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Reimplemented in CPN::RemoteQueue.
Definition at line 140 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::Dequeue(), dequeueUseOld, oldqueue, and queue.
Referenced by CPN::RemoteQueue::InternalDequeue(), and CPN::RemoteQueue::SendEnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Reimplemented in CPN::RemoteQueue.
Definition at line 69 of file CPNThresholdQueue.cc.
References ASSERT, ThresholdQueueBase::Count(), ThresholdQueueBase::Dequeue(), ThresholdQueueBase::Enqueue(), enqueueUseOld, ThresholdQueueBase::GetRawDequeuePtr(), ThresholdQueueBase::GetRawEnqueuePtr(), ThresholdQueueBase::MaxThreshold(), ThresholdQueueBase::NumChannels(), oldqueue, and queue.
Referenced by CPN::RemoteQueue::EnqueuePacket(), and CPN::RemoteQueue::InternalEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Reimplemented in CPN::RemoteQueue.
Definition at line 265 of file QueueBase.cc.
References PthreadCondition::Broadcast(), CPN::QueueBase::cond, CPN::QueueBase::flushed, CPN::QueueBase::InternalEnqueue(), CPN::QueueBase::InternalGetRawEnqueuePtr(), CPN::QueueBase::postpad, CPN::QueueBase::readshutdown, CPN::QueueBase::UnlockedEnqueueChannelStride(), CPN::QueueBase::UnlockedNumChannels(), CPN::QueueBase::WaitForFreespace(), CPN::QueueBase::writerequest, CPN::QueueBase::writerkey, and CPN::QueueBase::writeshutdown.
Referenced by CPN::QueueBase::Flush(), and CPN::RemoteQueue::InternalFlush().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 126 of file CPNThresholdQueue.cc.
References ASSERT, dequeueUseOld, ThresholdQueueBase::GetRawDequeuePtr(), CPN::QueueBase::indequeue, oldqueue, and queue.
Referenced by CPN::RemoteQueue::SendEnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 57 of file CPNThresholdQueue.cc.
References ASSERT, enqueueUseOld, ThresholdQueueBase::GetRawEnqueuePtr(), CPN::QueueBase::inenqueue, oldqueue, and queue.
Referenced by CPN::RemoteQueue::EnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Reimplemented from CPN::QueueBase.
Reimplemented in CPN::RemoteQueue.
Definition at line 173 of file CPNThresholdQueue.cc.
References dequeueUseOld, enqueueUseOld, CPN::QueueBase::InternalReset(), oldqueue, queue, and ThresholdQueueBase::Reset().
Referenced by CPN::RemoteQueue::InternalReset().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 390 of file QueueBase.cc.
References CPN::QueueBase::readshutdown.
|
inherited |
Definition at line 395 of file QueueBase.cc.
References CPN::QueueBase::writeshutdown.
|
inlinevirtualinherited |
These functions are to access the lock for the queue.
Implements D4R::QueueBase.
Definition at line 221 of file QueueBase.h.
References lock, and PthreadMutex::Lock().
Here is the call graph for this function:
|
virtualinherited |
For debugging ONLY!! Otherwise non deterministic output.
Reimplemented in CPN::RemoteQueue.
Definition at line 400 of file QueueBase.cc.
References CPN::QueueBase::dequeuethresh, CPN::QueueBase::enqueuethresh, Logger::Error(), CPN::QueueBase::flushed, CPN::QueueBase::indequeue, CPN::QueueBase::inenqueue, CPN::QueueBase::logger, CPN::QueueBase::readerkey, CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, CPN::QueueBase::UnlockedCount(), CPN::QueueBase::UnlockedFreespace(), CPN::QueueBase::UnlockedMaxThreshold(), CPN::QueueBase::UnlockedNumDequeued(), CPN::QueueBase::UnlockedNumEnqueued(), CPN::QueueBase::UnlockedQueueLength(), CPN::QueueBase::writerequest, CPN::QueueBase::writerkey, and CPN::QueueBase::writeshutdown.
Referenced by CPN::RemoteQueue::LogState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 225 of file QueueBase.cc.
References CPN::QueueBase::UnlockedMaxThreshold().
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), and UnlockedGrow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedinherited |
Definition at line 341 of file QueueBase.cc.
References PthreadCondition::Broadcast(), CPN::QueueBase::cond, CPN::QueueBase::readrequest, and CPN::QueueBase::UnlockedCount().
Referenced by CPN::QueueBase::Enqueue(), and CPN::RemoteQueue::EnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedinherited |
Definition at line 362 of file QueueBase.cc.
References PthreadCondition::Broadcast(), CPN::QueueBase::cond, CPN::QueueBase::UnlockedFreespace(), and CPN::QueueBase::writerequest.
Referenced by CPN::QueueBase::Dequeue(), and CPN::RemoteQueue::SendEnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Used to tell any waiting threads that the network is terminating.
Definition at line 368 of file QueueBase.cc.
References PthreadCondition::Broadcast(), and CPN::QueueBase::cond.
Here is the call graph for this function:
|
inherited |
Definition at line 200 of file QueueBase.cc.
References CPN::QueueBase::UnlockedNumChannels().
Here is the call graph for this function:
|
inherited |
Definition at line 321 of file QueueBase.cc.
References CPN::QueueBase::UnlockedNumDequeued().
Here is the call graph for this function:
|
inherited |
Definition at line 316 of file QueueBase.cc.
References CPN::QueueBase::UnlockedNumEnqueued().
Here is the call graph for this function:
|
inherited |
Definition at line 230 of file QueueBase.cc.
References CPN::QueueBase::UnlockedQueueLength().
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), CPN::RemoteQueue::GrowPacket(), UnlockedGrow(), and CPN::RemoteQueue::UnlockedGrow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Dequeue data from the queue directly into the memory pointed to by data. This function shall be equivalent to a call to GetRawDequeuePtr then a memcpy and then a call to Dequeue.
| data | poiner to memory to dequeue to |
| count | the number of bytes to copy into data |
| numChans | the number of channels to write to |
| chanStride | the distance in bytes between the beginning of the channels in data. |
Definition at line 102 of file QueueBase.cc.
References ASSERT, CPN::QueueBase::Dequeue(), and CPN::QueueBase::GetRawDequeuePtr().
Referenced by CPN::QueueBase::RawDequeue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
A version of RawDequeue to use when there is only 1 channel.
| data | the data to enqueue |
| count | the number of bytes to enqueue |
Definition at line 117 of file QueueBase.cc.
References CPN::QueueBase::RawDequeue().
Here is the call graph for this function:
|
inherited |
This function shall be equivalent to a call to GetRqwEnqueuePtr and a memcpy and then a call to Enqueue
The underlying implementatin may implement ether the GetRawEnqueuePtr and Enqueue or RawEnqueue and then implement the other in terms of the one implemented.
| data | pointer to the memory to enqueue |
| count | the number of bytes to enqueue |
| numChans | the number of channels to write to |
| chanStride | the distance in bytes between the beginning of the channels in data. |
Definition at line 169 of file QueueBase.cc.
References CPN::QueueBase::Enqueue(), and CPN::QueueBase::GetRawEnqueuePtr().
Referenced by CPN::QueueBase::RawEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
A version of RawEnqueue to use when there is only 1 channel.
| data | pointer to the memory to enqueue |
| count | the number of bytes to enqueue |
Definition at line 196 of file QueueBase.cc.
References CPN::QueueBase::RawEnqueue().
Here is the call graph for this function:
|
protectedinherited |
reader ===> writer ReadBlock requires that you already hold the lock and if it is reentrant then a single unlock will release the lock.
| D4R::DeadlockException |
Definition at line 71 of file D4RQueue.cc.
References D4R::QueueBase::incomm, D4R::QueueBase::ReadBlocked(), D4R::QueueBase::reader, D4R::QueueBase::Signal(), D4R::QueueBase::Wait(), D4R::QueueBase::writer, and D4R::QueueBase::writetagchanged.
Referenced by CPN::QueueBase::WaitForData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Implements D4R::QueueBase.
Definition at line 336 of file QueueBase.cc.
References CPN::KernelBase::CheckTerminated(), CPN::QueueBase::flushed, CPN::QueueBase::kernel, CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, CPN::QueueBase::UnlockedCount(), and CPN::QueueBase::writeshutdown.
Referenced by CPN::QueueBase::GetRawEnqueuePtr(), CPN::RemoteQueue::WaitForData(), and CPN::QueueBase::WaitForData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
For unit tests.
Definition at line 380 of file QueueBase.cc.
References CPN::QueueBase::readrequest.
|
inherited |
Definition at line 181 of file QueueBase.cc.
References CPN::QueueBase::InternalReset().
Here is the call graph for this function:
|
inherited |
Set the node which is reading from this queue
| n | the node |
Definition at line 59 of file D4RQueue.cc.
References D4R::QueueBase::reader, and D4R::QueueBase::Signal().
Referenced by CPN::RemoteQueue::RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Set the node which is writing to this queue.
| n | the node |
Definition at line 65 of file D4RQueue.cc.
References D4R::QueueBase::Signal(), and D4R::QueueBase::writer.
Referenced by CPN::RemoteQueue::RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Called by the QueueReader when no more data will be read.
Definition at line 250 of file QueueBase.cc.
References CPN::QueueBase::UnlockedShutdownReader().
Referenced by CPN::RemoteQueue::FileThreadEntryPoint().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Called by the QueueWriter when no more data will be written.
Definition at line 260 of file QueueBase.cc.
References CPN::QueueBase::UnlockedShutdownWriter().
Referenced by CPN::RemoteQueue::FileThreadEntryPoint().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotectedvirtualinherited |
Signal that Wait should return
Implements D4R::QueueBase.
Reimplemented in CPN::RemoteQueue.
Definition at line 247 of file QueueBase.h.
Referenced by CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::RemoteQueue::Signal(), CPN::QueueBase::UnlockedShutdownReader(), and CPN::QueueBase::UnlockedShutdownWriter().
Here is the caller graph for this function:
|
inherited |
These functions are called by the D4R::Node when thier tag changes.
Definition at line 139 of file D4RQueue.cc.
References D4R::QueueBase::UnlockedSignalReaderTagChanged().
Here is the call graph for this function:
|
inherited |
Definition at line 150 of file D4RQueue.cc.
References D4R::QueueBase::UnlockedSignalWriterTagChanged().
Here is the call graph for this function:
|
inlinevirtualinherited |
Implements D4R::QueueBase.
Definition at line 222 of file QueueBase.h.
References lock, and PthreadMutex::Unlock().
Here is the call graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Reimplemented in CPN::RemoteQueue.
Definition at line 149 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::Count(), and queue.
Here is the call graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 110 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::ChannelStride(), dequeueUseOld, oldqueue, and queue.
Here is the call graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Reimplemented in CPN::RemoteQueue.
Definition at line 153 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::Empty(), and queue.
Here is the call graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 102 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::ChannelStride(), enqueueUseOld, oldqueue, and queue.
Here is the call graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 118 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::Freespace(), and queue.
Referenced by CPN::RemoteQueue::GetState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 122 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::Full(), and queue.
Here is the call graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Reimplemented in CPN::RemoteQueue.
Definition at line 184 of file CPNThresholdQueue.cc.
References ASSERT, dequeueUseOld, enqueueUseOld, CPN::ThresholdQueue::TQImpl::Grow(), CPN::QueueBase::indequeue, CPN::QueueBase::inenqueue, CPN::QueueBase::MaxThreshold(), oldqueue, queue, and CPN::QueueBase::QueueLength().
Referenced by CPN::RemoteQueue::EnqueuePacket(), CPN::RemoteQueue::GrowPacket(), and CPN::RemoteQueue::UnlockedGrow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 157 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::MaxThreshold(), and queue.
Referenced by CPN::RemoteQueue::GetState(), and CPN::RemoteQueue::UnlockedGrow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 98 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::NumChannels(), and queue.
Here is the call graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 169 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::ElementsDequeued(), and queue.
Referenced by CPN::RemoteQueue::GetState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Definition at line 165 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::ElementsEnqueued(), and queue.
Referenced by CPN::RemoteQueue::GetState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements CPN::QueueBase.
Reimplemented in CPN::RemoteQueue.
Definition at line 161 of file CPNThresholdQueue.cc.
References queue, and ThresholdQueueBase::QueueLength().
Here is the call graph for this function:
|
protectedvirtualinherited |
Definition at line 255 of file QueueBase.cc.
References CPN::QueueBase::readshutdown, and CPN::QueueBase::Signal().
Referenced by CPN::RemoteQueue::EndOfReadPacket(), CPN::RemoteQueue::InternalCheckStatus(), and CPN::QueueBase::ShutdownReader().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Definition at line 311 of file QueueBase.cc.
References CPN::QueueBase::Signal(), and CPN::QueueBase::writeshutdown.
Referenced by CPN::RemoteQueue::EndOfWritePacket(), CPN::RemoteQueue::InternalCheckStatus(), and CPN::QueueBase::ShutdownWriter().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Reimplemented in CPN::RemoteQueue.
Definition at line 144 of file D4RQueue.cc.
References DEBUG, D4R::QueueBase::reader, D4R::QueueBase::readtagchanged, D4R::QueueBase::Signal(), and D4R::QueueBase::writer.
Referenced by CPN::RemoteQueue::D4RTagPacket(), D4R::QueueBase::SignalReaderTagChanged(), and CPN::RemoteQueue::UnlockedSignalReaderTagChanged().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Reimplemented in CPN::RemoteQueue.
Definition at line 155 of file D4RQueue.cc.
References DEBUG, D4R::QueueBase::reader, D4R::QueueBase::Signal(), D4R::QueueBase::writer, and D4R::QueueBase::writetagchanged.
Referenced by CPN::RemoteQueue::D4RTagPacket(), D4R::QueueBase::SignalWriterTagChanged(), and CPN::RemoteQueue::UnlockedSignalWriterTagChanged().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotectedvirtualinherited |
Wait untill Signal is called. Must be holding the lock to call.
Implements D4R::QueueBase.
Definition at line 246 of file QueueBase.h.
References lock.
Referenced by CPN::RemoteQueue::ActionThreadEntryPoint(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::RemoteQueue::WaitForData(), and CPN::RemoteQueue::WaitForFreespace().
Here is the caller graph for this function:
|
protectedvirtualinherited |
Reimplemented in CPN::RemoteQueue.
Definition at line 326 of file QueueBase.cc.
References CPN::QueueBase::cond, CPN::QueueBase::lock, D4R::QueueBase::ReadBlock(), CPN::QueueBase::ReadBlocked(), CPN::QueueBase::useD4R, and PthreadCondition::Wait().
Referenced by CPN::QueueBase::GetRawDequeuePtr(), and CPN::RemoteQueue::WaitForData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Reimplemented in CPN::RemoteQueue.
Definition at line 347 of file QueueBase.cc.
References CPN::QueueBase::cond, CPN::QueueBase::lock, CPN::QueueBase::UnlockedQueueLength(), CPN::QueueBase::useD4R, PthreadCondition::Wait(), D4R::QueueBase::WriteBlock(), and CPN::QueueBase::WriteBlocked().
Referenced by CPN::QueueBase::GetRawEnqueuePtr(), CPN::QueueBase::InternalFlush(), and CPN::RemoteQueue::WaitForFreespace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedinherited |
writer ===> reader WriteBlock requires that you already hold the lock and if it is reentrant then a single unlock will release the lock.
Definition at line 106 of file D4RQueue.cc.
References D4R::QueueBase::Detect(), D4R::QueueBase::incomm, D4R::QueueBase::reader, D4R::QueueBase::readtagchanged, D4R::QueueBase::Signal(), D4R::QueueBase::Wait(), D4R::QueueBase::WriteBlocked(), and D4R::QueueBase::writer.
Referenced by CPN::QueueBase::GetRawEnqueuePtr(), and CPN::QueueBase::WaitForFreespace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Implements D4R::QueueBase.
Definition at line 357 of file QueueBase.cc.
References CPN::KernelBase::CheckTerminated(), CPN::QueueBase::flushed, CPN::QueueBase::kernel, CPN::QueueBase::readshutdown, CPN::QueueBase::UnlockedFreespace(), CPN::QueueBase::writerequest, and CPN::QueueBase::writeshutdown.
Referenced by CPN::QueueBase::GetRawDequeuePtr(), CPN::RemoteQueue::WaitForFreespace(), and CPN::QueueBase::WaitForFreespace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
For unit tests.
Definition at line 385 of file QueueBase.cc.
References CPN::QueueBase::writerequest.
|
protectedinherited |
Definition at line 290 of file QueueBase.h.
Referenced by CPN::QueueBase::InternalFlush(), CPN::QueueBase::InternalReset(), CPN::QueueBase::NotifyData(), CPN::QueueBase::NotifyFreespace(), CPN::QueueBase::NotifyTerminate(), CPN::QueueBase::WaitForData(), and CPN::QueueBase::WaitForFreespace().
|
protectedinherited |
Definition at line 291 of file QueueBase.h.
|
protectedinherited |
Definition at line 282 of file QueueBase.h.
Referenced by CPN::QueueBase::Dequeue(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), and CPN::RemoteQueue::ResetPacket().
|
protected |
Definition at line 90 of file CPNThresholdQueue.h.
Referenced by InternalDequeue(), InternalGetRawDequeuePtr(), InternalReset(), CPN::RemoteQueue::ResetPacket(), UnlockedDequeueChannelStride(), and UnlockedGrow().
|
protectedinherited |
Definition at line 281 of file QueueBase.h.
Referenced by CPN::QueueBase::Enqueue(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), and CPN::RemoteQueue::ResetPacket().
|
protected |
Definition at line 89 of file CPNThresholdQueue.h.
Referenced by InternalEnqueue(), InternalGetRawEnqueuePtr(), InternalReset(), CPN::RemoteQueue::ResetPacket(), UnlockedEnqueueChannelStride(), and UnlockedGrow().
|
protectedinherited |
Definition at line 285 of file QueueBase.h.
Referenced by CPN::QueueBase::Flushed(), CPN::RemoteQueue::FlushPacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), CPN::QueueBase::ReadBlocked(), CPN::RemoteQueue::ResetPacket(), and CPN::QueueBase::WriteBlocked().
|
protectedinherited |
Definition at line 126 of file D4RQueue.h.
Referenced by D4R::QueueBase::ReadBlock(), and D4R::QueueBase::WriteBlock().
|
protectedinherited |
Definition at line 283 of file QueueBase.h.
Referenced by CPN::QueueBase::Dequeue(), CPN::QueueBase::GetRawDequeuePtr(), InternalGetRawDequeuePtr(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), CPN::RemoteQueue::ResetPacket(), CPN::RemoteQueue::SendEnqueuePacket(), and UnlockedGrow().
|
protectedinherited |
Definition at line 284 of file QueueBase.h.
Referenced by CPN::QueueBase::Enqueue(), CPN::RemoteQueue::EnqueuePacket(), CPN::QueueBase::GetRawEnqueuePtr(), InternalGetRawEnqueuePtr(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), CPN::RemoteQueue::ResetPacket(), and UnlockedGrow().
|
protectedinherited |
Definition at line 286 of file QueueBase.h.
Referenced by CPN::QueueBase::Detect(), CPN::RemoteQueue::FileThreadEntryPoint(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::RemoteQueue::InternalCheckStatus(), CPN::QueueBase::ReadBlocked(), and CPN::QueueBase::WriteBlocked().
|
mutableprotectedinherited |
Definition at line 289 of file QueueBase.h.
Referenced by CPN::RemoteQueue::FileThreadEntryPoint(), CPN::RemoteQueue::UnlockedGrow(), CPN::QueueBase::WaitForData(), and CPN::QueueBase::WaitForFreespace().
|
protectedinherited |
Definition at line 288 of file QueueBase.h.
Referenced by CPN::RemoteQueue::D4RTagPacket(), CPN::RemoteQueue::DequeuePacket(), CPN::QueueBase::Detect(), CPN::RemoteQueue::EndOfReadPacket(), CPN::RemoteQueue::EndOfWritePacket(), CPN::RemoteQueue::EnqueuePacket(), CPN::RemoteQueue::FileThreadEntryPoint(), CPN::RemoteQueue::FlushPacket(), CPN::RemoteQueue::GrowPacket(), CPN::RemoteQueue::HandleError(), CPN::RemoteQueue::InternalCheckStatus(), CPN::RemoteQueue::InternalDequeue(), CPN::RemoteQueue::InternalEnqueue(), CPN::RemoteQueue::LogState(), CPN::QueueBase::LogState(), CPN::QueueBase::QueueBase(), CPN::RemoteQueue::Read(), CPN::RemoteQueue::ReadBlockPacket(), CPN::RemoteQueue::RemoteQueue(), CPN::RemoteQueue::ResetPacket(), CPN::RemoteQueue::SendD4RTagPacket(), CPN::RemoteQueue::SendDequeuePacket(), CPN::RemoteQueue::SendEndOfReadPacket(), CPN::RemoteQueue::SendEndOfWritePacket(), CPN::RemoteQueue::SendEnqueuePacket(), CPN::RemoteQueue::SendFlushPacket(), CPN::RemoteQueue::SendGrowPacket(), CPN::RemoteQueue::SendReadBlockPacket(), CPN::RemoteQueue::SendResetPacket(), CPN::RemoteQueue::SendWriteBlockPacket(), CPN::RemoteQueue::UnlockedGrow(), CPN::RemoteQueue::UnlockedShutdown(), CPN::RemoteQueue::UnlockedSignalReaderTagChanged(), CPN::RemoteQueue::UnlockedSignalWriterTagChanged(), CPN::RemoteQueue::WaitForData(), CPN::RemoteQueue::WaitForFreespace(), CPN::RemoteQueue::WriteBlockPacket(), and CPN::RemoteQueue::~RemoteQueue().
|
protected |
Definition at line 88 of file CPNThresholdQueue.h.
Referenced by InternalDequeue(), InternalEnqueue(), InternalGetRawDequeuePtr(), InternalGetRawEnqueuePtr(), InternalReset(), CPN::RemoteQueue::ResetPacket(), UnlockedDequeueChannelStride(), UnlockedEnqueueChannelStride(), UnlockedGrow(), and ~ThresholdQueue().
|
protectedinherited |
Definition at line 278 of file QueueBase.h.
Referenced by CPN::QueueBase::InternalFlush().
|
protectedinherited |
Definition at line 277 of file QueueBase.h.
Referenced by CPN::QueueBase::InternalReset().
|
protected |
Definition at line 87 of file CPNThresholdQueue.h.
Referenced by CPN::RemoteQueue::EnqueuePacket(), CPN::RemoteQueue::GrowPacket(), CPN::RemoteQueue::InternalCheckStatus(), InternalDequeue(), InternalEnqueue(), InternalGetRawDequeuePtr(), InternalGetRawEnqueuePtr(), InternalReset(), CPN::RemoteQueue::ReadBlockPacket(), CPN::RemoteQueue::ResetPacket(), CPN::RemoteQueue::SendDequeuePacket(), CPN::RemoteQueue::SendEnqueuePacket(), CPN::RemoteQueue::SendGrowPacket(), ThresholdQueue(), UnlockedCount(), CPN::RemoteQueue::UnlockedCount(), UnlockedDequeueChannelStride(), UnlockedEmpty(), CPN::RemoteQueue::UnlockedEmpty(), UnlockedEnqueueChannelStride(), UnlockedFreespace(), UnlockedFull(), UnlockedGrow(), CPN::RemoteQueue::UnlockedGrow(), UnlockedMaxThreshold(), UnlockedNumChannels(), UnlockedNumDequeued(), UnlockedNumEnqueued(), UnlockedQueueLength(), CPN::RemoteQueue::WriteBlockPacket(), and ~ThresholdQueue().
|
protectedinherited |
Definition at line 122 of file D4RQueue.h.
Referenced by CPN::RemoteQueue::InternalCheckStatus(), D4R::QueueBase::ReadBlock(), CPN::RemoteQueue::SendD4RTagPacket(), D4R::QueueBase::SetReaderNode(), D4R::QueueBase::UnlockedSignalReaderTagChanged(), D4R::QueueBase::UnlockedSignalWriterTagChanged(), and D4R::QueueBase::WriteBlock().
|
protectedinherited |
Definition at line 273 of file QueueBase.h.
Referenced by CPN::QueueBase::Dequeue(), CPN::RemoteQueue::GetKey(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::LogState(), CPN::QueueBase::QueueBase(), and CPN::RemoteQueue::RemoteQueue().
|
protectedinherited |
Definition at line 279 of file QueueBase.h.
Referenced by CPN::RemoteQueue::DequeuePacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::RemoteQueue::GetState(), CPN::RemoteQueue::InternalCheckStatus(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), CPN::QueueBase::NotifyData(), CPN::QueueBase::ReadBlocked(), CPN::RemoteQueue::ReadBlockPacket(), CPN::QueueBase::ReadRequest(), CPN::RemoteQueue::ResetPacket(), and CPN::RemoteQueue::SendReadBlockPacket().
|
protectedinherited |
Definition at line 275 of file QueueBase.h.
Referenced by CPN::QueueBase::Dequeue(), CPN::RemoteQueue::DequeuePacket(), CPN::RemoteQueue::EndOfReadPacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::RemoteQueue::GetState(), CPN::RemoteQueue::HandleError(), CPN::RemoteQueue::InternalCheckStatus(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::IsReaderShutdown(), CPN::QueueBase::LogState(), CPN::QueueBase::ReadBlocked(), CPN::RemoteQueue::ReadBlockPacket(), CPN::QueueBase::UnlockedShutdownReader(), and CPN::QueueBase::WriteBlocked().
|
protectedinherited |
Definition at line 124 of file D4RQueue.h.
Referenced by D4R::QueueBase::UnlockedSignalReaderTagChanged(), and D4R::QueueBase::WriteBlock().
|
protectedinherited |
Definition at line 287 of file QueueBase.h.
Referenced by CPN::QueueBase::GetRawEnqueuePtr(), CPN::RemoteQueue::ReadBlockPacket(), CPN::QueueBase::WaitForData(), CPN::QueueBase::WaitForFreespace(), and CPN::RemoteQueue::WriteBlockPacket().
|
protectedinherited |
Definition at line 123 of file D4RQueue.h.
Referenced by CPN::RemoteQueue::InternalCheckStatus(), D4R::QueueBase::ReadBlock(), CPN::RemoteQueue::SendD4RTagPacket(), D4R::QueueBase::SetWriterNode(), D4R::QueueBase::UnlockedSignalReaderTagChanged(), D4R::QueueBase::UnlockedSignalWriterTagChanged(), and D4R::QueueBase::WriteBlock().
|
protectedinherited |
Definition at line 280 of file QueueBase.h.
Referenced by CPN::QueueBase::Detect(), CPN::RemoteQueue::EnqueuePacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::RemoteQueue::GetState(), CPN::RemoteQueue::InternalCheckStatus(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), CPN::QueueBase::NotifyFreespace(), CPN::RemoteQueue::ResetPacket(), CPN::RemoteQueue::SendWriteBlockPacket(), CPN::QueueBase::WriteBlocked(), CPN::RemoteQueue::WriteBlockPacket(), and CPN::QueueBase::WriteRequest().
|
protectedinherited |
Definition at line 274 of file QueueBase.h.
Referenced by CPN::QueueBase::Enqueue(), CPN::RemoteQueue::GetKey(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::LogState(), CPN::QueueBase::QueueBase(), and CPN::RemoteQueue::RemoteQueue().
|
protectedinherited |
Definition at line 276 of file QueueBase.h.
Referenced by CPN::RemoteQueue::EndOfWritePacket(), CPN::QueueBase::Enqueue(), CPN::RemoteQueue::EnqueuePacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::RemoteQueue::GetState(), CPN::RemoteQueue::HandleError(), CPN::RemoteQueue::InternalCheckStatus(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::IsWriterShutdown(), CPN::QueueBase::LogState(), CPN::QueueBase::ReadBlocked(), CPN::QueueBase::UnlockedShutdownWriter(), CPN::QueueBase::WriteBlocked(), and CPN::RemoteQueue::WriteBlockPacket().
|
protectedinherited |
Definition at line 125 of file D4RQueue.h.
Referenced by D4R::QueueBase::ReadBlock(), and D4R::QueueBase::UnlockedSignalWriterTagChanged().
1.8.5