fix misc warnings, cleanup macro..
This commit was SVN r7547.
Этот коммит содержится в:
родитель
05e6e51fec
Коммит
8239e635b9
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
@ -219,40 +218,43 @@ struct mca_btl_mvapi_module_t {
|
||||
}
|
||||
|
||||
|
||||
#define MCA_BTL_MVAPI_POST_SRR_SUB(post_srr_sub_cnt, \
|
||||
post_srr_sub_mvapi_btl, \
|
||||
post_srr_sub_frag_list, \
|
||||
post_srr_sub_srr_posted, \
|
||||
post_srr_sub_nic, \
|
||||
post_srr_sub_srq_hndl) \
|
||||
#define MCA_BTL_MVAPI_POST_SRR_SUB(cnt, \
|
||||
mvapi_btl, \
|
||||
frag_list, \
|
||||
srr_posted, \
|
||||
nic, \
|
||||
srq_hndl) \
|
||||
{\
|
||||
uint32_t post_srr_sub_i; \
|
||||
uint32_t post_srr_sub_rwqe_posted; \
|
||||
int post_srr_sub_rc; \
|
||||
opal_list_item_t* post_srr_sub_item; \
|
||||
mca_btl_mvapi_frag_t* post_srr_sub_frag; \
|
||||
VAPI_rr_desc_t* post_srr_sub_desc_post = post_srr_sub_mvapi_btl->rr_desc_post; \
|
||||
for(post_srr_sub_i = 0; post_srr_sub_i < post_srr_sub_cnt; post_srr_sub_i++) { \
|
||||
OMPI_FREE_LIST_WAIT(post_srr_sub_frag_list, post_srr_sub_item, post_srr_sub_rc); \
|
||||
post_srr_sub_frag = (mca_btl_mvapi_frag_t*) post_srr_sub_item; \
|
||||
post_srr_sub_frag->sg_entry.len = post_srr_sub_frag->size + \
|
||||
((unsigned char*) post_srr_sub_frag->segment.seg_addr.pval- \
|
||||
(unsigned char*) post_srr_sub_frag->hdr); \
|
||||
post_srr_sub_desc_post[post_srr_sub_i] = post_srr_sub_frag->rr_desc; \
|
||||
do { \
|
||||
uint32_t i; \
|
||||
VAPI_ret_t ret; \
|
||||
uint32_t rwqe_posted = 0; \
|
||||
int rc; \
|
||||
opal_list_item_t* item = NULL; \
|
||||
mca_btl_mvapi_frag_t* frag = NULL; \
|
||||
VAPI_rr_desc_t* desc_post = mvapi_btl->rr_desc_post; \
|
||||
for(i = 0; i < cnt; i++) { \
|
||||
OMPI_FREE_LIST_WAIT(frag_list, item, rc); \
|
||||
frag = (mca_btl_mvapi_frag_t*) item; \
|
||||
frag->sg_entry.len = frag->size + \
|
||||
((unsigned char*) frag->segment.seg_addr.pval- \
|
||||
(unsigned char*) frag->hdr); \
|
||||
desc_post[i] = frag->rr_desc; \
|
||||
}\
|
||||
post_srr_sub_frag->ret = VAPI_post_srq( post_srr_sub_nic, \
|
||||
post_srr_sub_srq_hndl, \
|
||||
post_srr_sub_cnt, \
|
||||
post_srr_sub_desc_post, \
|
||||
&post_srr_sub_rwqe_posted); \
|
||||
if(VAPI_OK != post_srr_sub_frag->ret) { \
|
||||
ret = VAPI_post_srq( nic, \
|
||||
srq_hndl, \
|
||||
cnt, \
|
||||
desc_post, \
|
||||
&rwqe_posted); \
|
||||
if(VAPI_OK != ret) { \
|
||||
BTL_ERROR(("error posting receive descriptors to shared receive queue: %s",\
|
||||
VAPI_strerror(post_srr_sub_frag->ret))); \
|
||||
} else if(post_srr_sub_rwqe_posted < 1) { \
|
||||
BTL_ERROR(("error posting receive descriptors to shared receive queue, number of entries posted is %d", post_srr_sub_rwqe_posted)); \
|
||||
VAPI_strerror(ret))); \
|
||||
} else if(rwqe_posted < 1) { \
|
||||
BTL_ERROR(("error posting receive descriptors to shared receive queue, number of entries posted is %d", rwqe_posted)); \
|
||||
} else {\
|
||||
OPAL_THREAD_ADD32(post_srr_sub_srr_posted, post_srr_sub_cnt); \
|
||||
OPAL_THREAD_ADD32(srr_posted, cnt); \
|
||||
}\
|
||||
} while(0);\
|
||||
}
|
||||
struct mca_btl_mvapi_frag_t;
|
||||
extern mca_btl_mvapi_module_t mca_btl_mvapi_module;
|
||||
|
@ -472,6 +472,7 @@ static void mca_btl_mvapi_endpoint_recv(
|
||||
size_t cnt = 1;
|
||||
mca_btl_mvapi_rem_info_t rem_info;
|
||||
|
||||
ib_endpoint = (mca_btl_mvapi_endpoint_t*) endpoint;
|
||||
/* start by unpacking data first so we know who is knocking at
|
||||
our door */
|
||||
|
||||
|
@ -47,7 +47,7 @@ int mca_rcache_rb_find (
|
||||
){
|
||||
|
||||
int pos, rc = OMPI_SUCCESS;
|
||||
mca_rcache_rb_tree_item_t* tree_item;
|
||||
mca_rcache_rb_tree_item_t* tree_item = NULL;
|
||||
void* base_addr;
|
||||
void* bound_addr;
|
||||
if(size == 0) {
|
||||
|
@ -45,10 +45,11 @@ int mca_rcache_rb_mru_insert(
|
||||
* the tree and mru list. memory will be deregistered when
|
||||
* the reference count goes to zero.
|
||||
*/
|
||||
old_reg = (mca_mpool_base_registration_t*)
|
||||
opal_list_get_first(&rcache->mru_list);
|
||||
old_reg->mpool->mpool_retain(old_reg->mpool, old_reg);
|
||||
old_reg->mpool->mpool_deregister(old_reg->mpool, old_reg);
|
||||
/* old_reg = (mca_mpool_base_registration_t*) */
|
||||
/* opal_list_get_first(&rcache->mru_list); */
|
||||
/* old_reg->mpool->mpool_retain(old_reg->mpool, old_reg); */
|
||||
/* old_reg->mpool->mpool_deregister(old_reg->mpool, old_reg); */
|
||||
|
||||
}
|
||||
opal_list_append(&rcache->mru_list,(opal_list_item_t*) reg);
|
||||
return OMPI_SUCCESS;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user