X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/dfe8486473094c0769fd1922329c3f0dfd8f43c0..f2170465073de34adf89161d4287182b518352c4:/rpc/fifo.h?ds=sidebyside 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