1
1

rename ompi_free_list operations to _mt, as per discussions at last face to face meeting

This commit was SVN r28734.
Этот коммит содержится в:
Aurelien Bouteiller 2013-07-08 22:07:52 +00:00
родитель ecbbf888d3
Коммит e1066143a4
67 изменённых файлов: 196 добавлений и 196 удалений

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

@ -270,7 +270,7 @@ int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elements)
* initialization.
*/
int
ompi_free_list_resize(ompi_free_list_t* flist, size_t size)
ompi_free_list_resize_mt(ompi_free_list_t* flist, size_t size)
{
ssize_t inc_num;
int ret = OMPI_SUCCESS;

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

@ -178,7 +178,7 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen
will not shrink the list if it is already larger than size and may
grow it past size if necessary (it will grow in
num_elements_per_alloc chunks) */
OMPI_DECLSPEC int ompi_free_list_resize(ompi_free_list_t *flist, size_t size);
OMPI_DECLSPEC int ompi_free_list_resize_mt(ompi_free_list_t *flist, size_t size);
/**
* Attemp to obtain an item from a free list.
@ -192,7 +192,7 @@ OMPI_DECLSPEC int ompi_free_list_resize(ompi_free_list_t *flist, size_t size);
* to the caller.
*/
#define OMPI_FREE_LIST_GET(fl, item) \
#define OMPI_FREE_LIST_GET_MT(fl, item) \
{ \
item = (ompi_free_list_item_t*) opal_atomic_lifo_pop(&((fl)->super)); \
if( OPAL_UNLIKELY(NULL == item) ) { \
@ -219,11 +219,11 @@ OMPI_DECLSPEC int ompi_free_list_resize(ompi_free_list_t *flist, size_t size);
* is returned to the list.
*/
#define OMPI_FREE_LIST_WAIT(fl, item) \
__ompi_free_list_wait( (fl), &(item) )
#define OMPI_FREE_LIST_WAIT_MT(fl, item) \
__ompi_free_list_wait_mt( (fl), &(item) )
static inline void __ompi_free_list_wait( ompi_free_list_t* fl,
ompi_free_list_item_t** item )
static inline void __ompi_free_list_wait_mt( ompi_free_list_t* fl,
ompi_free_list_item_t** item )
{
*item = (ompi_free_list_item_t*)opal_atomic_lifo_pop(&((fl)->super));
while( NULL == *item ) {
@ -268,7 +268,7 @@ static inline void __ompi_free_list_wait( ompi_free_list_t* fl,
*
*/
#define OMPI_FREE_LIST_RETURN(fl, item) \
#define OMPI_FREE_LIST_RETURN_MT(fl, item) \
do { \
opal_list_item_t* original; \
\

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

@ -81,15 +81,15 @@ int ompi_rb_tree_init(ompi_rb_tree_t * tree,
{
ompi_free_list_item_t * node;
/* we need to get memory for the root pointer from the free list */
OMPI_FREE_LIST_GET(&(tree->free_list), node);
OMPI_FREE_LIST_GET_MT(&(tree->free_list), node);
tree->root_ptr = (ompi_rb_tree_node_t *) node;
if (NULL == node) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
OMPI_FREE_LIST_GET(&(tree->free_list), node);
OMPI_FREE_LIST_GET_MT(&(tree->free_list), node);
if (NULL == node) {
OMPI_FREE_LIST_RETURN(&(tree->free_list), (ompi_free_list_item_t*)tree->root_ptr);
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), (ompi_free_list_item_t*)tree->root_ptr);
return OMPI_ERR_OUT_OF_RESOURCE;
}
tree->nill = (ompi_rb_tree_node_t *) node;
@ -122,7 +122,7 @@ int ompi_rb_tree_insert(ompi_rb_tree_t *tree, void * key, void * value)
ompi_free_list_item_t * item;
/* get the memory for a node */
OMPI_FREE_LIST_GET(&(tree->free_list), item);
OMPI_FREE_LIST_GET_MT(&(tree->free_list), item);
if (NULL == item) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -265,7 +265,7 @@ int ompi_rb_tree_delete(ompi_rb_tree_t *tree, void *key)
btree_delete_fixup(tree, y);
}
item = (ompi_free_list_item_t *) todelete;
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
--tree->tree_size;
return(OMPI_SUCCESS);
}
@ -281,11 +281,11 @@ int ompi_rb_tree_destroy(ompi_rb_tree_t *tree)
/* Now free the root -- root does not get free'd in the above
* inorder destroy */
item = (ompi_free_list_item_t *) tree->root_ptr;
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
/* free the tree->nill node */
item = (ompi_free_list_item_t *) tree->nill;
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
return(OMPI_SUCCESS);
}
@ -430,14 +430,14 @@ inorder_destroy(ompi_rb_tree_t *tree, ompi_rb_tree_node_t * node)
if (node->left != tree->nill) {
item = (ompi_free_list_item_t *) node->left;
--tree->tree_size;
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
}
inorder_destroy(tree, node->right);
if (node->right != tree->nill) {
item = (ompi_free_list_item_t *) node->right;
--tree->tree_size;
OMPI_FREE_LIST_RETURN(&(tree->free_list), item);
OMPI_FREE_LIST_RETURN_MT(&(tree->free_list), item);
}
}

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

@ -122,7 +122,7 @@ static void mca_allocator_basic_combine_prev(
if(prev->seg_addr + prev->seg_size == seg->seg_addr) {
prev->seg_size += seg->seg_size;
opal_list_remove_item(&module->seg_list, &seg->seg_item.super);
OMPI_FREE_LIST_RETURN(&module->seg_descriptors, &seg->seg_item);
OMPI_FREE_LIST_RETURN_MT(&module->seg_descriptors, &seg->seg_item);
return;
}
}
@ -139,7 +139,7 @@ static void mca_allocator_basic_combine_next(
next->seg_addr = seg->seg_addr;
next->seg_size += seg->seg_size;
opal_list_remove_item(&module->seg_list, &seg->seg_item.super);
OMPI_FREE_LIST_RETURN(&module->seg_descriptors, &seg->seg_item);
OMPI_FREE_LIST_RETURN_MT(&module->seg_descriptors, &seg->seg_item);
return;
}
}
@ -191,7 +191,7 @@ void *mca_allocator_basic_alloc(
} else if (seg->seg_size == size) {
addr = seg->seg_addr;
opal_list_remove_item(&module->seg_list, &item->super);
OMPI_FREE_LIST_RETURN(&module->seg_descriptors, item);
OMPI_FREE_LIST_RETURN_MT(&module->seg_descriptors, item);
OPAL_THREAD_UNLOCK(&module->seg_lock);
*(size_t*)addr = size;
return addr+sizeof(size_t);
@ -207,7 +207,7 @@ void *mca_allocator_basic_alloc(
/* create a segment for any extra allocation */
if(allocated_size > size) {
OMPI_FREE_LIST_GET(&module->seg_descriptors, item);
OMPI_FREE_LIST_GET_MT(&module->seg_descriptors, item);
if(NULL == item) {
OPAL_THREAD_UNLOCK(&module->seg_lock);
return NULL;
@ -309,7 +309,7 @@ void mca_allocator_basic_free(
/* insert before larger entry */
} else {
mca_allocator_basic_segment_t* new_seg;
OMPI_FREE_LIST_GET(&module->seg_descriptors, item);
OMPI_FREE_LIST_GET_MT(&module->seg_descriptors, item);
if(NULL == item) {
OPAL_THREAD_UNLOCK(&module->seg_lock);
return;
@ -325,7 +325,7 @@ void mca_allocator_basic_free(
}
/* append to the end of the list */
OMPI_FREE_LIST_GET(&module->seg_descriptors, item);
OMPI_FREE_LIST_GET_MT(&module->seg_descriptors, item);
if(NULL == item) {
OPAL_THREAD_UNLOCK(&module->seg_lock);
return;

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

@ -772,7 +772,7 @@ static int mca_bcol_iboffload_barrier_init(
IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_init"));
OMPI_FREE_LIST_WAIT(&cm->collreqs_free, item);
OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item);
if (OPAL_UNLIKELY(NULL == item)) {
IBOFFLOAD_VERBOSE(10, ("Failing for coll request free list waiting.\n"));
return OMPI_ERR_OUT_OF_RESOURCE;

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

@ -42,7 +42,7 @@ static int mca_bcol_iboffload_bcast_init(
mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component;
int my_group_index = iboffload_module->super.sbgp_partner_module->my_index;
OMPI_FREE_LIST_WAIT(&cm->collreqs_free, item);
OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item);
if (OPAL_UNLIKELY(NULL == item)) {
IBOFFLOAD_ERROR(("Wait for free list failed.\n"));
return OMPI_ERR_OUT_OF_RESOURCE;

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

@ -123,7 +123,7 @@ static inline __opal_attribute_always_inline__
mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component;
/* blocking allocation for collectives fragment */
OMPI_FREE_LIST_GET(&cm->collfrags_free, item);
OMPI_FREE_LIST_GET_MT(&cm->collfrags_free, item);
if (OPAL_UNLIKELY(NULL == item)) {
IBOFFLOAD_ERROR(("Failed to allocated collfrag.\n"));
return NULL;

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

@ -196,7 +196,7 @@ OBJ_CLASS_DECLARATION(mca_bcol_iboffload_collreq_t);
#define RELEASE_COLLREQ(cr) \
do { \
(cr)->user_handle_freed = false; \
OMPI_FREE_LIST_RETURN(&mca_bcol_iboffload_component.collreqs_free, \
OMPI_FREE_LIST_RETURN_MT(&mca_bcol_iboffload_component.collreqs_free, \
(ompi_free_list_item_t *) (cr)); \
} while (0)

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

@ -757,10 +757,10 @@ mca_bcol_iboffload_free_tasks_frags_resources(
/* Return task: if the pointer is NULL => we assume the task
is a member of the common task list (tasks_free) */
if (NULL == task->task_list) {
OMPI_FREE_LIST_RETURN(&cm->tasks_free,
OMPI_FREE_LIST_RETURN_MT(&cm->tasks_free,
(ompi_free_list_item_t *) task);
} else {
OMPI_FREE_LIST_RETURN(task->task_list,
OMPI_FREE_LIST_RETURN_MT(task->task_list,
(ompi_free_list_item_t *) task);
}
@ -781,7 +781,7 @@ static void fatal_error(char *mesg)
opal_list_remove_item(&(cf)->coll_full_req->work_requests, \
(opal_list_item_t *) (cf)); \
if (&(cf)->coll_full_req->first_collfrag != (cf)) { \
OMPI_FREE_LIST_RETURN(&mca_bcol_iboffload_component.collfrags_free, \
OMPI_FREE_LIST_RETURN_MT(&mca_bcol_iboffload_component.collfrags_free, \
(ompi_free_list_item_t *) (cf)); \
} \
} while (0)

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

@ -66,7 +66,7 @@ static void mca_bcol_iboffload_endpoint_destruct(mca_bcol_iboffload_endpoint_t *
item = (ompi_free_list_item_t *)
opal_list_remove_first(&ep->qps[qp_index].preposted_frags);
if(OPAL_LIKELY(NULL != item)) {
OMPI_FREE_LIST_RETURN(&ep->device->frags_free[qp_index], item);
OMPI_FREE_LIST_RETURN_MT(&ep->device->frags_free[qp_index], item);
}
} while (NULL != item);

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

@ -179,7 +179,7 @@ static int mca_bcol_iboffload_fanin_init(
IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_init"));
OMPI_FREE_LIST_WAIT(&cm->collreqs_free, item);
OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item);
if(OPAL_UNLIKELY(NULL == item)) {
IBOFFLOAD_VERBOSE(10, ("Failing for coll request free list waiting.\n"));
return OMPI_ERR_OUT_OF_RESOURCE;

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

@ -178,7 +178,7 @@ static int mca_bcol_iboffload_fanout_init(
IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_init"));
OMPI_FREE_LIST_WAIT(&cm->collreqs_free, item);
OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item);
if(NULL == item) {
IBOFFLOAD_VERBOSE(10, ("Failing for coll request free list waiting.\n"));
return OMPI_ERR_OUT_OF_RESOURCE;

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

@ -106,7 +106,7 @@ mca_bcol_iboffload_get_packed_frag(mca_bcol_iboffload_module_t *iboffload,
mca_bcol_iboffload_device_t *device = iboffload->device;
/* Get frag from free list */
OMPI_FREE_LIST_GET(&device->frags_free[qp_index], item);
OMPI_FREE_LIST_GET_MT(&device->frags_free[qp_index], item);
if (OPAL_UNLIKELY(NULL == item)) {
return NULL;
}
@ -123,7 +123,7 @@ mca_bcol_iboffload_get_packed_frag(mca_bcol_iboffload_module_t *iboffload,
&out_size, &max_size);
if (OPAL_UNLIKELY(rc < 0)) {
/* Error: put the fragment back */
OMPI_FREE_LIST_RETURN(&device->frags_free[qp_index], item);
OMPI_FREE_LIST_RETURN_MT(&device->frags_free[qp_index], item);
return NULL;
}
@ -146,7 +146,7 @@ mca_bcol_iboffload_get_calc_frag(mca_bcol_iboffload_module_t *iboffload, int qp_
IBOFFLOAD_VERBOSE(10, ("Start to pack frag.\n"));
/* Get frag from free list */
OMPI_FREE_LIST_GET(&device->frags_free[qp_index], item);
OMPI_FREE_LIST_GET_MT(&device->frags_free[qp_index], item);
if (OPAL_UNLIKELY(NULL == item)) {
return NULL;
}
@ -209,7 +209,7 @@ mca_bcol_iboffload_get_send_frag(mca_bcol_iboffload_collreq_t *coll_request,
IBOFFLOAD_VERBOSE(10, ("Getting MCA_BCOL_IBOFFLOAD_SEND_FRAG"));
/* Get frag from free list */
OMPI_FREE_LIST_GET(&iboffload->device->frags_free[qp_index], item);
OMPI_FREE_LIST_GET_MT(&iboffload->device->frags_free[qp_index], item);
frag = (mca_bcol_iboffload_frag_t *) item;
}

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

@ -112,7 +112,7 @@ mca_bcol_iboffload_frag_t* mca_bcol_iboffload_get_ml_empty_frag(
mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component;
/* Get frag from free list */
OMPI_FREE_LIST_GET(&cm->ml_frags_free, item);
OMPI_FREE_LIST_GET_MT(&cm->ml_frags_free, item);
if (OPAL_UNLIKELY(NULL == item)) {
return NULL;
}

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

@ -1375,7 +1375,7 @@ int mca_bcol_iboffload_exchange_rem_addr(mca_bcol_iboffload_endpoint_t *ep)
mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component;
OMPI_FREE_LIST_WAIT(&cm->collreqs_free, item);
OMPI_FREE_LIST_WAIT_MT(&cm->collreqs_free, item);
if (NULL == item) {
IBOFFLOAD_ERROR(("Failing for coll request free list waiting.\n"));
return OMPI_ERR_OUT_OF_RESOURCE;

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

@ -153,7 +153,7 @@ static int mca_bcol_iboffload_frag_reg_qp_prepost(
while (num_preposted < num_to_prepost) {
/* put the item on list of preposted */
OMPI_FREE_LIST_GET(&device->frags_free[qp_index], item);
OMPI_FREE_LIST_GET_MT(&device->frags_free[qp_index], item);
if (OPAL_UNLIKELY(NULL == item)) {
break;
}
@ -181,7 +181,7 @@ static int mca_bcol_iboffload_frag_reg_qp_prepost(
/* Return allocated frags */
for (i = 0; i < num_preposted; i++) {
OMPI_FREE_LIST_RETURN(&device->frags_free[qp_index],
OMPI_FREE_LIST_RETURN_MT(&device->frags_free[qp_index],
(ompi_free_list_item_t *)
opal_list_remove_last(preposted));
}

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

@ -99,10 +99,10 @@ static inline __opal_attribute_always_inline__ void
if (MCA_BCOL_IBOFFLOAD_DUMMY_OWNER != frag->type &&
0 == frag->ref_counter) {
if (MCA_BCOL_IBOFFLOAD_BCOL_OWNER == frag->type) {
OMPI_FREE_LIST_RETURN((&(list[frag->qp_index])),
OMPI_FREE_LIST_RETURN_MT((&(list[frag->qp_index])),
(ompi_free_list_item_t*) frag);
} else if (MCA_BCOL_IBOFFLOAD_ML_OWNER == frag->type) {
OMPI_FREE_LIST_RETURN((&(cm->ml_frags_free)),
OMPI_FREE_LIST_RETURN_MT((&(cm->ml_frags_free)),
(ompi_free_list_item_t*) frag);
}
}
@ -124,7 +124,7 @@ static inline __opal_attribute_always_inline__ void
opal_list_prepend(&ep->qps[qp_index].preposted_frags,
(opal_list_item_t *) recv_frag);
} else {
OMPI_FREE_LIST_RETURN((&(cm->ml_frags_free)),
OMPI_FREE_LIST_RETURN_MT((&(cm->ml_frags_free)),
(ompi_free_list_item_t*) recv_frag);
}
@ -146,7 +146,7 @@ static inline __opal_attribute_always_inline__ mca_bcol_iboffload_task_t*
mca_bcol_iboffload_endpoint_t *endpoint = iboffload->endpoints[source];
/* blocking allocation for send fragment */
OMPI_FREE_LIST_GET(&cm->tasks_free, item);
OMPI_FREE_LIST_GET_MT(&cm->tasks_free, item);
if (OPAL_UNLIKELY(NULL == item)) {
mca_bcol_iboffload_return_recv_frags_toendpoint(frags, endpoint, qp_index);
return NULL;
@ -203,7 +203,7 @@ mca_bcol_iboffload_prepare_send_task(
endpoint->iboffload_module->ibnet->super.group_list[endpoint->index]));
/* get item from free list */
OMPI_FREE_LIST_GET(task_list, item);
OMPI_FREE_LIST_GET_MT(task_list, item);
if (OPAL_UNLIKELY(NULL == item)) {
return NULL;
}

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

@ -56,7 +56,7 @@ static int bcol_ptpcoll_barrier_recurs_knomial_new(
mca_bcol_ptpcoll_collreq_t *collreq;
OMPI_FREE_LIST_WAIT(&ptpcoll_module->collreqs_free, item);
OMPI_FREE_LIST_WAIT_MT(&ptpcoll_module->collreqs_free, item);
if (OPAL_UNLIKELY(NULL == item)) {
PTPCOLL_ERROR(("Free list waiting failed."));
return OMPI_ERR_OUT_OF_RESOURCE;
@ -214,7 +214,7 @@ static int bcol_ptpcoll_barrier_recurs_knomial_new(
}
}
OMPI_FREE_LIST_RETURN(&ptpcoll_module->collreqs_free, (ompi_free_list_item_t *) collreq);
OMPI_FREE_LIST_RETURN_MT(&ptpcoll_module->collreqs_free, (ompi_free_list_item_t *) collreq);
return BCOL_FN_COMPLETE;
}
@ -387,7 +387,7 @@ static int bcol_ptpcoll_barrier_recurs_knomial_extra_new(
mca_bcol_ptpcoll_collreq_t *collreq;
OMPI_FREE_LIST_WAIT(&ptpcoll_module->collreqs_free, item);
OMPI_FREE_LIST_WAIT_MT(&ptpcoll_module->collreqs_free, item);
if (OPAL_UNLIKELY(NULL == item)) {
PTPCOLL_ERROR(("Free list waiting failed."));
return OMPI_ERR_OUT_OF_RESOURCE;
@ -441,7 +441,7 @@ static int bcol_ptpcoll_barrier_recurs_knomial_extra_new(
return BCOL_FN_STARTED;
}
OMPI_FREE_LIST_RETURN(&ptpcoll_module->collreqs_free, (ompi_free_list_item_t *) collreq);
OMPI_FREE_LIST_RETURN_MT(&ptpcoll_module->collreqs_free, (ompi_free_list_item_t *) collreq);
return BCOL_FN_COMPLETE;
}
@ -469,7 +469,7 @@ static int bcol_ptpcoll_barrier_recurs_dbl_new(
mca_bcol_ptpcoll_collreq_t *collreq;
OMPI_FREE_LIST_WAIT(&ptp_module->collreqs_free, item);
OMPI_FREE_LIST_WAIT_MT(&ptp_module->collreqs_free, item);
if (OPAL_UNLIKELY(NULL == item)) {
PTPCOLL_ERROR(("Free list waiting failed."));
return OMPI_ERR_OUT_OF_RESOURCE;
@ -619,7 +619,7 @@ static int bcol_ptpcoll_barrier_recurs_dbl_new(
}
}
OMPI_FREE_LIST_RETURN(&ptp_module->collreqs_free, (ompi_free_list_item_t *) collreq);
OMPI_FREE_LIST_RETURN_MT(&ptp_module->collreqs_free, (ompi_free_list_item_t *) collreq);
return BCOL_FN_COMPLETE;
}
@ -774,7 +774,7 @@ static int bcol_ptpcoll_barrier_recurs_dbl_extra_new(
(mca_bcol_ptpcoll_module_t *) const_args->bcol_module;
ompi_communicator_t *comm = ptp_module->super.sbgp_partner_module->group_comm;
OMPI_FREE_LIST_WAIT(&ptp_module->collreqs_free, item);
OMPI_FREE_LIST_WAIT_MT(&ptp_module->collreqs_free, item);
if (OPAL_UNLIKELY(NULL == item)) {
PTPCOLL_ERROR(("Free list waiting failed."));
return OMPI_ERR_OUT_OF_RESOURCE;
@ -830,7 +830,7 @@ static int bcol_ptpcoll_barrier_recurs_dbl_extra_new(
return BCOL_FN_STARTED;
}
OMPI_FREE_LIST_RETURN(&ptp_module->collreqs_free, (ompi_free_list_item_t *) collreq);
OMPI_FREE_LIST_RETURN_MT(&ptp_module->collreqs_free, (ompi_free_list_item_t *) collreq);
return BCOL_FN_COMPLETE;
}

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

@ -70,7 +70,7 @@ OBJ_CLASS_DECLARATION(mca_btl_mx_frag_user_t);
#define MCA_BTL_MX_FRAG_ALLOC_EAGER(btl, frag) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET( &mca_btl_mx_component.mx_send_eager_frags, item); \
OMPI_FREE_LIST_GET_MT( &mca_btl_mx_component.mx_send_eager_frags, item); \
if( OPAL_LIKELY(NULL != item) ) { \
frag = (mca_btl_mx_frag_t*) item; \
frag->mx_frag_list = &(mca_btl_mx_component.mx_send_eager_frags); \
@ -81,7 +81,7 @@ do { \
#define MCA_BTL_MX_FRAG_ALLOC_USER(btl, frag) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET( &mca_btl_mx_component.mx_send_user_frags, item); \
OMPI_FREE_LIST_GET_MT( &mca_btl_mx_component.mx_send_user_frags, item); \
if( OPAL_LIKELY(NULL != item) ) { \
frag = (mca_btl_mx_frag_t*) item; \
frag->mx_frag_list = &(mca_btl_mx_component.mx_send_user_frags); \
@ -90,7 +90,7 @@ do { \
#define MCA_BTL_MX_FRAG_RETURN(btl, frag) \
do { \
OMPI_FREE_LIST_RETURN( frag->mx_frag_list, \
OMPI_FREE_LIST_RETURN_MT( frag->mx_frag_list, \
(ompi_free_list_item_t*)(frag)); \
} while(0)

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

@ -970,7 +970,7 @@ ib_frag_alloc(mca_btl_openib_module_t *btl, size_t size, uint8_t order,
for(qp = 0; qp < mca_btl_openib_component.num_qps; qp++) {
if(mca_btl_openib_component.qp_infos[qp].size >= size) {
OMPI_FREE_LIST_GET(&btl->device->qps[qp].send_free, item);
OMPI_FREE_LIST_GET_MT(&btl->device->qps[qp].send_free, item);
if(item)
break;
}
@ -1605,7 +1605,7 @@ int mca_btl_openib_sendi( struct mca_btl_base_module_t* btl,
}
/* Allocate fragment */
OMPI_FREE_LIST_GET(&obtl->device->qps[qp].send_free, item);
OMPI_FREE_LIST_GET_MT(&obtl->device->qps[qp].send_free, item);
if(OPAL_UNLIKELY(NULL == item)) {
/* we don't return NULL because maybe later we will try to coalesce */
goto no_frags;

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

@ -3802,7 +3802,7 @@ int mca_btl_openib_post_srr(mca_btl_openib_module_t* openib_btl, const int qp)
for(i = 0; i < num_post; i++) {
ompi_free_list_item_t* item;
OMPI_FREE_LIST_WAIT(&openib_btl->device->qps[qp].recv_free, item);
OMPI_FREE_LIST_WAIT_MT(&openib_btl->device->qps[qp].recv_free, item);
to_base_frag(item)->base.order = qp;
to_com_frag(item)->endpoint = NULL;
if(NULL == wr)

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

@ -358,7 +358,7 @@ static inline int post_recvs(mca_btl_base_endpoint_t *ep, const int qp,
for(i = 0; i < num_post; i++) {
ompi_free_list_item_t* item;
OMPI_FREE_LIST_WAIT(&openib_btl->device->qps[qp].recv_free, item);
OMPI_FREE_LIST_WAIT_MT(&openib_btl->device->qps[qp].recv_free, item);
to_base_frag(item)->base.order = qp;
to_com_frag(item)->endpoint = ep;
if(NULL == wr)

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

@ -386,7 +386,7 @@ alloc_control_frag(mca_btl_openib_module_t *btl)
{
ompi_free_list_item_t *item;
OMPI_FREE_LIST_WAIT(&btl->device->send_free_control, item);
OMPI_FREE_LIST_WAIT_MT(&btl->device->send_free_control, item);
return to_send_control_frag(item);
}
@ -406,7 +406,7 @@ static inline mca_btl_openib_com_frag_t *alloc_send_user_frag(void)
{
ompi_free_list_item_t *item;
OMPI_FREE_LIST_GET(&mca_btl_openib_component.send_user_free, item);
OMPI_FREE_LIST_GET_MT(&mca_btl_openib_component.send_user_free, item);
return to_com_frag(item);
}
@ -415,7 +415,7 @@ static inline mca_btl_openib_com_frag_t *alloc_recv_user_frag(void)
{
ompi_free_list_item_t *item;
OMPI_FREE_LIST_GET(&mca_btl_openib_component.recv_user_free, item);
OMPI_FREE_LIST_GET_MT(&mca_btl_openib_component.recv_user_free, item);
return to_com_frag(item);
}
@ -424,14 +424,14 @@ static inline mca_btl_openib_coalesced_frag_t *alloc_coalesced_frag(void)
{
ompi_free_list_item_t *item;
OMPI_FREE_LIST_GET(&mca_btl_openib_component.send_free_coalesced, item);
OMPI_FREE_LIST_GET_MT(&mca_btl_openib_component.send_free_coalesced, item);
return to_coalesced_frag(item);
}
#define MCA_BTL_IB_FRAG_RETURN(frag) \
do { \
OMPI_FREE_LIST_RETURN(to_base_frag(frag)->list, \
OMPI_FREE_LIST_RETURN_MT(to_base_frag(frag)->list, \
(ompi_free_list_item_t*)(frag)); \
} while(0);

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

@ -79,7 +79,7 @@ OBJ_CLASS_DECLARATION(mca_btl_sctp_frag_user_t);
{ \
\
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&mca_btl_sctp_component.sctp_frag_eager, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_sctp_component.sctp_frag_eager, item); \
frag = (mca_btl_sctp_frag_t*) item; \
}
@ -87,20 +87,20 @@ OBJ_CLASS_DECLARATION(mca_btl_sctp_frag_user_t);
{ \
\
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&mca_btl_sctp_component.sctp_frag_max, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_sctp_component.sctp_frag_max, item); \
frag = (mca_btl_sctp_frag_t*) item; \
}
#define MCA_BTL_SCTP_FRAG_ALLOC_USER(frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&mca_btl_sctp_component.sctp_frag_user, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_sctp_component.sctp_frag_user, item); \
frag = (mca_btl_sctp_frag_t*) item; \
}
#define MCA_BTL_SCTP_FRAG_RETURN(frag) \
{ \
OMPI_FREE_LIST_RETURN(frag->my_list, (ompi_free_list_item_t*)(frag)); \
OMPI_FREE_LIST_RETURN_MT(frag->my_list, (ompi_free_list_item_t*)(frag)); \
}
#define MCA_BTL_SCTP_FRAG_INIT_DST(frag,ep) \

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

@ -47,13 +47,13 @@ OBJ_CLASS_DECLARATION(mca_btl_self_frag_rdma_t);
#define MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_btl_self_component.self_frags_eager, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_self_component.self_frags_eager, item); \
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, \
OMPI_FREE_LIST_RETURN_MT(&mca_btl_self_component.self_frags_eager, \
(ompi_free_list_item_t*)(frag)); \
frag->segment.seg_addr.pval = frag+1; \
}
@ -61,13 +61,13 @@ OBJ_CLASS_DECLARATION(mca_btl_self_frag_rdma_t);
#define MCA_BTL_SELF_FRAG_ALLOC_SEND(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_btl_self_component.self_frags_send, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_self_component.self_frags_send, item); \
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, \
OMPI_FREE_LIST_RETURN_MT( &mca_btl_self_component.self_frags_send, \
(ompi_free_list_item_t*)(frag)); \
frag->segment.seg_addr.pval = frag+1; \
}
@ -75,13 +75,13 @@ OBJ_CLASS_DECLARATION(mca_btl_self_frag_rdma_t);
#define MCA_BTL_SELF_FRAG_ALLOC_RDMA(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_btl_self_component.self_frags_rdma, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_self_component.self_frags_rdma, item); \
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, \
OMPI_FREE_LIST_RETURN_MT(&mca_btl_self_component.self_frags_rdma, \
(ompi_free_list_item_t*)(frag)); \
frag->segment.seg_addr.pval = frag+1; \
}

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

@ -643,8 +643,8 @@ int mca_btl_sm_add_procs(
mca_btl_sm_component.num_smp_procs += n_local_procs;
/* make sure we have enough eager fragmnents for each process */
return_code = ompi_free_list_resize(&mca_btl_sm_component.sm_frags_eager,
mca_btl_sm_component.num_smp_procs * 2);
return_code = ompi_free_list_resize_mt(&mca_btl_sm_component.sm_frags_eager,
mca_btl_sm_component.num_smp_procs * 2);
if (OMPI_SUCCESS != return_code)
goto CLEANUP;

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

@ -79,27 +79,27 @@ OBJ_CLASS_DECLARATION(mca_btl_sm_user_t);
#define MCA_BTL_SM_FRAG_ALLOC_EAGER(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_btl_sm_component.sm_frags_eager, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_sm_component.sm_frags_eager, item); \
frag = (mca_btl_sm_frag_t*)item; \
}
#define MCA_BTL_SM_FRAG_ALLOC_MAX(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_btl_sm_component.sm_frags_max, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_sm_component.sm_frags_max, item); \
frag = (mca_btl_sm_frag_t*)item; \
}
#define MCA_BTL_SM_FRAG_ALLOC_USER(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_btl_sm_component.sm_frags_user, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_sm_component.sm_frags_user, item); \
frag = (mca_btl_sm_frag_t*)item; \
}
#define MCA_BTL_SM_FRAG_RETURN(frag) \
{ \
OMPI_FREE_LIST_RETURN(frag->my_list, (ompi_free_list_item_t*)(frag)); \
OMPI_FREE_LIST_RETURN_MT(frag->my_list, (ompi_free_list_item_t*)(frag)); \
}
#endif

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

@ -87,27 +87,27 @@ OBJ_CLASS_DECLARATION(mca_btl_smcuda_user_t);
#define MCA_BTL_SMCUDA_FRAG_ALLOC_EAGER(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_btl_smcuda_component.sm_frags_eager, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_smcuda_component.sm_frags_eager, item); \
frag = (mca_btl_smcuda_frag_t*)item; \
}
#define MCA_BTL_SMCUDA_FRAG_ALLOC_MAX(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_btl_smcuda_component.sm_frags_max, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_smcuda_component.sm_frags_max, item); \
frag = (mca_btl_smcuda_frag_t*)item; \
}
#define MCA_BTL_SMCUDA_FRAG_ALLOC_USER(frag) \
{ \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_btl_smcuda_component.sm_frags_user, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_smcuda_component.sm_frags_user, item); \
frag = (mca_btl_smcuda_frag_t*)item; \
}
#define MCA_BTL_SMCUDA_FRAG_RETURN(frag) \
{ \
OMPI_FREE_LIST_RETURN(frag->my_list, (ompi_free_list_item_t*)(frag)); \
OMPI_FREE_LIST_RETURN_MT(frag->my_list, (ompi_free_list_item_t*)(frag)); \
}
#endif

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

@ -80,27 +80,27 @@ OBJ_CLASS_DECLARATION(mca_btl_tcp_frag_user_t);
#define MCA_BTL_TCP_FRAG_ALLOC_EAGER(frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&mca_btl_tcp_component.tcp_frag_eager, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_tcp_component.tcp_frag_eager, item); \
frag = (mca_btl_tcp_frag_t*) item; \
}
#define MCA_BTL_TCP_FRAG_ALLOC_MAX(frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&mca_btl_tcp_component.tcp_frag_max, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_tcp_component.tcp_frag_max, item); \
frag = (mca_btl_tcp_frag_t*) item; \
}
#define MCA_BTL_TCP_FRAG_ALLOC_USER(frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&mca_btl_tcp_component.tcp_frag_user, item); \
OMPI_FREE_LIST_GET_MT(&mca_btl_tcp_component.tcp_frag_user, item); \
frag = (mca_btl_tcp_frag_t*) item; \
}
#define MCA_BTL_TCP_FRAG_RETURN(frag) \
{ \
OMPI_FREE_LIST_RETURN(frag->my_list, (ompi_free_list_item_t*)(frag)); \
OMPI_FREE_LIST_RETURN_MT(frag->my_list, (ompi_free_list_item_t*)(frag)); \
}
#define MCA_BTL_TCP_FRAG_INIT_DST(frag,ep) \

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

@ -64,13 +64,13 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
{ \
\
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_template_module_t*)btl)->template_frag_eager, item); \
OMPI_FREE_LIST_GET_MT(&((mca_btl_template_module_t*)btl)->template_frag_eager, item); \
frag = (mca_btl_template_frag_t*) item; \
}
#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_MT(&((mca_btl_template_module_t*)btl)->template_frag_eager, \
(ompi_free_list_item_t*)(frag)); \
}
@ -78,13 +78,13 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
{ \
\
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_template_module_t*)btl)->template_frag_max, item); \
OMPI_FREE_LIST_GET_MT(&((mca_btl_template_module_t*)btl)->template_frag_max, item); \
frag = (mca_btl_template_frag_t*) item; \
}
#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_MT(&((mca_btl_template_module_t*)btl)->template_frag_max, \
(ompi_free_list_item_t*)(frag)); \
}
@ -92,13 +92,13 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t);
#define MCA_BTL_TEMPLATE_FRAG_ALLOC_USER(btl, frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_template_module_t*)btl)->template_frag_user, item); \
OMPI_FREE_LIST_GET_MT(&((mca_btl_template_module_t*)btl)->template_frag_user, item); \
frag = (mca_btl_template_frag_t*) item; \
}
#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_MT(&((mca_btl_template_module_t*)btl)->template_frag_user, \
(ompi_free_list_item_t*)(frag)); \
}

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

@ -128,66 +128,66 @@ OBJ_CLASS_DECLARATION(mca_btl_udapl_frag_eager_rdma_t);
#define MCA_BTL_UDAPL_FRAG_ALLOC_EAGER(btl, frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_udapl_module_t*)btl)->udapl_frag_eager, item); \
OMPI_FREE_LIST_GET_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_eager, item); \
frag = (mca_btl_udapl_frag_t*) item; \
}
#define MCA_BTL_UDAPL_FRAG_RETURN_EAGER(btl, frag) \
{ \
OMPI_FREE_LIST_RETURN(&((mca_btl_udapl_module_t*)btl)->udapl_frag_eager, \
OMPI_FREE_LIST_RETURN_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_eager, \
(ompi_free_list_item_t*)(frag)); \
}
#define MCA_BTL_UDAPL_FRAG_ALLOC_EAGER_RECV(btl, frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_udapl_module_t*)btl)->udapl_frag_eager_recv, item); \
OMPI_FREE_LIST_GET_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_eager_recv, item); \
frag = (mca_btl_udapl_frag_t*) item; \
}
#define MCA_BTL_UDAPL_FRAG_ALLOC_MAX(btl, frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_udapl_module_t*)btl)->udapl_frag_max, item); \
OMPI_FREE_LIST_GET_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_max, item); \
frag = (mca_btl_udapl_frag_t*) item; \
}
#define MCA_BTL_UDAPL_FRAG_RETURN_MAX(btl, frag) \
{ \
OMPI_FREE_LIST_RETURN(&((mca_btl_udapl_module_t*)btl)->udapl_frag_max, \
OMPI_FREE_LIST_RETURN_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_max, \
(ompi_free_list_item_t*)(frag)); \
}
#define MCA_BTL_UDAPL_FRAG_ALLOC_MAX_RECV(btl, frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_udapl_module_t*)btl)->udapl_frag_max_recv, item); \
OMPI_FREE_LIST_GET_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_max_recv, item); \
frag = (mca_btl_udapl_frag_t*) item; \
}
#define MCA_BTL_UDAPL_FRAG_ALLOC_USER(btl, frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_udapl_module_t*)btl)->udapl_frag_user, item); \
OMPI_FREE_LIST_GET_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_user, item); \
frag = (mca_btl_udapl_frag_t*) item; \
}
#define MCA_BTL_UDAPL_FRAG_RETURN_USER(btl, frag) \
{ \
OMPI_FREE_LIST_RETURN(&((mca_btl_udapl_module_t*)btl)->udapl_frag_user, \
OMPI_FREE_LIST_RETURN_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_user, \
(ompi_free_list_item_t*)(frag)); \
}
#define MCA_BTL_UDAPL_FRAG_ALLOC_CONTROL(btl, frag) \
{ \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_udapl_module_t*)btl)->udapl_frag_control, item); \
OMPI_FREE_LIST_GET_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_control, item); \
frag = (mca_btl_udapl_frag_t*) item; \
}
#define MCA_BTL_UDAPL_FRAG_RETURN_CONTROL(btl, frag) \
{ \
OMPI_FREE_LIST_RETURN(&((mca_btl_udapl_module_t*)btl)->udapl_frag_control, \
OMPI_FREE_LIST_RETURN_MT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_control, \
(ompi_free_list_item_t*)(frag)); \
}

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

@ -35,7 +35,7 @@ static inline int mca_btl_ugni_ep_smsg_get_mbox (mca_btl_base_endpoint_t *ep) {
mca_btl_ugni_module_t *ugni_module = ep->btl;
ompi_free_list_item_t *mbox;
OMPI_FREE_LIST_GET(&ugni_module->smsg_mboxes, mbox);
OMPI_FREE_LIST_GET_MT(&ugni_module->smsg_mboxes, mbox);
if (OPAL_UNLIKELY(NULL == mbox)) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -70,7 +70,7 @@ int mca_btl_ugni_ep_disconnect (mca_btl_base_endpoint_t *ep, bool send_disconnec
(void) ompi_common_ugni_ep_destroy (&ep->smsg_ep_handle);
(void) ompi_common_ugni_ep_destroy (&ep->rdma_ep_handle);
OMPI_FREE_LIST_RETURN(&ep->btl->smsg_mboxes, ((ompi_free_list_item_t *) ep->mailbox));
OMPI_FREE_LIST_RETURN_MT(&ep->btl->smsg_mboxes, ((ompi_free_list_item_t *) ep->mailbox));
ep->mailbox = NULL;
ep->state = MCA_BTL_UGNI_EP_STATE_INIT;

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

@ -104,7 +104,7 @@ static inline int mca_btl_ugni_frag_alloc (mca_btl_base_endpoint_t *ep,
{
ompi_free_list_item_t *item = NULL;
OMPI_FREE_LIST_GET(list, item);
OMPI_FREE_LIST_GET_MT(list, item);
*frag = (mca_btl_ugni_base_frag_t *) item;
if (OPAL_LIKELY(NULL != item)) {
(*frag)->my_list = list;
@ -125,7 +125,7 @@ static inline int mca_btl_ugni_frag_return (mca_btl_ugni_base_frag_t *frag)
frag->flags = 0;
OMPI_FREE_LIST_RETURN(frag->my_list, (ompi_free_list_item_t *) frag);
OMPI_FREE_LIST_RETURN_MT(frag->my_list, (ompi_free_list_item_t *) frag);
return OMPI_SUCCESS;
}

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

@ -60,7 +60,7 @@ void mca_btl_vader_frag_return (mca_btl_vader_frag_t *frag)
frag->base.des_dst = frag->segments;
frag->base.des_dst_cnt = 1;
OMPI_FREE_LIST_RETURN(frag->my_list, (ompi_free_list_item_t *)frag);
OMPI_FREE_LIST_RETURN_MT(frag->my_list, (ompi_free_list_item_t *)frag);
}
OBJ_CLASS_INSTANCE(mca_btl_vader_frag_t, mca_btl_base_descriptor_t,

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

@ -59,11 +59,11 @@ OBJ_CLASS_DECLARATION(mca_btl_vader_frag_t);
static inline int mca_btl_vader_frag_alloc (mca_btl_vader_frag_t **frag, ompi_free_list_t *list) {
ompi_free_list_item_t *item;
OMPI_FREE_LIST_GET(list, item);
OMPI_FREE_LIST_GET_MT(list, item);
*frag = (mca_btl_vader_frag_t *) item;
if (OPAL_LIKELY(NULL != item)) {
if (NULL == (*frag)->hdr) {
OMPI_FREE_LIST_RETURN(list, (ompi_free_list_item_t *)*frag);
OMPI_FREE_LIST_RETURN_MT(list, (ompi_free_list_item_t *)*frag);
*frag = NULL;
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
}

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

@ -386,7 +386,7 @@ static void* get_coll_handle(void)
{
ompi_request_t *ompi_req;
ompi_free_list_item_t *item;
OMPI_FREE_LIST_WAIT(&(mca_coll_hcoll_component.requests),item);
OMPI_FREE_LIST_WAIT_MT(&(mca_coll_hcoll_component.requests),item);
if (OPAL_UNLIKELY(NULL == item)) {
HCOL_ERROR("Wait for free list failed.\n");
return NULL;
@ -404,7 +404,7 @@ static int coll_handle_test(void* handle)
static void coll_handle_free(void *handle){
ompi_request_t *ompi_req = (ompi_request_t *)handle;
OMPI_FREE_LIST_RETURN(&mca_coll_hcoll_component.requests,
OMPI_FREE_LIST_RETURN_MT(&mca_coll_hcoll_component.requests,
(ompi_free_list_item_t *)ompi_req);
}

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

@ -119,7 +119,7 @@ typedef ompi_coll_libnbc_request_t NBC_Handle;
#define OMPI_COLL_LIBNBC_REQUEST_ALLOC(comm, req) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT(&mca_coll_libnbc_component.requests, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_coll_libnbc_component.requests, item); \
req = (ompi_coll_libnbc_request_t*) item; \
OMPI_REQUEST_INIT(&req->super, false); \
req->super.req_mpi_object.comm = comm; \
@ -130,7 +130,7 @@ typedef ompi_coll_libnbc_request_t NBC_Handle;
#define OMPI_COLL_LIBNBC_REQUEST_RETURN(req) \
do { \
OMPI_REQUEST_FINI(&request->super); \
OMPI_FREE_LIST_RETURN(&mca_coll_libnbc_component.requests, \
OMPI_FREE_LIST_RETURN_MT(&mca_coll_libnbc_component.requests, \
(ompi_free_list_item_t*) req); \
} while (0)

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

@ -49,7 +49,7 @@ static int mca_coll_ml_barrier_launch(mca_coll_ml_module_t *ml_module,
/* Blocking call on fragment allocation (Maybe we want to make it non blocking ?) */
OMPI_FREE_LIST_WAIT(&(ml_module->coll_ml_collective_descriptors),
OMPI_FREE_LIST_WAIT_MT(&(ml_module->coll_ml_collective_descriptors),
item);
coll_op = (mca_coll_ml_collective_operation_progress_t *) item;

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

@ -409,7 +409,7 @@ do {
assert(&coll_op->full_message != \
coll_op->fragment_data.message_descriptor); \
ML_VERBOSE(10, ("Releasing %p", op)); \
OMPI_FREE_LIST_RETURN(&(((mca_coll_ml_module_t *)(op)->coll_module)-> \
OMPI_FREE_LIST_RETURN_MT(&(((mca_coll_ml_module_t *)(op)->coll_module)-> \
coll_ml_collective_descriptors), \
(ompi_free_list_item_t *)op); \
/* Special check for memory synchronization completion */ \

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

@ -475,7 +475,7 @@ mca_coll_ml_alloc_op_prog_single_frag_dag(
ompi_request_t *req;
/* Blocking call on fragment allocation (Maybe we want to make it non blocking ?) */
OMPI_FREE_LIST_WAIT(&(ml_module->coll_ml_collective_descriptors),
OMPI_FREE_LIST_WAIT_MT(&(ml_module->coll_ml_collective_descriptors),
item);
coll_op = (mca_coll_ml_collective_operation_progress_t *) item;
@ -535,7 +535,7 @@ static inline __opal_attribute_always_inline__ mca_coll_ml_collective_operation_
mca_coll_ml_collective_operation_progress_t *coll_op = NULL;
/* Blocking call on fragment allocation (Maybe we want to make it non blocking ?) */
OMPI_FREE_LIST_WAIT(&(ml_module->coll_ml_collective_descriptors),
OMPI_FREE_LIST_WAIT_MT(&(ml_module->coll_ml_collective_descriptors),
item);
coll_op = (mca_coll_ml_collective_operation_progress_t *) item;

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

@ -250,7 +250,7 @@ static int mca_coll_ml_request_free(ompi_request_t** request)
assert(0 == ml_request->fragment_data.offset_into_user_buffer);
assert(ml_request->dag_description.status_array[0].item.opal_list_item_refcount == 0);
ML_VERBOSE(10, ("Releasing Master %p", ml_request));
OMPI_FREE_LIST_RETURN(&(ml_module->coll_ml_collective_descriptors),
OMPI_FREE_LIST_RETURN_MT(&(ml_module->coll_ml_collective_descriptors),
(ompi_free_list_item_t *)ml_request);
/* MPI needs to return with the request object set to MPI_REQUEST_NULL

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

@ -30,7 +30,7 @@ OBJ_CLASS_DECLARATION(ompi_coll_portals4_request_t);
#define OMPI_COLL_PORTALS4_REQUEST_ALLOC(comm, req) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&mca_coll_portals4_component.requests, \
OMPI_FREE_LIST_GET_MT(&mca_coll_portals4_component.requests, \
item); \
req = (ompi_coll_portals4_request_t*) item; \
OMPI_REQUEST_INIT(&req->super, false); \
@ -42,7 +42,7 @@ OBJ_CLASS_DECLARATION(ompi_coll_portals4_request_t);
#define OMPI_COLL_PORTALS4_REQUEST_RETURN(req) \
do { \
OMPI_REQUEST_FINI(&request->super); \
OMPI_FREE_LIST_RETURN(&mca_coll_portals4_component.requests, \
OMPI_FREE_LIST_RETURN_MT(&mca_coll_portals4_component.requests, \
(ompi_free_list_item_t*) req); \
} while (0)

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

@ -617,13 +617,13 @@ static void traffic_message_dump_drain_msg_indv(ompi_crcp_bkmrk_pml_drain_messag
#define HOKE_PEER_REF_ALLOC(peer_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&peer_ref_free_list, item); \
OMPI_FREE_LIST_WAIT_MT(&peer_ref_free_list, item); \
peer_ref = (ompi_crcp_bkmrk_pml_peer_ref_t*)item; \
} while(0);
#define HOKE_PEER_REF_RETURN(peer_ref) \
do { \
OMPI_FREE_LIST_RETURN(&peer_ref_free_list, \
OMPI_FREE_LIST_RETURN_MT(&peer_ref_free_list, \
(ompi_free_list_item_t*)peer_ref); \
} while(0);
@ -631,7 +631,7 @@ do { \
#define HOKE_CONTENT_REF_ALLOC(content_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&content_ref_free_list, item); \
OMPI_FREE_LIST_WAIT_MT(&content_ref_free_list, item); \
content_ref = (ompi_crcp_bkmrk_pml_message_content_ref_t*)item; \
content_ref->msg_id = content_ref_seq_num; \
content_ref_seq_num++;\
@ -639,7 +639,7 @@ do { \
#define HOKE_CONTENT_REF_RETURN(content_ref) \
do { \
OMPI_FREE_LIST_RETURN(&content_ref_free_list, \
OMPI_FREE_LIST_RETURN_MT(&content_ref_free_list, \
(ompi_free_list_item_t*)content_ref); \
} while(0);
@ -647,13 +647,13 @@ do { \
#define HOKE_TRAFFIC_MSG_REF_ALLOC(msg_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&traffic_msg_ref_free_list, item); \
OMPI_FREE_LIST_WAIT_MT(&traffic_msg_ref_free_list, item); \
msg_ref = (ompi_crcp_bkmrk_pml_traffic_message_ref_t*)item; \
} while(0);
#define HOKE_TRAFFIC_MSG_REF_RETURN(msg_ref) \
do { \
OMPI_FREE_LIST_RETURN(&traffic_msg_ref_free_list, \
OMPI_FREE_LIST_RETURN_MT(&traffic_msg_ref_free_list, \
(ompi_free_list_item_t*)msg_ref); \
} while(0);
@ -661,13 +661,13 @@ do { \
#define HOKE_DRAIN_MSG_REF_ALLOC(msg_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&drain_msg_ref_free_list, item); \
OMPI_FREE_LIST_WAIT_MT(&drain_msg_ref_free_list, item); \
msg_ref = (ompi_crcp_bkmrk_pml_drain_message_ref_t*)item; \
} while(0);
#define HOKE_DRAIN_MSG_REF_RETURN(msg_ref) \
do { \
OMPI_FREE_LIST_RETURN(&drain_msg_ref_free_list, \
OMPI_FREE_LIST_RETURN_MT(&drain_msg_ref_free_list, \
(ompi_free_list_item_t*)msg_ref); \
} while(0);
@ -675,13 +675,13 @@ do { \
#define HOKE_DRAIN_ACK_MSG_REF_ALLOC(msg_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&drain_ack_msg_ref_free_list, item); \
OMPI_FREE_LIST_WAIT_MT(&drain_ack_msg_ref_free_list, item); \
msg_ref = (ompi_crcp_bkmrk_pml_drain_message_ack_ref_t*)item; \
} while(0);
#define HOKE_DRAIN_ACK_MSG_REF_RETURN(msg_ref) \
do { \
OMPI_FREE_LIST_RETURN(&drain_ack_msg_ref_free_list, \
OMPI_FREE_LIST_RETURN_MT(&drain_ack_msg_ref_free_list, \
(ompi_free_list_item_t*)msg_ref); \
} while(0);
@ -968,13 +968,13 @@ OBJ_CLASS_INSTANCE(ompi_crcp_bkmrk_pml_state_t,
#define CRCP_COORD_STATE_ALLOC(state_ref) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&coord_state_free_list, item); \
OMPI_FREE_LIST_WAIT_MT(&coord_state_free_list, item); \
state_ref = (ompi_crcp_bkmrk_pml_state_t*)item; \
} while(0);
#define CRCP_COORD_STATE_RETURN(state_ref) \
do { \
OMPI_FREE_LIST_RETURN(&coord_state_free_list, \
OMPI_FREE_LIST_RETURN_MT(&coord_state_free_list, \
(ompi_free_list_item_t*)state_ref); \
} while(0);

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

@ -143,7 +143,7 @@ mca_mpool_base_tree_item_t* mca_mpool_base_tree_find(void* base) {
*/
mca_mpool_base_tree_item_t* mca_mpool_base_tree_item_get(void) {
ompi_free_list_item_t* item = NULL;
OMPI_FREE_LIST_GET(&mca_mpool_base_tree_item_free_list, item);
OMPI_FREE_LIST_GET_MT(&mca_mpool_base_tree_item_free_list, item);
if(NULL != item) {
return (mca_mpool_base_tree_item_t*) item;
} else {
@ -155,7 +155,7 @@ mca_mpool_base_tree_item_t* mca_mpool_base_tree_item_get(void) {
* put an item back into the free list
*/
void mca_mpool_base_tree_item_put(mca_mpool_base_tree_item_t* item) {
OMPI_FREE_LIST_RETURN(&mca_mpool_base_tree_item_free_list,
OMPI_FREE_LIST_RETURN_MT(&mca_mpool_base_tree_item_free_list,
&(item->super));
}

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

@ -135,7 +135,7 @@ int mca_mpool_gpusm_register(mca_mpool_base_module_t *mpool, void *addr,
base = addr;
bound = (unsigned char *)addr + size - 1;
OMPI_FREE_LIST_GET(&mpool_gpusm->reg_list, item);
OMPI_FREE_LIST_GET_MT(&mpool_gpusm->reg_list, item);
if(NULL == item) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -149,7 +149,7 @@ int mca_mpool_gpusm_register(mca_mpool_base_module_t *mpool, void *addr,
rc = mpool_gpusm->resources.register_mem(base, size, gpusm_reg, NULL);
if(rc != OMPI_SUCCESS) {
OMPI_FREE_LIST_RETURN(&mpool_gpusm->reg_list, item);
OMPI_FREE_LIST_RETURN_MT(&mpool_gpusm->reg_list, item);
return rc;
}
@ -169,7 +169,7 @@ int mca_mpool_gpusm_deregister(struct mca_mpool_base_module_t *mpool,
mca_mpool_gpusm_module_t *mpool_gpusm = (mca_mpool_gpusm_module_t *)mpool;
rc = mpool_gpusm->resources.deregister_mem(mpool, reg);
OMPI_FREE_LIST_RETURN(&mpool_gpusm->reg_list, (ompi_free_list_item_t*)reg);
OMPI_FREE_LIST_RETURN_MT(&mpool_gpusm->reg_list, (ompi_free_list_item_t*)reg);
return OMPI_SUCCESS;
}

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

@ -112,7 +112,7 @@ static inline int dereg_mem(mca_mpool_base_registration_t *reg)
OPAL_THREAD_LOCK(&reg->mpool->rcache->lock);
if (OPAL_LIKELY(OMPI_SUCCESS == rc)) {
OMPI_FREE_LIST_RETURN(&mpool_grdma->reg_list,
OMPI_FREE_LIST_RETURN_MT(&mpool_grdma->reg_list,
(ompi_free_list_item_t *) reg);
}
@ -263,7 +263,7 @@ int mca_mpool_grdma_register(mca_mpool_base_module_t *mpool, void *addr,
}
}
OMPI_FREE_LIST_GET(&mpool_grdma->reg_list, item);
OMPI_FREE_LIST_GET_MT(&mpool_grdma->reg_list, item);
if(NULL == item) {
OPAL_THREAD_UNLOCK(&mpool->rcache->lock);
return OMPI_ERR_OUT_OF_RESOURCE;
@ -280,7 +280,7 @@ int mca_mpool_grdma_register(mca_mpool_base_module_t *mpool, void *addr,
if (OPAL_UNLIKELY(rc != OMPI_SUCCESS)) {
OPAL_THREAD_UNLOCK(&mpool->rcache->lock);
OMPI_FREE_LIST_RETURN(&mpool_grdma->reg_list, item);
OMPI_FREE_LIST_RETURN_MT(&mpool_grdma->reg_list, item);
return rc;
}
}
@ -299,7 +299,7 @@ int mca_mpool_grdma_register(mca_mpool_base_module_t *mpool, void *addr,
mpool->rcache->rcache_delete(mpool->rcache, grdma_reg);
}
OPAL_THREAD_UNLOCK(&mpool->rcache->lock);
OMPI_FREE_LIST_RETURN(&mpool_grdma->reg_list, item);
OMPI_FREE_LIST_RETURN_MT(&mpool_grdma->reg_list, item);
return rc;
}

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

@ -130,7 +130,7 @@ static inline bool mca_mpool_rgpusm_deregister_lru (mca_mpool_base_module_t *mpo
return false;
}
OMPI_FREE_LIST_RETURN(&mpool_rgpusm->reg_list,
OMPI_FREE_LIST_RETURN_MT(&mpool_rgpusm->reg_list,
(ompi_free_list_item_t*)old_reg);
mpool_rgpusm->stat_evicted++;
@ -210,7 +210,7 @@ int mca_mpool_rgpusm_register(mca_mpool_base_module_t *mpool, void *addr,
* are not leaving the registrations pinned, the number of
* registrations is unlimited and there is no need for a cache. */
if(!mca_mpool_rgpusm_component.leave_pinned && 0 == mca_mpool_rgpusm_component.rcache_size_limit) {
OMPI_FREE_LIST_GET(&mpool_rgpusm->reg_list, item);
OMPI_FREE_LIST_GET_MT(&mpool_rgpusm->reg_list, item);
if(NULL == item) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -234,7 +234,7 @@ int mca_mpool_rgpusm_register(mca_mpool_base_module_t *mpool, void *addr,
assert(OMPI_ERR_WOULD_BLOCK != rc);
if(rc != OMPI_SUCCESS) {
OMPI_FREE_LIST_RETURN(&mpool_rgpusm->reg_list, item);
OMPI_FREE_LIST_RETURN_MT(&mpool_rgpusm->reg_list, item);
return rc;
}
rgpusm_reg->base.ref_count++;
@ -323,7 +323,7 @@ int mca_mpool_rgpusm_register(mca_mpool_base_module_t *mpool, void *addr,
"RGPUSM: New registration ep=%d, addr=%p, size=%d. Need to register and insert in cache",
mypeer, addr, (int)size);
OMPI_FREE_LIST_GET(&mpool_rgpusm->reg_list, item);
OMPI_FREE_LIST_GET_MT(&mpool_rgpusm->reg_list, item);
if(NULL == item) {
OPAL_THREAD_UNLOCK(&mpool->rcache->lock);
return OMPI_ERR_OUT_OF_RESOURCE;
@ -405,7 +405,7 @@ int mca_mpool_rgpusm_register(mca_mpool_base_module_t *mpool, void *addr,
if(rc != OMPI_SUCCESS) {
OPAL_THREAD_UNLOCK(&mpool->rcache->lock);
OMPI_FREE_LIST_RETURN(&mpool_rgpusm->reg_list, item);
OMPI_FREE_LIST_RETURN_MT(&mpool_rgpusm->reg_list, item);
return rc;
}
@ -424,7 +424,7 @@ int mca_mpool_rgpusm_register(mca_mpool_base_module_t *mpool, void *addr,
if(rc != OMPI_SUCCESS) {
OPAL_THREAD_UNLOCK(&mpool->rcache->lock);
OMPI_FREE_LIST_RETURN(&mpool_rgpusm->reg_list, item);
OMPI_FREE_LIST_RETURN_MT(&mpool_rgpusm->reg_list, item);
/* We cannot recover from this. We can be here if the size of
* the cache is smaller than the amount of memory we are
* trying to register in a single transfer. In that case, rc
@ -529,7 +529,7 @@ int mca_mpool_rgpusm_deregister(struct mca_mpool_base_module_t *mpool,
OPAL_THREAD_LOCK(&mpool->rcache->lock);
if(OMPI_SUCCESS == rc) {
OMPI_FREE_LIST_RETURN(&mpool_rgpusm->reg_list,
OMPI_FREE_LIST_RETURN_MT(&mpool_rgpusm->reg_list,
(ompi_free_list_item_t*)reg);
}
}
@ -593,7 +593,7 @@ void mca_mpool_rgpusm_finalize(struct mca_mpool_base_module_t *mpool)
continue;
}
OMPI_FREE_LIST_RETURN(&mpool_rgpusm->reg_list,
OMPI_FREE_LIST_RETURN_MT(&mpool_rgpusm->reg_list,
(ompi_free_list_item_t*)reg);
}
} while(reg_cnt == RGPUSM_MPOOL_NREGS);

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

@ -61,7 +61,7 @@ int ompi_mtl_mxm_improbe(struct mca_mtl_base_module_t *mtl,
ompi_free_list_item_t *item;
ompi_mtl_mxm_message_t *msgp;
OMPI_FREE_LIST_WAIT(&mca_mtl_mxm_component.mxm_messages, item);
OMPI_FREE_LIST_WAIT_MT(&mca_mtl_mxm_component.mxm_messages, item);
if (OPAL_UNLIKELY(NULL == item)) {
return OMPI_ERR_OUT_OF_RESOURCE;
}

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

@ -190,7 +190,7 @@ int ompi_mtl_mxm_imrecv(struct mca_mtl_base_module_t* mtl,
return OMPI_ERROR;
}
OMPI_FREE_LIST_RETURN(&mca_mtl_mxm_component.mxm_messages,
OMPI_FREE_LIST_RETURN_MT(&mca_mtl_mxm_component.mxm_messages,
(ompi_free_list_item_t *) msgp);
ompi_message_return(*message);

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

@ -220,14 +220,14 @@ OBJ_CLASS_DECLARATION(mca_pml_bfo_pckt_pending_t);
#define MCA_PML_BFO_PCKT_PENDING_ALLOC(pckt) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_bfo.pending_pckts, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_bfo.pending_pckts, item); \
pckt = (mca_pml_bfo_pckt_pending_t*)item; \
} while (0)
#define MCA_PML_BFO_PCKT_PENDING_RETURN(pckt) \
do { \
/* return packet */ \
OMPI_FREE_LIST_RETURN(&mca_pml_bfo.pending_pckts, \
OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.pending_pckts, \
(ompi_free_list_item_t*)pckt); \
} while(0)

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

@ -790,7 +790,7 @@ void mca_pml_bfo_send_request_restart(mca_pml_bfo_send_request_t* sendreq,
last_item = opal_list_get_last(&sendreq->req_send_ranges);
while (first_item != last_item) {
opal_list_remove_item(&sendreq->req_send_ranges, last_item);
OMPI_FREE_LIST_RETURN(&mca_pml_bfo.send_ranges, (ompi_free_list_item_t *)last_item);
OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.send_ranges, (ompi_free_list_item_t *)last_item);
last_item = opal_list_get_last(&sendreq->req_send_ranges);
}
OPAL_THREAD_UNLOCK(&sendreq->req_send_range_lock);

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

@ -57,14 +57,14 @@ OBJ_CLASS_DECLARATION(mca_pml_bfo_rdma_frag_t);
#define MCA_PML_BFO_RDMA_FRAG_ALLOC(frag) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_bfo.rdma_frags, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_bfo.rdma_frags, item); \
frag = (mca_pml_bfo_rdma_frag_t*)item; \
} while(0)
#define MCA_PML_BFO_RDMA_FRAG_RETURN(frag) \
do { \
/* return fragment */ \
OMPI_FREE_LIST_RETURN(&mca_pml_bfo.rdma_frags, \
OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.rdma_frags, \
(ompi_free_list_item_t*)frag); \
} while(0)

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

@ -53,7 +53,7 @@ OBJ_CLASS_DECLARATION(mca_pml_bfo_recv_frag_t);
#define MCA_PML_BFO_RECV_FRAG_ALLOC(frag) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_bfo.recv_frags, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_bfo.recv_frags, item); \
frag = (mca_pml_bfo_recv_frag_t*)item; \
} while(0)
@ -102,7 +102,7 @@ do { \
frag->num_segments = 0; \
\
/* return recv_frag */ \
OMPI_FREE_LIST_RETURN(&mca_pml_bfo.recv_frags, \
OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.recv_frags, \
(ompi_free_list_item_t*)frag); \
} while(0)

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

@ -86,7 +86,7 @@ static inline bool unlock_recv_request(mca_pml_bfo_recv_request_t *recvreq)
#define MCA_PML_BFO_RECV_REQUEST_ALLOC(recvreq) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_pml_base_recv_requests, item); \
OMPI_FREE_LIST_GET_MT(&mca_pml_base_recv_requests, item); \
recvreq = (mca_pml_bfo_recv_request_t*)item; \
} while(0)
@ -140,7 +140,7 @@ do { \
#define MCA_PML_BFO_RECV_REQUEST_RETURN(recvreq) \
{ \
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
OMPI_FREE_LIST_RETURN( &mca_pml_base_recv_requests, \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_recv_requests, \
(ompi_free_list_item_t*)(recvreq)); \
}

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

@ -969,7 +969,7 @@ void mca_pml_bfo_send_request_copy_in_out( mca_pml_bfo_send_request_t *sendreq,
if( OPAL_UNLIKELY(0 == send_length) )
return;
OMPI_FREE_LIST_WAIT(&mca_pml_bfo.send_ranges, i);
OMPI_FREE_LIST_WAIT_MT(&mca_pml_bfo.send_ranges, i);
sr = (mca_pml_bfo_send_range_t*)i;
@ -1023,7 +1023,7 @@ get_next_send_range(mca_pml_bfo_send_request_t* sendreq,
{
OPAL_THREAD_LOCK(&sendreq->req_send_range_lock);
opal_list_remove_item(&sendreq->req_send_ranges, (opal_list_item_t *)range);
OMPI_FREE_LIST_RETURN(&mca_pml_bfo.send_ranges, &range->base);
OMPI_FREE_LIST_RETURN_MT(&mca_pml_bfo.send_ranges, &range->base);
range = get_send_range_nolock(sendreq);
OPAL_THREAD_UNLOCK(&sendreq->req_send_range_lock);

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

@ -129,7 +129,7 @@ get_request_from_send_pending(mca_pml_bfo_send_pending_t *type)
\
sendreq = NULL; \
if( OPAL_LIKELY(NULL != proc) ) { \
OMPI_FREE_LIST_WAIT(&mca_pml_base_send_requests, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_base_send_requests, item); \
sendreq = (mca_pml_bfo_send_request_t*)item; \
sendreq->req_send.req_base.req_proc = proc; \
} \
@ -212,7 +212,7 @@ do {
do { \
/* Let the base handle the reference counts */ \
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
OMPI_FREE_LIST_RETURN( &mca_pml_base_send_requests, \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_send_requests, \
(ompi_free_list_item_t*)sendreq); \
} while(0)

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

@ -55,7 +55,7 @@ OBJ_CLASS_DECLARATION(mca_pml_cm_hvy_recv_request_t);
#define MCA_PML_CM_THIN_RECV_REQUEST_ALLOC(recvreq) \
do { \
ompi_free_list_item_t*item; \
OMPI_FREE_LIST_GET(&mca_pml_base_recv_requests, item); \
OMPI_FREE_LIST_GET_MT(&mca_pml_base_recv_requests, item); \
recvreq = (mca_pml_cm_thin_recv_request_t*) item; \
recvreq->req_base.req_pml_type = MCA_PML_CM_REQUEST_RECV_THIN; \
recvreq->req_mtl.ompi_req = (ompi_request_t*) recvreq; \
@ -65,7 +65,7 @@ OBJ_CLASS_DECLARATION(mca_pml_cm_hvy_recv_request_t);
#define MCA_PML_CM_HVY_RECV_REQUEST_ALLOC(recvreq) \
do { \
ompi_free_list_item_t*item; \
OMPI_FREE_LIST_GET(&mca_pml_base_recv_requests, item); \
OMPI_FREE_LIST_GET_MT(&mca_pml_base_recv_requests, item); \
recvreq = (mca_pml_cm_hvy_recv_request_t*) item; \
recvreq->req_base.req_pml_type = MCA_PML_CM_REQUEST_RECV_HEAVY; \
recvreq->req_mtl.ompi_req = (ompi_request_t*) recvreq; \
@ -296,7 +296,7 @@ do { \
OBJ_RELEASE((recvreq)->req_base.req_datatype); \
OMPI_REQUEST_FINI(&(recvreq)->req_base.req_ompi); \
opal_convertor_cleanup( &((recvreq)->req_base.req_convertor) ); \
OMPI_FREE_LIST_RETURN( &mca_pml_base_recv_requests, \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_recv_requests, \
(ompi_free_list_item_t*)(recvreq)); \
}
@ -309,7 +309,7 @@ do { \
OBJ_RELEASE((recvreq)->req_base.req_datatype); \
OMPI_REQUEST_FINI(&(recvreq)->req_base.req_ompi); \
opal_convertor_cleanup( &((recvreq)->req_base.req_convertor) ); \
OMPI_FREE_LIST_RETURN( &mca_pml_base_recv_requests, \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_recv_requests, \
(ompi_free_list_item_t*)(recvreq)); \
}

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

@ -65,7 +65,7 @@ do { \
if(OPAL_UNLIKELY(NULL == ompi_proc)) { \
sendreq = NULL; \
} else { \
OMPI_FREE_LIST_WAIT(&mca_pml_base_send_requests, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_base_send_requests, item); \
sendreq = (mca_pml_cm_thin_send_request_t*)item; \
sendreq->req_send.req_base.req_pml_type = MCA_PML_CM_REQUEST_SEND_THIN; \
sendreq->req_mtl.ompi_req = (ompi_request_t*) sendreq; \
@ -82,7 +82,7 @@ do { \
if(OPAL_UNLIKELY(NULL == ompi_proc)) { \
sendreq = NULL; \
} else { \
OMPI_FREE_LIST_WAIT(&mca_pml_base_send_requests, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_base_send_requests, item); \
sendreq = (mca_pml_cm_hvy_send_request_t*)item; \
sendreq->req_send.req_base.req_pml_type = MCA_PML_CM_REQUEST_SEND_HEAVY; \
sendreq->req_mtl.ompi_req = (ompi_request_t*) sendreq; \
@ -307,7 +307,7 @@ do {
OBJ_RELEASE(sendreq->req_send.req_base.req_comm); \
OMPI_REQUEST_FINI(&sendreq->req_send.req_base.req_ompi); \
opal_convertor_cleanup( &(sendreq->req_send.req_base.req_convertor) ); \
OMPI_FREE_LIST_RETURN( &mca_pml_base_send_requests, \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_send_requests, \
(ompi_free_list_item_t*)sendreq); \
}
@ -346,7 +346,7 @@ do { \
OBJ_RELEASE(sendreq->req_send.req_base.req_comm); \
OMPI_REQUEST_FINI(&sendreq->req_send.req_base.req_ompi); \
opal_convertor_cleanup( &(sendreq->req_send.req_base.req_convertor) ); \
OMPI_FREE_LIST_RETURN( &mca_pml_base_send_requests, \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_send_requests, \
(ompi_free_list_item_t*)sendreq); \
}

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

@ -62,7 +62,7 @@ mca_pml_crcpw_module_t mca_pml_crcpw_module = {
do { \
if( !pml_crcpw_is_finalized ) { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&pml_state_list, item); \
OMPI_FREE_LIST_WAIT_MT(&pml_state_list, item); \
pml_state = (ompi_crcp_base_pml_state_t*)item; \
} \
} while(0);
@ -70,7 +70,7 @@ do { \
#define PML_CRCP_STATE_RETURN(pml_state) \
do { \
if( !pml_crcpw_is_finalized ) { \
OMPI_FREE_LIST_RETURN(&pml_state_list, \
OMPI_FREE_LIST_RETURN_MT(&pml_state_list, \
(ompi_free_list_item_t*)pml_state); \
} \
} while(0);

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

@ -223,14 +223,14 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_pckt_pending_t);
#define MCA_PML_OB1_PCKT_PENDING_ALLOC(pckt) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.pending_pckts, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_ob1.pending_pckts, item); \
pckt = (mca_pml_ob1_pckt_pending_t*)item; \
} while (0)
#define MCA_PML_OB1_PCKT_PENDING_RETURN(pckt) \
do { \
/* return packet */ \
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.pending_pckts, \
OMPI_FREE_LIST_RETURN_MT(&mca_pml_ob1.pending_pckts, \
(ompi_free_list_item_t*)pckt); \
} while(0)

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

@ -54,14 +54,14 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_rdma_frag_t);
#define MCA_PML_OB1_RDMA_FRAG_ALLOC(frag) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.rdma_frags, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_ob1.rdma_frags, item); \
frag = (mca_pml_ob1_rdma_frag_t*)item; \
} while(0)
#define MCA_PML_OB1_RDMA_FRAG_RETURN(frag) \
do { \
/* return fragment */ \
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.rdma_frags, \
OMPI_FREE_LIST_RETURN_MT(&mca_pml_ob1.rdma_frags, \
(ompi_free_list_item_t*)frag); \
} while(0)

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

@ -56,7 +56,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_recv_frag_t);
#define MCA_PML_OB1_RECV_FRAG_ALLOC(frag) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.recv_frags, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_ob1.recv_frags, item); \
frag = (mca_pml_ob1_recv_frag_t*)item; \
} while(0)
@ -105,7 +105,7 @@ do { \
frag->num_segments = 0; \
\
/* return recv_frag */ \
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_frags, \
OMPI_FREE_LIST_RETURN_MT(&mca_pml_ob1.recv_frags, \
(ompi_free_list_item_t*)frag); \
} while(0)

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

@ -75,7 +75,7 @@ static inline bool unlock_recv_request(mca_pml_ob1_recv_request_t *recvreq)
#define MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq) \
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_GET(&mca_pml_base_recv_requests, item); \
OMPI_FREE_LIST_GET_MT(&mca_pml_base_recv_requests, item); \
recvreq = (mca_pml_ob1_recv_request_t*)item; \
} while(0)
@ -129,7 +129,7 @@ do { \
#define MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq) \
{ \
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
OMPI_FREE_LIST_RETURN( &mca_pml_base_recv_requests, \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_recv_requests, \
(ompi_free_list_item_t*)(recvreq)); \
}

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

@ -874,7 +874,7 @@ void mca_pml_ob1_send_request_copy_in_out( mca_pml_ob1_send_request_t *sendreq,
if( OPAL_UNLIKELY(0 == send_length) )
return;
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.send_ranges, i);
OMPI_FREE_LIST_WAIT_MT(&mca_pml_ob1.send_ranges, i);
sr = (mca_pml_ob1_send_range_t*)i;
@ -928,7 +928,7 @@ get_next_send_range(mca_pml_ob1_send_request_t* sendreq,
{
OPAL_THREAD_LOCK(&sendreq->req_send_range_lock);
opal_list_remove_item(&sendreq->req_send_ranges, (opal_list_item_t *)range);
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.send_ranges, &range->base);
OMPI_FREE_LIST_RETURN_MT(&mca_pml_ob1.send_ranges, &range->base);
range = get_send_range_nolock(sendreq);
OPAL_THREAD_UNLOCK(&sendreq->req_send_range_lock);

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

@ -125,7 +125,7 @@ get_request_from_send_pending(mca_pml_ob1_send_pending_t *type)
ompi_free_list_item_t* item; \
\
if( OPAL_LIKELY(NULL != proc) ) { \
OMPI_FREE_LIST_WAIT(&mca_pml_base_send_requests, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_pml_base_send_requests, item); \
sendreq = (mca_pml_ob1_send_request_t*)item; \
sendreq->req_send.req_base.req_proc = proc; \
sendreq->src_des = NULL; \
@ -216,7 +216,7 @@ do {
do { \
/* Let the base handle the reference counts */ \
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
OMPI_FREE_LIST_RETURN( &mca_pml_base_send_requests, \
OMPI_FREE_LIST_RETURN_MT( &mca_pml_base_send_requests, \
(ompi_free_list_item_t*)sendreq); \
} while(0)

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

@ -116,7 +116,7 @@ int mca_rcache_rb_tree_insert(
int rc;
mca_rcache_rb_tree_item_t* rb_tree_item;
OMPI_FREE_LIST_GET(&rb_module->rb_tree_item_list, item);
OMPI_FREE_LIST_GET_MT(&rb_module->rb_tree_item_list, item);
if(NULL == item) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -130,7 +130,7 @@ int mca_rcache_rb_tree_insert(
(void*) &rb_tree_item->key, item);
if(OMPI_SUCCESS != rc) {
OMPI_FREE_LIST_RETURN(&rb_module->rb_tree_item_list, item);
OMPI_FREE_LIST_RETURN_MT(&rb_module->rb_tree_item_list, item);
return rc;
}
return OMPI_SUCCESS;
@ -157,7 +157,7 @@ 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,
OMPI_FREE_LIST_RETURN_MT(&rb_module->rb_tree_item_list,
(ompi_free_list_item_t*) tree_item);
return rc;

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

@ -54,7 +54,7 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_vprotocol_pessimist_event_t);
#define VPESSIMIST_MATCHING_EVENT_NEW(event) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT(&mca_vprotocol_pessimist.events_pool, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_vprotocol_pessimist.events_pool, item); \
event = (mca_vprotocol_pessimist_event_t *) item; \
event->type = VPROTOCOL_PESSIMIST_EVENT_TYPE_MATCHING; \
event->u_event.e_matching.src = -1; \
@ -63,13 +63,13 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_vprotocol_pessimist_event_t);
#define VPESSIMIST_DELIVERY_EVENT_NEW(event) \
do { \
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_WAIT(&mca_vprotocol_pessimist.events_pool, item); \
OMPI_FREE_LIST_WAIT_MT(&mca_vprotocol_pessimist.events_pool, item); \
event = (mca_vprotocol_pessimist_event_t *) item; \
event->type = VPROTOCOL_PESSIMIST_EVENT_TYPE_DELIVERY; \
} while(0)
#define VPESSIMIST_EVENT_RETURN(event) \
OMPI_FREE_LIST_RETURN(&mca_vprotocol_pessimist.events_pool, \
OMPI_FREE_LIST_RETURN_MT(&mca_vprotocol_pessimist.events_pool, \
(ompi_free_list_item_t *) event)
END_C_DECLS