diff options
Diffstat (limited to 'cpp/src/qpid/sys/rdma/rdma_factories.h')
-rw-r--r-- | cpp/src/qpid/sys/rdma/rdma_factories.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/cpp/src/qpid/sys/rdma/rdma_factories.h b/cpp/src/qpid/sys/rdma/rdma_factories.h index 26a93bb494..783181cf1b 100644 --- a/cpp/src/qpid/sys/rdma/rdma_factories.h +++ b/cpp/src/qpid/sys/rdma/rdma_factories.h @@ -1,7 +1,27 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ #ifndef RDMA_FACTORIES_H #define RDMA_FACTORIES_H -#include "rdma_exception.h" +#include "qpid/sys/rdma/rdma_exception.h" #include <rdma/rdma_cma.h> @@ -15,10 +35,11 @@ namespace Rdma { void deallocPd(::ibv_pd* p) throw (); void destroyCChannel(::ibv_comp_channel* c) throw (); void destroyCq(::ibv_cq* cq) throw (); + void destroyQp(::ibv_qp* qp) throw (); inline boost::shared_ptr< ::rdma_event_channel > mkEChannel() { - return - boost::shared_ptr< ::rdma_event_channel >(::rdma_create_event_channel(), destroyEChannel); + ::rdma_event_channel* c = CHECK_NULL(::rdma_create_event_channel()); + return boost::shared_ptr< ::rdma_event_channel >(c, destroyEChannel); } inline boost::shared_ptr< ::rdma_cm_id > |