X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/eeab3e6cade87c1fe0a5f3d93522e12ccb9ec2ab..f2170465073de34adf89161d4287182b518352c4:/rpc/fifo.h diff --git a/rpc/fifo.h b/rpc/fifo.h index 93a79cf..dde514d 100644 --- a/rpc/fifo.h +++ b/rpc/fifo.h @@ -8,20 +8,20 @@ template class fifo { public: - fifo(int limit=0) : max_(limit) {}; + fifo(size_t limit=0) : max_(limit) {} bool enq(T, bool blocking=true); void deq(T *); bool size() { lock ml(m_); return q_.size(); - }; + } private: std::list q_; mutex m_; cond non_empty_c_; // q went non-empty cond has_space_c_; // q is not longer overfull - unsigned int max_; // maximum capacity of the queue, block enq threads if exceeds this limit + size_t max_; // maximum capacity of the queue, block enq threads if exceeds this limit }; template bool