summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/rdma/RdmaIO.h
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-09-08 16:48:58 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-09-08 16:48:58 +0000
commit9048ed46bb240aa3839f74d8b6daf837592186be (patch)
treebfd8c6e2d704a93b36ab575395bf4af6297a9b60 /cpp/src/qpid/sys/rdma/RdmaIO.h
parent8db918da6cb8d883c2f6c506823293c9029f1b18 (diff)
downloadqpid-python-9048ed46bb240aa3839f74d8b6daf837592186be.tar.gz
Refactored Rdma write buffers to be controlled by the rdma_wrapper layer
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@995131 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/rdma/RdmaIO.h')
-rw-r--r--cpp/src/qpid/sys/rdma/RdmaIO.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/cpp/src/qpid/sys/rdma/RdmaIO.h b/cpp/src/qpid/sys/rdma/RdmaIO.h
index 9f55a7be7c..5876646b96 100644
--- a/cpp/src/qpid/sys/rdma/RdmaIO.h
+++ b/cpp/src/qpid/sys/rdma/RdmaIO.h
@@ -32,7 +32,6 @@
#include <netinet/in.h>
#include <boost/function.hpp>
-#include <deque>
namespace Rdma {
@@ -56,8 +55,6 @@ namespace Rdma {
enum State { IDLE, DATA, PENDING_DATA, NOTIFY_WRITE, PENDING_NOTIFY, DRAINED, SHUTDOWN };
qpid::sys::AtomicValue<State> state;
//qpid::sys::Mutex stateLock;
- std::deque<Buffer*> bufferQueue;
- qpid::sys::Mutex bufferQueueLock;
QueuePair::intrusive_ptr qp;
qpid::sys::DispatchHandleRef dataHandle;
@@ -126,8 +123,17 @@ namespace Rdma {
}
inline bool AsynchIO::bufferAvailable() const {
- return !bufferQueue.empty();
+ return qp->bufferAvailable();
}
+
+ inline Buffer* AsynchIO::getBuffer() {
+ return qp->getBuffer();
+ }
+
+ inline void AsynchIO::returnBuffer(Buffer* b) {
+ qp->returnBuffer(b);
+ }
+
// These are the parameters necessary to start the conversation
// * Each peer HAS to allocate buffers of the size of the maximum receive from its peer
// * Each peer HAS to know the initial "credit" it has for transmitting to its peer