freebsd-nq/contrib/ofed/libibverbs/fixes/pthread_cond_t_fields.patch
2011-03-21 09:58:24 +00:00

63 lines
1.6 KiB
Diff

move pthread_cond_t fields to the end of structs, because
their size changed from RHAS4 to RHAS5. In all the cases,
the intervening entries were not accessed outside libibverbs
(in non-XRC applications).
The structs modified are: ibv_cq, ibv_srq, and ibv_qp.
(OFED 1.3 libibverbs commit 4c29c266a3c0932cd06e8f2b4e238aecd3c65dcc)
Pointed out by: Changqing Tang <changquing.tang@hp.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Index: libibverbs/include/infiniband/verbs.h
===================================================================
--- libibverbs.orig/include/infiniband/verbs.h 2009-11-01 15:18:24.585280000 +0200
+++ libibverbs/include/infiniband/verbs.h 2009-11-01 15:18:28.759417000 +0200
@@ -565,13 +565,14 @@ struct ibv_srq {
struct ibv_pd *pd;
uint32_t handle;
- pthread_mutex_t mutex;
- pthread_cond_t cond;
uint32_t events_completed;
uint32_t xrc_srq_num;
struct ibv_xrc_domain *xrc_domain;
struct ibv_cq *xrc_cq;
+
+ pthread_mutex_t mutex;
+ pthread_cond_t cond;
};
struct ibv_qp {
@@ -586,11 +587,12 @@ struct ibv_qp {
enum ibv_qp_state state;
enum ibv_qp_type qp_type;
- pthread_mutex_t mutex;
- pthread_cond_t cond;
uint32_t events_completed;
struct ibv_xrc_domain *xrc_domain;
+
+ pthread_mutex_t mutex;
+ pthread_cond_t cond;
};
struct ibv_comp_channel {
@@ -606,10 +608,11 @@ struct ibv_cq {
uint32_t handle;
int cqe;
- pthread_mutex_t mutex;
- pthread_cond_t cond;
uint32_t comp_events_completed;
uint32_t async_events_completed;
+
+ pthread_mutex_t mutex;
+ pthread_cond_t cond;
};
struct ibv_ah {