finished the ompi_free_list_t class nightmare..
This commit was SVN r10314.
Этот коммит содержится в:
родитель
a3c93df20c
Коммит
218a438509
@ -143,7 +143,7 @@ OMPI_DECLSPEC int ompi_free_list_parse( ompi_free_list_t* list,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define OMPI_FREE_LIST_WAIT(fl, item, rc) \
|
#define OMPI_FREE_LIST_WAIT(fl, item, rc) \
|
||||||
rc = __ompi_free_list_wait( (fl), (ompi_free_list_item_t**)&(item) )
|
rc = __ompi_free_list_wait( (fl), &(item) )
|
||||||
|
|
||||||
static inline int __ompi_free_list_wait( ompi_free_list_t* fl,
|
static inline int __ompi_free_list_wait( ompi_free_list_t* fl,
|
||||||
ompi_free_list_item_t** item )
|
ompi_free_list_item_t** item )
|
||||||
@ -187,7 +187,7 @@ static inline int __ompi_free_list_wait( ompi_free_list_t* fl,
|
|||||||
opal_list_item_t* original; \
|
opal_list_item_t* original; \
|
||||||
\
|
\
|
||||||
original = opal_atomic_lifo_push( &(fl)->super, \
|
original = opal_atomic_lifo_push( &(fl)->super, \
|
||||||
(opal_list_item_t*)item ); \
|
&(item)->super); \
|
||||||
if( &(fl)->super.opal_lifo_ghost == original ) { \
|
if( &(fl)->super.opal_lifo_ghost == original ) { \
|
||||||
OPAL_THREAD_LOCK(&(fl)->fl_lock); \
|
OPAL_THREAD_LOCK(&(fl)->fl_lock); \
|
||||||
if((fl)->fl_num_waiting > 0) { \
|
if((fl)->fl_num_waiting > 0) { \
|
||||||
|
@ -218,7 +218,7 @@ int ompi_rb_tree_delete(ompi_rb_tree_t *tree, void *key)
|
|||||||
ompi_rb_tree_node_t * p;
|
ompi_rb_tree_node_t * p;
|
||||||
ompi_rb_tree_node_t * todelete;
|
ompi_rb_tree_node_t * todelete;
|
||||||
ompi_rb_tree_node_t * y;
|
ompi_rb_tree_node_t * y;
|
||||||
opal_list_item_t * item;
|
ompi_free_list_item_t * item;
|
||||||
|
|
||||||
p = ompi_rb_tree_find_node(tree, key);
|
p = ompi_rb_tree_find_node(tree, key);
|
||||||
if (NULL == p) {
|
if (NULL == p) {
|
||||||
@ -256,7 +256,7 @@ int ompi_rb_tree_delete(ompi_rb_tree_t *tree, void *key)
|
|||||||
if (todelete->color == BLACK) {
|
if (todelete->color == BLACK) {
|
||||||
btree_delete_fixup(tree, y);
|
btree_delete_fixup(tree, y);
|
||||||
}
|
}
|
||||||
item = (opal_list_item_t *) todelete;
|
item = (ompi_free_list_item_t *) todelete;
|
||||||
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
|
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
|
||||||
--tree->tree_size;
|
--tree->tree_size;
|
||||||
return(OMPI_SUCCESS);
|
return(OMPI_SUCCESS);
|
||||||
|
@ -77,7 +77,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t);
|
|||||||
#define MCA_BTL_GM_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
#define MCA_BTL_GM_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_gm_module_t*)btl)->gm_frag_eager, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_gm_module_t*)btl)->gm_frag_eager, item, rc); \
|
||||||
frag = (mca_btl_gm_frag_t*) item; \
|
frag = (mca_btl_gm_frag_t*) item; \
|
||||||
frag->my_list = &((mca_btl_gm_module_t*)btl)->gm_frag_eager; \
|
frag->my_list = &((mca_btl_gm_module_t*)btl)->gm_frag_eager; \
|
||||||
@ -86,7 +86,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t);
|
|||||||
#define MCA_BTL_GM_FRAG_ALLOC_MAX(btl, frag, rc) \
|
#define MCA_BTL_GM_FRAG_ALLOC_MAX(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_gm_module_t*)btl)->gm_frag_max, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_gm_module_t*)btl)->gm_frag_max, item, rc); \
|
||||||
frag = (mca_btl_gm_frag_t*) item; \
|
frag = (mca_btl_gm_frag_t*) item; \
|
||||||
frag->my_list = &((mca_btl_gm_module_t*)btl)->gm_frag_max; \
|
frag->my_list = &((mca_btl_gm_module_t*)btl)->gm_frag_max; \
|
||||||
@ -94,7 +94,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t);
|
|||||||
|
|
||||||
#define MCA_BTL_GM_FRAG_ALLOC_USER(btl, frag, rc) \
|
#define MCA_BTL_GM_FRAG_ALLOC_USER(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_gm_module_t*)btl)->gm_frag_user, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_gm_module_t*)btl)->gm_frag_user, item, rc); \
|
||||||
frag = (mca_btl_gm_frag_t*) item; \
|
frag = (mca_btl_gm_frag_t*) item; \
|
||||||
frag->my_list = &((mca_btl_gm_module_t*)btl)->gm_frag_user; \
|
frag->my_list = &((mca_btl_gm_module_t*)btl)->gm_frag_user; \
|
||||||
@ -103,7 +103,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t);
|
|||||||
#define MCA_BTL_GM_FRAG_RETURN(btl, frag) \
|
#define MCA_BTL_GM_FRAG_RETURN(btl, frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(frag->my_list, \
|
OMPI_FREE_LIST_RETURN(frag->my_list, \
|
||||||
(opal_list_item_t*)(frag)); \
|
(ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ struct mca_btl_mvapi_module_t {
|
|||||||
VAPI_ret_t ret; \
|
VAPI_ret_t ret; \
|
||||||
uint32_t rwqe_posted = 0; \
|
uint32_t rwqe_posted = 0; \
|
||||||
int rc; \
|
int rc; \
|
||||||
opal_list_item_t* item = NULL; \
|
ompi_free_list_item_t* item = NULL; \
|
||||||
mca_btl_mvapi_frag_t* frag = NULL; \
|
mca_btl_mvapi_frag_t* frag = NULL; \
|
||||||
VAPI_rr_desc_t* desc_post = mvapi_btl->rr_desc_post; \
|
VAPI_rr_desc_t* desc_post = mvapi_btl->rr_desc_post; \
|
||||||
for(i = 0; i < cnt; i++) { \
|
for(i = 0; i < cnt; i++) { \
|
||||||
|
@ -635,7 +635,7 @@ int mca_btl_mvapi_handle_incoming_hp(
|
|||||||
|
|
||||||
if (!MCA_BTL_MVAPI_RDMA_FRAG(frag)) {
|
if (!MCA_BTL_MVAPI_RDMA_FRAG(frag)) {
|
||||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager),
|
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager),
|
||||||
(opal_list_item_t*) frag);
|
(ompi_free_list_item_t*) frag);
|
||||||
} else {
|
} else {
|
||||||
mca_btl_mvapi_frag_t *tf;
|
mca_btl_mvapi_frag_t *tf;
|
||||||
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
|
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
|
||||||
@ -992,7 +992,7 @@ int mca_btl_mvapi_component_progress( void )
|
|||||||
frag->hdr->tag,
|
frag->hdr->tag,
|
||||||
&frag->base,
|
&frag->base,
|
||||||
mvapi_btl->ib_reg[frag->hdr->tag].cbdata);
|
mvapi_btl->ib_reg[frag->hdr->tag].cbdata);
|
||||||
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (opal_list_item_t*) frag);
|
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (ompi_free_list_item_t*) frag);
|
||||||
|
|
||||||
#ifdef VAPI_FEATURE_SRQ
|
#ifdef VAPI_FEATURE_SRQ
|
||||||
if(mca_btl_mvapi_component.use_srq) {
|
if(mca_btl_mvapi_component.use_srq) {
|
||||||
|
@ -226,7 +226,7 @@ do { \
|
|||||||
mca_btl_mvapi_module_t *mvapi_btl = my_endpoint->endpoint_btl; \
|
mca_btl_mvapi_module_t *mvapi_btl = my_endpoint->endpoint_btl; \
|
||||||
VAPI_rr_desc_t* desc_post = mvapi_btl->rr_desc_post; \
|
VAPI_rr_desc_t* desc_post = mvapi_btl->rr_desc_post; \
|
||||||
for(i = 0; i < num_post; i++) { \
|
for(i = 0; i < num_post; i++) { \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
mca_btl_mvapi_frag_t* frag = NULL; \
|
mca_btl_mvapi_frag_t* frag = NULL; \
|
||||||
OMPI_FREE_LIST_WAIT(frag_list, item, rc); \
|
OMPI_FREE_LIST_WAIT(frag_list, item, rc); \
|
||||||
frag = (mca_btl_mvapi_frag_t*) item; \
|
frag = (mca_btl_mvapi_frag_t*) item; \
|
||||||
|
@ -134,7 +134,7 @@ OBJ_CLASS_DECLARATION(mca_btl_mvapi_recv_frag_max_t);
|
|||||||
#define MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
#define MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_mvapi_module_t*)btl)->send_free_eager, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_mvapi_module_t*)btl)->send_free_eager, item, rc); \
|
||||||
frag = (mca_btl_mvapi_frag_t*) item; \
|
frag = (mca_btl_mvapi_frag_t*) item; \
|
||||||
frag->my_list = &((mca_btl_mvapi_module_t*)btl)->send_free_eager; \
|
frag->my_list = &((mca_btl_mvapi_module_t*)btl)->send_free_eager; \
|
||||||
@ -143,7 +143,7 @@ OBJ_CLASS_DECLARATION(mca_btl_mvapi_recv_frag_max_t);
|
|||||||
#define MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc) \
|
#define MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_mvapi_module_t*)btl)->send_free_max, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_mvapi_module_t*)btl)->send_free_max, item, rc); \
|
||||||
frag = (mca_btl_mvapi_frag_t*) item; \
|
frag = (mca_btl_mvapi_frag_t*) item; \
|
||||||
frag->my_list = &((mca_btl_mvapi_module_t*)btl)->send_free_max; \
|
frag->my_list = &((mca_btl_mvapi_module_t*)btl)->send_free_max; \
|
||||||
@ -152,7 +152,7 @@ OBJ_CLASS_DECLARATION(mca_btl_mvapi_recv_frag_max_t);
|
|||||||
#define MCA_BTL_IB_FRAG_ALLOC_FRAG(btl, frag, rc) \
|
#define MCA_BTL_IB_FRAG_ALLOC_FRAG(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_mvapi_module_t*)btl)->send_free_frag, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_mvapi_module_t*)btl)->send_free_frag, item, rc); \
|
||||||
frag = (mca_btl_mvapi_frag_t*) item; \
|
frag = (mca_btl_mvapi_frag_t*) item; \
|
||||||
frag->my_list = &((mca_btl_mvapi_module_t*)btl)->send_free_frag; \
|
frag->my_list = &((mca_btl_mvapi_module_t*)btl)->send_free_frag; \
|
||||||
@ -161,7 +161,7 @@ OBJ_CLASS_DECLARATION(mca_btl_mvapi_recv_frag_max_t);
|
|||||||
#define MCA_BTL_IB_FRAG_RETURN(btl, frag) \
|
#define MCA_BTL_IB_FRAG_RETURN(btl, frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(frag->my_list, \
|
OMPI_FREE_LIST_RETURN(frag->my_list, \
|
||||||
(opal_list_item_t*)(frag)); \
|
(ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ extern "C" {
|
|||||||
|
|
||||||
#define MCA_BTL_MX_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
#define MCA_BTL_MX_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT( &mca_btl_mx_component.mx_send_eager_frags, item, rc); \
|
OMPI_FREE_LIST_WAIT( &mca_btl_mx_component.mx_send_eager_frags, item, rc); \
|
||||||
frag = (mca_btl_mx_frag_t*) item; \
|
frag = (mca_btl_mx_frag_t*) item; \
|
||||||
frag->mx_frag_list = (ompi_free_list_t*)&(mca_btl_mx_component.mx_send_eager_frags); \
|
frag->mx_frag_list = (ompi_free_list_t*)&(mca_btl_mx_component.mx_send_eager_frags); \
|
||||||
@ -78,7 +78,7 @@ extern "C" {
|
|||||||
#if 0
|
#if 0
|
||||||
#define MCA_BTL_MX_FRAG_ALLOC_USER(btl, frag, rc) \
|
#define MCA_BTL_MX_FRAG_ALLOC_USER(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT( &mca_btl_mx_component.mx_send_user_frags, item, rc); \
|
OMPI_FREE_LIST_WAIT( &mca_btl_mx_component.mx_send_user_frags, item, rc); \
|
||||||
frag = (mca_btl_mx_frag_t*) item; \
|
frag = (mca_btl_mx_frag_t*) item; \
|
||||||
frag->mx_frag_list = (ompi_free_list_t*)&(mca_btl_mx_component.mx_send_user_frags); \
|
frag->mx_frag_list = (ompi_free_list_t*)&(mca_btl_mx_component.mx_send_user_frags); \
|
||||||
@ -93,7 +93,7 @@ extern "C" {
|
|||||||
#define MCA_BTL_MX_FRAG_RETURN(btl, frag) \
|
#define MCA_BTL_MX_FRAG_RETURN(btl, frag) \
|
||||||
{ \
|
{ \
|
||||||
/*opal_output( 0, "return item to %p\n", frag->mx_frag_list );*/ \
|
/*opal_output( 0, "return item to %p\n", frag->mx_frag_list );*/ \
|
||||||
OMPI_FREE_LIST_RETURN( frag->mx_frag_list, (opal_list_item_t*)(frag)); \
|
OMPI_FREE_LIST_RETURN( frag->mx_frag_list, (ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(c_plusplus) || defined(__cplusplus)
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
@ -463,7 +463,7 @@ int mca_btl_openib_module_init(mca_btl_openib_module_t* openib_btl);
|
|||||||
do { \
|
do { \
|
||||||
int32_t i; \
|
int32_t i; \
|
||||||
int32_t num_post = cnt; \
|
int32_t num_post = cnt; \
|
||||||
opal_list_item_t* item = NULL; \
|
ompi_free_list_item_t* item = NULL; \
|
||||||
mca_btl_openib_frag_t* frag = NULL; \
|
mca_btl_openib_frag_t* frag = NULL; \
|
||||||
struct ibv_recv_wr *bad_wr; \
|
struct ibv_recv_wr *bad_wr; \
|
||||||
int32_t rc; \
|
int32_t rc; \
|
||||||
|
@ -646,7 +646,7 @@ int mca_btl_openib_handle_incoming_hp(
|
|||||||
|
|
||||||
if (!MCA_BTL_OPENIB_RDMA_FRAG(frag)) {
|
if (!MCA_BTL_OPENIB_RDMA_FRAG(frag)) {
|
||||||
OMPI_FREE_LIST_RETURN(&(openib_btl->recv_free_eager),
|
OMPI_FREE_LIST_RETURN(&(openib_btl->recv_free_eager),
|
||||||
(opal_list_item_t*) frag);
|
(ompi_free_list_item_t*) frag);
|
||||||
} else {
|
} else {
|
||||||
mca_btl_openib_frag_t *tf;
|
mca_btl_openib_frag_t *tf;
|
||||||
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
|
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
|
||||||
@ -1101,7 +1101,7 @@ int mca_btl_openib_component_progress()
|
|||||||
frag->hdr->tag,
|
frag->hdr->tag,
|
||||||
&frag->base,
|
&frag->base,
|
||||||
openib_btl->ib_reg[frag->hdr->tag].cbdata);
|
openib_btl->ib_reg[frag->hdr->tag].cbdata);
|
||||||
OMPI_FREE_LIST_RETURN(&(openib_btl->recv_free_max), (opal_list_item_t*) frag);
|
OMPI_FREE_LIST_RETURN(&(openib_btl->recv_free_max), (ompi_free_list_item_t*) frag);
|
||||||
|
|
||||||
#ifdef OMPI_MCA_BTL_OPENIB_HAVE_SRQ
|
#ifdef OMPI_MCA_BTL_OPENIB_HAVE_SRQ
|
||||||
if(mca_btl_openib_component.use_srq) {
|
if(mca_btl_openib_component.use_srq) {
|
||||||
|
@ -233,7 +233,7 @@ do { \
|
|||||||
int32_t num_post = cnt; \
|
int32_t num_post = cnt; \
|
||||||
struct ibv_recv_wr* bad_wr; \
|
struct ibv_recv_wr* bad_wr; \
|
||||||
for(i = 0; i < num_post; i++) { \
|
for(i = 0; i < num_post; i++) { \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
mca_btl_openib_frag_t* frag; \
|
mca_btl_openib_frag_t* frag; \
|
||||||
OMPI_FREE_LIST_WAIT(frag_list, item, rc); \
|
OMPI_FREE_LIST_WAIT(frag_list, item, rc); \
|
||||||
frag = (mca_btl_openib_frag_t*) item; \
|
frag = (mca_btl_openib_frag_t*) item; \
|
||||||
|
@ -130,7 +130,7 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_recv_frag_max_t);
|
|||||||
#define MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
#define MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_eager, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_eager, item, rc); \
|
||||||
frag = (mca_btl_openib_frag_t*) item; \
|
frag = (mca_btl_openib_frag_t*) item; \
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_recv_frag_max_t);
|
|||||||
#define MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc) \
|
#define MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_max, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_max, item, rc); \
|
||||||
frag = (mca_btl_openib_frag_t*) item; \
|
frag = (mca_btl_openib_frag_t*) item; \
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_recv_frag_max_t);
|
|||||||
#define MCA_BTL_IB_FRAG_ALLOC_FRAG(btl, frag, rc) \
|
#define MCA_BTL_IB_FRAG_ALLOC_FRAG(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_frag, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_openib_module_t*)btl)->send_free_frag, item, rc); \
|
||||||
frag = (mca_btl_openib_frag_t*) item; \
|
frag = (mca_btl_openib_frag_t*) item; \
|
||||||
}
|
}
|
||||||
@ -165,7 +165,7 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_recv_frag_max_t);
|
|||||||
case MCA_BTL_OPENIB_FRAG_FRAG: \
|
case MCA_BTL_OPENIB_FRAG_FRAG: \
|
||||||
my_list = &btl->send_free_frag; \
|
my_list = &btl->send_free_frag; \
|
||||||
} \
|
} \
|
||||||
OMPI_FREE_LIST_RETURN(my_list, (opal_list_item_t*)(frag)); \
|
OMPI_FREE_LIST_RETURN(my_list, (ompi_free_list_item_t*)(frag)); \
|
||||||
} while(0); \
|
} while(0); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,38 +48,39 @@ OBJ_CLASS_DECLARATION(mca_btl_self_frag_rdma_t);
|
|||||||
|
|
||||||
#define MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag, rc) \
|
#define MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_eager, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_eager, item, rc); \
|
||||||
frag = (mca_btl_self_frag_t*)item; \
|
frag = (mca_btl_self_frag_t*)item; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MCA_BTL_SELF_FRAG_RETURN_EAGER(frag) \
|
#define MCA_BTL_SELF_FRAG_RETURN_EAGER(frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_eager, (opal_list_item_t*)(frag)); \
|
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_eager, \
|
||||||
|
(ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MCA_BTL_SELF_FRAG_ALLOC_SEND(frag, rc) \
|
#define MCA_BTL_SELF_FRAG_ALLOC_SEND(frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_send, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_send, item, rc); \
|
||||||
frag = (mca_btl_self_frag_t*)item; \
|
frag = (mca_btl_self_frag_t*)item; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MCA_BTL_SELF_FRAG_RETURN_SEND(frag) \
|
#define MCA_BTL_SELF_FRAG_RETURN_SEND(frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_send, (opal_list_item_t*)(frag)); \
|
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_send, (ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MCA_BTL_SELF_FRAG_ALLOC_RDMA(frag, rc) \
|
#define MCA_BTL_SELF_FRAG_ALLOC_RDMA(frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_rdma, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_rdma, item, rc); \
|
||||||
frag = (mca_btl_self_frag_t*)item; \
|
frag = (mca_btl_self_frag_t*)item; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MCA_BTL_SELF_FRAG_RETURN_RDMA(frag) \
|
#define MCA_BTL_SELF_FRAG_RETURN_RDMA(frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_rdma, (opal_list_item_t*)(frag)); \
|
OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_rdma, (ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,7 +59,7 @@ OBJ_CLASS_DECLARATION(mca_btl_sm_frag2_t);
|
|||||||
|
|
||||||
#define MCA_BTL_SM_FRAG_ALLOC1(frag, rc) \
|
#define MCA_BTL_SM_FRAG_ALLOC1(frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_btl_sm_component.sm_frags1, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_btl_sm_component.sm_frags1, item, rc); \
|
||||||
frag = (mca_btl_sm_frag_t*)item; \
|
frag = (mca_btl_sm_frag_t*)item; \
|
||||||
frag->my_list = &mca_btl_sm_component.sm_frags1; \
|
frag->my_list = &mca_btl_sm_component.sm_frags1; \
|
||||||
@ -67,7 +67,7 @@ OBJ_CLASS_DECLARATION(mca_btl_sm_frag2_t);
|
|||||||
|
|
||||||
#define MCA_BTL_SM_FRAG_ALLOC2(frag, rc) \
|
#define MCA_BTL_SM_FRAG_ALLOC2(frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_btl_sm_component.sm_frags2, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_btl_sm_component.sm_frags2, item, rc); \
|
||||||
frag = (mca_btl_sm_frag_t*)item; \
|
frag = (mca_btl_sm_frag_t*)item; \
|
||||||
frag->my_list = &mca_btl_sm_component.sm_frags2; \
|
frag->my_list = &mca_btl_sm_component.sm_frags2; \
|
||||||
@ -75,7 +75,7 @@ OBJ_CLASS_DECLARATION(mca_btl_sm_frag2_t);
|
|||||||
|
|
||||||
#define MCA_BTL_SM_FRAG_RETURN(frag) \
|
#define MCA_BTL_SM_FRAG_RETURN(frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(frag->my_list, (opal_list_item_t*)(frag)); \
|
OMPI_FREE_LIST_RETURN(frag->my_list, (ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OBJ_CLASS_DECLARATION(mca_btl_tcp_frag_user_t);
|
|||||||
#define MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag, rc) \
|
#define MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_btl_tcp_component.tcp_frag_eager, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_btl_tcp_component.tcp_frag_eager, item, rc); \
|
||||||
frag = (mca_btl_tcp_frag_t*) item; \
|
frag = (mca_btl_tcp_frag_t*) item; \
|
||||||
}
|
}
|
||||||
@ -90,14 +90,14 @@ OBJ_CLASS_DECLARATION(mca_btl_tcp_frag_user_t);
|
|||||||
#define MCA_BTL_TCP_FRAG_ALLOC_MAX(frag, rc) \
|
#define MCA_BTL_TCP_FRAG_ALLOC_MAX(frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_btl_tcp_component.tcp_frag_max, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_btl_tcp_component.tcp_frag_max, item, rc); \
|
||||||
frag = (mca_btl_tcp_frag_t*) item; \
|
frag = (mca_btl_tcp_frag_t*) item; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MCA_BTL_TCP_FRAG_ALLOC_USER(frag, rc) \
|
#define MCA_BTL_TCP_FRAG_ALLOC_USER(frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_btl_tcp_component.tcp_frag_user, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_btl_tcp_component.tcp_frag_user, item, rc); \
|
||||||
frag = (mca_btl_tcp_frag_t*) item; \
|
frag = (mca_btl_tcp_frag_t*) item; \
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ OBJ_CLASS_DECLARATION(mca_btl_tcp_frag_user_t);
|
|||||||
#define MCA_BTL_TCP_FRAG_RETURN(frag) \
|
#define MCA_BTL_TCP_FRAG_RETURN(frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(frag->my_list, \
|
OMPI_FREE_LIST_RETURN(frag->my_list, \
|
||||||
(opal_list_item_t*)(frag)); \
|
(ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MCA_BTL_TCP_FRAG_INIT_DST(frag,ep) \
|
#define MCA_BTL_TCP_FRAG_INIT_DST(frag,ep) \
|
||||||
|
@ -69,7 +69,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
|
|||||||
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_template_module_t*)btl)->template_frag_eager, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_template_module_t*)btl)->template_frag_eager, item, rc); \
|
||||||
frag = (mca_btl_template_frag_t*) item; \
|
frag = (mca_btl_template_frag_t*) item; \
|
||||||
}
|
}
|
||||||
@ -77,13 +77,13 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
|
|||||||
#define MCA_BTL_TEMPLATE_FRAG_RETURN_EAGER(btl, frag) \
|
#define MCA_BTL_TEMPLATE_FRAG_RETURN_EAGER(btl, frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_eager, \
|
OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_eager, \
|
||||||
(opal_list_item_t*)(frag)); \
|
(ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_MAX(btl, frag, rc) \
|
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_MAX(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_template_module_t*)btl)->template_frag_max, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_template_module_t*)btl)->template_frag_max, item, rc); \
|
||||||
frag = (mca_btl_template_frag_t*) item; \
|
frag = (mca_btl_template_frag_t*) item; \
|
||||||
}
|
}
|
||||||
@ -91,13 +91,13 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
|
|||||||
#define MCA_BTL_TEMPLATE_FRAG_RETURN_MAX(btl, frag) \
|
#define MCA_BTL_TEMPLATE_FRAG_RETURN_MAX(btl, frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_max, \
|
OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_max, \
|
||||||
(opal_list_item_t*)(frag)); \
|
(ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_USER(btl, frag, rc) \
|
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_USER(btl, frag, rc) \
|
||||||
{ \
|
{ \
|
||||||
opal_list_item_t *item; \
|
ompi_free_list_item_t *item; \
|
||||||
OMPI_FREE_LIST_WAIT(&((mca_btl_template_module_t*)btl)->template_frag_user, item, rc); \
|
OMPI_FREE_LIST_WAIT(&((mca_btl_template_module_t*)btl)->template_frag_user, item, rc); \
|
||||||
frag = (mca_btl_template_frag_t*) item; \
|
frag = (mca_btl_template_frag_t*) item; \
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
|
|||||||
#define MCA_BTL_TEMPLATE_FRAG_RETURN_USER(btl, frag) \
|
#define MCA_BTL_TEMPLATE_FRAG_RETURN_USER(btl, frag) \
|
||||||
{ \
|
{ \
|
||||||
OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_user, \
|
OMPI_FREE_LIST_RETURN(&((mca_btl_template_module_t*)btl)->template_frag_user, \
|
||||||
(opal_list_item_t*)(frag)); \
|
(ompi_free_list_item_t*)(frag)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -222,10 +222,11 @@ void mca_io_base_request_free(ompi_file_t *file,
|
|||||||
*/
|
*/
|
||||||
void mca_io_base_request_return(ompi_file_t *file)
|
void mca_io_base_request_return(ompi_file_t *file)
|
||||||
{
|
{
|
||||||
opal_list_item_t *next;
|
ompi_free_list_item_t *next;
|
||||||
|
|
||||||
OPAL_THREAD_LOCK(&file->f_io_requests_lock);
|
OPAL_THREAD_LOCK(&file->f_io_requests_lock);
|
||||||
while (NULL != (next = opal_list_remove_first(&file->f_io_requests))) {
|
while (NULL != (next = (ompi_free_list_item_t*)
|
||||||
|
opal_list_remove_first(&file->f_io_requests))) {
|
||||||
OMPI_FREE_LIST_RETURN(&mca_io_base_requests, next);
|
OMPI_FREE_LIST_RETURN(&mca_io_base_requests, next);
|
||||||
}
|
}
|
||||||
OPAL_THREAD_UNLOCK(&file->f_io_requests_lock);
|
OPAL_THREAD_UNLOCK(&file->f_io_requests_lock);
|
||||||
|
@ -54,7 +54,7 @@ OBJ_CLASS_DECLARATION(mca_pml_dr_recv_frag_t);
|
|||||||
|
|
||||||
#define MCA_PML_DR_RECV_FRAG_ALLOC(frag,rc) \
|
#define MCA_PML_DR_RECV_FRAG_ALLOC(frag,rc) \
|
||||||
do { \
|
do { \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_pml_dr.recv_frags, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_pml_dr.recv_frags, item, rc); \
|
||||||
frag = (mca_pml_dr_recv_frag_t*)item; \
|
frag = (mca_pml_dr_recv_frag_t*)item; \
|
||||||
} while(0)
|
} while(0)
|
||||||
@ -77,7 +77,7 @@ do { \
|
|||||||
\
|
\
|
||||||
/* copy over data */ \
|
/* copy over data */ \
|
||||||
for(i=0; i<cnt; i++) { \
|
for(i=0; i<cnt; i++) { \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
mca_pml_dr_buffer_t* buff; \
|
mca_pml_dr_buffer_t* buff; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_pml_dr.buffers, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_pml_dr.buffers, item, rc); \
|
||||||
buff = (mca_pml_dr_buffer_t*)item; \
|
buff = (mca_pml_dr_buffer_t*)item; \
|
||||||
@ -132,13 +132,13 @@ do { \
|
|||||||
/* return buffers */ \
|
/* return buffers */ \
|
||||||
for(i=0; i<frag->num_segments; i++) { \
|
for(i=0; i<frag->num_segments; i++) { \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_pml_dr.buffers, \
|
OMPI_FREE_LIST_RETURN(&mca_pml_dr.buffers, \
|
||||||
(opal_list_item_t*)frag->buffers[i]); \
|
(ompi_free_list_item_t*)frag->buffers[i]); \
|
||||||
} \
|
} \
|
||||||
frag->num_segments = 0; \
|
frag->num_segments = 0; \
|
||||||
\
|
\
|
||||||
/* return recv_frag */ \
|
/* return recv_frag */ \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_pml_dr.recv_frags, \
|
OMPI_FREE_LIST_RETURN(&mca_pml_dr.recv_frags, \
|
||||||
(opal_list_item_t*)frag); \
|
(ompi_free_list_item_t*)frag); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,16 +114,18 @@ do { \
|
|||||||
|
|
||||||
#define MCA_PML_DR_RECV_REQUEST_PML_COMPLETE(recvreq) \
|
#define MCA_PML_DR_RECV_REQUEST_PML_COMPLETE(recvreq) \
|
||||||
do { \
|
do { \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
assert( false == recvreq->req_recv.req_base.req_pml_complete ); \
|
assert( false == recvreq->req_recv.req_base.req_pml_complete ); \
|
||||||
OPAL_THREAD_LOCK((recvreq)->req_mutex); \
|
OPAL_THREAD_LOCK((recvreq)->req_mutex); \
|
||||||
while(NULL != (item = opal_list_remove_first(&(recvreq)->req_vfrags))) { \
|
while(NULL != (item = (ompi_free_list_item_t*) \
|
||||||
|
opal_list_remove_first(&(recvreq)->req_vfrags))) { \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_pml_dr.vfrags, item); \
|
OMPI_FREE_LIST_RETURN(&mca_pml_dr.vfrags, item); \
|
||||||
} \
|
} \
|
||||||
OPAL_THREAD_UNLOCK((recvreq)->req_mutex); \
|
OPAL_THREAD_UNLOCK((recvreq)->req_mutex); \
|
||||||
\
|
\
|
||||||
OPAL_THREAD_LOCK(&ompi_request_lock); \
|
OPAL_THREAD_LOCK(&ompi_request_lock); \
|
||||||
opal_list_remove_item(&(recvreq)->req_proc->matched_receives, (opal_list_item_t*)(recvreq)); \
|
opal_list_remove_item(&(recvreq)->req_proc->matched_receives, \
|
||||||
|
(opal_list_item_t*)(recvreq)); \
|
||||||
\
|
\
|
||||||
/* initialize request status */ \
|
/* initialize request status */ \
|
||||||
recvreq->req_recv.req_base.req_pml_complete = true; \
|
recvreq->req_recv.req_base.req_pml_complete = true; \
|
||||||
@ -148,7 +150,7 @@ do {
|
|||||||
do { \
|
do { \
|
||||||
/* decrement reference counts */ \
|
/* decrement reference counts */ \
|
||||||
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
|
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_pml_dr.recv_requests, (opal_list_item_t*)(recvreq)); \
|
OMPI_FREE_LIST_RETURN(&mca_pml_dr.recv_requests, (ompi_free_list_item_t*)(recvreq)); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,7 +75,7 @@ OBJ_CLASS_DECLARATION(mca_pml_dr_send_request_t);
|
|||||||
{ \
|
{ \
|
||||||
ompi_proc_t *proc = \
|
ompi_proc_t *proc = \
|
||||||
comm->c_pml_procs[dst]->proc_ompi; \
|
comm->c_pml_procs[dst]->proc_ompi; \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
\
|
\
|
||||||
if(NULL == proc) { \
|
if(NULL == proc) { \
|
||||||
rc = OMPI_ERR_OUT_OF_RESOURCE; \
|
rc = OMPI_ERR_OUT_OF_RESOURCE; \
|
||||||
@ -267,7 +267,7 @@ do {
|
|||||||
/* Let the base handle the reference counts */ \
|
/* Let the base handle the reference counts */ \
|
||||||
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
|
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
|
||||||
OMPI_FREE_LIST_RETURN( &mca_pml_dr.send_requests, \
|
OMPI_FREE_LIST_RETURN( &mca_pml_dr.send_requests, \
|
||||||
(opal_list_item_t*)sendreq ); \
|
(ompi_free_list_item_t*)sendreq ); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -68,7 +68,7 @@ OBJ_CLASS_DECLARATION(mca_pml_dr_vfrag_t);
|
|||||||
|
|
||||||
#define MCA_PML_DR_VFRAG_ALLOC(vfrag,rc) \
|
#define MCA_PML_DR_VFRAG_ALLOC(vfrag,rc) \
|
||||||
do { \
|
do { \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_pml_dr.vfrags, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_pml_dr.vfrags, item, rc); \
|
||||||
vfrag = (mca_pml_dr_vfrag_t*)item; \
|
vfrag = (mca_pml_dr_vfrag_t*)item; \
|
||||||
} while(0)
|
} while(0)
|
||||||
@ -76,7 +76,8 @@ do { \
|
|||||||
|
|
||||||
#define MCA_PML_DR_VFRAG_RETURN(vfrag) \
|
#define MCA_PML_DR_VFRAG_RETURN(vfrag) \
|
||||||
do { \
|
do { \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_pml_dr.vfrags, (opal_list_item_t*)vfrag); \
|
OMPI_FREE_LIST_RETURN(&mca_pml_dr.vfrags, \
|
||||||
|
(ompi_free_list_item_t*)vfrag); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define MCA_PML_DR_VFRAG_INIT(vfrag) \
|
#define MCA_PML_DR_VFRAG_INIT(vfrag) \
|
||||||
|
@ -50,7 +50,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_rdma_frag_t);
|
|||||||
|
|
||||||
#define MCA_PML_OB1_RDMA_FRAG_ALLOC(frag,rc) \
|
#define MCA_PML_OB1_RDMA_FRAG_ALLOC(frag,rc) \
|
||||||
do { \
|
do { \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.rdma_frags, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.rdma_frags, item, rc); \
|
||||||
frag = (mca_pml_ob1_rdma_frag_t*)item; \
|
frag = (mca_pml_ob1_rdma_frag_t*)item; \
|
||||||
} while(0)
|
} while(0)
|
||||||
@ -59,7 +59,7 @@ do { \
|
|||||||
do { \
|
do { \
|
||||||
/* return fragment */ \
|
/* return fragment */ \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.rdma_frags, \
|
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.rdma_frags, \
|
||||||
(opal_list_item_t*)frag); \
|
(ompi_free_list_item_t*)frag); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_recv_frag_t);
|
|||||||
|
|
||||||
#define MCA_PML_OB1_RECV_FRAG_ALLOC(frag,rc) \
|
#define MCA_PML_OB1_RECV_FRAG_ALLOC(frag,rc) \
|
||||||
do { \
|
do { \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.recv_frags, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.recv_frags, item, rc); \
|
||||||
frag = (mca_pml_ob1_recv_frag_t*)item; \
|
frag = (mca_pml_ob1_recv_frag_t*)item; \
|
||||||
} while(0)
|
} while(0)
|
||||||
@ -70,7 +70,7 @@ do { \
|
|||||||
frag->num_segments = cnt; \
|
frag->num_segments = cnt; \
|
||||||
/* copy over data */ \
|
/* copy over data */ \
|
||||||
for(i=0; i<cnt; i++) { \
|
for(i=0; i<cnt; i++) { \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
mca_pml_ob1_buffer_t* buff; \
|
mca_pml_ob1_buffer_t* buff; \
|
||||||
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.buffers, item, rc); \
|
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.buffers, item, rc); \
|
||||||
buff = (mca_pml_ob1_buffer_t*)item; \
|
buff = (mca_pml_ob1_buffer_t*)item; \
|
||||||
@ -92,13 +92,13 @@ do { \
|
|||||||
/* return buffers */ \
|
/* return buffers */ \
|
||||||
for(i=0; i<frag->num_segments; i++) { \
|
for(i=0; i<frag->num_segments; i++) { \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.buffers, \
|
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.buffers, \
|
||||||
(opal_list_item_t*)frag->buffers[i]); \
|
(ompi_free_list_item_t*)frag->buffers[i]); \
|
||||||
} \
|
} \
|
||||||
frag->num_segments = 0; \
|
frag->num_segments = 0; \
|
||||||
\
|
\
|
||||||
/* return recv_frag */ \
|
/* return recv_frag */ \
|
||||||
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_frags, \
|
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_frags, \
|
||||||
(opal_list_item_t*)frag); \
|
(ompi_free_list_item_t*)frag); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ do {
|
|||||||
{ \
|
{ \
|
||||||
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
|
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
|
||||||
OMPI_FREE_LIST_RETURN( &mca_pml_ob1.recv_requests, \
|
OMPI_FREE_LIST_RETURN( &mca_pml_ob1.recv_requests, \
|
||||||
(opal_list_item_t*)(recvreq)); \
|
(ompi_free_list_item_t*)(recvreq)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,7 +69,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_send_request_t);
|
|||||||
{ \
|
{ \
|
||||||
ompi_proc_t *proc = \
|
ompi_proc_t *proc = \
|
||||||
comm->c_pml_procs[dst]->proc_ompi; \
|
comm->c_pml_procs[dst]->proc_ompi; \
|
||||||
opal_list_item_t* item; \
|
ompi_free_list_item_t* item; \
|
||||||
\
|
\
|
||||||
if(NULL == proc) { \
|
if(NULL == proc) { \
|
||||||
rc = OMPI_ERR_OUT_OF_RESOURCE; \
|
rc = OMPI_ERR_OUT_OF_RESOURCE; \
|
||||||
@ -336,7 +336,7 @@ do {
|
|||||||
/* Let the base handle the reference counts */ \
|
/* Let the base handle the reference counts */ \
|
||||||
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
|
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
|
||||||
OMPI_FREE_LIST_RETURN( \
|
OMPI_FREE_LIST_RETURN( \
|
||||||
&mca_pml_ob1.send_requests, (opal_list_item_t*)sendreq); \
|
&mca_pml_ob1.send_requests, (ompi_free_list_item_t*)sendreq); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -151,7 +151,8 @@ int mca_rcache_rb_tree_delete(mca_rcache_rb_module_t* rb_module,
|
|||||||
assert(reg == tree_item->reg);
|
assert(reg == tree_item->reg);
|
||||||
rc = ompi_rb_tree_delete(&rb_module->rb_tree, &tree_item->key);
|
rc = ompi_rb_tree_delete(&rb_module->rb_tree, &tree_item->key);
|
||||||
|
|
||||||
OMPI_FREE_LIST_RETURN(&rb_module->rb_tree_item_list, (opal_list_item_t*) tree_item);
|
OMPI_FREE_LIST_RETURN(&rb_module->rb_tree_item_list,
|
||||||
|
(ompi_free_list_item_t*) tree_item);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user