1
1

finished the ompi_free_list_t class nightmare..

This commit was SVN r10314.
Этот коммит содержится в:
Galen Shipman 2006-06-12 22:09:03 +00:00
родитель a3c93df20c
Коммит 218a438509
26 изменённых файлов: 76 добавлений и 70 удалений

Просмотреть файл

@ -143,7 +143,7 @@ OMPI_DECLSPEC int ompi_free_list_parse( ompi_free_list_t* list,
*/
#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,
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; \
\
original = opal_atomic_lifo_push( &(fl)->super, \
(opal_list_item_t*)item ); \
&(item)->super); \
if( &(fl)->super.opal_lifo_ghost == original ) { \
OPAL_THREAD_LOCK(&(fl)->fl_lock); \
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 * todelete;
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);
if (NULL == p) {
@ -256,7 +256,7 @@ int ompi_rb_tree_delete(ompi_rb_tree_t *tree, void *key)
if (todelete->color == BLACK) {
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);
--tree->tree_size;
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) \
{ \
\
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); \
frag = (mca_btl_gm_frag_t*) item; \
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) \
{ \
\
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); \
frag = (mca_btl_gm_frag_t*) item; \
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) \
{ \
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); \
frag = (mca_btl_gm_frag_t*) item; \
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) \
{ \
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; \
uint32_t rwqe_posted = 0; \
int rc; \
opal_list_item_t* item = NULL; \
ompi_free_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++) { \

Просмотреть файл

@ -635,7 +635,7 @@ int mca_btl_mvapi_handle_incoming_hp(
if (!MCA_BTL_MVAPI_RDMA_FRAG(frag)) {
OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager),
(opal_list_item_t*) frag);
(ompi_free_list_item_t*) frag);
} else {
mca_btl_mvapi_frag_t *tf;
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
@ -992,7 +992,7 @@ int mca_btl_mvapi_component_progress( void )
frag->hdr->tag,
&frag->base,
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
if(mca_btl_mvapi_component.use_srq) {

Просмотреть файл

@ -226,7 +226,7 @@ do { \
mca_btl_mvapi_module_t *mvapi_btl = my_endpoint->endpoint_btl; \
VAPI_rr_desc_t* desc_post = mvapi_btl->rr_desc_post; \
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; \
OMPI_FREE_LIST_WAIT(frag_list, item, rc); \
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) \
{ \
\
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); \
frag = (mca_btl_mvapi_frag_t*) item; \
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) \
{ \
\
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); \
frag = (mca_btl_mvapi_frag_t*) item; \
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) \
{ \
\
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); \
frag = (mca_btl_mvapi_frag_t*) item; \
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) \
{ \
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) \
{ \
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); \
frag = (mca_btl_mx_frag_t*) item; \
frag->mx_frag_list = (ompi_free_list_t*)&(mca_btl_mx_component.mx_send_eager_frags); \
@ -78,7 +78,7 @@ extern "C" {
#if 0
#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); \
frag = (mca_btl_mx_frag_t*) item; \
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) \
{ \
/*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)

Просмотреть файл

@ -463,7 +463,7 @@ int mca_btl_openib_module_init(mca_btl_openib_module_t* openib_btl);
do { \
int32_t i; \
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; \
struct ibv_recv_wr *bad_wr; \
int32_t rc; \

Просмотреть файл

@ -646,7 +646,7 @@ int mca_btl_openib_handle_incoming_hp(
if (!MCA_BTL_OPENIB_RDMA_FRAG(frag)) {
OMPI_FREE_LIST_RETURN(&(openib_btl->recv_free_eager),
(opal_list_item_t*) frag);
(ompi_free_list_item_t*) frag);
} else {
mca_btl_openib_frag_t *tf;
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
@ -1101,7 +1101,7 @@ int mca_btl_openib_component_progress()
frag->hdr->tag,
&frag->base,
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
if(mca_btl_openib_component.use_srq) {

Просмотреть файл

@ -233,7 +233,7 @@ do { \
int32_t num_post = cnt; \
struct ibv_recv_wr* bad_wr; \
for(i = 0; i < num_post; i++) { \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
mca_btl_openib_frag_t* frag; \
OMPI_FREE_LIST_WAIT(frag_list, item, rc); \
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) \
{ \
\
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); \
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) \
{ \
\
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); \
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) \
{ \
\
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); \
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: \
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); \
}

Просмотреть файл

@ -48,38 +48,39 @@ OBJ_CLASS_DECLARATION(mca_btl_self_frag_rdma_t);
#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); \
frag = (mca_btl_self_frag_t*)item; \
}
#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) \
{ \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_send, item, rc); \
frag = (mca_btl_self_frag_t*)item; \
}
#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) \
{ \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_btl_self_component.self_frags_rdma, item, rc); \
frag = (mca_btl_self_frag_t*)item; \
}
#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

Просмотреть файл

@ -59,7 +59,7 @@ OBJ_CLASS_DECLARATION(mca_btl_sm_frag2_t);
#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); \
frag = (mca_btl_sm_frag_t*)item; \
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) \
{ \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_btl_sm_component.sm_frags2, item, rc); \
frag = (mca_btl_sm_frag_t*)item; \
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) \
{ \
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

Просмотреть файл

@ -82,7 +82,7 @@ OBJ_CLASS_DECLARATION(mca_btl_tcp_frag_user_t);
#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); \
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) \
{ \
\
opal_list_item_t *item; \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT(&mca_btl_tcp_component.tcp_frag_max, item, rc); \
frag = (mca_btl_tcp_frag_t*) item; \
}
#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); \
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) \
{ \
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) \

Просмотреть файл

@ -69,7 +69,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
#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); \
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) \
{ \
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) \
{ \
\
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); \
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) \
{ \
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) \
{ \
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); \
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) \
{ \
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)
{
opal_list_item_t *next;
ompi_free_list_item_t *next;
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);
}
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) \
do { \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_dr.recv_frags, item, rc); \
frag = (mca_pml_dr_recv_frag_t*)item; \
} while(0)
@ -77,7 +77,7 @@ do { \
\
/* copy over data */ \
for(i=0; i<cnt; i++) { \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
mca_pml_dr_buffer_t* buff; \
OMPI_FREE_LIST_WAIT(&mca_pml_dr.buffers, item, rc); \
buff = (mca_pml_dr_buffer_t*)item; \
@ -132,13 +132,13 @@ do { \
/* return buffers */ \
for(i=0; i<frag->num_segments; i++) { \
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; \
\
/* return recv_frag */ \
OMPI_FREE_LIST_RETURN(&mca_pml_dr.recv_frags, \
(opal_list_item_t*)frag); \
(ompi_free_list_item_t*)frag); \
} while(0)

Просмотреть файл

@ -114,16 +114,18 @@ do { \
#define MCA_PML_DR_RECV_REQUEST_PML_COMPLETE(recvreq) \
do { \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
assert( false == recvreq->req_recv.req_base.req_pml_complete ); \
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); \
} \
OPAL_THREAD_UNLOCK((recvreq)->req_mutex); \
\
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 */ \
recvreq->req_recv.req_base.req_pml_complete = true; \
@ -148,7 +150,7 @@ do {
do { \
/* decrement reference counts */ \
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)
/**

Просмотреть файл

@ -75,7 +75,7 @@ OBJ_CLASS_DECLARATION(mca_pml_dr_send_request_t);
{ \
ompi_proc_t *proc = \
comm->c_pml_procs[dst]->proc_ompi; \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
\
if(NULL == proc) { \
rc = OMPI_ERR_OUT_OF_RESOURCE; \
@ -267,7 +267,7 @@ do {
/* Let the base handle the reference counts */ \
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
OMPI_FREE_LIST_RETURN( &mca_pml_dr.send_requests, \
(opal_list_item_t*)sendreq ); \
(ompi_free_list_item_t*)sendreq ); \
} while(0)
/*

Просмотреть файл

@ -68,7 +68,7 @@ OBJ_CLASS_DECLARATION(mca_pml_dr_vfrag_t);
#define MCA_PML_DR_VFRAG_ALLOC(vfrag,rc) \
do { \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_dr.vfrags, item, rc); \
vfrag = (mca_pml_dr_vfrag_t*)item; \
} while(0)
@ -76,7 +76,8 @@ do { \
#define MCA_PML_DR_VFRAG_RETURN(vfrag) \
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)
#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) \
do { \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.rdma_frags, item, rc); \
frag = (mca_pml_ob1_rdma_frag_t*)item; \
} while(0)
@ -59,7 +59,7 @@ do { \
do { \
/* return fragment */ \
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.rdma_frags, \
(opal_list_item_t*)frag); \
(ompi_free_list_item_t*)frag); \
} while(0)

Просмотреть файл

@ -52,7 +52,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_recv_frag_t);
#define MCA_PML_OB1_RECV_FRAG_ALLOC(frag,rc) \
do { \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.recv_frags, item, rc); \
frag = (mca_pml_ob1_recv_frag_t*)item; \
} while(0)
@ -70,7 +70,7 @@ do { \
frag->num_segments = cnt; \
/* copy over data */ \
for(i=0; i<cnt; i++) { \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
mca_pml_ob1_buffer_t* buff; \
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.buffers, item, rc); \
buff = (mca_pml_ob1_buffer_t*)item; \
@ -92,13 +92,13 @@ do { \
/* return buffers */ \
for(i=0; i<frag->num_segments; i++) { \
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; \
\
/* return recv_frag */ \
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_frags, \
(opal_list_item_t*)frag); \
(ompi_free_list_item_t*)frag); \
} while(0)

Просмотреть файл

@ -172,7 +172,7 @@ do {
{ \
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
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 = \
comm->c_pml_procs[dst]->proc_ompi; \
opal_list_item_t* item; \
ompi_free_list_item_t* item; \
\
if(NULL == proc) { \
rc = OMPI_ERR_OUT_OF_RESOURCE; \
@ -336,7 +336,7 @@ do {
/* Let the base handle the reference counts */ \
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
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);
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;
}