23 #include "common_priv.h"
31 #define DEBUG(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
33 #define DEBUG(fmt, ...)
80 DEBUG(
"Transfer: publicTag < t\n\tPrivate: (%llu, %llu, %d, %llu)\n\tPublic: (%llu, %llu, %d, %llu)\n\t t: (%llu, %llu, %d, %llu)\n",
92 DEBUG(
"Transfer: publicTag == t\n\tPrivate: (%llu, %llu, %d, %llu)\n\tPublic: (%llu, %llu, %d, %llu)\n\t t: (%llu, %llu, %d, %llu)\n",
99 DEBUG(
"Transfer: publicTag > t NOP\n\tPrivate: (%llu, %llu, %d, %llu)\n\tPublic: (%llu, %llu, %d, %llu)\n\t t: (%llu, %llu, %d, %llu)\n",
117 q->SignalReaderTagChanged();
121 q->SignalWriterTagChanged();
126 QueueList::iterator itr, end;
130 shared_ptr<QueueBase> q = itr->lock();
135 itr = qlist.erase(itr);
141 std::list<shared_ptr<QueueBase> > readers;
142 std::list<shared_ptr<QueueBase> > writers;
148 std::for_each(readers.begin(), readers.end(), &
SignalReader);
149 std::for_each(writers.begin(), writers.end(), &
SignalWriter);
void AddReader(weak_ptr< QueueBase > q)
void SetPrivateTag(const Tag &t)
Tag GetPrivateTag() const
void SignalWriter(shared_ptr< QueueBase > q)
uint64_t QueueKey() const
std::list< weak_ptr< QueueBase > > writerlist
void SetPublicTag(const Tag &t)
std::list< weak_ptr< QueueBase > > QueueList
void GetQueues(QueueList &qlist, std::list< shared_ptr< QueueBase > > &out)
void SignalReader(shared_ptr< QueueBase > q)
const uint128_t & Priority() const
void AddWriter(weak_ptr< QueueBase > q)
std::list< weak_ptr< QueueBase > > readerlist
uint64_t QueueSize() const
void Block(const Tag &t, unsigned qsize)
bool Transmit(const Tag &t)
Automatic locking on the stack.