diff --git a/ompi/class/ompi_free_list.c b/ompi/class/ompi_free_list.c index 56c0f4f87c..8879f65705 100644 --- a/ompi/class/ompi_free_list.c +++ b/ompi/class/ompi_free_list.c @@ -26,7 +26,7 @@ static void ompi_free_list_destruct(ompi_free_list_t* fl); opal_class_t ompi_free_list_t_class = { "ompi_free_list_t", - OBJ_CLASS(ompi_list_t), + OBJ_CLASS(opal_list_t), (opal_construct_t)ompi_free_list_construct, (opal_destruct_t)ompi_free_list_destruct }; @@ -98,7 +98,7 @@ int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elements) if (NULL != flist->fl_elem_class) { OBJ_CONSTRUCT_INTERNAL(item, flist->fl_elem_class); } - ompi_list_append(&(flist->super), &(item->super)); + opal_list_append(&(flist->super), &(item->super)); ptr += flist->fl_elem_size; } flist->fl_num_allocated += num_elements; diff --git a/ompi/class/ompi_free_list.h b/ompi/class/ompi_free_list.h index fc0343e712..86184279d9 100644 --- a/ompi/class/ompi_free_list.h +++ b/ompi/class/ompi_free_list.h @@ -18,7 +18,7 @@ #define OMPI_FREE_LIST_H #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/thread.h" #include "threads/condition.h" #include "include/constants.h" @@ -33,7 +33,7 @@ struct mca_mem_pool_t; struct ompi_free_list_t { - ompi_list_t super; + opal_list_t super; size_t fl_max_to_alloc; size_t fl_num_allocated; size_t fl_num_per_alloc; @@ -49,7 +49,7 @@ typedef struct ompi_free_list_t ompi_free_list_t; struct ompi_free_list_item_t { - ompi_list_item_t super; + opal_list_item_t super; void* user_data; }; typedef struct ompi_free_list_item_t ompi_free_list_item_t; @@ -94,17 +94,17 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen { \ if(ompi_using_threads()) { \ ompi_mutex_lock(&((fl)->fl_lock)); \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ if(NULL == item) { \ ompi_free_list_grow((fl), (fl)->fl_num_per_alloc); \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ } \ ompi_mutex_unlock(&((fl)->fl_lock)); \ } else { \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ if(NULL == item) { \ ompi_free_list_grow((fl), (fl)->fl_num_per_alloc); \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ } \ } \ rc = (NULL == item) ? OMPI_ERR_TEMP_OUT_OF_RESOURCE : OMPI_SUCCESS; \ @@ -127,7 +127,7 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen #define OMPI_FREE_LIST_WAIT(fl, item, rc) \ { \ OMPI_THREAD_LOCK(&((fl)->fl_lock)); \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ while(NULL == item) { \ if((fl)->fl_max_to_alloc <= (fl)->fl_num_allocated) { \ (fl)->fl_num_waiting++; \ @@ -136,7 +136,7 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen } else { \ ompi_free_list_grow((fl), (fl)->fl_num_per_alloc); \ } \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ } \ OMPI_THREAD_UNLOCK(&((fl)->fl_lock)); \ rc = (NULL == item) ? OMPI_ERR_OUT_OF_RESOURCE : OMPI_SUCCESS; \ @@ -154,7 +154,7 @@ OMPI_DECLSPEC int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elemen #define OMPI_FREE_LIST_RETURN(fl, item) \ { \ OMPI_THREAD_LOCK(&(fl)->fl_lock); \ - ompi_list_prepend(&((fl)->super), (item)); \ + opal_list_prepend(&((fl)->super), (item)); \ if((fl)->fl_num_waiting > 0) { \ ompi_condition_signal(&((fl)->fl_condition)); \ } \ diff --git a/ompi/class/ompi_rb_tree.c b/ompi/class/ompi_rb_tree.c index 28a53179ed..57baaeabce 100644 --- a/ompi/class/ompi_rb_tree.c +++ b/ompi/class/ompi_rb_tree.c @@ -22,7 +22,7 @@ #include "class/ompi_rb_tree.h" /* declare the instance of the classes */ -OBJ_CLASS_INSTANCE(ompi_rb_tree_node_t, ompi_list_item_t, NULL, NULL); +OBJ_CLASS_INSTANCE(ompi_rb_tree_node_t, opal_list_item_t, NULL, NULL); OBJ_CLASS_INSTANCE(ompi_rb_tree_t, opal_object_t, ompi_rb_tree_construct, ompi_rb_tree_destruct); @@ -69,7 +69,7 @@ int ompi_rb_tree_init(ompi_rb_tree_t * tree, { int rc; - ompi_list_item_t * node; + opal_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, rc); tree->root_ptr = (ompi_rb_tree_node_t *) node; @@ -108,7 +108,7 @@ int ompi_rb_tree_insert(ompi_rb_tree_t *tree, void * key, void * value) { ompi_rb_tree_node_t * y; ompi_rb_tree_node_t * node; - ompi_list_item_t * item; + opal_list_item_t * item; int rc; /* get the memory for a node */ @@ -216,7 +216,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; - ompi_list_item_t * item; + opal_list_item_t * item; p = ompi_rb_tree_find_node(tree, key); if (NULL == p) { @@ -254,7 +254,7 @@ int ompi_rb_tree_delete(ompi_rb_tree_t *tree, void *key) if (todelete->color == BLACK) { btree_delete_fixup(tree, y); } - item = (ompi_list_item_t *) todelete; + item = (opal_list_item_t *) todelete; OMPI_FREE_LIST_RETURN(&(tree->free_list), item); --tree->tree_size; return(OMPI_SUCCESS); @@ -264,17 +264,17 @@ int ompi_rb_tree_delete(ompi_rb_tree_t *tree, void *key) /* Destroy the hashmap */ int ompi_rb_tree_destroy(ompi_rb_tree_t *tree) { - ompi_list_item_t * item; + opal_list_item_t * item; /* Recursive inorder traversal for delete */ inorder_destroy(tree, tree->root_ptr); /* Now free the root -- root does not get free'd in the above * inorder destroy */ - item = (ompi_list_item_t *) tree->root_ptr; + item = (opal_list_item_t *) tree->root_ptr; OMPI_FREE_LIST_RETURN(&(tree->free_list), item); /* free the tree->nill node */ - item = (ompi_list_item_t *) tree->nill; + item = (opal_list_item_t *) tree->nill; OMPI_FREE_LIST_RETURN(&(tree->free_list), item); return(OMPI_SUCCESS); } @@ -409,7 +409,7 @@ void btree_delete_fixup(ompi_rb_tree_t *tree, ompi_rb_tree_node_t * x) void inorder_destroy(ompi_rb_tree_t *tree, ompi_rb_tree_node_t * node) { - ompi_list_item_t * item; + opal_list_item_t * item; if (node == tree->nill) { return; @@ -418,14 +418,14 @@ inorder_destroy(ompi_rb_tree_t *tree, ompi_rb_tree_node_t * node) inorder_destroy(tree, node->left); if (node->left != tree->nill) { - item = (ompi_list_item_t *) node->left; + item = (opal_list_item_t *) node->left; --tree->tree_size; OMPI_FREE_LIST_RETURN(&(tree->free_list), item); } inorder_destroy(tree, node->right); if (node->right != tree->nill) { - item = (ompi_list_item_t *) node->right; + item = (opal_list_item_t *) node->right; --tree->tree_size; OMPI_FREE_LIST_RETURN(&(tree->free_list), item); } diff --git a/ompi/class/ompi_rb_tree.h b/ompi/class/ompi_rb_tree.h index e3d72764c4..e742b17783 100644 --- a/ompi/class/ompi_rb_tree.h +++ b/ompi/class/ompi_rb_tree.h @@ -45,7 +45,7 @@ typedef enum {RED, BLACK} ompi_rb_tree_nodecolor_t; */ struct ompi_rb_tree_node_t { - ompi_list_item_t super; /**< the parent class */ + opal_list_item_t super; /**< the parent class */ ompi_rb_tree_nodecolor_t color; /**< the node color */ struct ompi_rb_tree_node_t * parent;/**< the parent node, can be NULL */ struct ompi_rb_tree_node_t * left; /**< the left child - can be nill */ diff --git a/ompi/communicator/comm_cid.c b/ompi/communicator/comm_cid.c index d2c98d8c8e..01378385e8 100644 --- a/ompi/communicator/comm_cid.c +++ b/ompi/communicator/comm_cid.c @@ -24,7 +24,7 @@ #include "proc/proc.h" #include "include/constants.h" #include "class/ompi_pointer_array.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/pml/pml.h" #include "mca/coll/coll.h" #include "mca/coll/base/base.h" @@ -86,7 +86,7 @@ static int ompi_comm_unregister_cid (uint32_t contextid); static uint32_t ompi_comm_lowest_cid ( void ); struct ompi_comm_reg_t{ - ompi_list_item_t super; + opal_list_item_t super; uint32_t cid; }; typedef struct ompi_comm_reg_t ompi_comm_reg_t; @@ -96,14 +96,14 @@ static void ompi_comm_reg_constructor(ompi_comm_reg_t *regcom); static void ompi_comm_reg_destructor(ompi_comm_reg_t *regcom); OBJ_CLASS_INSTANCE (ompi_comm_reg_t, - ompi_list_item_t, + opal_list_item_t, ompi_comm_reg_constructor, ompi_comm_reg_destructor ); #if OMPI_HAVE_THREAD_SUPPORT static ompi_mutex_t ompi_cid_lock; #endif /* OMPI_HAVE_THREAD_SUPPORT */ -static ompi_list_t ompi_registered_comms; +static opal_list_t ompi_registered_comms; int ompi_comm_nextcid ( ompi_communicator_t* newcomm, @@ -234,7 +234,7 @@ static void ompi_comm_reg_destructor (ompi_comm_reg_t *regcom) void ompi_comm_reg_init (void) { - OBJ_CONSTRUCT(&ompi_registered_comms, ompi_list_t); + OBJ_CONSTRUCT(&ompi_registered_comms, opal_list_t); } void ompi_comm_reg_finalize (void) @@ -245,25 +245,25 @@ void ompi_comm_reg_finalize (void) static int ompi_comm_register_cid (uint32_t cid ) { - ompi_list_item_t *item=NULL; + opal_list_item_t *item=NULL; ompi_comm_reg_t *regcom=NULL; ompi_comm_reg_t *newentry = OBJ_NEW(ompi_comm_reg_t); newentry->cid = cid; - if ( !(ompi_list_is_empty (&ompi_registered_comms)) ) { - for (item = ompi_list_get_first(&ompi_registered_comms); - item != ompi_list_get_end(&ompi_registered_comms); - item = ompi_list_get_next(item)) { + if ( !(opal_list_is_empty (&ompi_registered_comms)) ) { + for (item = opal_list_get_first(&ompi_registered_comms); + item != opal_list_get_end(&ompi_registered_comms); + item = opal_list_get_next(item)) { regcom = (ompi_comm_reg_t *)item; if ( regcom->cid > cid ) { break; } } - ompi_list_insert_pos (&ompi_registered_comms, (ompi_list_item_t *)regcom, - (ompi_list_item_t *)newentry); + opal_list_insert_pos (&ompi_registered_comms, (opal_list_item_t *)regcom, + (opal_list_item_t *)newentry); } else { - ompi_list_append (&ompi_registered_comms, (ompi_list_item_t *)newentry); + opal_list_append (&ompi_registered_comms, (opal_list_item_t *)newentry); } return OMPI_SUCCESS; @@ -272,7 +272,7 @@ static int ompi_comm_register_cid (uint32_t cid ) static int ompi_comm_unregister_cid (uint32_t cid) { ompi_comm_reg_t *regcom=NULL; - ompi_list_item_t *item=ompi_list_remove_first(&ompi_registered_comms); + opal_list_item_t *item=opal_list_remove_first(&ompi_registered_comms); regcom = (ompi_comm_reg_t *) item; OBJ_RELEASE(regcom); @@ -283,7 +283,7 @@ static int ompi_comm_unregister_cid (uint32_t cid) static uint32_t ompi_comm_lowest_cid (void) { ompi_comm_reg_t *regcom=NULL; - ompi_list_item_t *item=ompi_list_get_first (&ompi_registered_comms); + opal_list_item_t *item=opal_list_get_first (&ompi_registered_comms); regcom = (ompi_comm_reg_t *)item; return regcom->cid; diff --git a/ompi/file/file.c b/ompi/file/file.c index 782daeb3e7..230e6f88e2 100644 --- a/ompi/file/file.c +++ b/ompi/file/file.c @@ -17,7 +17,7 @@ #include "ompi_config.h" #include "file/file.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "ompi/runtime/params.h" #include "mca/io/base/base.h" #include "info/info.h" @@ -243,7 +243,7 @@ static void file_constructor(ompi_file_t *file) file->f_io_selected_data = NULL; /* Construct the io request freelist */ - OBJ_CONSTRUCT(&file->f_io_requests, ompi_list_t); + OBJ_CONSTRUCT(&file->f_io_requests, opal_list_t); /* If the user doesn't want us to ever free it, then add an extra RETAIN here */ diff --git a/ompi/file/file.h b/ompi/file/file.h index 6a59555ec8..c068c7563e 100644 --- a/ompi/file/file.h +++ b/ompi/file/file.h @@ -18,7 +18,7 @@ #define OMPI_FILE_H #include "mpi.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "errhandler/errhandler.h" #include "threads/mutex.h" #include "mca/io/io.h" @@ -84,7 +84,7 @@ struct ompi_file_t { struct mca_io_base_file_t *f_io_selected_data; /** Per-module io request freelist */ - ompi_list_t f_io_requests; + opal_list_t f_io_requests; /** Lock for the per-module io request freelist */ ompi_mutex_t f_io_requests_lock; diff --git a/ompi/info/info.c b/ompi/info/info.c index 9ff39c02e1..b904e7b4c6 100644 --- a/ompi/info/info.c +++ b/ompi/info/info.c @@ -42,7 +42,7 @@ static ompi_info_entry_t *info_find_key (ompi_info_t *info, char *key); * ompi_info_t classes */ OBJ_CLASS_INSTANCE(ompi_info_t, - ompi_list_t, + opal_list_t, info_constructor, info_destructor); @@ -50,7 +50,7 @@ OBJ_CLASS_INSTANCE(ompi_info_t, * ompi_info_entry_t classes */ OBJ_CLASS_INSTANCE(ompi_info_entry_t, - ompi_list_item_t, + opal_list_item_t, info_entry_constructor, info_entry_destructor); @@ -87,13 +87,13 @@ int ompi_info_init(void) int ompi_info_dup (ompi_info_t *info, ompi_info_t **newinfo) { int err; - ompi_list_item_t *item; + opal_list_item_t *item; ompi_info_entry_t *iterator; OMPI_THREAD_LOCK(info->i_lock); - for (item = ompi_list_get_first(&(info->super)); - item != ompi_list_get_end(&(info->super)); - item = ompi_list_get_next(iterator)) { + for (item = opal_list_get_first(&(info->super)); + item != opal_list_get_end(&(info->super)); + item = opal_list_get_next(iterator)) { iterator = (ompi_info_entry_t *) item; err = ompi_info_set(*newinfo, iterator->ie_key, iterator->ie_value); if (MPI_SUCCESS != err) { @@ -136,7 +136,7 @@ int ompi_info_set (ompi_info_t *info, char *key, char *value) } strcpy (new_info->ie_key, key); new_info->ie_value = new_value; - ompi_list_append (&(info->super), (ompi_list_item_t *) new_info); + opal_list_append (&(info->super), (opal_list_item_t *) new_info); } OMPI_THREAD_UNLOCK(info->i_lock); return MPI_SUCCESS; @@ -211,8 +211,8 @@ int ompi_info_delete (ompi_info_t *info, char *key) * and free the memory allocated to it */ found = (ompi_info_entry_t *) - ompi_list_remove_item (&(info->super), - (ompi_list_item_t *)search); + opal_list_remove_item (&(info->super), + (opal_list_item_t *)search); OBJ_RELEASE(search); } OMPI_THREAD_UNLOCK(info->i_lock); @@ -256,18 +256,18 @@ int ompi_info_get_nthkey (ompi_info_t *info, int n, char *key) * Iterate over and over till we get to the nth key */ OMPI_THREAD_LOCK(info->i_lock); - for (iterator = (ompi_info_entry_t *)ompi_list_get_first(&(info->super)); + for (iterator = (ompi_info_entry_t *)opal_list_get_first(&(info->super)); n > 0; --n) { - iterator = (ompi_info_entry_t *)ompi_list_get_next(iterator); - if (ompi_list_get_end(&(info->super)) == - (ompi_list_item_t *) iterator) { + iterator = (ompi_info_entry_t *)opal_list_get_next(iterator); + if (opal_list_get_end(&(info->super)) == + (opal_list_item_t *) iterator) { OMPI_THREAD_UNLOCK(info->i_lock); return MPI_ERR_ARG; } } /* - * iterator is of the type ompi_list_item_t. We have to + * iterator is of the type opal_list_item_t. We have to * cast it to ompi_info_entry_t before we can use it to * access the value */ @@ -284,7 +284,7 @@ int ompi_info_finalize(void) { size_t i, max; ompi_info_t *info; - ompi_list_item_t *item; + opal_list_item_t *item; ompi_info_entry_t *entry; bool found = false; @@ -323,9 +323,9 @@ int ompi_info_finalize(void) if (!info->i_freed && ompi_debug_show_handle_leaks) { if (ompi_debug_show_handle_leaks) { ompi_output(0, "WARNING: MPI_Info still allocated at MPI_FINALIZE"); - for (item = ompi_list_get_first(&(info->super)); - ompi_list_get_end(&(info->super)) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&(info->super)); + opal_list_get_end(&(info->super)) != item; + item = opal_list_get_next(item)) { entry = (ompi_info_entry_t *) item; ompi_output(0, "WARNING: key=\"%s\", value=\"%s\"", entry->ie_key, @@ -380,14 +380,14 @@ static void info_constructor(ompi_info_t *info) */ static void info_destructor(ompi_info_t *info) { - ompi_list_item_t *item; + opal_list_item_t *item; ompi_info_entry_t *iterator; /* Remove every key in the list */ - for (item = ompi_list_remove_first(&(info->super)); + for (item = opal_list_remove_first(&(info->super)); NULL != item; - item = ompi_list_remove_first(&(info->super))) { + item = opal_list_remove_first(&(info->super))) { iterator = (ompi_info_entry_t *) item; OBJ_RELEASE(iterator); } @@ -442,9 +442,9 @@ static ompi_info_entry_t *info_find_key (ompi_info_t *info, char *key) * return immediately. Else, the loop will fall of the edge * and NULL is returned */ - for (iterator = (ompi_info_entry_t *)ompi_list_get_first(&(info->super)); - ompi_list_get_end(&(info->super)) != (ompi_list_item_t*) iterator; - iterator = (ompi_info_entry_t *)ompi_list_get_next(iterator)) { + for (iterator = (ompi_info_entry_t *)opal_list_get_first(&(info->super)); + opal_list_get_end(&(info->super)) != (opal_list_item_t*) iterator; + iterator = (ompi_info_entry_t *)opal_list_get_next(iterator)) { if (0 == strcmp(key, iterator->ie_key)) { return iterator; } diff --git a/ompi/info/info.h b/ompi/info/info.h index 9c5aede345..2ebcb00e79 100644 --- a/ompi/info/info.h +++ b/ompi/info/info.h @@ -21,7 +21,7 @@ #include "mpi.h" #include "util/strncpy.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_pointer_array.h" #include "threads/mutex.h" @@ -31,7 +31,7 @@ * ompi_info_t structure. MPI_Info is a pointer to this structure */ struct ompi_info_t { - ompi_list_t super; + opal_list_t super; /**< generic list pointer which is the container for (key,value) pairs */ int i_f_to_c_index; @@ -55,7 +55,7 @@ typedef struct ompi_info_t ompi_info_t; * type. It contains (key,value) pairs */ struct ompi_info_entry_t { - ompi_list_item_t super; /**< required for ompi_list_t type */ + opal_list_item_t super; /**< required for opal_list_t type */ char *ie_value; /**< value part of the (key, value) pair. * Maximum length is MPI_MAX_INFO_VAL */ char ie_key[MPI_MAX_INFO_KEY + 1]; /**< "key" part of the (key, value) @@ -242,7 +242,7 @@ static inline bool ompi_info_is_freed(ompi_info_t *info) static inline int ompi_info_get_nkeys(ompi_info_t *info, int *nkeys) { - *nkeys = (int) ompi_list_get_size(&(info->super)); + *nkeys = (int) opal_list_get_size(&(info->super)); return MPI_SUCCESS; } diff --git a/ompi/mca/allocator/base/allocator_base_open.c b/ompi/mca/allocator/base/allocator_base_open.c index 0cb772f3d3..71244d6fd4 100644 --- a/ompi/mca/allocator/base/allocator_base_open.c +++ b/ompi/mca/allocator/base/allocator_base_open.c @@ -35,7 +35,7 @@ /* * Global variables */ -ompi_list_t mca_allocator_base_components; +opal_list_t mca_allocator_base_components; int mca_allocator_base_output = -1; /** @@ -63,10 +63,10 @@ int mca_allocator_base_open(void) mca_allocator_base_component_t* mca_allocator_component_lookup(const char* name) { /* Traverse the list of available components; call their init functions. */ - ompi_list_item_t* item; - for (item = ompi_list_get_first(&mca_allocator_base_components); - item != ompi_list_get_end(&mca_allocator_base_components); - item = ompi_list_get_next(item)) { + opal_list_item_t* item; + for (item = opal_list_get_first(&mca_allocator_base_components); + item != opal_list_get_end(&mca_allocator_base_components); + item = opal_list_get_next(item)) { mca_base_component_list_item_t *cli = (mca_base_component_list_item_t *) item; mca_allocator_base_component_t* component = (mca_allocator_base_component_t *) cli->cli_component; if(strcmp(component->allocator_version.mca_component_name, diff --git a/ompi/mca/allocator/base/base.h b/ompi/mca/allocator/base/base.h index 24693fe038..8a6c892f08 100644 --- a/ompi/mca/allocator/base/base.h +++ b/ompi/mca/allocator/base/base.h @@ -21,7 +21,7 @@ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/allocator/allocator.h" @@ -32,8 +32,8 @@ extern "C" { * Structure which describes a selected module. */ struct mca_allocator_base_selected_module_t { - ompi_list_item_t super; - /**< Makes this an object of type ompi_list_item */ + opal_list_item_t super; + /**< Makes this an object of type opal_list_item */ mca_allocator_base_component_t *allocator_component; /**< Info about the module */ mca_allocator_base_module_t *allocator_module; @@ -65,7 +65,7 @@ OMPI_DECLSPEC mca_allocator_base_component_t* mca_allocator_component_lookup(con /** * The list of all the selected components. */ -OMPI_DECLSPEC extern ompi_list_t mca_allocator_base_components; +OMPI_DECLSPEC extern opal_list_t mca_allocator_base_components; #if defined(c_plusplus) || defined(__cplusplus) } #endif diff --git a/ompi/mca/allocator/basic/allocator_basic.c b/ompi/mca/allocator/basic/allocator_basic.c index 8939f10caa..74445d9cb1 100644 --- a/ompi/mca/allocator/basic/allocator_basic.c +++ b/ompi/mca/allocator/basic/allocator_basic.c @@ -52,7 +52,7 @@ mca_allocator_base_component_t mca_allocator_basic_component = { OBJ_CLASS_INSTANCE( mca_allocator_basic_segment_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL); @@ -93,7 +93,7 @@ mca_allocator_base_module_t* mca_allocator_basic_component_init( module->super.alc_mpool = mpool; module->seg_alloc = segment_alloc; module->seg_free = segment_free; - OBJ_CONSTRUCT(&module->seg_list, ompi_list_t); + OBJ_CONSTRUCT(&module->seg_list, opal_list_t); OBJ_CONSTRUCT(&module->seg_lock, ompi_mutex_t); OBJ_CONSTRUCT(&module->seg_descriptors, ompi_free_list_t); @@ -116,12 +116,12 @@ static void mca_allocator_basic_combine_prev( mca_allocator_basic_module_t* module, mca_allocator_basic_segment_t* seg) { - ompi_list_item_t* item = ompi_list_get_prev(seg); - if(item != ompi_list_get_begin(&module->seg_list)) { + opal_list_item_t* item = opal_list_get_prev(seg); + if(item != opal_list_get_begin(&module->seg_list)) { mca_allocator_basic_segment_t *prev = (mca_allocator_basic_segment_t*)item; if(prev->seg_addr + prev->seg_size == seg->seg_addr) { prev->seg_size += seg->seg_size; - ompi_list_remove_item(&module->seg_list, &seg->seg_item); + opal_list_remove_item(&module->seg_list, &seg->seg_item); OMPI_FREE_LIST_RETURN(&module->seg_descriptors, &seg->seg_item); return; } @@ -132,13 +132,13 @@ static void mca_allocator_basic_combine_next( mca_allocator_basic_module_t* module, mca_allocator_basic_segment_t* seg) { - ompi_list_item_t *item = ompi_list_get_next(seg); - if(item != ompi_list_get_end(&module->seg_list)) { + opal_list_item_t *item = opal_list_get_next(seg); + if(item != opal_list_get_end(&module->seg_list)) { mca_allocator_basic_segment_t *next = (mca_allocator_basic_segment_t*)item; if(seg->seg_addr + seg->seg_size == next->seg_addr) { next->seg_addr = seg->seg_addr; next->seg_size += seg->seg_size; - ompi_list_remove_item(&module->seg_list, &seg->seg_item); + opal_list_remove_item(&module->seg_list, &seg->seg_item); OMPI_FREE_LIST_RETURN(&module->seg_descriptors, &seg->seg_item); return; } @@ -165,16 +165,16 @@ void *mca_allocator_basic_alloc( { mca_allocator_basic_module_t* module = (mca_allocator_basic_module_t*)base; mca_allocator_basic_segment_t* seg; - ompi_list_item_t* item; + opal_list_item_t* item; unsigned char* addr; size_t allocated_size; OMPI_THREAD_LOCK(&module->seg_lock); /* search the list for a segment of the required size */ size += sizeof(size_t); - for(item = ompi_list_get_first(&module->seg_list); - item != ompi_list_get_end(&module->seg_list); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&module->seg_list); + item != opal_list_get_end(&module->seg_list); + item = opal_list_get_next(item)) { seg = (mca_allocator_basic_segment_t*)item; /* split the segment */ @@ -187,7 +187,7 @@ void *mca_allocator_basic_alloc( return addr+sizeof(size_t); } else if (seg->seg_size == size) { addr = seg->seg_addr; - ompi_list_remove_item(&module->seg_list, item); + opal_list_remove_item(&module->seg_list, item); OMPI_FREE_LIST_RETURN(&module->seg_descriptors, item); OMPI_THREAD_UNLOCK(&module->seg_lock); *(size_t*)addr = size; @@ -213,7 +213,7 @@ void *mca_allocator_basic_alloc( seg = (mca_allocator_basic_segment_t*)item; seg->seg_addr = addr + size; seg->seg_size = allocated_size - size; - ompi_list_append(&module->seg_list, item); + opal_list_append(&module->seg_list, item); } *(size_t*)addr = size; @@ -272,16 +272,16 @@ void mca_allocator_basic_free( { mca_allocator_basic_module_t* module = (mca_allocator_basic_module_t*)base; mca_allocator_basic_segment_t* seg; - ompi_list_item_t *item; + opal_list_item_t *item; unsigned char* addr = (unsigned char*)ptr - sizeof(size_t); size_t size = *(size_t*)addr; int rc; OMPI_THREAD_LOCK(&module->seg_lock); /* maintain the free list in sorted order by address */ - for(item = ompi_list_get_first(&module->seg_list); - item != ompi_list_get_end(&module->seg_list); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&module->seg_list); + item != opal_list_get_end(&module->seg_list); + item = opal_list_get_next(item)) { seg = (mca_allocator_basic_segment_t*)item; if (seg->seg_addr < addr) { @@ -316,7 +316,7 @@ void mca_allocator_basic_free( new_seg = (mca_allocator_basic_segment_t*)item; new_seg->seg_addr = addr; new_seg->seg_size = size; - ompi_list_insert_pos(&module->seg_list, &seg->seg_item, item); + opal_list_insert_pos(&module->seg_list, &seg->seg_item, item); OMPI_THREAD_UNLOCK(&module->seg_lock); return; } @@ -332,7 +332,7 @@ void mca_allocator_basic_free( seg = (mca_allocator_basic_segment_t*)item; seg->seg_addr = addr; seg->seg_size = size; - ompi_list_append(&module->seg_list, item); + opal_list_append(&module->seg_list, item); OMPI_THREAD_UNLOCK(&module->seg_lock); } diff --git a/ompi/mca/allocator/basic/allocator_basic.h b/ompi/mca/allocator/basic/allocator_basic.h index 53c3878be0..1227f41af9 100644 --- a/ompi/mca/allocator/basic/allocator_basic.h +++ b/ompi/mca/allocator/basic/allocator_basic.h @@ -34,7 +34,7 @@ */ struct mca_allocator_basic_segment_t { - ompi_list_item_t seg_item; + opal_list_item_t seg_item; unsigned char* seg_addr; size_t seg_size; }; @@ -49,7 +49,7 @@ struct mca_allocator_basic_module_t { mca_allocator_base_module_t super; mca_allocator_base_component_segment_alloc_fn_t seg_alloc; mca_allocator_base_component_segment_free_fn_t seg_free; - ompi_list_t seg_list; + opal_list_t seg_list; ompi_mutex_t seg_lock; ompi_free_list_t seg_descriptors; }; diff --git a/ompi/mca/btl/base/base.h b/ompi/mca/btl/base/base.h index 6e0ceee01b..decf97b764 100644 --- a/ompi/mca/btl/base/base.h +++ b/ompi/mca/btl/base/base.h @@ -20,7 +20,7 @@ #define MCA_BTL_BASE_H #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/btl/btl.h" @@ -29,7 +29,7 @@ extern "C" { #endif struct mca_btl_base_selected_module_t { - ompi_list_item_t super; + opal_list_item_t super; mca_btl_base_component_t *btl_component; mca_btl_base_module_t *btl_module; }; @@ -63,8 +63,8 @@ OMPI_DECLSPEC int mca_btl_base_close(void); OMPI_DECLSPEC extern int mca_btl_base_output; OMPI_DECLSPEC extern char* mca_btl_base_include; OMPI_DECLSPEC extern char* mca_btl_base_exclude; -OMPI_DECLSPEC extern ompi_list_t mca_btl_base_components_opened; -OMPI_DECLSPEC extern ompi_list_t mca_btl_base_modules_initialized; +OMPI_DECLSPEC extern opal_list_t mca_btl_base_components_opened; +OMPI_DECLSPEC extern opal_list_t mca_btl_base_modules_initialized; #if defined(c_plusplus) || defined(__cplusplus) } diff --git a/ompi/mca/btl/base/btl_base_close.c b/ompi/mca/btl/base/btl_base_close.c index 2be0c2eac2..fa18b12936 100644 --- a/ompi/mca/btl/base/btl_base_close.c +++ b/ompi/mca/btl/base/btl_base_close.c @@ -29,7 +29,7 @@ int mca_btl_base_close(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_btl_base_selected_module_t *sm; /* disable event processing while cleaning up btls */ @@ -37,9 +37,9 @@ int mca_btl_base_close(void) /* Finalize all the btl components and free their list items */ - for (item = ompi_list_remove_first(&mca_btl_base_modules_initialized); + for (item = opal_list_remove_first(&mca_btl_base_modules_initialized); NULL != item; - item = ompi_list_remove_first(&mca_btl_base_modules_initialized)) { + item = opal_list_remove_first(&mca_btl_base_modules_initialized)) { sm = (mca_btl_base_selected_module_t *) item; /* Blatebtly ignore the return code (what would we do to recover, @@ -53,7 +53,7 @@ int mca_btl_base_close(void) /* Close all remaining opened components (may be one if this is a OMPI RTE program, or [possibly] multiple if this is ompi_info) */ - if (0 != ompi_list_get_size(&mca_btl_base_components_opened)) { + if (0 != opal_list_get_size(&mca_btl_base_components_opened)) { mca_base_components_close(mca_btl_base_output, &mca_btl_base_components_opened, NULL); } diff --git a/ompi/mca/btl/base/btl_base_open.c b/ompi/mca/btl/base/btl_base_open.c index 1d7fb6e130..5c69919271 100644 --- a/ompi/mca/btl/base/btl_base_open.c +++ b/ompi/mca/btl/base/btl_base_open.c @@ -46,7 +46,7 @@ static void mca_btl_base_descriptor_destructor(mca_btl_base_descriptor_t* des) OBJ_CLASS_INSTANCE( mca_btl_base_descriptor_t, - ompi_list_item_t, + opal_list_item_t, mca_btl_base_descriptor_constructor, mca_btl_base_descriptor_destructor); @@ -66,8 +66,8 @@ OBJ_CLASS_INSTANCE( int mca_btl_base_output = -1; char* mca_btl_base_include = NULL; char* mca_btl_base_exclude = NULL; -ompi_list_t mca_btl_base_components_opened; -ompi_list_t mca_btl_base_modules_initialized; +opal_list_t mca_btl_base_components_opened; +opal_list_t mca_btl_base_modules_initialized; /** @@ -88,7 +88,7 @@ int mca_btl_base_open(void) iterate over it (even if it's empty, as in the case of ompi_info) */ - OBJ_CONSTRUCT(&mca_btl_base_modules_initialized, ompi_list_t); + OBJ_CONSTRUCT(&mca_btl_base_modules_initialized, opal_list_t); /* register parameters */ mca_base_param_lookup_string( diff --git a/ompi/mca/btl/base/btl_base_select.c b/ompi/mca/btl/base/btl_base_select.c index d6a8e4f99f..ff52801dd4 100644 --- a/ompi/mca/btl/base/btl_base_select.c +++ b/ompi/mca/btl/base/btl_base_select.c @@ -26,7 +26,7 @@ OBJ_CLASS_INSTANCE( mca_btl_base_selected_module_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL); @@ -36,13 +36,13 @@ OBJ_CLASS_INSTANCE( * Call the init function on all available components to find out if * they want to run. Select all components that don't fail. Failing * components will be closed and unloaded. The selected modules will - * be returned to the caller in a ompi_list_t. + * be returned to the caller in a opal_list_t. */ int mca_btl_base_select(bool enable_progress_threads, bool enable_mpi_threads) { int i, num_btls; - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; mca_btl_base_component_t *component; mca_btl_base_module_t **modules; @@ -54,9 +54,9 @@ int mca_btl_base_select(bool enable_progress_threads, /* Traverse the list of opened modules; call their init functions. */ - item = ompi_list_get_first(&mca_btl_base_components_opened); - while(item != ompi_list_get_end(&mca_btl_base_components_opened)) { - ompi_list_item_t *next = ompi_list_get_next(item); + item = opal_list_get_first(&mca_btl_base_components_opened); + while(item != opal_list_get_end(&mca_btl_base_components_opened)) { + opal_list_item_t *next = opal_list_get_next(item); cli = (mca_base_component_list_item_t *) item; component = (mca_btl_base_component_t *) cli->cli_component; @@ -116,7 +116,7 @@ int mca_btl_base_select(bool enable_progress_threads, component->btl_version.mca_component_name); mca_base_component_repository_release((mca_base_component_t *) component); - ompi_list_remove_item(&mca_btl_base_components_opened, item); + opal_list_remove_item(&mca_btl_base_components_opened, item); } /* Otherwise, it initialized properly. Save it. */ @@ -132,8 +132,8 @@ int mca_btl_base_select(bool enable_progress_threads, } sm->btl_component = component; sm->btl_module = modules[i]; - ompi_list_append(&mca_btl_base_modules_initialized, - (ompi_list_item_t*) sm); + opal_list_append(&mca_btl_base_modules_initialized, + (opal_list_item_t*) sm); } free(modules); } @@ -143,7 +143,7 @@ int mca_btl_base_select(bool enable_progress_threads, /* Finished querying all components. Check for the bozo case. */ - if (0 == ompi_list_get_size(&mca_btl_base_modules_initialized)) { + if (0 == opal_list_get_size(&mca_btl_base_modules_initialized)) { /* JMS Replace with show_help */ orte_abort(1, "No btl components available. This shouldn't happen."); } diff --git a/ompi/mca/btl/gm/btl_gm.c b/ompi/mca/btl/gm/btl_gm.c index e069f723a8..c7c7c3c700 100644 --- a/ompi/mca/btl/gm/btl_gm.c +++ b/ompi/mca/btl/gm/btl_gm.c @@ -569,9 +569,9 @@ static void mca_btl_gm_send_callback( struct gm_port* port, void* context, gm_st frag->base.des_cbfunc(&btl->super, frag->endpoint, &frag->base, OMPI_SUCCESS); /* check for pending fragments */ - if(ompi_list_get_size(&btl->gm_pending)) { + if(opal_list_get_size(&btl->gm_pending)) { OMPI_THREAD_LOCK(&btl->gm_lock); - frag = (mca_btl_gm_frag_t*)ompi_list_remove_first(&btl->gm_pending); + frag = (mca_btl_gm_frag_t*)opal_list_remove_first(&btl->gm_pending); OMPI_THREAD_UNLOCK(&btl->gm_lock); mca_btl_gm_send(&btl->super, frag->endpoint, &frag->base, frag->hdr->tag); } @@ -634,7 +634,7 @@ int mca_btl_gm_send( /* queue the descriptor if there are no send tokens */ if(OMPI_THREAD_ADD32(&gm_btl->gm_num_send_tokens, -1) < 0) { OMPI_THREAD_LOCK(&gm_btl->gm_lock); - ompi_list_append(&gm_btl->gm_pending, (ompi_list_item_t*)frag); + opal_list_append(&gm_btl->gm_pending, (opal_list_item_t*)frag); OMPI_THREAD_UNLOCK(&gm_btl->gm_lock); OMPI_THREAD_ADD32(&gm_btl->gm_num_send_tokens, 1); return OMPI_SUCCESS; @@ -737,22 +737,22 @@ int mca_btl_gm_finalize(struct mca_btl_base_module_t* btl) mca_btl_gm_module_t* gm_btl = (mca_btl_gm_module_t*) btl; if(gm_btl->gm_frag_eager.fl_num_allocated != - gm_btl->gm_frag_eager.super.ompi_list_length){ + gm_btl->gm_frag_eager.super.opal_list_length){ ompi_output(0, "btl gm_frag_eager: %d allocated %d returned \n", gm_btl->gm_frag_eager.fl_num_allocated, - gm_btl->gm_frag_eager.super.ompi_list_length); + gm_btl->gm_frag_eager.super.opal_list_length); } if(gm_btl->gm_frag_max.fl_num_allocated != - gm_btl->gm_frag_max.super.ompi_list_length) { + gm_btl->gm_frag_max.super.opal_list_length) { ompi_output(0, "btl gm_frag_max: %d allocated %d returned \n", gm_btl->gm_frag_max.fl_num_allocated, - gm_btl->gm_frag_max.super.ompi_list_length); + gm_btl->gm_frag_max.super.opal_list_length); } if(gm_btl->gm_frag_user.fl_num_allocated != - gm_btl->gm_frag_user.super.ompi_list_length){ + gm_btl->gm_frag_user.super.opal_list_length){ ompi_output(0, "btl gm_frag_user: %d allocated %d returned \n", gm_btl->gm_frag_user.fl_num_allocated, - gm_btl->gm_frag_user.super.ompi_list_length); + gm_btl->gm_frag_user.super.opal_list_length); } OBJ_DESTRUCT(&gm_btl->gm_lock); diff --git a/ompi/mca/btl/gm/btl_gm.h b/ompi/mca/btl/gm/btl_gm.h index 8d74179ca7..03b5574e01 100644 --- a/ompi/mca/btl/gm/btl_gm.h +++ b/ompi/mca/btl/gm/btl_gm.h @@ -60,7 +60,7 @@ struct mca_btl_gm_component_t { int gm_free_list_max; /**< maximum size of free lists */ int gm_free_list_inc; /**< number of elements to alloc when growing free lists */ - ompi_list_t gm_procs; /**< list of gm proc structures */ + opal_list_t gm_procs; /**< list of gm proc structures */ ompi_mutex_t gm_lock; /**< lock for accessing module state */ char* gm_mpool_name; /**< name of memory pool */ @@ -96,7 +96,7 @@ struct mca_btl_gm_module_t { unsigned int gm_max_recv_tokens; /* lock for accessing module state */ - ompi_list_t gm_pending; /**< list of pending send descriptors */ + opal_list_t gm_pending; /**< list of pending send descriptors */ ompi_mutex_t gm_lock; struct mca_mpool_base_module_t* gm_mpool; }; diff --git a/ompi/mca/btl/gm/btl_gm_component.c b/ompi/mca/btl/gm/btl_gm_component.c index c86b285b8b..969d209ed4 100644 --- a/ompi/mca/btl/gm/btl_gm_component.c +++ b/ompi/mca/btl/gm/btl_gm_component.c @@ -107,7 +107,7 @@ int mca_btl_gm_component_open(void) mca_btl_gm_component.gm_port_name=NULL; /* initialize objects */ - OBJ_CONSTRUCT(&mca_btl_gm_component.gm_procs, ompi_list_t); + OBJ_CONSTRUCT(&mca_btl_gm_component.gm_procs, opal_list_t); OBJ_CONSTRUCT(&mca_btl_gm_component.gm_lock, ompi_mutex_t); /* register GM component parameters */ @@ -178,7 +178,7 @@ mca_btl_gm_module_init (mca_btl_gm_module_t * btl) OBJ_CONSTRUCT(&btl->gm_frag_eager, ompi_free_list_t); OBJ_CONSTRUCT(&btl->gm_frag_max, ompi_free_list_t); OBJ_CONSTRUCT(&btl->gm_frag_user, ompi_free_list_t); - OBJ_CONSTRUCT(&btl->gm_pending, ompi_list_t); + OBJ_CONSTRUCT(&btl->gm_pending, opal_list_t); OBJ_CONSTRUCT(&btl->gm_lock, ompi_mutex_t); /* query nic tokens */ diff --git a/ompi/mca/btl/gm/btl_gm_endpoint.c b/ompi/mca/btl/gm/btl_gm_endpoint.c index fd428dd2e3..913c225edf 100644 --- a/ompi/mca/btl/gm/btl_gm_endpoint.c +++ b/ompi/mca/btl/gm/btl_gm_endpoint.c @@ -53,7 +53,7 @@ static void mca_btl_gm_endpoint_destruct(mca_btl_base_endpoint_t* endpoint) OBJ_CLASS_INSTANCE( mca_btl_gm_endpoint_t, - ompi_list_item_t, + opal_list_item_t, mca_btl_gm_endpoint_construct, mca_btl_gm_endpoint_destruct); diff --git a/ompi/mca/btl/gm/btl_gm_endpoint.h b/ompi/mca/btl/gm/btl_gm_endpoint.h index 70d81f0eb3..5436a95688 100644 --- a/ompi/mca/btl/gm/btl_gm_endpoint.h +++ b/ompi/mca/btl/gm/btl_gm_endpoint.h @@ -17,7 +17,7 @@ #ifndef MCA_BTL_GM_ENDPOINT_H #define MCA_BTL_GM_ENDPOINT_H -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "event/event.h" #include "mca/pml/pml.h" #include "mca/btl/btl.h" @@ -51,7 +51,7 @@ typedef struct mca_btl_gm_addr_t mca_btl_gm_addr_t; */ struct mca_btl_base_endpoint_t { - ompi_list_item_t super; + opal_list_item_t super; struct mca_btl_gm_module_t* endpoint_btl; /**< BTL instance that created this connection */ diff --git a/ompi/mca/btl/gm/btl_gm_frag.h b/ompi/mca/btl/gm/btl_gm_frag.h index 9eb41a84ac..3568d0162b 100644 --- a/ompi/mca/btl/gm/btl_gm_frag.h +++ b/ompi/mca/btl/gm/btl_gm_frag.h @@ -66,7 +66,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t); #define MCA_BTL_GM_FRAG_ALLOC_EAGER(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } @@ -74,13 +74,13 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t); #define MCA_BTL_GM_FRAG_RETURN_EAGER(btl, frag) \ { \ OMPI_FREE_LIST_RETURN(&((mca_btl_gm_module_t*)btl)->gm_frag_eager, \ - (ompi_list_item_t*)(frag)); \ + (opal_list_item_t*)(frag)); \ } #define MCA_BTL_GM_FRAG_ALLOC_MAX(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } @@ -88,13 +88,13 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t); #define MCA_BTL_GM_FRAG_RETURN_MAX(btl, frag) \ { \ OMPI_FREE_LIST_RETURN(&((mca_btl_gm_module_t*)btl)->gm_frag_max, \ - (ompi_list_item_t*)(frag)); \ + (opal_list_item_t*)(frag)); \ } #define MCA_BTL_GM_FRAG_ALLOC_USER(btl, frag, rc) \ { \ - ompi_list_item_t *item; \ + opal_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; \ } @@ -102,7 +102,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_frag_user_t); #define MCA_BTL_GM_FRAG_RETURN_USER(btl, frag) \ { \ OMPI_FREE_LIST_RETURN(&((mca_btl_gm_module_t*)btl)->gm_frag_user, \ - (ompi_list_item_t*)(frag)); \ + (opal_list_item_t*)(frag)); \ } diff --git a/ompi/mca/btl/gm/btl_gm_proc.c b/ompi/mca/btl/gm/btl_gm_proc.c index a5014c00cd..b8e1c0e8cf 100644 --- a/ompi/mca/btl/gm/btl_gm_proc.c +++ b/ompi/mca/btl/gm/btl_gm_proc.c @@ -26,7 +26,7 @@ static void mca_btl_gm_proc_construct(mca_btl_gm_proc_t* proc); static void mca_btl_gm_proc_destruct(mca_btl_gm_proc_t* proc); OBJ_CLASS_INSTANCE(mca_btl_gm_proc_t, - ompi_list_item_t, mca_btl_gm_proc_construct, + opal_list_item_t, mca_btl_gm_proc_construct, mca_btl_gm_proc_destruct); void mca_btl_gm_proc_construct(mca_btl_gm_proc_t* proc) @@ -38,7 +38,7 @@ void mca_btl_gm_proc_construct(mca_btl_gm_proc_t* proc) OBJ_CONSTRUCT(&proc->proc_lock, ompi_mutex_t); /* add to list of all proc instance */ OMPI_THREAD_LOCK(&mca_btl_gm_component.gm_lock); - ompi_list_append(&mca_btl_gm_component.gm_procs, &proc->super); + opal_list_append(&mca_btl_gm_component.gm_procs, &proc->super); OMPI_THREAD_UNLOCK(&mca_btl_gm_component.gm_lock); } @@ -50,7 +50,7 @@ void mca_btl_gm_proc_destruct(mca_btl_gm_proc_t* proc) { /* remove from list of all proc instances */ OMPI_THREAD_LOCK(&mca_btl_gm_component.gm_lock); - ompi_list_remove_item(&mca_btl_gm_component.gm_procs, &proc->super); + opal_list_remove_item(&mca_btl_gm_component.gm_procs, &proc->super); OMPI_THREAD_UNLOCK(&mca_btl_gm_component.gm_lock); /* release resources */ @@ -71,10 +71,10 @@ static mca_btl_gm_proc_t* mca_btl_gm_proc_lookup_ompi(ompi_proc_t* ompi_proc) OMPI_THREAD_LOCK(&mca_btl_gm_component.gm_lock); for(gm_proc = (mca_btl_gm_proc_t*) - ompi_list_get_first(&mca_btl_gm_component.gm_procs); + opal_list_get_first(&mca_btl_gm_component.gm_procs); gm_proc != (mca_btl_gm_proc_t*) - ompi_list_get_end(&mca_btl_gm_component.gm_procs); - gm_proc = (mca_btl_gm_proc_t*)ompi_list_get_next(gm_proc)) { + opal_list_get_end(&mca_btl_gm_component.gm_procs); + gm_proc = (mca_btl_gm_proc_t*)opal_list_get_next(gm_proc)) { if(gm_proc->proc_ompi == ompi_proc) { OMPI_THREAD_UNLOCK(&mca_btl_gm_component.gm_lock); diff --git a/ompi/mca/btl/gm/btl_gm_proc.h b/ompi/mca/btl/gm/btl_gm_proc.h index 387b99fee1..d98c6fbeff 100644 --- a/ompi/mca/btl/gm/btl_gm_proc.h +++ b/ompi/mca/btl/gm/btl_gm_proc.h @@ -35,7 +35,7 @@ OBJ_CLASS_DECLARATION(mca_btl_gm_proc_t); * BTL instance that attempts to open a connection to the process. */ struct mca_btl_gm_proc_t { - ompi_list_item_t super; + opal_list_item_t super; /**< allow proc to be placed on a list */ ompi_proc_t *proc_ompi; diff --git a/ompi/mca/btl/mvapi/btl_mvapi.c b/ompi/mca/btl/mvapi/btl_mvapi.c index 861b294a94..1571630fe1 100644 --- a/ompi/mca/btl/mvapi/btl_mvapi.c +++ b/ompi/mca/btl/mvapi/btl_mvapi.c @@ -267,7 +267,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src( } if(is_leave_pinned) { - if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)){ + if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)){ ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); return NULL; } @@ -296,15 +296,15 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src( OBJ_RETAIN(vapi_reg); if(is_leave_pinned) { vapi_reg->is_leave_pinned = is_leave_pinned; - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } } else if(is_leave_pinned) { - if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) { + if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); return NULL; } - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } frag->mem_hndl = vapi_reg->hndl; @@ -345,11 +345,11 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src( if(mca_btl_mvapi_component.leave_pinned) { - if(mca_btl_mvapi_component.reg_mru_len <= mvapi_btl->reg_mru_list.ompi_list_length ) { + if(mca_btl_mvapi_component.reg_mru_len <= mvapi_btl->reg_mru_list.opal_list_length ) { mca_mpool_mvapi_registration_t* old_reg = (mca_mpool_mvapi_registration_t*) - ompi_list_remove_last(&mvapi_btl->reg_mru_list); + opal_list_remove_last(&mvapi_btl->reg_mru_list); if( NULL == old_reg) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); @@ -383,7 +383,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_src( vapi_reg->is_leave_pinned = true; - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } else { mvapi_btl->ib_pool->mpool_register(mvapi_btl->ib_pool, @@ -522,7 +522,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_dst( } if(is_leave_pinned) { - if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) { + if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); return NULL; } @@ -549,27 +549,27 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_dst( if(is_leave_pinned) { vapi_reg->is_leave_pinned = is_leave_pinned; - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } } else if(is_leave_pinned){ - if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) { + if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); return NULL; } - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } } else { if(mca_btl_mvapi_component.leave_pinned) { - if( mca_btl_mvapi_component.reg_mru_len <= mvapi_btl->reg_mru_list.ompi_list_length ) { + if( mca_btl_mvapi_component.reg_mru_len <= mvapi_btl->reg_mru_list.opal_list_length ) { mca_mpool_mvapi_registration_t* old_reg = (mca_mpool_mvapi_registration_t*) - ompi_list_remove_last(&mvapi_btl->reg_mru_list); + opal_list_remove_last(&mvapi_btl->reg_mru_list); if( NULL == old_reg) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); @@ -603,7 +603,7 @@ mca_btl_base_descriptor_t* mca_btl_mvapi_prepare_dst( } OBJ_RETAIN(vapi_reg); - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } else { mvapi_btl->ib_pool->mpool_register(mvapi_btl->ib_pool, @@ -641,36 +641,36 @@ int mca_btl_mvapi_finalize(struct mca_btl_base_module_t* btl) mvapi_btl = (mca_btl_mvapi_module_t*) btl; if(mvapi_btl->send_free_eager.fl_num_allocated != - mvapi_btl->send_free_eager.super.ompi_list_length){ + mvapi_btl->send_free_eager.super.opal_list_length){ ompi_output(0, "btl ib send_free_eager frags: %d allocated %d returned \n", mvapi_btl->send_free_eager.fl_num_allocated, - mvapi_btl->send_free_eager.super.ompi_list_length); + mvapi_btl->send_free_eager.super.opal_list_length); } if(mvapi_btl->send_free_max.fl_num_allocated != - mvapi_btl->send_free_max.super.ompi_list_length){ + mvapi_btl->send_free_max.super.opal_list_length){ ompi_output(0, "btl ib send_free_max frags: %d allocated %d returned \n", mvapi_btl->send_free_max.fl_num_allocated, - mvapi_btl->send_free_max.super.ompi_list_length); + mvapi_btl->send_free_max.super.opal_list_length); } if(mvapi_btl->send_free_frag.fl_num_allocated != - mvapi_btl->send_free_frag.super.ompi_list_length){ + mvapi_btl->send_free_frag.super.opal_list_length){ ompi_output(0, "btl ib send_free_frag frags: %d allocated %d returned \n", mvapi_btl->send_free_frag.fl_num_allocated, - mvapi_btl->send_free_frag.super.ompi_list_length); + mvapi_btl->send_free_frag.super.opal_list_length); } if(mvapi_btl->recv_free_eager.fl_num_allocated != - mvapi_btl->recv_free_eager.super.ompi_list_length){ + mvapi_btl->recv_free_eager.super.opal_list_length){ ompi_output(0, "btl ib recv_free_eager frags: %d allocated %d returned \n", mvapi_btl->recv_free_eager.fl_num_allocated, - mvapi_btl->recv_free_eager.super.ompi_list_length); + mvapi_btl->recv_free_eager.super.opal_list_length); } if(mvapi_btl->recv_free_max.fl_num_allocated != - mvapi_btl->recv_free_max.super.ompi_list_length){ + mvapi_btl->recv_free_max.super.opal_list_length){ ompi_output(0, "btl ib recv_free_max frags: %d allocated %d returned \n", mvapi_btl->recv_free_max.fl_num_allocated, - mvapi_btl->recv_free_max.super.ompi_list_length); + mvapi_btl->recv_free_max.super.opal_list_length); } return OMPI_SUCCESS; diff --git a/ompi/mca/btl/mvapi/btl_mvapi.h b/ompi/mca/btl/mvapi/btl_mvapi.h index 097004f001..b48d060abc 100644 --- a/ompi/mca/btl/mvapi/btl_mvapi.h +++ b/ompi/mca/btl/mvapi/btl_mvapi.h @@ -65,7 +65,7 @@ struct mca_btl_mvapi_component_t { int ib_free_list_inc; /**< number of elements to alloc when growing free lists */ - ompi_list_t ib_procs; + opal_list_t ib_procs; /**< list of ib proc structures */ ompi_event_t ib_send_event; @@ -130,10 +130,10 @@ struct mca_btl_mvapi_module_t { ompi_free_list_t recv_free_eager; /**< High priority free list of buffer descriptors */ ompi_free_list_t recv_free_max; /**< Low priority free list of buffer descriptors */ - ompi_list_t reg_mru_list; /**< a most recently used list of mca_mpool_mvapi_registration_t + opal_list_t reg_mru_list; /**< a most recently used list of mca_mpool_mvapi_registration_t entries, this allows us to keep a working set of memory pinned */ - ompi_list_t repost; /**< list of buffers to repost */ + opal_list_t repost; /**< list of buffers to repost */ ompi_mutex_t ib_lock; /**< module level lock */ diff --git a/ompi/mca/btl/mvapi/btl_mvapi_component.c b/ompi/mca/btl/mvapi/btl_mvapi_component.c index e9ace9b37a..a1a08d2874 100644 --- a/ompi/mca/btl/mvapi/btl_mvapi_component.c +++ b/ompi/mca/btl/mvapi/btl_mvapi_component.c @@ -109,7 +109,7 @@ int mca_btl_mvapi_component_open(void) mca_btl_mvapi_component.mvapi_btls=NULL; /* initialize objects */ - OBJ_CONSTRUCT(&mca_btl_mvapi_component.ib_procs, ompi_list_t); + OBJ_CONSTRUCT(&mca_btl_mvapi_component.ib_procs, opal_list_t); /* OBJ_CONSTRUCT (&mca_btl_mvapi_component.ib_recv_frags, ompi_free_list_t); */ /* register IB component parameters */ @@ -250,10 +250,10 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules, mca_btl_base_module_t** btls; uint32_t i,j, length; struct mca_mpool_base_resources_t hca_pd; - ompi_list_t btl_list; + opal_list_t btl_list; mca_btl_mvapi_module_t * mvapi_btl; mca_btl_base_selected_module_t* ib_selected; - ompi_list_item_t* item; + opal_list_item_t* item; /* initialization */ *num_btl_modules = 0; @@ -282,7 +282,7 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules, for each hca we query the number of ports on the hca and set up a distinct btl module for each hca port */ - OBJ_CONSTRUCT(&btl_list, ompi_list_t); + OBJ_CONSTRUCT(&btl_list, opal_list_t); OBJ_CONSTRUCT(&mca_btl_mvapi_component.ib_lock, ompi_mutex_t); @@ -320,7 +320,7 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules, mvapi_btl->nic = hca_hndl; mvapi_btl->port_id = (IB_port_t) j; mvapi_btl->port = hca_port; - ompi_list_append(&btl_list, (ompi_list_item_t*) ib_selected); + opal_list_append(&btl_list, (opal_list_item_t*) ib_selected); mca_btl_mvapi_component.ib_num_btls ++; } @@ -347,7 +347,7 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules, for(i = 0; i < mca_btl_mvapi_component.ib_num_btls; i++){ - item = ompi_list_remove_first(&btl_list); + item = opal_list_remove_first(&btl_list); ib_selected = (mca_btl_base_selected_module_t*)item; mvapi_btl = (mca_btl_mvapi_module_t*) ib_selected->btl_module; memcpy(&(mca_btl_mvapi_component.mvapi_btls[i]), mvapi_btl , sizeof(mca_btl_mvapi_module_t)); @@ -370,8 +370,8 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules, OBJ_CONSTRUCT(&mvapi_btl->recv_free_max, ompi_free_list_t); - OBJ_CONSTRUCT(&mvapi_btl->repost, ompi_list_t); - OBJ_CONSTRUCT(&mvapi_btl->reg_mru_list, ompi_list_t); + OBJ_CONSTRUCT(&mvapi_btl->repost, opal_list_t); + OBJ_CONSTRUCT(&mvapi_btl->reg_mru_list, opal_list_t); @@ -532,7 +532,7 @@ int mca_btl_mvapi_component_progress() /* advance the segment address past the header and subtract from the length..*/ mvapi_btl->ib_reg[frag->hdr->tag].cbfunc(&mvapi_btl->super, frag->hdr->tag, &frag->base, mvapi_btl->ib_reg[frag->hdr->tag].cbdata); - OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager), (ompi_list_item_t*) frag); + OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager), (opal_list_item_t*) frag); OMPI_THREAD_ADD32(&mvapi_btl->rr_posted_high, -1); mca_btl_mvapi_endpoint_post_rr(((mca_btl_mvapi_frag_t*)comp.id)->endpoint, 0); @@ -578,7 +578,7 @@ int mca_btl_mvapi_component_progress() /* advance the segment address past the header and subtract from the length..*/ mvapi_btl->ib_reg[frag->hdr->tag].cbfunc(&mvapi_btl->super, frag->hdr->tag, &frag->base, mvapi_btl->ib_reg[frag->hdr->tag].cbdata); - OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (ompi_list_item_t*) frag); + OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (opal_list_item_t*) frag); OMPI_THREAD_ADD32(&mvapi_btl->rr_posted_low, -1); diff --git a/ompi/mca/btl/mvapi/btl_mvapi_endpoint.c b/ompi/mca/btl/mvapi/btl_mvapi_endpoint.c index 4ed348b28d..7a406cc3f7 100644 --- a/ompi/mca/btl/mvapi/btl_mvapi_endpoint.c +++ b/ompi/mca/btl/mvapi/btl_mvapi_endpoint.c @@ -96,7 +96,7 @@ static inline int mca_btl_mvapi_endpoint_post_send(mca_btl_mvapi_module_t* mvapi OBJ_CLASS_INSTANCE(mca_btl_mvapi_endpoint_t, - ompi_list_item_t, mca_btl_mvapi_endpoint_construct, + opal_list_item_t, mca_btl_mvapi_endpoint_construct, mca_btl_mvapi_endpoint_destruct); /* @@ -113,7 +113,7 @@ static void mca_btl_mvapi_endpoint_construct(mca_btl_base_endpoint_t* endpoint) endpoint->endpoint_retries = 0; OBJ_CONSTRUCT(&endpoint->endpoint_send_lock, ompi_mutex_t); OBJ_CONSTRUCT(&endpoint->endpoint_recv_lock, ompi_mutex_t); - OBJ_CONSTRUCT(&endpoint->pending_send_frags, ompi_list_t); + OBJ_CONSTRUCT(&endpoint->pending_send_frags, opal_list_t); } /* @@ -413,10 +413,10 @@ static void mca_btl_mvapi_endpoint_recv( int rc; for(ib_proc = (mca_btl_mvapi_proc_t*) - ompi_list_get_first(&mca_btl_mvapi_component.ib_procs); + opal_list_get_first(&mca_btl_mvapi_component.ib_procs); ib_proc != (mca_btl_mvapi_proc_t*) - ompi_list_get_end(&mca_btl_mvapi_component.ib_procs); - ib_proc = (mca_btl_mvapi_proc_t*)ompi_list_get_next(ib_proc)) { + opal_list_get_end(&mca_btl_mvapi_component.ib_procs); + ib_proc = (mca_btl_mvapi_proc_t*)opal_list_get_next(ib_proc)) { if(ib_proc->proc_guid.vpid == endpoint->vpid) { @@ -517,8 +517,8 @@ int mca_btl_mvapi_endpoint_send( DEBUG_OUT("Queing because state is connecting"); - ompi_list_append(&endpoint->pending_send_frags, - (ompi_list_item_t *)frag); + opal_list_append(&endpoint->pending_send_frags, + (opal_list_item_t *)frag); rc = OMPI_SUCCESS; break; @@ -527,8 +527,8 @@ int mca_btl_mvapi_endpoint_send( DEBUG_OUT("Queuing because waiting for ack"); - ompi_list_append(&endpoint->pending_send_frags, - (ompi_list_item_t *)frag); + opal_list_append(&endpoint->pending_send_frags, + (opal_list_item_t *)frag); rc = OMPI_SUCCESS; break; @@ -537,8 +537,8 @@ int mca_btl_mvapi_endpoint_send( DEBUG_OUT("Connection to endpoint closed ... connecting ..."); - ompi_list_append(&endpoint->pending_send_frags, - (ompi_list_item_t *)frag); + opal_list_append(&endpoint->pending_send_frags, + (opal_list_item_t *)frag); rc = mca_btl_mvapi_endpoint_start_connect(endpoint); @@ -575,7 +575,7 @@ int mca_btl_mvapi_endpoint_send( void mca_btl_mvapi_progress_send_frags(mca_btl_mvapi_endpoint_t* endpoint) { - ompi_list_item_t *frag_item; + opal_list_item_t *frag_item; mca_btl_mvapi_frag_t *frag; mca_btl_mvapi_module_t* mvapi_btl; /*Check if endpoint is connected */ @@ -587,8 +587,8 @@ void mca_btl_mvapi_progress_send_frags(mca_btl_mvapi_endpoint_t* endpoint) /* While there are frags in the list, * process them */ - while(!ompi_list_is_empty(&(endpoint->pending_send_frags))) { - frag_item = ompi_list_remove_first(&(endpoint->pending_send_frags)); + while(!opal_list_is_empty(&(endpoint->pending_send_frags))) { + frag_item = opal_list_remove_first(&(endpoint->pending_send_frags)); frag = (mca_btl_mvapi_frag_t *) frag_item; mvapi_btl = endpoint->endpoint_btl; /* We need to post this one */ diff --git a/ompi/mca/btl/mvapi/btl_mvapi_endpoint.h b/ompi/mca/btl/mvapi/btl_mvapi_endpoint.h index cf0fe154a3..27b09d28fc 100644 --- a/ompi/mca/btl/mvapi/btl_mvapi_endpoint.h +++ b/ompi/mca/btl/mvapi/btl_mvapi_endpoint.h @@ -17,7 +17,7 @@ #ifndef MCA_BTL_IB_ENDPOINT_H #define MCA_BTL_IB_ENDPOINT_H -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "event/event.h" #include "mca/pml/pml.h" #include "mca/btl/btl.h" @@ -62,7 +62,7 @@ typedef enum { */ struct mca_btl_base_endpoint_t { - ompi_list_item_t super; + opal_list_item_t super; struct mca_btl_mvapi_module_t* endpoint_btl; /**< BTL instance that created this connection */ @@ -85,7 +85,7 @@ struct mca_btl_base_endpoint_t { ompi_mutex_t endpoint_recv_lock; /**< lock for concurrent access to endpoint state */ - ompi_list_t pending_send_frags; + opal_list_t pending_send_frags; /**< list of pending send frags for this endpoint */ VAPI_qp_num_t rem_qp_num_high; @@ -131,7 +131,7 @@ static inline int mca_btl_mvapi_endpoint_post_rr_sub(int cnt, { int rc, i; - ompi_list_item_t* item; + opal_list_item_t* item; mca_btl_mvapi_frag_t* frag; mca_btl_mvapi_module_t *mvapi_btl = endpoint->endpoint_btl; VAPI_rr_desc_t* rr_desc_post = mvapi_btl->rr_desc_post; diff --git a/ompi/mca/btl/mvapi/btl_mvapi_frag.h b/ompi/mca/btl/mvapi/btl_mvapi_frag.h index 75e7fca0fc..bda2dc9851 100644 --- a/ompi/mca/btl/mvapi/btl_mvapi_frag.h +++ b/ompi/mca/btl/mvapi/btl_mvapi_frag.h @@ -99,42 +99,42 @@ OBJ_CLASS_DECLARATION(mca_btl_mvapi_recv_frag_max_t); #define MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } #define MCA_BTL_IB_FRAG_RETURN_EAGER(btl, frag) \ { \ - OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_eager, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_eager, (opal_list_item_t*)(frag)); \ } #define MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } #define MCA_BTL_IB_FRAG_RETURN_MAX(btl, frag) \ { \ - OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_max, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_max, (opal_list_item_t*)(frag)); \ } #define MCA_BTL_IB_FRAG_ALLOC_FRAG(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } #define MCA_BTL_IB_FRAG_RETURN_FRAG(btl, frag) \ { \ - OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_frag, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&((mca_btl_mvapi_module_t*)btl)->send_free_frag, (opal_list_item_t*)(frag)); \ } diff --git a/ompi/mca/btl/mvapi/btl_mvapi_proc.c b/ompi/mca/btl/mvapi/btl_mvapi_proc.c index 501ca4116f..3268ceef3b 100644 --- a/ompi/mca/btl/mvapi/btl_mvapi_proc.c +++ b/ompi/mca/btl/mvapi/btl_mvapi_proc.c @@ -26,7 +26,7 @@ static void mca_btl_mvapi_proc_construct(mca_btl_mvapi_proc_t* proc); static void mca_btl_mvapi_proc_destruct(mca_btl_mvapi_proc_t* proc); OBJ_CLASS_INSTANCE(mca_btl_mvapi_proc_t, - ompi_list_item_t, mca_btl_mvapi_proc_construct, + opal_list_item_t, mca_btl_mvapi_proc_construct, mca_btl_mvapi_proc_destruct); void mca_btl_mvapi_proc_construct(mca_btl_mvapi_proc_t* proc) @@ -38,7 +38,7 @@ void mca_btl_mvapi_proc_construct(mca_btl_mvapi_proc_t* proc) OBJ_CONSTRUCT(&proc->proc_lock, ompi_mutex_t); /* add to list of all proc instance */ OMPI_THREAD_LOCK(&mca_btl_mvapi_component.ib_lock); - ompi_list_append(&mca_btl_mvapi_component.ib_procs, &proc->super); + opal_list_append(&mca_btl_mvapi_component.ib_procs, &proc->super); OMPI_THREAD_UNLOCK(&mca_btl_mvapi_component.ib_lock); } @@ -50,7 +50,7 @@ void mca_btl_mvapi_proc_destruct(mca_btl_mvapi_proc_t* proc) { /* remove from list of all proc instances */ OMPI_THREAD_LOCK(&mca_btl_mvapi_component.ib_lock); - ompi_list_remove_item(&mca_btl_mvapi_component.ib_procs, &proc->super); + opal_list_remove_item(&mca_btl_mvapi_component.ib_procs, &proc->super); OMPI_THREAD_UNLOCK(&mca_btl_mvapi_component.ib_lock); /* release resources */ @@ -71,10 +71,10 @@ static mca_btl_mvapi_proc_t* mca_btl_mvapi_proc_lookup_ompi(ompi_proc_t* ompi_pr OMPI_THREAD_LOCK(&mca_btl_mvapi_component.ib_lock); for(ib_proc = (mca_btl_mvapi_proc_t*) - ompi_list_get_first(&mca_btl_mvapi_component.ib_procs); + opal_list_get_first(&mca_btl_mvapi_component.ib_procs); ib_proc != (mca_btl_mvapi_proc_t*) - ompi_list_get_end(&mca_btl_mvapi_component.ib_procs); - ib_proc = (mca_btl_mvapi_proc_t*)ompi_list_get_next(ib_proc)) { + opal_list_get_end(&mca_btl_mvapi_component.ib_procs); + ib_proc = (mca_btl_mvapi_proc_t*)opal_list_get_next(ib_proc)) { if(ib_proc->proc_ompi == ompi_proc) { OMPI_THREAD_UNLOCK(&mca_btl_mvapi_component.ib_lock); diff --git a/ompi/mca/btl/mvapi/btl_mvapi_proc.h b/ompi/mca/btl/mvapi/btl_mvapi_proc.h index 96c13bbfe1..04a53acdc3 100644 --- a/ompi/mca/btl/mvapi/btl_mvapi_proc.h +++ b/ompi/mca/btl/mvapi/btl_mvapi_proc.h @@ -35,7 +35,7 @@ OBJ_CLASS_DECLARATION(mca_btl_mvapi_proc_t); * BTL instance that attempts to open a connection to the process. */ struct mca_btl_mvapi_proc_t { - ompi_list_item_t super; + opal_list_item_t super; /**< allow proc to be placed on a list */ ompi_proc_t *proc_ompi; diff --git a/ompi/mca/btl/openib/btl_openib.c b/ompi/mca/btl/openib/btl_openib.c index b8789fecfd..d3063cbf64 100644 --- a/ompi/mca/btl/openib/btl_openib.c +++ b/ompi/mca/btl/openib/btl_openib.c @@ -267,7 +267,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src( } if(is_leave_pinned) { - if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)){ + if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)){ ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); return NULL; } @@ -296,15 +296,15 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src( OBJ_RETAIN(vapi_reg); if(is_leave_pinned) { vapi_reg->is_leave_pinned = is_leave_pinned; - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } } else if(is_leave_pinned) { - if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) { + if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); return NULL; } - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } frag->mem_hndl = vapi_reg->hndl; @@ -345,11 +345,11 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src( if(mca_btl_openib_component.leave_pinned) { - if(mca_btl_openib_component.reg_mru_len <= mvapi_btl->reg_mru_list.ompi_list_length ) { + if(mca_btl_openib_component.reg_mru_len <= mvapi_btl->reg_mru_list.opal_list_length ) { mca_mpool_mvapi_registration_t* old_reg = (mca_mpool_mvapi_registration_t*) - ompi_list_remove_last(&mvapi_btl->reg_mru_list); + opal_list_remove_last(&mvapi_btl->reg_mru_list); if( NULL == old_reg) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); @@ -383,7 +383,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src( vapi_reg->is_leave_pinned = true; - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } else { mvapi_btl->ib_pool->mpool_register(mvapi_btl->ib_pool, @@ -522,7 +522,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst( } if(is_leave_pinned) { - if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) { + if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); return NULL; } @@ -549,27 +549,27 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst( if(is_leave_pinned) { vapi_reg->is_leave_pinned = is_leave_pinned; - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } } else if(is_leave_pinned){ - if(NULL == ompi_list_remove_item(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg)) { + if(NULL == opal_list_remove_item(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg)) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); return NULL; } - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } } else { if(mca_btl_openib_component.leave_pinned) { - if( mca_btl_openib_component.reg_mru_len <= mvapi_btl->reg_mru_list.ompi_list_length ) { + if( mca_btl_openib_component.reg_mru_len <= mvapi_btl->reg_mru_list.opal_list_length ) { mca_mpool_mvapi_registration_t* old_reg = (mca_mpool_mvapi_registration_t*) - ompi_list_remove_last(&mvapi_btl->reg_mru_list); + opal_list_remove_last(&mvapi_btl->reg_mru_list); if( NULL == old_reg) { ompi_output(0,"%s:%d:%s error removing item from reg_mru_list", __FILE__, __LINE__, __func__); @@ -603,7 +603,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst( } OBJ_RETAIN(vapi_reg); - ompi_list_append(&mvapi_btl->reg_mru_list, (ompi_list_item_t*) vapi_reg); + opal_list_append(&mvapi_btl->reg_mru_list, (opal_list_item_t*) vapi_reg); } else { mvapi_btl->ib_pool->mpool_register(mvapi_btl->ib_pool, @@ -641,36 +641,36 @@ int mca_btl_openib_finalize(struct mca_btl_base_module_t* btl) mvapi_btl = (mca_btl_openib_module_t*) btl; if(mvapi_btl->send_free_eager.fl_num_allocated != - mvapi_btl->send_free_eager.super.ompi_list_length){ + mvapi_btl->send_free_eager.super.opal_list_length){ ompi_output(0, "btl ib send_free_eager frags: %d allocated %d returned \n", mvapi_btl->send_free_eager.fl_num_allocated, - mvapi_btl->send_free_eager.super.ompi_list_length); + mvapi_btl->send_free_eager.super.opal_list_length); } if(mvapi_btl->send_free_max.fl_num_allocated != - mvapi_btl->send_free_max.super.ompi_list_length){ + mvapi_btl->send_free_max.super.opal_list_length){ ompi_output(0, "btl ib send_free_max frags: %d allocated %d returned \n", mvapi_btl->send_free_max.fl_num_allocated, - mvapi_btl->send_free_max.super.ompi_list_length); + mvapi_btl->send_free_max.super.opal_list_length); } if(mvapi_btl->send_free_frag.fl_num_allocated != - mvapi_btl->send_free_frag.super.ompi_list_length){ + mvapi_btl->send_free_frag.super.opal_list_length){ ompi_output(0, "btl ib send_free_frag frags: %d allocated %d returned \n", mvapi_btl->send_free_frag.fl_num_allocated, - mvapi_btl->send_free_frag.super.ompi_list_length); + mvapi_btl->send_free_frag.super.opal_list_length); } if(mvapi_btl->recv_free_eager.fl_num_allocated != - mvapi_btl->recv_free_eager.super.ompi_list_length){ + mvapi_btl->recv_free_eager.super.opal_list_length){ ompi_output(0, "btl ib recv_free_eager frags: %d allocated %d returned \n", mvapi_btl->recv_free_eager.fl_num_allocated, - mvapi_btl->recv_free_eager.super.ompi_list_length); + mvapi_btl->recv_free_eager.super.opal_list_length); } if(mvapi_btl->recv_free_max.fl_num_allocated != - mvapi_btl->recv_free_max.super.ompi_list_length){ + mvapi_btl->recv_free_max.super.opal_list_length){ ompi_output(0, "btl ib recv_free_max frags: %d allocated %d returned \n", mvapi_btl->recv_free_max.fl_num_allocated, - mvapi_btl->recv_free_max.super.ompi_list_length); + mvapi_btl->recv_free_max.super.opal_list_length); } return OMPI_SUCCESS; diff --git a/ompi/mca/btl/openib/btl_openib.h b/ompi/mca/btl/openib/btl_openib.h index 8ac899881f..425dd817f5 100644 --- a/ompi/mca/btl/openib/btl_openib.h +++ b/ompi/mca/btl/openib/btl_openib.h @@ -65,7 +65,7 @@ struct mca_btl_openib_component_t { int ib_free_list_inc; /**< number of elements to alloc when growing free lists */ - ompi_list_t ib_procs; + opal_list_t ib_procs; /**< list of ib proc structures */ ompi_event_t ib_send_event; @@ -132,10 +132,10 @@ struct mca_btl_openib_module_t { ompi_free_list_t recv_free_eager; /**< High priority free list of buffer descriptors */ ompi_free_list_t recv_free_max; /**< Low priority free list of buffer descriptors */ - ompi_list_t reg_mru_list; /**< a most recently used list of mca_mpool_mvapi_registration_t + opal_list_t reg_mru_list; /**< a most recently used list of mca_mpool_mvapi_registration_t entries, this allows us to keep a working set of memory pinned */ - ompi_list_t repost; /**< list of buffers to repost */ + opal_list_t repost; /**< list of buffers to repost */ ompi_mutex_t ib_lock; /**< module level lock */ diff --git a/ompi/mca/btl/openib/btl_openib_component.c b/ompi/mca/btl/openib/btl_openib_component.c index 20be8fc833..e7efd00957 100644 --- a/ompi/mca/btl/openib/btl_openib_component.c +++ b/ompi/mca/btl/openib/btl_openib_component.c @@ -109,7 +109,7 @@ int mca_btl_openib_component_open(void) mca_btl_openib_component.mvapi_btls=NULL; /* initialize objects */ - OBJ_CONSTRUCT(&mca_btl_openib_component.ib_procs, ompi_list_t); + OBJ_CONSTRUCT(&mca_btl_openib_component.ib_procs, opal_list_t); /* OBJ_CONSTRUCT (&mca_btl_openib_component.ib_recv_frags, ompi_free_list_t); */ /* register IB component parameters */ @@ -251,10 +251,10 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules, mca_btl_base_module_t** btls; uint32_t i,j, length; struct mca_mpool_base_resources_t hca_pd; - ompi_list_t btl_list; + opal_list_t btl_list; mca_btl_openib_module_t * mvapi_btl; mca_btl_base_selected_module_t* ib_selected; - ompi_list_item_t* item; + opal_list_item_t* item; /* initialization */ *num_btl_modules = 0; num_devs = 0; @@ -293,7 +293,7 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules, for each hca we query the number of ports on the hca and set up a distinct btl module for each hca port */ - OBJ_CONSTRUCT(&btl_list, ompi_list_t); + OBJ_CONSTRUCT(&btl_list, opal_list_t); OBJ_CONSTRUCT(&mca_btl_openib_component.ib_lock, ompi_mutex_t); @@ -329,7 +329,7 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules, mvapi_btl->nic = hca_hndl; mvapi_btl->port_id = (IB_port_t) j; mvapi_btl->port = hca_port; - ompi_list_append(&btl_list, (ompi_list_item_t*) ib_selected); + opal_list_append(&btl_list, (opal_list_item_t*) ib_selected); mca_btl_openib_component.ib_num_btls ++; } @@ -356,7 +356,7 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules, for(i = 0; i < mca_btl_openib_component.ib_num_btls; i++){ - item = ompi_list_remove_first(&btl_list); + item = opal_list_remove_first(&btl_list); ib_selected = (mca_btl_base_selected_module_t*)item; mvapi_btl = (mca_btl_openib_module_t*) ib_selected->btl_module; memcpy(&(mca_btl_openib_component.mvapi_btls[i]), mvapi_btl , sizeof(mca_btl_openib_module_t)); @@ -379,8 +379,8 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules, OBJ_CONSTRUCT(&mvapi_btl->recv_free_max, ompi_free_list_t); - OBJ_CONSTRUCT(&mvapi_btl->repost, ompi_list_t); - OBJ_CONSTRUCT(&mvapi_btl->reg_mru_list, ompi_list_t); + OBJ_CONSTRUCT(&mvapi_btl->repost, opal_list_t); + OBJ_CONSTRUCT(&mvapi_btl->reg_mru_list, opal_list_t); @@ -541,7 +541,7 @@ int mca_btl_openib_component_progress() /* advance the segment address past the header and subtract from the length..*/ mvapi_btl->ib_reg[frag->hdr->tag].cbfunc(&mvapi_btl->super, frag->hdr->tag, &frag->base, mvapi_btl->ib_reg[frag->hdr->tag].cbdata); - OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager), (ompi_list_item_t*) frag); + OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_eager), (opal_list_item_t*) frag); OMPI_THREAD_ADD32(&mvapi_btl->rr_posted_high, -1); mca_btl_openib_endpoint_post_rr(((mca_btl_openib_frag_t*)comp.id)->endpoint, 0); @@ -587,7 +587,7 @@ int mca_btl_openib_component_progress() /* advance the segment address past the header and subtract from the length..*/ mvapi_btl->ib_reg[frag->hdr->tag].cbfunc(&mvapi_btl->super, frag->hdr->tag, &frag->base, mvapi_btl->ib_reg[frag->hdr->tag].cbdata); - OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (ompi_list_item_t*) frag); + OMPI_FREE_LIST_RETURN(&(mvapi_btl->recv_free_max), (opal_list_item_t*) frag); OMPI_THREAD_ADD32(&mvapi_btl->rr_posted_low, -1); diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.c b/ompi/mca/btl/openib/btl_openib_endpoint.c index 900d28747b..4588b0dc79 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.c +++ b/ompi/mca/btl/openib/btl_openib_endpoint.c @@ -96,7 +96,7 @@ static inline int mca_btl_openib_endpoint_post_send(mca_btl_openib_module_t* mva OBJ_CLASS_INSTANCE(mca_btl_openib_endpoint_t, - ompi_list_item_t, mca_btl_openib_endpoint_construct, + opal_list_item_t, mca_btl_openib_endpoint_construct, mca_btl_openib_endpoint_destruct); /* @@ -113,7 +113,7 @@ static void mca_btl_openib_endpoint_construct(mca_btl_base_endpoint_t* endpoint) endpoint->endpoint_retries = 0; OBJ_CONSTRUCT(&endpoint->endpoint_send_lock, ompi_mutex_t); OBJ_CONSTRUCT(&endpoint->endpoint_recv_lock, ompi_mutex_t); - OBJ_CONSTRUCT(&endpoint->pending_send_frags, ompi_list_t); + OBJ_CONSTRUCT(&endpoint->pending_send_frags, opal_list_t); } /* @@ -413,10 +413,10 @@ static void mca_btl_openib_endpoint_recv( int rc; for(ib_proc = (mca_btl_openib_proc_t*) - ompi_list_get_first(&mca_btl_openib_component.ib_procs); + opal_list_get_first(&mca_btl_openib_component.ib_procs); ib_proc != (mca_btl_openib_proc_t*) - ompi_list_get_end(&mca_btl_openib_component.ib_procs); - ib_proc = (mca_btl_openib_proc_t*)ompi_list_get_next(ib_proc)) { + opal_list_get_end(&mca_btl_openib_component.ib_procs); + ib_proc = (mca_btl_openib_proc_t*)opal_list_get_next(ib_proc)) { if(ib_proc->proc_guid.vpid == endpoint->vpid) { @@ -517,8 +517,8 @@ int mca_btl_openib_endpoint_send( DEBUG_OUT("Queing because state is connecting"); - ompi_list_append(&endpoint->pending_send_frags, - (ompi_list_item_t *)frag); + opal_list_append(&endpoint->pending_send_frags, + (opal_list_item_t *)frag); rc = OMPI_SUCCESS; break; @@ -527,8 +527,8 @@ int mca_btl_openib_endpoint_send( DEBUG_OUT("Queuing because waiting for ack"); - ompi_list_append(&endpoint->pending_send_frags, - (ompi_list_item_t *)frag); + opal_list_append(&endpoint->pending_send_frags, + (opal_list_item_t *)frag); rc = OMPI_SUCCESS; break; @@ -537,8 +537,8 @@ int mca_btl_openib_endpoint_send( DEBUG_OUT("Connection to endpoint closed ... connecting ..."); - ompi_list_append(&endpoint->pending_send_frags, - (ompi_list_item_t *)frag); + opal_list_append(&endpoint->pending_send_frags, + (opal_list_item_t *)frag); rc = mca_btl_openib_endpoint_start_connect(endpoint); @@ -575,7 +575,7 @@ int mca_btl_openib_endpoint_send( void mca_btl_openib_progress_send_frags(mca_btl_openib_endpoint_t* endpoint) { - ompi_list_item_t *frag_item; + opal_list_item_t *frag_item; mca_btl_openib_frag_t *frag; mca_btl_openib_module_t* mvapi_btl; /*Check if endpoint is connected */ @@ -587,8 +587,8 @@ void mca_btl_openib_progress_send_frags(mca_btl_openib_endpoint_t* endpoint) /* While there are frags in the list, * process them */ - while(!ompi_list_is_empty(&(endpoint->pending_send_frags))) { - frag_item = ompi_list_remove_first(&(endpoint->pending_send_frags)); + while(!opal_list_is_empty(&(endpoint->pending_send_frags))) { + frag_item = opal_list_remove_first(&(endpoint->pending_send_frags)); frag = (mca_btl_openib_frag_t *) frag_item; mvapi_btl = endpoint->endpoint_btl; /* We need to post this one */ diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.h b/ompi/mca/btl/openib/btl_openib_endpoint.h index 98ebd603d9..10a2b7ff98 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.h +++ b/ompi/mca/btl/openib/btl_openib_endpoint.h @@ -17,7 +17,7 @@ #ifndef MCA_BTL_IB_ENDPOINT_H #define MCA_BTL_IB_ENDPOINT_H -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "event/event.h" #include "mca/pml/pml.h" #include "mca/btl/btl.h" @@ -62,7 +62,7 @@ typedef enum { */ struct mca_btl_base_endpoint_t { - ompi_list_item_t super; + opal_list_item_t super; struct mca_btl_openib_module_t* endpoint_btl; /**< BTL instance that created this connection */ @@ -85,7 +85,7 @@ struct mca_btl_base_endpoint_t { ompi_mutex_t endpoint_recv_lock; /**< lock for concurrent access to endpoint state */ - ompi_list_t pending_send_frags; + opal_list_t pending_send_frags; /**< list of pending send frags for this endpoint */ VAPI_qp_num_t rem_qp_num_high; @@ -131,7 +131,7 @@ static inline int mca_btl_openib_endpoint_post_rr_sub(int cnt, { int rc, i; - ompi_list_item_t* item; + opal_list_item_t* item; mca_btl_openib_frag_t* frag; mca_btl_openib_module_t *mvapi_btl = endpoint->endpoint_btl; VAPI_rr_desc_t* rr_desc_post = mvapi_btl->rr_desc_post; diff --git a/ompi/mca/btl/openib/btl_openib_frag.h b/ompi/mca/btl/openib/btl_openib_frag.h index 25d67bb5ce..4bfa7d85c9 100644 --- a/ompi/mca/btl/openib/btl_openib_frag.h +++ b/ompi/mca/btl/openib/btl_openib_frag.h @@ -99,42 +99,42 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_recv_frag_max_t); #define MCA_BTL_IB_FRAG_ALLOC_EAGER(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } #define MCA_BTL_IB_FRAG_RETURN_EAGER(btl, frag) \ { \ - OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_eager, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_eager, (opal_list_item_t*)(frag)); \ } #define MCA_BTL_IB_FRAG_ALLOC_MAX(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } #define MCA_BTL_IB_FRAG_RETURN_MAX(btl, frag) \ { \ - OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_max, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_max, (opal_list_item_t*)(frag)); \ } #define MCA_BTL_IB_FRAG_ALLOC_FRAG(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } #define MCA_BTL_IB_FRAG_RETURN_FRAG(btl, frag) \ { \ - OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_frag, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&((mca_btl_openib_module_t*)btl)->send_free_frag, (opal_list_item_t*)(frag)); \ } diff --git a/ompi/mca/btl/openib/btl_openib_proc.c b/ompi/mca/btl/openib/btl_openib_proc.c index 084825a79c..4c8ec0f7cc 100644 --- a/ompi/mca/btl/openib/btl_openib_proc.c +++ b/ompi/mca/btl/openib/btl_openib_proc.c @@ -26,7 +26,7 @@ static void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* proc); static void mca_btl_openib_proc_destruct(mca_btl_openib_proc_t* proc); OBJ_CLASS_INSTANCE(mca_btl_openib_proc_t, - ompi_list_item_t, mca_btl_openib_proc_construct, + opal_list_item_t, mca_btl_openib_proc_construct, mca_btl_openib_proc_destruct); void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* proc) @@ -38,7 +38,7 @@ void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* proc) OBJ_CONSTRUCT(&proc->proc_lock, ompi_mutex_t); /* add to list of all proc instance */ OMPI_THREAD_LOCK(&mca_btl_openib_component.ib_lock); - ompi_list_append(&mca_btl_openib_component.ib_procs, &proc->super); + opal_list_append(&mca_btl_openib_component.ib_procs, &proc->super); OMPI_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock); } @@ -50,7 +50,7 @@ void mca_btl_openib_proc_destruct(mca_btl_openib_proc_t* proc) { /* remove from list of all proc instances */ OMPI_THREAD_LOCK(&mca_btl_openib_component.ib_lock); - ompi_list_remove_item(&mca_btl_openib_component.ib_procs, &proc->super); + opal_list_remove_item(&mca_btl_openib_component.ib_procs, &proc->super); OMPI_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock); /* release resources */ @@ -71,10 +71,10 @@ static mca_btl_openib_proc_t* mca_btl_openib_proc_lookup_ompi(ompi_proc_t* ompi_ OMPI_THREAD_LOCK(&mca_btl_openib_component.ib_lock); for(ib_proc = (mca_btl_openib_proc_t*) - ompi_list_get_first(&mca_btl_openib_component.ib_procs); + opal_list_get_first(&mca_btl_openib_component.ib_procs); ib_proc != (mca_btl_openib_proc_t*) - ompi_list_get_end(&mca_btl_openib_component.ib_procs); - ib_proc = (mca_btl_openib_proc_t*)ompi_list_get_next(ib_proc)) { + opal_list_get_end(&mca_btl_openib_component.ib_procs); + ib_proc = (mca_btl_openib_proc_t*)opal_list_get_next(ib_proc)) { if(ib_proc->proc_ompi == ompi_proc) { OMPI_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock); diff --git a/ompi/mca/btl/openib/btl_openib_proc.h b/ompi/mca/btl/openib/btl_openib_proc.h index 25388d0cef..db3f293a4a 100644 --- a/ompi/mca/btl/openib/btl_openib_proc.h +++ b/ompi/mca/btl/openib/btl_openib_proc.h @@ -35,7 +35,7 @@ OBJ_CLASS_DECLARATION(mca_btl_openib_proc_t); * BTL instance that attempts to open a connection to the process. */ struct mca_btl_openib_proc_t { - ompi_list_item_t super; + opal_list_item_t super; /**< allow proc to be placed on a list */ ompi_proc_t *proc_ompi; diff --git a/ompi/mca/btl/self/btl_self_frag.h b/ompi/mca/btl/self/btl_self_frag.h index ee24630540..d987751d43 100644 --- a/ompi/mca/btl/self/btl_self_frag.h +++ b/ompi/mca/btl/self/btl_self_frag.h @@ -46,38 +46,38 @@ OBJ_CLASS_DECLARATION(mca_btl_self_frag_rdma_t); #define MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag, rc) \ { \ - ompi_list_item_t* item; \ + opal_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, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_eager, (opal_list_item_t*)(frag)); \ } #define MCA_BTL_SELF_FRAG_ALLOC_SEND(frag, rc) \ { \ - ompi_list_item_t* item; \ + opal_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, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_send, (opal_list_item_t*)(frag)); \ } #define MCA_BTL_SELF_FRAG_ALLOC_RDMA(frag, rc) \ { \ - ompi_list_item_t* item; \ + opal_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, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&mca_btl_self_component.self_frags_rdma, (opal_list_item_t*)(frag)); \ } #endif diff --git a/ompi/mca/btl/sm/btl_sm_frag.h b/ompi/mca/btl/sm/btl_sm_frag.h index 29d5045955..e4989c75eb 100644 --- a/ompi/mca/btl/sm/btl_sm_frag.h +++ b/ompi/mca/btl/sm/btl_sm_frag.h @@ -56,26 +56,26 @@ OBJ_CLASS_DECLARATION(mca_btl_sm_frag2_t); #define MCA_BTL_SM_FRAG_ALLOC1(frag, rc) \ { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_WAIT(&mca_btl_sm_component.sm_frags1, item, rc); \ frag = (mca_btl_sm_frag_t*)item; \ } #define MCA_BTL_SM_FRAG_ALLOC2(frag, rc) \ { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_WAIT(&mca_btl_sm_component.sm_frags2, item, rc); \ frag = (mca_btl_sm_frag_t*)item; \ } #define MCA_BTL_SM_FRAG_RETURN1(frag) \ { \ - OMPI_FREE_LIST_RETURN(&mca_btl_sm_component.sm_frags1, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&mca_btl_sm_component.sm_frags1, (opal_list_item_t*)(frag)); \ } #define MCA_BTL_SM_FRAG_RETURN2(frag) \ { \ - OMPI_FREE_LIST_RETURN(&mca_btl_sm_component.sm_frags2, (ompi_list_item_t*)(frag)); \ + OMPI_FREE_LIST_RETURN(&mca_btl_sm_component.sm_frags2, (opal_list_item_t*)(frag)); \ } #endif diff --git a/ompi/mca/btl/template/btl_template.c b/ompi/mca/btl/template/btl_template.c index f57da852e0..2a31c15608 100644 --- a/ompi/mca/btl/template/btl_template.c +++ b/ompi/mca/btl/template/btl_template.c @@ -596,22 +596,22 @@ int mca_btl_template_finalize(struct mca_btl_base_module_t* btl) mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl; if(template_btl->template_frag_eager.fl_num_allocated != - template_btl->template_frag_eager.super.ompi_list_length){ + template_btl->template_frag_eager.super.opal_list_length){ ompi_output(0, "btl template_frag_eager: %d allocated %d returned \n", template_btl->template_frag_eager.fl_num_allocated, - template_btl->template_frag_eager.super.ompi_list_length); + template_btl->template_frag_eager.super.opal_list_length); } if(template_btl->template_frag_max.fl_num_allocated != - template_btl->template_frag_max.super.ompi_list_length) { + template_btl->template_frag_max.super.opal_list_length) { ompi_output(0, "btl template_frag_max: %d allocated %d returned \n", template_btl->template_frag_max.fl_num_allocated, - template_btl->template_frag_max.super.ompi_list_length); + template_btl->template_frag_max.super.opal_list_length); } if(template_btl->template_frag_user.fl_num_allocated != - template_btl->template_frag_user.super.ompi_list_length){ + template_btl->template_frag_user.super.opal_list_length){ ompi_output(0, "btl template_frag_user: %d allocated %d returned \n", template_btl->template_frag_user.fl_num_allocated, - template_btl->template_frag_user.super.ompi_list_length); + template_btl->template_frag_user.super.opal_list_length); } OBJ_DESTRUCT(&template_btl->template_lock); diff --git a/ompi/mca/btl/template/btl_template.h b/ompi/mca/btl/template/btl_template.h index 306d5505fb..9811f5b96b 100644 --- a/ompi/mca/btl/template/btl_template.h +++ b/ompi/mca/btl/template/btl_template.h @@ -63,7 +63,7 @@ struct mca_btl_template_component_t { int template_free_list_inc; /**< number of elements to alloc when growing free lists */ - ompi_list_t template_procs; + opal_list_t template_procs; /**< list of template proc structures */ ompi_mutex_t template_lock; diff --git a/ompi/mca/btl/template/btl_template_component.c b/ompi/mca/btl/template/btl_template_component.c index 04e3859711..0b1fb3c883 100644 --- a/ompi/mca/btl/template/btl_template_component.c +++ b/ompi/mca/btl/template/btl_template_component.c @@ -104,7 +104,7 @@ int mca_btl_template_component_open(void) mca_btl_template_component.template_btls=NULL; /* initialize objects */ - OBJ_CONSTRUCT(&mca_btl_template_component.template_procs, ompi_list_t); + OBJ_CONSTRUCT(&mca_btl_template_component.template_procs, opal_list_t); /* register TEMPLATE component parameters */ mca_btl_template_component.template_free_list_num = diff --git a/ompi/mca/btl/template/btl_template_endpoint.c b/ompi/mca/btl/template/btl_template_endpoint.c index 5872948d2f..40c1807f9e 100644 --- a/ompi/mca/btl/template/btl_template_endpoint.c +++ b/ompi/mca/btl/template/btl_template_endpoint.c @@ -53,7 +53,7 @@ static void mca_btl_template_endpoint_destruct(mca_btl_base_endpoint_t* endpoint OBJ_CLASS_INSTANCE( mca_btl_template_endpoint_t, - ompi_list_item_t, + opal_list_item_t, mca_btl_template_endpoint_construct, mca_btl_template_endpoint_destruct); diff --git a/ompi/mca/btl/template/btl_template_endpoint.h b/ompi/mca/btl/template/btl_template_endpoint.h index 4f30ffea08..36cbc18431 100644 --- a/ompi/mca/btl/template/btl_template_endpoint.h +++ b/ompi/mca/btl/template/btl_template_endpoint.h @@ -17,7 +17,7 @@ #ifndef MCA_BTL_TEMPLATE_ENDPOINT_H #define MCA_BTL_TEMPLATE_ENDPOINT_H -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "event/event.h" #include "mca/pml/pml.h" #include "mca/btl/btl.h" @@ -37,7 +37,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_endpoint_t); */ struct mca_btl_base_endpoint_t { - ompi_list_item_t super; + opal_list_item_t super; struct mca_btl_template_module_t* endpoint_btl; /**< BTL instance that created this connection */ diff --git a/ompi/mca/btl/template/btl_template_frag.h b/ompi/mca/btl/template/btl_template_frag.h index 5b5487988b..fd72e81061 100644 --- a/ompi/mca/btl/template/btl_template_frag.h +++ b/ompi/mca/btl/template/btl_template_frag.h @@ -67,7 +67,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_frag_user_t); #define MCA_BTL_TEMPLATE_FRAG_ALLOC_EAGER(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } @@ -75,13 +75,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, \ - (ompi_list_item_t*)(frag)); \ + (opal_list_item_t*)(frag)); \ } #define MCA_BTL_TEMPLATE_FRAG_ALLOC_MAX(btl, frag, rc) \ { \ \ - ompi_list_item_t *item; \ + opal_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; \ } @@ -89,13 +89,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, \ - (ompi_list_item_t*)(frag)); \ + (opal_list_item_t*)(frag)); \ } #define MCA_BTL_TEMPLATE_FRAG_ALLOC_USER(btl, frag, rc) \ { \ - ompi_list_item_t *item; \ + opal_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; \ } @@ -103,7 +103,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, \ - (ompi_list_item_t*)(frag)); \ + (opal_list_item_t*)(frag)); \ } diff --git a/ompi/mca/btl/template/btl_template_proc.c b/ompi/mca/btl/template/btl_template_proc.c index 6f0f1dc80c..bff4c647f8 100644 --- a/ompi/mca/btl/template/btl_template_proc.c +++ b/ompi/mca/btl/template/btl_template_proc.c @@ -26,7 +26,7 @@ static void mca_btl_template_proc_construct(mca_btl_template_proc_t* proc); static void mca_btl_template_proc_destruct(mca_btl_template_proc_t* proc); OBJ_CLASS_INSTANCE(mca_btl_template_proc_t, - ompi_list_item_t, mca_btl_template_proc_construct, + opal_list_item_t, mca_btl_template_proc_construct, mca_btl_template_proc_destruct); void mca_btl_template_proc_construct(mca_btl_template_proc_t* proc) @@ -38,7 +38,7 @@ void mca_btl_template_proc_construct(mca_btl_template_proc_t* proc) OBJ_CONSTRUCT(&proc->proc_lock, ompi_mutex_t); /* add to list of all proc instance */ OMPI_THREAD_LOCK(&mca_btl_template_component.template_lock); - ompi_list_append(&mca_btl_template_component.template_procs, &proc->super); + opal_list_append(&mca_btl_template_component.template_procs, &proc->super); OMPI_THREAD_UNLOCK(&mca_btl_template_component.template_lock); } @@ -50,7 +50,7 @@ void mca_btl_template_proc_destruct(mca_btl_template_proc_t* proc) { /* remove from list of all proc instances */ OMPI_THREAD_LOCK(&mca_btl_template_component.template_lock); - ompi_list_remove_item(&mca_btl_template_component.template_procs, &proc->super); + opal_list_remove_item(&mca_btl_template_component.template_procs, &proc->super); OMPI_THREAD_UNLOCK(&mca_btl_template_component.template_lock); /* release resources */ @@ -71,10 +71,10 @@ static mca_btl_template_proc_t* mca_btl_template_proc_lookup_ompi(ompi_proc_t* o OMPI_THREAD_LOCK(&mca_btl_template_component.template_lock); for(template_proc = (mca_btl_template_proc_t*) - ompi_list_get_first(&mca_btl_template_component.template_procs); + opal_list_get_first(&mca_btl_template_component.template_procs); template_proc != (mca_btl_template_proc_t*) - ompi_list_get_end(&mca_btl_template_component.template_procs); - template_proc = (mca_btl_template_proc_t*)ompi_list_get_next(template_proc)) { + opal_list_get_end(&mca_btl_template_component.template_procs); + template_proc = (mca_btl_template_proc_t*)opal_list_get_next(template_proc)) { if(template_proc->proc_ompi == ompi_proc) { OMPI_THREAD_UNLOCK(&mca_btl_template_component.template_lock); diff --git a/ompi/mca/btl/template/btl_template_proc.h b/ompi/mca/btl/template/btl_template_proc.h index 6d267452bc..ff28bd4ae2 100644 --- a/ompi/mca/btl/template/btl_template_proc.h +++ b/ompi/mca/btl/template/btl_template_proc.h @@ -35,7 +35,7 @@ OBJ_CLASS_DECLARATION(mca_btl_template_proc_t); * BTL instance that attempts to open a connection to the process. */ struct mca_btl_template_proc_t { - ompi_list_item_t super; + opal_list_item_t super; /**< allow proc to be placed on a list */ ompi_proc_t *proc_ompi; diff --git a/ompi/mca/coll/base/base.h b/ompi/mca/coll/base/base.h index c7c1ea4acc..70a41e62f8 100644 --- a/ompi/mca/coll/base/base.h +++ b/ompi/mca/coll/base/base.h @@ -32,7 +32,7 @@ #include "ompi_config.h" #include "mpi.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/coll/coll.h" @@ -244,7 +244,7 @@ OMPI_DECLSPEC extern bool mca_coll_base_components_opened_valid; * initialized and destroyed when we reduce the list to all available * coll components. */ -OMPI_DECLSPEC extern ompi_list_t mca_coll_base_components_opened; +OMPI_DECLSPEC extern opal_list_t mca_coll_base_components_opened; /** * Indicator as to whether the list of available coll components is valid * or not. @@ -255,7 +255,7 @@ OMPI_DECLSPEC extern bool mca_coll_base_components_available_valid; * components to all those who indicate that they may run during this * process. */ -OMPI_DECLSPEC extern ompi_list_t mca_coll_base_components_available; +OMPI_DECLSPEC extern opal_list_t mca_coll_base_components_available; /** * Pointer to the "basic" component so that it can be found easily diff --git a/ompi/mca/coll/base/coll_base_comm_select.c b/ompi/mca/coll/base/coll_base_comm_select.c index 26937469bf..e07db7280e 100644 --- a/ompi/mca/coll/base/coll_base_comm_select.c +++ b/ompi/mca/coll/base/coll_base_comm_select.c @@ -24,7 +24,7 @@ #include "communicator/communicator.h" #include "util/argv.h" #include "util/show_help.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "opal/class/opal_object.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -53,7 +53,7 @@ static mca_coll_base_module_1_0_0_t null_module = { * Local types */ struct avail_coll_t { - ompi_list_item_t super; + opal_list_item_t super; int ac_priority; const mca_coll_base_component_1_0_0_t *ac_component; @@ -66,7 +66,7 @@ typedef struct avail_coll_t avail_coll_t; /* * Local functions */ -static ompi_list_t *check_components(ompi_list_t *components, +static opal_list_t *check_components(opal_list_t *components, ompi_communicator_t *comm, char **names, int num_names); static int check_one_component(ompi_communicator_t *comm, @@ -100,7 +100,7 @@ static int replace_null_with_basic(ompi_communicator_t *comm); /* * Stuff for the OBJ interface */ -static OBJ_CLASS_INSTANCE(avail_coll_t, ompi_list_item_t, NULL, NULL); +static OBJ_CLASS_INSTANCE(avail_coll_t, opal_list_item_t, NULL, NULL); /* @@ -119,8 +119,8 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm, char *names, **name_array; char *str; avail_coll_t *avail; - ompi_list_t *selectable; - ompi_list_item_t *item; + opal_list_t *selectable; + opal_list_item_t *item; const mca_coll_base_component_1_0_0_t *selected_component, *component; const mca_coll_base_module_1_0_0_t *selected_module; struct mca_coll_base_comm_t *selected_data; @@ -238,7 +238,7 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm, if (NULL != selectable) { using_basic = false; - item = ompi_list_remove_first(selectable); + item = opal_list_remove_first(selectable); avail = (avail_coll_t *) item; selected_component = avail->ac_component; selected_module = avail->ac_module; @@ -259,8 +259,8 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm, invoked, but will never have init() invoked in this scope). */ if (NULL != selectable) { - for (item = ompi_list_remove_first(selectable); item != NULL; - item = ompi_list_remove_first(selectable)) { + for (item = opal_list_remove_first(selectable); item != NULL; + item = opal_list_remove_first(selectable)) { avail = (avail_coll_t *) item; component = avail->ac_component; unquery(component, comm, avail->ac_data); @@ -311,30 +311,30 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm, * only those who returned that they want to run, and put them in * priority order. */ -static ompi_list_t *check_components(ompi_list_t *components, +static opal_list_t *check_components(opal_list_t *components, ompi_communicator_t *comm, char **names, int num_names) { int i, priority; const mca_base_component_t *component; - ompi_list_item_t *item, *item2; + opal_list_item_t *item, *item2; const mca_coll_base_module_1_0_0_t *module; bool want_to_check; - ompi_list_t *selectable; + opal_list_t *selectable; avail_coll_t *avail, *avail2; struct mca_coll_base_comm_t *data; /* Make a list of the components that query successfully */ - selectable = OBJ_NEW(ompi_list_t); + selectable = OBJ_NEW(opal_list_t); /* Scan through the list of components. This nested loop is O(N^2), but we should never have too many components and/or names, so this *hopefully* shouldn't matter... */ - for (item = ompi_list_get_first(components); - item != ompi_list_get_end(components); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(components); + item != opal_list_get_end(components); + item = opal_list_get_next(item)) { component = ((mca_base_component_priority_list_item_t *) item)->super.cli_component; @@ -370,20 +370,20 @@ static ompi_list_t *check_components(ompi_list_t *components, /* Put this item on the list in priority order (highest priority first). Should it go first? */ - if (ompi_list_is_empty(selectable)) { - ompi_list_prepend(selectable, (ompi_list_item_t *) avail); + if (opal_list_is_empty(selectable)) { + opal_list_prepend(selectable, (opal_list_item_t *) avail); } else { - item2 = ompi_list_get_first(selectable); + item2 = opal_list_get_first(selectable); avail2 = (avail_coll_t *) item2; if (avail->ac_priority > avail2->ac_priority) { - ompi_list_prepend(selectable, (ompi_list_item_t *) avail); + opal_list_prepend(selectable, (opal_list_item_t *) avail); } else { - for (i = 1; item2 != ompi_list_get_end(selectable); - item2 = ompi_list_get_next(item2), ++i) { + for (i = 1; item2 != opal_list_get_end(selectable); + item2 = opal_list_get_next(item2), ++i) { avail2 = (avail_coll_t *) item2; if (avail->ac_priority > avail2->ac_priority) { - ompi_list_insert(selectable, - (ompi_list_item_t *) avail, i); + opal_list_insert(selectable, + (opal_list_item_t *) avail, i); break; } } @@ -392,8 +392,8 @@ static ompi_list_t *check_components(ompi_list_t *components, append it (because it has the lowest priority found so far) */ - if (ompi_list_get_end(selectable) == item2) { - ompi_list_append(selectable, (ompi_list_item_t *) avail); + if (opal_list_get_end(selectable) == item2) { + opal_list_append(selectable, (opal_list_item_t *) avail); } } } @@ -403,7 +403,7 @@ static ompi_list_t *check_components(ompi_list_t *components, /* If we didn't find any available components, return an error */ - if (0 == ompi_list_get_size(selectable)) { + if (0 == opal_list_get_size(selectable)) { OBJ_RELEASE(selectable); return NULL; } diff --git a/ompi/mca/coll/base/coll_base_comm_unselect.c b/ompi/mca/coll/base/coll_base_comm_unselect.c index 607d425602..94c35b3fe4 100644 --- a/ompi/mca/coll/base/coll_base_comm_unselect.c +++ b/ompi/mca/coll/base/coll_base_comm_unselect.c @@ -28,7 +28,7 @@ #include "mca/coll/coll.h" #include "mca/coll/base/base.h" -extern ompi_list_t mca_coll_base_available; +extern opal_list_t mca_coll_base_available; /* diff --git a/ompi/mca/coll/base/coll_base_find_available.c b/ompi/mca/coll/base/coll_base_find_available.c index 47aea91c43..76e9bfe9f5 100644 --- a/ompi/mca/coll/base/coll_base_find_available.c +++ b/ompi/mca/coll/base/coll_base_find_available.c @@ -22,7 +22,7 @@ #include "mpi.h" #include "include/constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/output.h" #include "util/show_help.h" #include "mca/mca.h" @@ -35,7 +35,7 @@ * Global variables */ bool mca_coll_base_components_available_valid = false; -ompi_list_t mca_coll_base_components_available; +opal_list_t mca_coll_base_components_available; const mca_coll_base_component_1_0_0_t *mca_coll_base_basic_component = NULL; @@ -69,21 +69,21 @@ int mca_coll_base_find_available(bool enable_progress_threads, { bool found = false; mca_base_component_priority_list_item_t *entry; - ompi_list_item_t *p; + opal_list_item_t *p; const mca_base_component_t *component; /* Initialize the list */ - OBJ_CONSTRUCT(&mca_coll_base_components_available, ompi_list_t); + OBJ_CONSTRUCT(&mca_coll_base_components_available, opal_list_t); mca_coll_base_components_available_valid = true; /* The list of components that we should check has already been established in mca_coll_base_open. */ for (found = false, - p = ompi_list_remove_first(&mca_coll_base_components_opened); + p = opal_list_remove_first(&mca_coll_base_components_opened); p != NULL; - p = ompi_list_remove_first(&mca_coll_base_components_opened)) { + p = opal_list_remove_first(&mca_coll_base_components_opened)) { component = ((mca_base_component_list_item_t *) p)->cli_component; /* Call a subroutine to do the work, because the component may @@ -114,8 +114,8 @@ int mca_coll_base_find_available(bool enable_progress_threads, level for this process. */ else { - ompi_list_append(&mca_coll_base_components_available, - (ompi_list_item_t *) entry); + opal_list_append(&mca_coll_base_components_available, + (opal_list_item_t *) entry); } /* Either way, we found something :-) */ diff --git a/ompi/mca/coll/base/coll_base_open.c b/ompi/mca/coll/base/coll_base_open.c index 6dfdd6f5f0..eb1701e01c 100644 --- a/ompi/mca/coll/base/coll_base_open.c +++ b/ompi/mca/coll/base/coll_base_open.c @@ -50,7 +50,7 @@ int mca_coll_base_bcast_collmaxlin = 4; int mca_coll_base_bcast_collmaxdim = 64; bool mca_coll_base_components_opened_valid = false; -ompi_list_t mca_coll_base_components_opened; +opal_list_t mca_coll_base_components_opened; /* diff --git a/ompi/mca/common/sm/common_sm_mmap.h b/ompi/mca/common/sm/common_sm_mmap.h index c5511078a4..88e52284da 100644 --- a/ompi/mca/common/sm/common_sm_mmap.h +++ b/ompi/mca/common/sm/common_sm_mmap.h @@ -20,7 +20,7 @@ #include "ompi_config.h" #include "opal/class/opal_object.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "include/sys/atomic.h" #include "mca/mpool/mpool.h" @@ -55,7 +55,7 @@ typedef struct mca_common_sm_file_header_t mca_common_sm_file_header_t; struct mca_common_sm_mmap_t { /* double link list element */ - ompi_list_item_t map_item; + opal_list_item_t map_item; /* pointer to header imbeded in the shared memory file */ mca_common_sm_file_header_t* map_seg; /* base address of the mmap'ed file */ diff --git a/ompi/mca/io/base/base.h b/ompi/mca/io/base/base.h index 4efd04111f..25b0ddd2f1 100644 --- a/ompi/mca/io/base/base.h +++ b/ompi/mca/io/base/base.h @@ -26,7 +26,7 @@ #include "ompi_config.h" #include "mpi.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_free_list.h" #include "mca/io/io.h" @@ -291,7 +291,7 @@ OMPI_DECLSPEC extern bool mca_io_base_components_opened_valid; * initialized and destroyed when we reduce the list to all available * io components. */ -OMPI_DECLSPEC extern ompi_list_t mca_io_base_components_opened; +OMPI_DECLSPEC extern opal_list_t mca_io_base_components_opened; /** * Indicator as to whether the list of available io components is valid * or not. @@ -302,7 +302,7 @@ OMPI_DECLSPEC extern bool mca_io_base_components_available_valid; * components to all those who indicate that they may run during this * process. */ -OMPI_DECLSPEC extern ompi_list_t mca_io_base_components_available; +OMPI_DECLSPEC extern opal_list_t mca_io_base_components_available; /** * Indicator as to whether the freelist of IO requests is valid or * not. diff --git a/ompi/mca/io/base/io_base_component_list.c b/ompi/mca/io/base/io_base_component_list.c index a01a005345..19a57a1ce3 100644 --- a/ompi/mca/io/base/io_base_component_list.c +++ b/ompi/mca/io/base/io_base_component_list.c @@ -16,7 +16,7 @@ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/mutex.h" #include "mca/base/base.h" #include "mca/io/io.h" @@ -27,19 +27,19 @@ * Private variables */ static bool initialized = false; -static ompi_list_t components_in_use; +static opal_list_t components_in_use; #if OMPI_HAVE_THREAD_SUPPORT static ompi_mutex_t mutex; #endif /* OMPI_HAVE_THREAD_SUPPORT */ struct component_item_t { - ompi_list_item_t super; + opal_list_item_t super; int refcount; mca_io_base_version_t version; mca_io_base_components_t component; }; typedef struct component_item_t component_item_t; -static OBJ_CLASS_INSTANCE(component_item_t, ompi_list_item_t, NULL, NULL); +static OBJ_CLASS_INSTANCE(component_item_t, opal_list_item_t, NULL, NULL); /* @@ -47,7 +47,7 @@ static OBJ_CLASS_INSTANCE(component_item_t, ompi_list_item_t, NULL, NULL); */ int mca_io_base_component_init(void) { - OBJ_CONSTRUCT(&components_in_use, ompi_list_t); + OBJ_CONSTRUCT(&components_in_use, opal_list_t); initialized = true; @@ -63,7 +63,7 @@ int mca_io_base_component_init(void) */ int mca_io_base_component_add(mca_io_base_components_t *comp) { - ompi_list_item_t *item; + opal_list_item_t *item; component_item_t *citem; mca_base_component_t *c; @@ -75,9 +75,9 @@ int mca_io_base_component_add(mca_io_base_components_t *comp) refcount. Otherwise, add it to the list with a refcount of 1. */ - for (item = ompi_list_get_first(&components_in_use); - item != ompi_list_get_end(&components_in_use); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&components_in_use); + item != opal_list_get_end(&components_in_use); + item = opal_list_get_next(item)) { citem = (component_item_t *) item; /* Note the memory / pointer trickery here: we don't care what @@ -98,7 +98,7 @@ int mca_io_base_component_add(mca_io_base_components_t *comp) /* If we didn't find it, save it */ - if (ompi_list_get_end(&components_in_use) == item) { + if (opal_list_get_end(&components_in_use) == item) { citem = OBJ_NEW(component_item_t); citem->refcount = 1; citem->component = *comp; @@ -111,7 +111,7 @@ int mca_io_base_component_add(mca_io_base_components_t *comp) } else { citem->version = MCA_IO_BASE_V_NONE; } - ompi_list_append(&components_in_use, (ompi_list_item_t *) citem); + opal_list_append(&components_in_use, (opal_list_item_t *) citem); } OMPI_THREAD_UNLOCK(&mutex); @@ -128,16 +128,16 @@ int mca_io_base_component_add(mca_io_base_components_t *comp) */ int mca_io_base_component_del(mca_io_base_components_t *comp) { - ompi_list_item_t *item; + opal_list_item_t *item; component_item_t *citem; OMPI_THREAD_LOCK(&mutex); /* Find the component in the list */ - for (item = ompi_list_get_first(&components_in_use); - item != ompi_list_get_end(&components_in_use); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&components_in_use); + item != opal_list_get_end(&components_in_use); + item = opal_list_get_next(item)) { citem = (component_item_t *) item; /* Note the memory / pointer trickery here: we don't care what @@ -150,8 +150,8 @@ int mca_io_base_component_del(mca_io_base_components_t *comp) (const mca_base_component_t *) comp) == 0) { --citem->refcount; if (0 == citem->refcount) { - ompi_list_remove_item(&components_in_use, - (ompi_list_item_t *) citem); + opal_list_remove_item(&components_in_use, + (opal_list_item_t *) citem); } OBJ_RELEASE(citem); break; @@ -170,7 +170,7 @@ int mca_io_base_component_del(mca_io_base_components_t *comp) int mca_io_base_component_run_progress(void) { int ret, count = 0; - ompi_list_item_t *item; + opal_list_item_t *item; component_item_t *citem; if (! initialized) return 0; @@ -180,9 +180,9 @@ int mca_io_base_component_run_progress(void) /* Go through all the components and call their progress function */ - for (item = ompi_list_get_first(&components_in_use); - item != ompi_list_get_end(&components_in_use); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&components_in_use); + item != opal_list_get_end(&components_in_use); + item = opal_list_get_next(item)) { citem = (component_item_t *) item; switch (citem->version) { diff --git a/ompi/mca/io/base/io_base_delete.c b/ompi/mca/io/base/io_base_delete.c index 519a32436b..1af9f2116c 100644 --- a/ompi/mca/io/base/io_base_delete.c +++ b/ompi/mca/io/base/io_base_delete.c @@ -22,7 +22,7 @@ #include "mpi.h" #include "file/file.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/argv.h" #include "util/output.h" #include "mca/mca.h" @@ -34,7 +34,7 @@ * Local types */ struct avail_io_t { - ompi_list_item_t super; + opal_list_item_t super; mca_io_base_version_t ai_version; @@ -47,7 +47,7 @@ typedef struct avail_io_t avail_io_t; /* * Local functions */ -static ompi_list_t *check_components(ompi_list_t *components, +static opal_list_t *check_components(opal_list_t *components, char *filename, struct ompi_info_t *info, char **names, int num_names); static avail_io_t *check_one_component(const mca_base_component_t *component, @@ -66,7 +66,7 @@ static int delete_file(avail_io_t *avail, char *filename, struct ompi_info_t *in /* * Stuff for the OBJ interface */ -static OBJ_CLASS_INSTANCE(avail_io_t, ompi_list_item_t, NULL, NULL); +static OBJ_CLASS_INSTANCE(avail_io_t, opal_list_item_t, NULL, NULL); /* @@ -75,8 +75,8 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info) { int err, num_names; char *names, **name_array; - ompi_list_t *selectable; - ompi_list_item_t *item; + opal_list_t *selectable; + opal_list_item_t *item; avail_io_t *avail, selected; /* Announce */ @@ -138,7 +138,7 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info) #if 1 /* For the moment, just take the top module off the list */ - item = ompi_list_remove_first(selectable); + item = opal_list_remove_first(selectable); avail = (avail_io_t *) item; selected = *avail; OBJ_RELEASE(avail); @@ -151,8 +151,8 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info) query() invoked, but will never have init() invoked in this scope). */ - for (item = ompi_list_remove_first(selectable); item != NULL; - item = ompi_list_remove_first(selectable)) { + for (item = opal_list_remove_first(selectable); item != NULL; + item = opal_list_remove_first(selectable)) { avail = (avail_io_t *) item; unquery(avail, filename, info); OBJ_RELEASE(item); @@ -182,28 +182,28 @@ int mca_io_base_delete(char *filename, struct ompi_info_t *info) * be only those who returned that they want to run, and put them in * priority order. */ -static ompi_list_t *check_components(ompi_list_t *components, +static opal_list_t *check_components(opal_list_t *components, char *filename, struct ompi_info_t *info, char **names, int num_names) { int i; const mca_base_component_t *component; - ompi_list_item_t *item, *item2; + opal_list_item_t *item, *item2; bool want_to_check; - ompi_list_t *selectable; + opal_list_t *selectable; avail_io_t *avail, *avail2; /* Make a list of the components that query successfully */ - selectable = OBJ_NEW(ompi_list_t); + selectable = OBJ_NEW(opal_list_t); /* Scan through the list of components. This nested loop is O(N^2), but we should never have too many components and/or names, so this *hopefully* shouldn't matter... */ - for (item = ompi_list_get_first(components); - item != ompi_list_get_end(components); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(components); + item != opal_list_get_end(components); + item = opal_list_get_next(item)) { component = ((mca_base_component_priority_list_item_t *) item)->super.cli_component; @@ -230,18 +230,18 @@ static ompi_list_t *check_components(ompi_list_t *components, /* Put this item on the list in priority order (highest priority first). Should it go first? */ - item2 = ompi_list_get_first(selectable); + item2 = opal_list_get_first(selectable); avail2 = (avail_io_t *) item2; - if (ompi_list_get_end(selectable) == item2 || + if (opal_list_get_end(selectable) == item2 || avail->ai_priority > avail2->ai_priority) { - ompi_list_prepend(selectable, (ompi_list_item_t*) avail); + opal_list_prepend(selectable, (opal_list_item_t*) avail); } else { - for (i = 1; item2 != ompi_list_get_end(selectable); - item2 = ompi_list_get_next(selectable), ++i) { + for (i = 1; item2 != opal_list_get_end(selectable); + item2 = opal_list_get_next(selectable), ++i) { avail2 = (avail_io_t *) item2; if (avail->ai_priority > avail2->ai_priority) { - ompi_list_insert(selectable, - (ompi_list_item_t *) avail, i); + opal_list_insert(selectable, + (opal_list_item_t *) avail, i); break; } } @@ -250,9 +250,9 @@ static ompi_list_t *check_components(ompi_list_t *components, list, then append it (because it has the lowest priority found so far) */ - if (ompi_list_get_end(selectable) == item2) { - ompi_list_append(selectable, - (ompi_list_item_t *) avail); + if (opal_list_get_end(selectable) == item2) { + opal_list_append(selectable, + (opal_list_item_t *) avail); } } } @@ -261,7 +261,7 @@ static ompi_list_t *check_components(ompi_list_t *components, /* If we didn't find any available components, return an error */ - if (0 == ompi_list_get_size(selectable)) { + if (0 == opal_list_get_size(selectable)) { OBJ_RELEASE(selectable); return NULL; } diff --git a/ompi/mca/io/base/io_base_file_select.c b/ompi/mca/io/base/io_base_file_select.c index 4fdb245e1b..1aa580f837 100644 --- a/ompi/mca/io/base/io_base_file_select.c +++ b/ompi/mca/io/base/io_base_file_select.c @@ -24,7 +24,7 @@ #include "file/file.h" #include "util/argv.h" #include "util/output.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "opal/class/opal_object.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -37,7 +37,7 @@ * Local types */ struct avail_io_t { - ompi_list_item_t super; + opal_list_item_t super; mca_io_base_version_t ai_version; @@ -51,7 +51,7 @@ typedef struct avail_io_t avail_io_t; /* * Local functions */ -static ompi_list_t *check_components(ompi_list_t *components, +static opal_list_t *check_components(opal_list_t *components, ompi_file_t *file, char **names, int num_names); static avail_io_t *check_one_component(ompi_file_t *file, @@ -70,7 +70,7 @@ static int module_init(ompi_file_t *file); /* * Stuff for the OBJ interface */ -static OBJ_CLASS_INSTANCE(avail_io_t, ompi_list_item_t, NULL, NULL); +static OBJ_CLASS_INSTANCE(avail_io_t, opal_list_item_t, NULL, NULL); /* @@ -84,8 +84,8 @@ int mca_io_base_file_select(ompi_file_t *file, int err, num_names; char *names, **name_array; char *str; - ompi_list_t *selectable; - ompi_list_item_t *item; + opal_list_t *selectable; + opal_list_item_t *item; avail_io_t *avail, selected; /* Announce */ @@ -178,7 +178,7 @@ int mca_io_base_file_select(ompi_file_t *file, #if 1 /* For the moment, just take the top module off the list */ - item = ompi_list_remove_first(selectable); + item = opal_list_remove_first(selectable); avail = (avail_io_t *) item; selected = *avail; OBJ_RELEASE(avail); @@ -191,8 +191,8 @@ int mca_io_base_file_select(ompi_file_t *file, query() invoked, but will never have init() invoked in this scope). */ - for (item = ompi_list_remove_first(selectable); item != NULL; - item = ompi_list_remove_first(selectable)) { + for (item = opal_list_remove_first(selectable); item != NULL; + item = opal_list_remove_first(selectable)) { avail = (avail_io_t *) item; unquery(avail, file); OBJ_RELEASE(item); @@ -234,28 +234,28 @@ int mca_io_base_file_select(ompi_file_t *file, * (component, module) tuples (of type avail_io_t) to be only those * who returned that they want to run, and put them in priority order. */ -static ompi_list_t *check_components(ompi_list_t *components, +static opal_list_t *check_components(opal_list_t *components, ompi_file_t *file, char **names, int num_names) { int i; const mca_base_component_t *component; - ompi_list_item_t *item, *item2; + opal_list_item_t *item, *item2; bool want_to_check; - ompi_list_t *selectable; + opal_list_t *selectable; avail_io_t *avail, *avail2; /* Make a list of the components that query successfully */ - selectable = OBJ_NEW(ompi_list_t); + selectable = OBJ_NEW(opal_list_t); /* Scan through the list of components. This nested loop is O(N^2), but we should never have too many components and/or names, so this *hopefully* shouldn't matter... */ - for (item = ompi_list_get_first(components); - item != ompi_list_get_end(components); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(components); + item != opal_list_get_end(components); + item = opal_list_get_next(item)) { component = ((mca_base_component_priority_list_item_t *) item)->super.cli_component; @@ -282,18 +282,18 @@ static ompi_list_t *check_components(ompi_list_t *components, /* Put this item on the list in priority order (highest priority first). Should it go first? */ - item2 = ompi_list_get_first(selectable); + item2 = opal_list_get_first(selectable); avail2 = (avail_io_t *) item2; - if (ompi_list_get_end(selectable) == item2 || + if (opal_list_get_end(selectable) == item2 || avail->ai_priority > avail2->ai_priority) { - ompi_list_prepend(selectable, (ompi_list_item_t*) avail); + opal_list_prepend(selectable, (opal_list_item_t*) avail); } else { - for (i = 1; item2 != ompi_list_get_end(selectable); - item2 = ompi_list_get_next(selectable), ++i) { + for (i = 1; item2 != opal_list_get_end(selectable); + item2 = opal_list_get_next(selectable), ++i) { avail2 = (avail_io_t *) item2; if (avail->ai_priority > avail2->ai_priority) { - ompi_list_insert(selectable, - (ompi_list_item_t *) avail, i); + opal_list_insert(selectable, + (opal_list_item_t *) avail, i); break; } } @@ -302,9 +302,9 @@ static ompi_list_t *check_components(ompi_list_t *components, list, then append it (because it has the lowest priority found so far) */ - if (ompi_list_get_end(selectable) == item2) { - ompi_list_append(selectable, - (ompi_list_item_t *) avail); + if (opal_list_get_end(selectable) == item2) { + opal_list_append(selectable, + (opal_list_item_t *) avail); } } } @@ -313,7 +313,7 @@ static ompi_list_t *check_components(ompi_list_t *components, /* If we didn't find any available components, return an error */ - if (0 == ompi_list_get_size(selectable)) { + if (0 == opal_list_get_size(selectable)) { OBJ_RELEASE(selectable); return NULL; } diff --git a/ompi/mca/io/base/io_base_find_available.c b/ompi/mca/io/base/io_base_find_available.c index cacdda5733..1f48decd67 100644 --- a/ompi/mca/io/base/io_base_find_available.c +++ b/ompi/mca/io/base/io_base_find_available.c @@ -21,7 +21,7 @@ #include "mpi.h" #include "include/constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/output.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -61,20 +61,20 @@ int mca_io_base_find_available(bool enable_progress_threads, { int err; mca_base_component_priority_list_item_t *entry; - ompi_list_item_t *p; + opal_list_item_t *p; const mca_base_component_t *component; /* Initialize the list */ - OBJ_CONSTRUCT(&mca_io_base_components_available, ompi_list_t); + OBJ_CONSTRUCT(&mca_io_base_components_available, opal_list_t); mca_io_base_components_available_valid = true; /* The list of components that we should check has already been established in mca_io_base_open. */ - for (p = ompi_list_remove_first(&mca_io_base_components_opened); + for (p = opal_list_remove_first(&mca_io_base_components_opened); p != NULL; - p = ompi_list_remove_first(&mca_io_base_components_opened)) { + p = opal_list_remove_first(&mca_io_base_components_opened)) { component = ((mca_base_component_list_item_t *) p)->cli_component; /* Call a subroutine to do the work, because the component may @@ -94,8 +94,8 @@ int mca_io_base_find_available(bool enable_progress_threads, the initial selection algorithm can negotiate the overall thread level for this process. */ - ompi_list_append(&mca_io_base_components_available, - (ompi_list_item_t *) entry); + opal_list_append(&mca_io_base_components_available, + (opal_list_item_t *) entry); } else { /* If the component doesn't want to run, then close it. diff --git a/ompi/mca/io/base/io_base_open.c b/ompi/mca/io/base/io_base_open.c index 43b8f9685d..0e3e2679dc 100644 --- a/ompi/mca/io/base/io_base_open.c +++ b/ompi/mca/io/base/io_base_open.c @@ -47,10 +47,10 @@ int mca_io_base_param = -1; int mca_io_base_output = -1; bool mca_io_base_components_opened_valid = false; -ompi_list_t mca_io_base_components_opened; +opal_list_t mca_io_base_components_opened; bool mca_io_base_components_available_valid = false; -ompi_list_t mca_io_base_components_available; +opal_list_t mca_io_base_components_available; /* diff --git a/ompi/mca/io/base/io_base_request.c b/ompi/mca/io/base/io_base_request.c index 32c1b31f56..542d5a2197 100644 --- a/ompi/mca/io/base/io_base_request.c +++ b/ompi/mca/io/base/io_base_request.c @@ -61,7 +61,7 @@ static void io_base_request_constructor(mca_io_base_request_t *req) */ int mca_io_base_request_create_freelist(void) { - ompi_list_item_t *p; + opal_list_item_t *p; const mca_base_component_t *component; const mca_io_base_component_1_0_0_t *v100; size_t size = 0; @@ -70,9 +70,9 @@ int mca_io_base_request_create_freelist(void) /* Find the maximum additional number of bytes required by all io components for requests and make that the request size */ - for (p = ompi_list_get_first(&mca_io_base_components_available); - p != ompi_list_get_end(&mca_io_base_components_available); - p = ompi_list_get_next(p)) { + for (p = opal_list_get_first(&mca_io_base_components_available); + p != opal_list_get_end(&mca_io_base_components_available); + p = opal_list_get_next(p)) { component = ((mca_base_component_priority_list_item_t *) p)->super.cli_component; @@ -117,7 +117,7 @@ int mca_io_base_request_alloc(ompi_file_t *file, { int err; mca_io_base_module_request_once_init_fn_t func; - ompi_list_item_t *item; + opal_list_item_t *item; /* See if we've got a request on the module's freelist (which is cached on the file, since there's only one module per @@ -125,11 +125,11 @@ int mca_io_base_request_alloc(ompi_file_t *file, enough) check as a slight optimization to potentially having to avoid locking and unlocking. */ - if (ompi_list_get_size(&file->f_io_requests) > 0) { + if (opal_list_get_size(&file->f_io_requests) > 0) { OMPI_THREAD_LOCK(&file->f_io_requests_lock); - if (ompi_list_get_size(&file->f_io_requests) > 0) { + if (opal_list_get_size(&file->f_io_requests) > 0) { *req = (mca_io_base_request_t*) - ompi_list_remove_first(&file->f_io_requests); + opal_list_remove_first(&file->f_io_requests); } else { *req = NULL; } @@ -208,7 +208,7 @@ void mca_io_base_request_free(ompi_file_t *file, been initialized for that module */ OMPI_THREAD_LOCK(&file->f_io_requests_lock); - ompi_list_prepend(&file->f_io_requests, (ompi_list_item_t*) req); + opal_list_prepend(&file->f_io_requests, (opal_list_item_t*) req); OMPI_THREAD_UNLOCK(&file->f_io_requests_lock); } @@ -218,13 +218,13 @@ void mca_io_base_request_free(ompi_file_t *file, */ void mca_io_base_request_return(ompi_file_t *file) { - ompi_list_item_t *p, *next; + opal_list_item_t *p, *next; OMPI_THREAD_LOCK(&file->f_io_requests_lock); - for (p = ompi_list_get_first(&file->f_io_requests); - p != ompi_list_get_end(&file->f_io_requests); + for (p = opal_list_get_first(&file->f_io_requests); + p != opal_list_get_end(&file->f_io_requests); p = next) { - next = ompi_list_get_next(p); + next = opal_list_get_next(p); OMPI_FREE_LIST_RETURN(&mca_io_base_requests, p); } OMPI_THREAD_UNLOCK(&file->f_io_requests_lock); diff --git a/ompi/mca/io/romio/src/io_romio.h b/ompi/mca/io/romio/src/io_romio.h index ac0d2becdf..7e05810c64 100644 --- a/ompi/mca/io/romio/src/io_romio.h +++ b/ompi/mca/io/romio/src/io_romio.h @@ -34,7 +34,7 @@ extern "C" { */ extern ompi_mutex_t mca_io_romio_mutex; extern mca_io_base_module_1_0_0_t mca_io_romio_module; -extern ompi_list_t mca_io_romio_pending_requests; +extern opal_list_t mca_io_romio_pending_requests; /* @@ -73,7 +73,7 @@ int mca_io_romio_request_cancel(ompi_request_t *req, int flag); */ #define MCA_IO_ROMIO_REQUEST_ADD(request) \ ((ompi_request_t*) request)->req_state = OMPI_REQUEST_ACTIVE; \ - ompi_list_append(&mca_io_romio_pending_requests, (ompi_list_item_t *) request); \ + opal_list_append(&mca_io_romio_pending_requests, (opal_list_item_t *) request); \ mca_io_base_request_progress_add(); diff --git a/ompi/mca/io/romio/src/io_romio_component.c b/ompi/mca/io/romio/src/io_romio_component.c index 1ac4a0fcce..eacce044c5 100644 --- a/ompi/mca/io/romio/src/io_romio_component.c +++ b/ompi/mca/io/romio/src/io_romio_component.c @@ -16,7 +16,7 @@ #include "ompi_config.h" #include "mpi.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/mutex.h" #include "mca/base/base.h" #include "mca/io/io.h" @@ -61,7 +61,7 @@ ompi_mutex_t mca_io_romio_mutex; /* * Global list of requests for this component */ -ompi_list_t mca_io_romio_pending_requests; +opal_list_t mca_io_romio_pending_requests; /* @@ -129,7 +129,7 @@ static int open_component(void) /* Create the list of pending requests */ - OBJ_CONSTRUCT(&mca_io_romio_pending_requests, ompi_list_t); + OBJ_CONSTRUCT(&mca_io_romio_pending_requests, opal_list_t); return OMPI_SUCCESS; } @@ -236,7 +236,7 @@ static int delete_select(char *filename, struct ompi_info_t *info, static int progress() { - ompi_list_item_t *item, *next; + opal_list_item_t *item, *next; int ret, flag, count; ROMIO_PREFIX(MPIO_Request) romio_rq; mca_io_base_request_t *ioreq; @@ -246,10 +246,10 @@ static int progress() count = 0; OMPI_THREAD_LOCK (&mca_io_romio_mutex); - for (item = ompi_list_get_first(&mca_io_romio_pending_requests); - item != ompi_list_get_end(&mca_io_romio_pending_requests); + for (item = opal_list_get_first(&mca_io_romio_pending_requests); + item != opal_list_get_end(&mca_io_romio_pending_requests); item = next) { - next = ompi_list_get_next(item); + next = opal_list_get_next(item); ioreq = (mca_io_base_request_t*) item; romio_rq = ((mca_io_romio_request_t *) item)->romio_rq; @@ -263,7 +263,7 @@ static int progress() /* mark as complete (and make sure to wake up any waiters */ ompi_request_complete((ompi_request_t*) item); /* we're done, so remove us from the pending list */ - ompi_list_remove_item(&mca_io_romio_pending_requests, item); + opal_list_remove_item(&mca_io_romio_pending_requests, item); mca_io_base_request_progress_del(); /* if the request has been freed already, the user isn't * going to call test or wait on us, so we need to do it diff --git a/ompi/mca/mpool/base/base.h b/ompi/mca/mpool/base/base.h index 1dd1ded3a7..ba33a38aed 100644 --- a/ompi/mca/mpool/base/base.h +++ b/ompi/mca/mpool/base/base.h @@ -21,7 +21,7 @@ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_rb_tree.h" #include "mca/mca.h" #include "mca/mpool/mpool.h" @@ -32,7 +32,7 @@ extern "C" { #endif struct mca_mpool_base_selected_module_t { - ompi_list_item_t super; + opal_list_item_t super; mca_mpool_base_component_t *mpool_component; mca_mpool_base_module_t *mpool_module; void* user_data; @@ -79,7 +79,7 @@ typedef struct mca_mpool_base_reg_mpool_t mca_mpool_base_reg_mpool_t; */ struct mca_mpool_base_chunk_t { - ompi_list_item_t super; /**< the parent class */ + opal_list_item_t super; /**< the parent class */ mca_mpool_base_key_t key; /**< the key which holds the memory pointers */ mca_mpool_base_reg_mpool_t mpools[MCA_MPOOL_BASE_MAX_REG]; /**< the mpools the memory is registered with */ @@ -111,8 +111,8 @@ OMPI_DECLSPEC mca_mpool_base_module_t* mca_mpool_base_module_create( * Globals */ OMPI_DECLSPEC extern int mca_mpool_base_output; -OMPI_DECLSPEC extern ompi_list_t mca_mpool_base_components; -OMPI_DECLSPEC extern ompi_list_t mca_mpool_base_modules; +OMPI_DECLSPEC extern opal_list_t mca_mpool_base_components; +OMPI_DECLSPEC extern opal_list_t mca_mpool_base_modules; OMPI_DECLSPEC extern ompi_free_list_t mca_mpool_base_mem_list; OMPI_DECLSPEC extern ompi_rb_tree_t mca_mpool_base_tree; OMPI_DECLSPEC extern ompi_mutex_t mca_mpool_base_tree_lock; diff --git a/ompi/mca/mpool/base/mpool_base_alloc.c b/ompi/mca/mpool/base/mpool_base_alloc.c index 03fad94827..14dae47bd5 100644 --- a/ompi/mca/mpool/base/mpool_base_alloc.c +++ b/ompi/mca/mpool/base/mpool_base_alloc.c @@ -102,7 +102,7 @@ static void mca_mpool_base_registration_destructor( mca_mpool_base_registration_ OBJ_CLASS_INSTANCE( mca_mpool_base_registration_t, - ompi_list_item_t, + opal_list_item_t, mca_mpool_base_registration_constructor, mca_mpool_base_registration_destructor); @@ -139,7 +139,7 @@ int mca_mpool_base_insert(void * addr, size_t size, void* user_data, mca_mpool_base_registration_t* registration) { - ompi_list_item_t *item; + opal_list_item_t *item; int rc; OMPI_FREE_LIST_GET(&mca_mpool_base_mem_list, item, rc); if(rc != OMPI_SUCCESS) @@ -208,8 +208,8 @@ int mca_mpool_base_remove(void * base) */ void * mca_mpool_base_alloc(size_t size, ompi_info_t * info) { - ompi_list_item_t * item; - int num_modules = ompi_list_get_size(&mca_mpool_base_modules); + opal_list_item_t * item; + int num_modules = opal_list_get_size(&mca_mpool_base_modules); int reg_module_num = 0; int i, num_keys; mca_mpool_base_selected_module_t * current; @@ -223,9 +223,9 @@ void * mca_mpool_base_alloc(size_t size, ompi_info_t * info) if(&ompi_mpi_info_null == info) { - for(item = ompi_list_get_first(&mca_mpool_base_modules); - item != ompi_list_get_end(&mca_mpool_base_modules); - item = ompi_list_get_next(item)) + for(item = opal_list_get_first(&mca_mpool_base_modules); + item != opal_list_get_end(&mca_mpool_base_modules); + item = opal_list_get_next(item)) { current = ((mca_mpool_base_selected_module_t *) item); if(NULL == current->mpool_module->mpool_register) @@ -246,9 +246,9 @@ void * mca_mpool_base_alloc(size_t size, ompi_info_t * info) { match_found = false; ompi_info_get_nthkey(info, i, key); - for(item = ompi_list_get_first(&mca_mpool_base_modules); - item != ompi_list_get_end(&mca_mpool_base_modules); - item = ompi_list_get_next(item)) + for(item = opal_list_get_first(&mca_mpool_base_modules); + item != opal_list_get_end(&mca_mpool_base_modules); + item = opal_list_get_next(item)) { current = ((mca_mpool_base_selected_module_t *)item); if(0 == strcmp(key, @@ -400,7 +400,7 @@ int mca_mpool_base_free(void * base) if(chunk->mpools[0].mpool == NULL) { free(chunk->key.bottom); - OMPI_FREE_LIST_RETURN(&mca_mpool_base_mem_list, (ompi_list_item_t*) chunk); + OMPI_FREE_LIST_RETURN(&mca_mpool_base_mem_list, (opal_list_item_t*) chunk); rc = ompi_rb_tree_delete(&mca_mpool_base_tree, &chunk->key); OMPI_THREAD_UNLOCK(&mca_mpool_base_tree_lock); return rc; @@ -418,7 +418,7 @@ int mca_mpool_base_free(void * base) ); } chunk->mpools[i].mpool->mpool_free(chunk->mpools[i].mpool, chunk->key.bottom, chunk->mpools[i].mpool_registration); - OMPI_FREE_LIST_RETURN(&mca_mpool_base_mem_list, (ompi_list_item_t *) chunk); + OMPI_FREE_LIST_RETURN(&mca_mpool_base_mem_list, (opal_list_item_t *) chunk); rc = ompi_rb_tree_delete(&mca_mpool_base_tree, &chunk->key); OMPI_THREAD_UNLOCK(&mca_mpool_base_tree_lock); diff --git a/ompi/mca/mpool/base/mpool_base_close.c b/ompi/mca/mpool/base/mpool_base_close.c index ae30f2ccae..bd69ec4486 100644 --- a/ompi/mca/mpool/base/mpool_base_close.c +++ b/ompi/mca/mpool/base/mpool_base_close.c @@ -27,14 +27,14 @@ int mca_mpool_base_close(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_mpool_base_selected_module_t *sm; /* Finalize all the mpool components and free their list items */ - for (item = ompi_list_remove_first(&mca_mpool_base_modules); + for (item = opal_list_remove_first(&mca_mpool_base_modules); NULL != item; - item = ompi_list_remove_first(&mca_mpool_base_modules)) { + item = opal_list_remove_first(&mca_mpool_base_modules)) { sm = (mca_mpool_base_selected_module_t *) item; /* Blatently ignore the return code (what would we do to recover, diff --git a/ompi/mca/mpool/base/mpool_base_init.c b/ompi/mca/mpool/base/mpool_base_init.c index ef24587226..fdc76c9dcb 100644 --- a/ompi/mca/mpool/base/mpool_base_init.c +++ b/ompi/mca/mpool/base/mpool_base_init.c @@ -26,11 +26,11 @@ #include "class/ompi_free_list.h" #include "threads/mutex.h" -OBJ_CLASS_INSTANCE(mca_mpool_base_selected_module_t, ompi_list_item_t, NULL, NULL); +OBJ_CLASS_INSTANCE(mca_mpool_base_selected_module_t, opal_list_item_t, NULL, NULL); static bool mca_mpool_enable_progress_threads = true; static bool mca_mpool_enable_mpi_threads = true; -OBJ_CLASS_INSTANCE(mca_mpool_base_chunk_t, ompi_list_item_t, NULL, NULL); +OBJ_CLASS_INSTANCE(mca_mpool_base_chunk_t, opal_list_item_t, NULL, NULL); /** * Function for weeding out mpool modules that don't want to run. @@ -38,7 +38,7 @@ OBJ_CLASS_INSTANCE(mca_mpool_base_chunk_t, ompi_list_item_t, NULL, NULL); * Call the init function on all available components to find out if they * want to run. Select all components that don't fail. Failing modules * will be closed and unloaded. The selected modules will be returned - * to the caller in a ompi_list_t. + * to the caller in a opal_list_t. */ int mca_mpool_base_init(bool enable_progress_threads, bool enable_mpi_threads) { diff --git a/ompi/mca/mpool/base/mpool_base_lookup.c b/ompi/mca/mpool/base/mpool_base_lookup.c index 44c2ba577d..847c28a6a0 100644 --- a/ompi/mca/mpool/base/mpool_base_lookup.c +++ b/ompi/mca/mpool/base/mpool_base_lookup.c @@ -28,10 +28,10 @@ mca_mpool_base_component_t* mca_mpool_base_component_lookup(const char* name) { /* Traverse the list of available modules; call their init functions. */ - ompi_list_item_t* item; - for (item = ompi_list_get_first(&mca_mpool_base_components); - item != ompi_list_get_end(&mca_mpool_base_components); - item = ompi_list_get_next(item)) { + opal_list_item_t* item; + for (item = opal_list_get_first(&mca_mpool_base_components); + item != opal_list_get_end(&mca_mpool_base_components); + item = opal_list_get_next(item)) { mca_base_component_list_item_t *cli = (mca_base_component_list_item_t *) item; mca_mpool_base_component_t* component = @@ -52,12 +52,12 @@ mca_mpool_base_module_t* mca_mpool_base_module_create( mca_mpool_base_component_t* component = NULL; mca_mpool_base_module_t* module = NULL; - ompi_list_item_t* item; + opal_list_item_t* item; mca_mpool_base_selected_module_t *sm; - for (item = ompi_list_get_first(&mca_mpool_base_components); - item != ompi_list_get_end(&mca_mpool_base_components); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&mca_mpool_base_components); + item != opal_list_get_end(&mca_mpool_base_components); + item = opal_list_get_next(item)) { mca_base_component_list_item_t *cli = (mca_base_component_list_item_t *) item; component = @@ -75,6 +75,6 @@ mca_mpool_base_module_t* mca_mpool_base_module_create( sm->mpool_module = module; sm->user_data = user_data; sm->mpool_resources = resources; - ompi_list_append(&mca_mpool_base_modules, (ompi_list_item_t*) sm); + opal_list_append(&mca_mpool_base_modules, (opal_list_item_t*) sm); return module; } diff --git a/ompi/mca/mpool/base/mpool_base_open.c b/ompi/mca/mpool/base/mpool_base_open.c index 06ea790198..285b5ef1ca 100644 --- a/ompi/mca/mpool/base/mpool_base_open.c +++ b/ompi/mca/mpool/base/mpool_base_open.c @@ -41,8 +41,8 @@ * Global variables */ int mca_mpool_base_output = -1; -ompi_list_t mca_mpool_base_components; -ompi_list_t mca_mpool_base_modules; +opal_list_t mca_mpool_base_components; +opal_list_t mca_mpool_base_modules; /** @@ -64,7 +64,7 @@ int mca_mpool_base_open(void) iterate over it (even if it's empty, as in the case of ompi_info) */ - OBJ_CONSTRUCT(&mca_mpool_base_modules, ompi_list_t); + OBJ_CONSTRUCT(&mca_mpool_base_modules, opal_list_t); /* All done */ diff --git a/ompi/mca/mpool/gm/mpool_gm.h b/ompi/mca/mpool/gm/mpool_gm.h index b6f80259c7..0f9195a3a8 100644 --- a/ompi/mca/mpool/gm/mpool_gm.h +++ b/ompi/mca/mpool/gm/mpool_gm.h @@ -21,7 +21,7 @@ #include "ompi_config.h" #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_free_list.h" #include "event/event.h" #include "mca/mpool/mpool.h" diff --git a/ompi/mca/mpool/gm/mpool_gm_component.c b/ompi/mca/mpool/gm/mpool_gm_component.c index 398c79a923..4820df2b00 100644 --- a/ompi/mca/mpool/gm/mpool_gm_component.c +++ b/ompi/mca/mpool/gm/mpool_gm_component.c @@ -117,9 +117,9 @@ static mca_mpool_base_module_t* mca_mpool_gm_init( /* if specified allocator cannout be loaded - look for an alternative */ allocator_component = mca_allocator_component_lookup(mca_mpool_gm_component.gm_allocator_name); if(NULL == allocator_component) { - if(ompi_list_get_size(&mca_allocator_base_components) == 0) { + if(opal_list_get_size(&mca_allocator_base_components) == 0) { mca_base_component_list_item_t* item = (mca_base_component_list_item_t*) - ompi_list_get_first(&mca_allocator_base_components); + opal_list_get_first(&mca_allocator_base_components); allocator_component = (mca_allocator_base_component_t*)item->cli_component; ompi_output(0, "[%d:%d] unable to locate allocator: %s - using %s\n", __FILE__, __LINE__, diff --git a/ompi/mca/mpool/mpool.h b/ompi/mca/mpool/mpool.h index c4d96dc2c5..1f4b2ed79e 100644 --- a/ompi/mca/mpool/mpool.h +++ b/ompi/mca/mpool/mpool.h @@ -21,13 +21,13 @@ #define MCA_MPOOL_H #include "mca/mca.h" #include "info/info.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" struct mca_mpool_base_resources_t; struct mca_mpool_base_registration_t { - ompi_list_item_t super; + opal_list_item_t super; struct mca_mpool_base_module_t *mpool; unsigned char* base; unsigned char* bound; diff --git a/ompi/mca/mpool/mvapi/mpool_mvapi.h b/ompi/mca/mpool/mvapi/mpool_mvapi.h index 2fe45e068c..c1a43c4c2d 100644 --- a/ompi/mca/mpool/mvapi/mpool_mvapi.h +++ b/ompi/mca/mpool/mvapi/mpool_mvapi.h @@ -19,7 +19,7 @@ #ifndef MCA_MPOOL_VAPI_H #define MCA_MPOOL_VAPI_H -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_free_list.h" #include "event/event.h" #include "mca/mpool/mpool.h" diff --git a/ompi/mca/mpool/mvapi/mpool_mvapi_component.c b/ompi/mca/mpool/mvapi/mpool_mvapi_component.c index a61bf5b075..1f68423886 100644 --- a/ompi/mca/mpool/mvapi/mpool_mvapi_component.c +++ b/ompi/mca/mpool/mvapi/mpool_mvapi_component.c @@ -145,9 +145,9 @@ static mca_mpool_base_module_t* mca_mpool_mvapi_init( /* if specified allocator cannout be loaded - look for an alternative */ allocator_component = mca_allocator_component_lookup(mca_mpool_mvapi_component.vapi_allocator_name); if(NULL == allocator_component) { - if(ompi_list_get_size(&mca_allocator_base_components) == 0) { + if(opal_list_get_size(&mca_allocator_base_components) == 0) { mca_base_component_list_item_t* item = (mca_base_component_list_item_t*) - ompi_list_get_first(&mca_allocator_base_components); + opal_list_get_first(&mca_allocator_base_components); allocator_component = (mca_allocator_base_component_t*)item->cli_component; ompi_output(0, "mca_mpool_mvapi_init: unable to locate allocator: %s - using %s\n", mca_mpool_mvapi_component.vapi_allocator_name, allocator_component->allocator_version.mca_component_name); diff --git a/ompi/mca/mpool/openib/mpool_openib.h b/ompi/mca/mpool/openib/mpool_openib.h index 3b078d3327..73e8d2e67a 100644 --- a/ompi/mca/mpool/openib/mpool_openib.h +++ b/ompi/mca/mpool/openib/mpool_openib.h @@ -19,7 +19,7 @@ #ifndef MCA_MPOOL_VAPI_H #define MCA_MPOOL_VAPI_H -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_free_list.h" #include "event/event.h" #include "mca/mpool/mpool.h" diff --git a/ompi/mca/mpool/openib/mpool_openib_component.c b/ompi/mca/mpool/openib/mpool_openib_component.c index f64470c2bc..8fee5c5232 100644 --- a/ompi/mca/mpool/openib/mpool_openib_component.c +++ b/ompi/mca/mpool/openib/mpool_openib_component.c @@ -152,9 +152,9 @@ static mca_mpool_base_module_t* mca_mpool_openib_init( /* if specified allocator cannout be loaded - look for an alternative */ allocator_component = mca_allocator_component_lookup(mca_mpool_openib_component.vapi_allocator_name); if(NULL == allocator_component) { - if(ompi_list_get_size(&mca_allocator_base_components) == 0) { + if(opal_list_get_size(&mca_allocator_base_components) == 0) { mca_base_component_list_item_t* item = (mca_base_component_list_item_t*) - ompi_list_get_first(&mca_allocator_base_components); + opal_list_get_first(&mca_allocator_base_components); allocator_component = (mca_allocator_base_component_t*)item->cli_component; ompi_output(0, "mca_mpool_openib_init: unable to locate allocator: %s - using %s\n", mca_mpool_openib_component.vapi_allocator_name, allocator_component->allocator_version.mca_component_name); diff --git a/ompi/mca/mpool/sm/mpool_sm.h b/ompi/mca/mpool/sm/mpool_sm.h index 466d90f416..c63abf983a 100644 --- a/ompi/mca/mpool/sm/mpool_sm.h +++ b/ompi/mca/mpool/sm/mpool_sm.h @@ -19,7 +19,7 @@ #ifndef MCA_MPOOL_SM_H #define MCA_MPOOL_SM_H -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_free_list.h" #include "event/event.h" #include "mca/mpool/mpool.h" diff --git a/ompi/mca/mpool/sm/mpool_sm_component.c b/ompi/mca/mpool/sm/mpool_sm_component.c index c00053f563..c55ca19aa5 100644 --- a/ompi/mca/mpool/sm/mpool_sm_component.c +++ b/ompi/mca/mpool/sm/mpool_sm_component.c @@ -108,9 +108,9 @@ static mca_mpool_base_module_t* mca_mpool_sm_init( /* if specified allocator cannout be loaded - look for an alternative */ if(NULL == allocator_component) { - if(ompi_list_get_size(&mca_allocator_base_components) == 0) { + if(opal_list_get_size(&mca_allocator_base_components) == 0) { mca_base_component_list_item_t* item = (mca_base_component_list_item_t*) - ompi_list_get_first(&mca_allocator_base_components); + opal_list_get_first(&mca_allocator_base_components); allocator_component = (mca_allocator_base_component_t*)item->cli_component; ompi_output(0, "mca_mpool_sm_init: unable to locate allocator: %s - using %s\n", mca_mpool_sm_component.sm_allocator_name, allocator_component->allocator_version.mca_component_name); diff --git a/ompi/mca/pml/base/base.h b/ompi/mca/pml/base/base.h index f807002289..adc8764ce0 100644 --- a/ompi/mca/pml/base/base.h +++ b/ompi/mca/pml/base/base.h @@ -41,7 +41,7 @@ OMPI_DECLSPEC int mca_pml_base_close(void); * Globals */ OMPI_DECLSPEC extern int mca_pml_base_output; -OMPI_DECLSPEC extern ompi_list_t mca_pml_base_components_available; +OMPI_DECLSPEC extern opal_list_t mca_pml_base_components_available; OMPI_DECLSPEC extern mca_pml_base_component_t mca_pml_base_selected_component; OMPI_DECLSPEC extern mca_pml_base_module_t mca_pml; OMPI_DECLSPEC extern char* mca_pml_base_pml; diff --git a/ompi/mca/pml/base/pml_base_module_exchange.c b/ompi/mca/pml/base/pml_base_module_exchange.c index 718e664404..758d7749c7 100644 --- a/ompi/mca/pml/base/pml_base_module_exchange.c +++ b/ompi/mca/pml/base/pml_base_module_exchange.c @@ -45,7 +45,7 @@ */ struct mca_base_modex_module_t { - ompi_list_item_t super; + opal_list_item_t super; mca_base_component_t component; void *module_data; size_t module_data_size; @@ -70,7 +70,7 @@ static void mca_base_modex_module_destruct(mca_base_modex_module_t *module) OBJ_CLASS_INSTANCE( mca_base_modex_module_t, - ompi_list_item_t, + opal_list_item_t, mca_base_modex_module_construct, mca_base_modex_module_destruct ); @@ -83,13 +83,13 @@ OBJ_CLASS_INSTANCE( */ struct mca_base_modex_t { opal_object_t super; - ompi_list_t modex_modules; + opal_list_t modex_modules; }; typedef struct mca_base_modex_t mca_base_modex_t; static void mca_base_modex_construct(mca_base_modex_t* modex) { - OBJ_CONSTRUCT(&modex->modex_modules, ompi_list_t); + OBJ_CONSTRUCT(&modex->modex_modules, opal_list_t); } static void mca_base_modex_destruct(mca_base_modex_t* modex) @@ -111,14 +111,14 @@ OBJ_CLASS_INSTANCE( */ struct mca_base_modex_subscription_t { - ompi_list_item_t item; + opal_list_item_t item; orte_jobid_t jobid; }; typedef struct mca_base_modex_subscription_t mca_base_modex_subscription_t; OBJ_CLASS_INSTANCE( mca_base_modex_subscription_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL); @@ -126,7 +126,7 @@ OBJ_CLASS_INSTANCE( * Globals to track the list of subscriptions. */ -static ompi_list_t mca_base_modex_subscriptions; +static opal_list_t mca_base_modex_subscriptions; static ompi_mutex_t mca_base_modex_lock; @@ -135,7 +135,7 @@ static ompi_mutex_t mca_base_modex_lock; */ int mca_base_modex_init(void) { - OBJ_CONSTRUCT(&mca_base_modex_subscriptions, ompi_list_t); + OBJ_CONSTRUCT(&mca_base_modex_subscriptions, opal_list_t); OBJ_CONSTRUCT(&mca_base_modex_lock, ompi_mutex_t); return OMPI_SUCCESS; } @@ -145,8 +145,8 @@ int mca_base_modex_init(void) */ int mca_base_modex_finalize(void) { - ompi_list_item_t *item; - while(NULL != (item = ompi_list_remove_first(&mca_base_modex_subscriptions))) + opal_list_item_t *item; + while(NULL != (item = opal_list_remove_first(&mca_base_modex_subscriptions))) OBJ_RELEASE(item); OBJ_DESTRUCT(&mca_base_modex_subscriptions); return OMPI_SUCCESS; @@ -162,9 +162,9 @@ static mca_base_modex_module_t* mca_base_modex_lookup_module( mca_base_component_t* component) { mca_base_modex_module_t* modex_module; - for(modex_module = (mca_base_modex_module_t*)ompi_list_get_first(&modex->modex_modules); - modex_module != (mca_base_modex_module_t*)ompi_list_get_end(&modex->modex_modules); - modex_module = (mca_base_modex_module_t*)ompi_list_get_next(modex_module)) { + for(modex_module = (mca_base_modex_module_t*)opal_list_get_first(&modex->modex_modules); + modex_module != (mca_base_modex_module_t*)opal_list_get_end(&modex->modex_modules); + modex_module = (mca_base_modex_module_t*)opal_list_get_next(modex_module)) { if(mca_base_component_compatible(&modex_module->component, component) == 0) { return modex_module; } @@ -186,7 +186,7 @@ static mca_base_modex_module_t* mca_base_modex_create_module( modex_module = OBJ_NEW(mca_base_modex_module_t); if(NULL != modex_module) { modex_module->component = *component; - ompi_list_append(&modex->modex_modules, (ompi_list_item_t*)modex_module); + opal_list_append(&modex->modex_modules, (opal_list_item_t*)modex_module); } } return modex_module; @@ -377,16 +377,16 @@ static int mca_base_modex_subscribe(orte_process_name_t* name) orte_gpr_trigger_t trig, *trigs; orte_gpr_subscription_t sub, *subs; orte_jobid_t jobid; - ompi_list_item_t* item; + opal_list_item_t* item; mca_base_modex_subscription_t* subscription; int rc; /* check for an existing subscription */ OMPI_LOCK(&mca_base_modex_lock); - if (!ompi_list_is_empty(&mca_base_modex_subscriptions)) { - for(item = ompi_list_get_first(&mca_base_modex_subscriptions); - item != ompi_list_get_end(&mca_base_modex_subscriptions); - item = ompi_list_get_next(item)) { + if (!opal_list_is_empty(&mca_base_modex_subscriptions)) { + for(item = opal_list_get_first(&mca_base_modex_subscriptions); + item != opal_list_get_end(&mca_base_modex_subscriptions); + item = opal_list_get_next(item)) { subscription = (mca_base_modex_subscription_t*)item; if(subscription->jobid == name->jobid) { OMPI_UNLOCK(&mca_base_modex_lock); @@ -503,7 +503,7 @@ static int mca_base_modex_subscribe(orte_process_name_t* name) OMPI_LOCK(&mca_base_modex_lock); subscription = OBJ_NEW(mca_base_modex_subscription_t); subscription->jobid = name->jobid; - ompi_list_append(&mca_base_modex_subscriptions, &subscription->item); + opal_list_append(&mca_base_modex_subscriptions, &subscription->item); OMPI_UNLOCK(&mca_base_modex_lock); OBJ_DESTRUCT(&sub); OBJ_DESTRUCT(&trig); diff --git a/ompi/mca/pml/base/pml_base_open.c b/ompi/mca/pml/base/pml_base_open.c index 2adad10c43..1c22c8a0ef 100644 --- a/ompi/mca/pml/base/pml_base_open.c +++ b/ompi/mca/pml/base/pml_base_open.c @@ -60,7 +60,7 @@ OMPI_DECLSPEC mca_pml_base_module_t mca_pml = { NULL /* pml_start */ }; -ompi_list_t mca_pml_base_components_available; +opal_list_t mca_pml_base_components_available; mca_pml_base_component_t mca_pml_base_selected_component; char *mca_pml_base_pml; diff --git a/ompi/mca/pml/base/pml_base_select.c b/ompi/mca/pml/base/pml_base_select.c index 4c228407bb..f77e921f52 100644 --- a/ompi/mca/pml/base/pml_base_select.c +++ b/ompi/mca/pml/base/pml_base_select.c @@ -16,7 +16,7 @@ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "runtime/runtime.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -25,7 +25,7 @@ typedef struct opened_component_t { - ompi_list_item_t super; + opal_list_item_t super; mca_pml_base_component_t *om_component; } opened_component_t; @@ -44,11 +44,11 @@ int mca_pml_base_select(bool enable_progress_threads, bool enable_mpi_threads) { int priority = 0, best_priority = 0; - ompi_list_item_t *item = NULL; + opal_list_item_t *item = NULL; mca_base_component_list_item_t *cli = NULL; mca_pml_base_component_t *component = NULL, *best_component = NULL; mca_pml_base_module_t *module = NULL, *best_module = NULL; - ompi_list_t opened; + opal_list_t opened; opened_component_t *om = NULL; /* Traverse the list of available components; call their init @@ -57,10 +57,10 @@ int mca_pml_base_select(bool enable_progress_threads, best_priority = -1; best_component = NULL; module = NULL; - OBJ_CONSTRUCT(&opened, ompi_list_t); - for (item = ompi_list_get_first(&mca_pml_base_components_available); - ompi_list_get_end(&mca_pml_base_components_available) != item; - item = ompi_list_get_next(item)) { + OBJ_CONSTRUCT(&opened, opal_list_t); + for (item = opal_list_get_first(&mca_pml_base_components_available); + opal_list_get_end(&mca_pml_base_components_available) != item; + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (mca_pml_base_component_t *) cli->cli_component; @@ -95,9 +95,9 @@ int mca_pml_base_select(bool enable_progress_threads, if (NULL == om) { return OMPI_ERR_OUT_OF_RESOURCE; } - OBJ_CONSTRUCT(om, ompi_list_item_t); + OBJ_CONSTRUCT(om, opal_list_item_t); om->om_component = component; - ompi_list_append(&opened, (ompi_list_item_t*) om); + opal_list_append(&opened, (opal_list_item_t*) om); } } } @@ -111,9 +111,9 @@ int mca_pml_base_select(bool enable_progress_threads, /* Finalize all non-selected components */ - for (item = ompi_list_remove_first(&opened); + for (item = opal_list_remove_first(&opened); NULL != item; - item = ompi_list_remove_first(&opened)) { + item = opal_list_remove_first(&opened)) { om = (opened_component_t *) item; if (om->om_component != best_component) { diff --git a/ompi/mca/pml/example/pml_example.c b/ompi/mca/pml/example/pml_example.c index fc0c3557b9..5c2a1ea07e 100644 --- a/ompi/mca/pml/example/pml_example.c +++ b/ompi/mca/pml/example/pml_example.c @@ -44,7 +44,7 @@ int mca_pml_example_del_comm(ompi_communicator_t* comm) return OMPI_SUCCESS; } -int mca_pml_example_add_ptls(ompi_list_t *ptls) +int mca_pml_example_add_ptls(opal_list_t *ptls) { return OMPI_SUCCESS; } diff --git a/ompi/mca/pml/example/pml_example.h b/ompi/mca/pml/example/pml_example.h index 7f30fe4095..019ed02f6a 100644 --- a/ompi/mca/pml/example/pml_example.h +++ b/ompi/mca/pml/example/pml_example.h @@ -32,7 +32,7 @@ struct mca_pml_example_t { mca_ptl_base_module_t** example_ptl_modules; size_t example_num_ptl_modules; - ompi_list_t example_procs; + opal_list_t example_procs; ompi_mutex_t example_lock; /* free list of requests */ @@ -40,7 +40,7 @@ struct mca_pml_example_t { ompi_free_list_t example_recv_requests; /* list of pending send requests */ - ompi_list_t example_send_pending; + opal_list_t example_send_pending; }; typedef struct mca_pml_example_t mca_pml_example_t; @@ -55,7 +55,7 @@ extern int mca_pml_example_del_comm( struct ompi_communicator_t* comm ); extern int mca_pml_example_add_procs( struct ompi_proc_t **procs, size_t nprocs ); extern int mca_pml_example_del_procs( struct ompi_proc_t **procs, size_t nprocs ); -extern int mca_pml_example_add_ptls( ompi_list_t *ptls ); +extern int mca_pml_example_add_ptls( opal_list_t *ptls ); extern int mca_pml_example_control( int param, void *size, size_t value ); diff --git a/ompi/mca/pml/ob1/pml_ob1.c b/ompi/mca/pml/ob1/pml_ob1.c index 1620842c96..3d2bd03475 100644 --- a/ompi/mca/pml/ob1/pml_ob1.c +++ b/ompi/mca/pml/ob1/pml_ob1.c @@ -106,9 +106,9 @@ static int btl_exclusivity_compare(const void* arg1, const void* arg2) int mca_pml_ob1_add_btls() { /* build an array of ob1s and ob1 modules */ - ompi_list_t* btls = &mca_btl_base_modules_initialized; + opal_list_t* btls = &mca_btl_base_modules_initialized; mca_btl_base_selected_module_t* selected_btl; - size_t num_btls = ompi_list_get_size(btls); + size_t num_btls = opal_list_get_size(btls); mca_pml_ob1.num_btl_modules = 0; mca_pml_ob1.num_btl_progress = 0; @@ -123,9 +123,9 @@ int mca_pml_ob1_add_btls() return OMPI_ERR_OUT_OF_RESOURCE; } - for(selected_btl = (mca_btl_base_selected_module_t*)ompi_list_get_first(btls); - selected_btl != (mca_btl_base_selected_module_t*)ompi_list_get_end(btls); - selected_btl = (mca_btl_base_selected_module_t*)ompi_list_get_next(selected_btl)) { + for(selected_btl = (mca_btl_base_selected_module_t*)opal_list_get_first(btls); + selected_btl != (mca_btl_base_selected_module_t*)opal_list_get_end(btls); + selected_btl = (mca_btl_base_selected_module_t*)opal_list_get_next(selected_btl)) { mca_btl_base_module_t *btl = selected_btl->btl_module; size_t i; int rc; diff --git a/ompi/mca/pml/ob1/pml_ob1.h b/ompi/mca/pml/ob1/pml_ob1.h index e365bf2608..7d8c942797 100644 --- a/ompi/mca/pml/ob1/pml_ob1.h +++ b/ompi/mca/pml/ob1/pml_ob1.h @@ -73,10 +73,10 @@ struct mca_pml_ob1_t { ompi_free_list_t buffers; /* list of pending operations */ - ompi_list_t acks_pending; - ompi_list_t send_pending; - ompi_list_t recv_pending; - ompi_list_t rdma_pending; + opal_list_t acks_pending; + opal_list_t send_pending; + opal_list_t recv_pending; + opal_list_t rdma_pending; }; typedef struct mca_pml_ob1_t mca_pml_ob1_t; diff --git a/ompi/mca/pml/ob1/pml_ob1_comm.c b/ompi/mca/pml/ob1/pml_ob1_comm.c index 2ff0889462..8916914ee8 100644 --- a/ompi/mca/pml/ob1/pml_ob1_comm.c +++ b/ompi/mca/pml/ob1/pml_ob1_comm.c @@ -25,9 +25,9 @@ static void mca_pml_ob1_comm_proc_construct(mca_pml_ob1_comm_proc_t* proc) { proc->expected_sequence = 1; - OBJ_CONSTRUCT(&proc->frags_cant_match, ompi_list_t); - OBJ_CONSTRUCT(&proc->specific_receives, ompi_list_t); - OBJ_CONSTRUCT(&proc->unexpected_frags, ompi_list_t); + OBJ_CONSTRUCT(&proc->frags_cant_match, opal_list_t); + OBJ_CONSTRUCT(&proc->specific_receives, opal_list_t); + OBJ_CONSTRUCT(&proc->unexpected_frags, opal_list_t); } @@ -48,7 +48,7 @@ static OBJ_CLASS_INSTANCE( static void mca_pml_ob1_comm_construct(mca_pml_ob1_comm_t* comm) { - OBJ_CONSTRUCT(&comm->wild_receives, ompi_list_t); + OBJ_CONSTRUCT(&comm->wild_receives, opal_list_t); OBJ_CONSTRUCT(&comm->matching_lock, ompi_mutex_t); comm->recv_sequence = 0; comm->procs = NULL; diff --git a/ompi/mca/pml/ob1/pml_ob1_comm.h b/ompi/mca/pml/ob1/pml_ob1_comm.h index 87ef0bb6c3..21dd70ab5f 100644 --- a/ompi/mca/pml/ob1/pml_ob1_comm.h +++ b/ompi/mca/pml/ob1/pml_ob1_comm.h @@ -22,7 +22,7 @@ #include "threads/mutex.h" #include "threads/condition.h" #include "mca/ptl/ptl.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #if defined(c_plusplus) || defined(__cplusplus) extern "C" { #endif @@ -31,9 +31,9 @@ extern "C" { struct mca_pml_ob1_comm_proc_t { opal_object_t super; uint16_t expected_sequence; /**< send message sequence number - receiver side */ - ompi_list_t frags_cant_match; /**< out-of-order fragment queues */ - ompi_list_t specific_receives; /**< queues of unmatched specific receives */ - ompi_list_t unexpected_frags; /**< unexpected fragment queues */ + opal_list_t frags_cant_match; /**< out-of-order fragment queues */ + opal_list_t specific_receives; /**< queues of unmatched specific receives */ + opal_list_t unexpected_frags; /**< unexpected fragment queues */ }; typedef struct mca_pml_ob1_comm_proc_t mca_pml_ob1_comm_proc_t; @@ -46,7 +46,7 @@ struct mca_pml_comm_t { opal_object_t super; mca_ptl_sequence_t recv_sequence; /**< recv request sequence number - receiver side */ ompi_mutex_t matching_lock; /**< matching lock */ - ompi_list_t wild_receives; /**< queue of unmatched wild (source process not specified) receives */ + opal_list_t wild_receives; /**< queue of unmatched wild (source process not specified) receives */ mca_pml_ob1_comm_proc_t* procs; size_t num_procs; }; diff --git a/ompi/mca/pml/ob1/pml_ob1_component.c b/ompi/mca/pml/ob1/pml_ob1_component.c index fdfafb67f5..252b24cdb6 100644 --- a/ompi/mca/pml/ob1/pml_ob1_component.c +++ b/ompi/mca/pml/ob1/pml_ob1_component.c @@ -90,9 +90,9 @@ int mca_pml_ob1_component_open(void) OBJ_CONSTRUCT(&mca_pml_ob1.buffers, ompi_free_list_t); /* pending operations */ - OBJ_CONSTRUCT(&mca_pml_ob1.send_pending, ompi_list_t); - OBJ_CONSTRUCT(&mca_pml_ob1.recv_pending, ompi_list_t); - OBJ_CONSTRUCT(&mca_pml_ob1.acks_pending, ompi_list_t); + OBJ_CONSTRUCT(&mca_pml_ob1.send_pending, opal_list_t); + OBJ_CONSTRUCT(&mca_pml_ob1.recv_pending, opal_list_t); + OBJ_CONSTRUCT(&mca_pml_ob1.acks_pending, opal_list_t); mca_pml_ob1.btl_components = NULL; mca_pml_ob1.num_btl_components = 0; @@ -135,16 +135,16 @@ int mca_pml_ob1_component_close(void) #if OMPI_ENABLE_DEBUG if (mca_pml_ob1.send_requests.fl_num_allocated != - mca_pml_ob1.send_requests.super.ompi_list_length) { + mca_pml_ob1.send_requests.super.opal_list_length) { ompi_output(0, "ob1 send requests: %d allocated %d returned\n", mca_pml_ob1.send_requests.fl_num_allocated, - mca_pml_ob1.send_requests.super.ompi_list_length); + mca_pml_ob1.send_requests.super.opal_list_length); } if (mca_pml_ob1.recv_requests.fl_num_allocated != - mca_pml_ob1.recv_requests.super.ompi_list_length) { + mca_pml_ob1.recv_requests.super.opal_list_length) { ompi_output(0, "ob1 recv requests: %d allocated %d returned\n", mca_pml_ob1.recv_requests.fl_num_allocated, - mca_pml_ob1.recv_requests.super.ompi_list_length); + mca_pml_ob1.recv_requests.super.opal_list_length); } #endif diff --git a/ompi/mca/pml/ob1/pml_ob1_rdmafrag.c b/ompi/mca/pml/ob1/pml_ob1_rdmafrag.c index 552230382a..9796e61f26 100644 --- a/ompi/mca/pml/ob1/pml_ob1_rdmafrag.c +++ b/ompi/mca/pml/ob1/pml_ob1_rdmafrag.c @@ -4,6 +4,6 @@ OBJ_CLASS_INSTANCE( mca_pml_ob1_rdma_frag_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL); diff --git a/ompi/mca/pml/ob1/pml_ob1_rdmafrag.h b/ompi/mca/pml/ob1/pml_ob1_rdmafrag.h index 9a4718b852..74a749d86f 100644 --- a/ompi/mca/pml/ob1/pml_ob1_rdmafrag.h +++ b/ompi/mca/pml/ob1/pml_ob1_rdmafrag.h @@ -31,7 +31,7 @@ typedef enum { } mca_pml_ob1_rdma_state_t; struct mca_pml_ob1_rdma_frag_t { - ompi_list_item_t super; + opal_list_item_t super; mca_btl_base_module_t* rdma_btl; mca_pml_ob1_hdr_t rdma_hdr; mca_pml_ob1_rdma_state_t rdma_state; @@ -47,7 +47,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_rdma_frag_t); #define MCA_PML_OB1_RDMA_FRAG_ALLOC(frag,rc) \ do { \ - ompi_list_item_t* item; \ + opal_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) @@ -56,7 +56,7 @@ do { \ do { \ /* return fragment */ \ OMPI_FREE_LIST_RETURN(&mca_pml_ob1.rdma_frags, \ - (ompi_list_item_t*)frag); \ + (opal_list_item_t*)frag); \ } while(0) diff --git a/ompi/mca/pml/ob1/pml_ob1_recvfrag.c b/ompi/mca/pml/ob1/pml_ob1_recvfrag.c index 08f3579bfc..197f8a094d 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvfrag.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvfrag.c @@ -20,7 +20,7 @@ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/mutex.h" #include "include/constants.h" #include "communicator/communicator.h" @@ -36,14 +36,14 @@ OBJ_CLASS_INSTANCE( mca_pml_ob1_buffer_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL ); OBJ_CLASS_INSTANCE( mca_pml_ob1_recv_frag_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL ); @@ -141,7 +141,7 @@ void mca_pml_ob1_recv_frag_callback( #define MCA_PML_OB1_CHECK_WILD_RECEIVES_FOR_MATCH(hdr,comm,proc,return_match) \ do { \ /* local parameters */ \ - ompi_list_t* wild_receives = &comm->wild_receives; \ + opal_list_t* wild_receives = &comm->wild_receives; \ mca_pml_ob1_recv_request_t *wild_recv; \ int frag_tag,recv_tag; \ \ @@ -154,11 +154,11 @@ do { \ * change this list. \ */ \ for(wild_recv = (mca_pml_ob1_recv_request_t *) \ - ompi_list_get_first(wild_receives); \ + opal_list_get_first(wild_receives); \ wild_recv != (mca_pml_ob1_recv_request_t *) \ - ompi_list_get_end(wild_receives); \ + opal_list_get_end(wild_receives); \ wild_recv = (mca_pml_ob1_recv_request_t *) \ - ((ompi_list_item_t *)wild_recv)->ompi_list_next) { \ + ((opal_list_item_t *)wild_recv)->opal_list_next) { \ \ recv_tag = wild_recv->req_recv.req_base.req_tag; \ if ( \ @@ -176,8 +176,8 @@ do { \ return_match = wild_recv; \ \ /* remove this irecv from the postd wild ireceive list */ \ - ompi_list_remove_item(wild_receives, \ - (ompi_list_item_t *)wild_recv); \ + opal_list_remove_item(wild_receives, \ + (opal_list_item_t *)wild_recv); \ \ /* found match - no need to continue */ \ break; \ @@ -203,7 +203,7 @@ do { \ #define MCA_PML_OB1_CHECK_SPECIFIC_RECEIVES_FOR_MATCH(hdr,comm,proc,return_match) \ do { \ /* local variables */ \ - ompi_list_t* specific_receives = &proc->specific_receives; \ + opal_list_t* specific_receives = &proc->specific_receives; \ mca_pml_ob1_recv_request_t *specific_recv; \ int recv_tag,frag_tag; \ \ @@ -214,11 +214,11 @@ do { \ * Loop over the specific irecvs. \ */ \ for(specific_recv = (mca_pml_ob1_recv_request_t *) \ - ompi_list_get_first(specific_receives); \ + opal_list_get_first(specific_receives); \ specific_recv != (mca_pml_ob1_recv_request_t *) \ - ompi_list_get_end(specific_receives); \ + opal_list_get_end(specific_receives); \ specific_recv = (mca_pml_ob1_recv_request_t *) \ - ((ompi_list_item_t *)specific_recv)->ompi_list_next) { \ + ((opal_list_item_t *)specific_recv)->opal_list_next) { \ /* \ * Check for a match \ */ \ @@ -232,8 +232,8 @@ do { \ return_match = specific_recv; \ \ /* remove descriptor from posted specific ireceive list */ \ - ompi_list_remove_item(specific_receives, \ - (ompi_list_item_t *)specific_recv); \ + opal_list_remove_item(specific_receives, \ + (opal_list_item_t *)specific_recv); \ \ break; \ } \ @@ -273,9 +273,9 @@ do { \ * have been posted. \ */ \ specific_recv = (mca_pml_ob1_recv_request_t *) \ - ompi_list_get_first(&(proc)->specific_receives); \ + opal_list_get_first(&(proc)->specific_receives); \ wild_recv = (mca_pml_ob1_recv_request_t *) \ - ompi_list_get_first(&comm->wild_receives); \ + opal_list_get_first(&comm->wild_receives); \ \ specific_recv_seq = specific_recv->req_recv.req_base.req_sequence; \ wild_recv_seq = wild_recv->req_recv.req_base.req_sequence; \ @@ -297,8 +297,8 @@ do { \ return_match=wild_recv; \ \ /* remove this recv from the wild receive queue */ \ - ompi_list_remove_item(&comm->wild_receives, \ - (ompi_list_item_t *)wild_recv); \ + opal_list_remove_item(&comm->wild_receives, \ + (opal_list_item_t *)wild_recv); \ break; \ } \ \ @@ -306,14 +306,14 @@ do { \ * No match, go to the next. \ */ \ wild_recv=(mca_pml_ob1_recv_request_t *) \ - ((ompi_list_item_t *)wild_recv)->ompi_list_next; \ + ((opal_list_item_t *)wild_recv)->opal_list_next; \ \ /* \ * If that was the last wild one, just look at the \ * rest of the specific ones. \ */ \ if (wild_recv == (mca_pml_ob1_recv_request_t *) \ - ompi_list_get_end(&comm->wild_receives) ) \ + opal_list_get_end(&comm->wild_receives) ) \ { \ MCA_PML_OB1_CHECK_SPECIFIC_RECEIVES_FOR_MATCH(hdr, comm, proc, return_match); \ break; \ @@ -338,8 +338,8 @@ do { \ */ \ return_match = specific_recv; \ /* remove descriptor from specific receive list */ \ - ompi_list_remove_item(&(proc)->specific_receives, \ - (ompi_list_item_t *)specific_recv); \ + opal_list_remove_item(&(proc)->specific_receives, \ + (opal_list_item_t *)specific_recv); \ break; \ } \ \ @@ -347,14 +347,14 @@ do { \ * No match, go on to the next specific irecv. \ */ \ specific_recv = (mca_pml_ob1_recv_request_t *) \ - ((ompi_list_item_t *)specific_recv)->ompi_list_next; \ + ((opal_list_item_t *)specific_recv)->opal_list_next; \ \ /* \ * If that was the last specific irecv, process the \ * rest of the wild ones. \ */ \ if (specific_recv == (mca_pml_ob1_recv_request_t *) \ - ompi_list_get_end(&(proc)->specific_receives)) \ + opal_list_get_end(&(proc)->specific_receives)) \ { \ MCA_PML_OB1_CHECK_WILD_RECEIVES_FOR_MATCH(hdr, comm, proc, return_match); \ break; \ @@ -374,7 +374,7 @@ do { \ */ static bool mca_pml_ob1_check_cantmatch_for_match( - ompi_list_t *additional_matches, + opal_list_t *additional_matches, mca_pml_ob1_comm_t* comm, mca_pml_ob1_comm_proc_t *proc); @@ -422,7 +422,7 @@ int mca_pml_ob1_recv_frag_match( mca_pml_ob1_comm_t *comm; mca_pml_ob1_comm_proc_t *proc; bool additional_match=false; - ompi_list_t additional_matches; + opal_list_t additional_matches; int rc; /* communicator pointer */ @@ -460,13 +460,13 @@ int mca_pml_ob1_recv_frag_match( * look only at "specific" receives, or "wild" receives, * or if we need to traverse both sets at the same time. */ - if (ompi_list_get_size(&proc->specific_receives) == 0 ){ + if (opal_list_get_size(&proc->specific_receives) == 0 ){ /* * There are only wild irecvs, so specialize the algorithm. */ MCA_PML_OB1_CHECK_WILD_RECEIVES_FOR_MATCH(hdr, comm, proc, match); - } else if (ompi_list_get_size(&comm->wild_receives) == 0 ) { + } else if (opal_list_get_size(&comm->wild_receives) == 0 ) { /* * There are only specific irecvs, so specialize the algorithm. */ @@ -498,7 +498,7 @@ int mca_pml_ob1_recv_frag_match( return rc; } MCA_PML_OB1_RECV_FRAG_INIT(frag,btl,hdr,segments,num_segments); - ompi_list_append( &proc->unexpected_frags, (ompi_list_item_t *)frag ); + opal_list_append( &proc->unexpected_frags, (opal_list_item_t *)frag ); } /* @@ -506,7 +506,7 @@ int mca_pml_ob1_recv_frag_match( * any fragments on the c_c_frags_cant_match list * may now be used to form new matchs */ - if (0 < ompi_list_get_size(&proc->frags_cant_match)) { + if (0 < opal_list_get_size(&proc->frags_cant_match)) { additional_match = mca_pml_ob1_check_cantmatch_for_match(&additional_matches,comm,proc); } @@ -523,7 +523,7 @@ int mca_pml_ob1_recv_frag_match( return rc; } MCA_PML_OB1_RECV_FRAG_INIT(frag,btl,hdr,segments,num_segments); - ompi_list_append(&proc->frags_cant_match, (ompi_list_item_t *)frag); + opal_list_append(&proc->frags_cant_match, (opal_list_item_t *)frag); } OMPI_THREAD_UNLOCK(&pml_comm->matching_lock); @@ -535,8 +535,8 @@ int mca_pml_ob1_recv_frag_match( mca_pml_ob1_recv_request_progress(match,btl,segments,num_segments); } if(additional_match) { - ompi_list_item_t* item; - while(NULL != (item = ompi_list_remove_first(&additional_matches))) { + opal_list_item_t* item; + while(NULL != (item = opal_list_remove_first(&additional_matches))) { mca_pml_ob1_recv_frag_t* frag = (mca_pml_ob1_recv_frag_t*)item; MCA_PML_OB1_RECV_REQUEST_MATCHED(frag->request, hdr); mca_pml_ob1_recv_request_progress(frag->request,frag->btl,frag->segments,frag->num_segments); @@ -563,7 +563,7 @@ int mca_pml_ob1_recv_frag_match( */ static bool mca_pml_ob1_check_cantmatch_for_match( - ompi_list_t *additional_matches, + opal_list_t *additional_matches, mca_pml_ob1_comm_t* comm, mca_pml_ob1_comm_proc_t *proc) { @@ -580,7 +580,7 @@ static bool mca_pml_ob1_check_cantmatch_for_match( */ match_found = 1; - while ((0 < ompi_list_get_size(&proc->frags_cant_match)) && match_found) { + while ((0 < opal_list_get_size(&proc->frags_cant_match)) && match_found) { /* initialize match flag for this search */ match_found = 0; @@ -592,11 +592,11 @@ static bool mca_pml_ob1_check_cantmatch_for_match( * number next_msg_seq_expected */ for(frag = (mca_pml_ob1_recv_frag_t *) - ompi_list_get_first(&proc->frags_cant_match); + opal_list_get_first(&proc->frags_cant_match); frag != (mca_pml_ob1_recv_frag_t *) - ompi_list_get_end(&proc->frags_cant_match); + opal_list_get_end(&proc->frags_cant_match); frag = (mca_pml_ob1_recv_frag_t *) - ompi_list_get_next(frag)) + opal_list_get_next(frag)) { /* * If the message has the next expected seq from that proc... @@ -614,8 +614,8 @@ static bool mca_pml_ob1_check_cantmatch_for_match( /* * remove frag from list */ - ompi_list_remove_item(&proc->frags_cant_match, - (ompi_list_item_t *)frag); + opal_list_remove_item(&proc->frags_cant_match, + (opal_list_item_t *)frag); /* * figure out what sort of matching logic to use, if need to @@ -623,12 +623,12 @@ static bool mca_pml_ob1_check_cantmatch_for_match( * or if we need to traverse both sets at the same time. */ proc = comm->procs + hdr->hdr_src; - if (ompi_list_get_size(&proc->specific_receives) == 0 ) { + if (opal_list_get_size(&proc->specific_receives) == 0 ) { /* * There are only wild irecvs, so specialize the algorithm. */ MCA_PML_OB1_CHECK_WILD_RECEIVES_FOR_MATCH(hdr, comm, proc, match); - } else if (ompi_list_get_size(&comm->wild_receives) == 0 ) { + } else if (opal_list_get_size(&comm->wild_receives) == 0 ) { /* * There are only specific irecvs, so specialize the algorithm. */ @@ -653,14 +653,14 @@ static bool mca_pml_ob1_check_cantmatch_for_match( */ if(match_made == false) { match_made = true; - OBJ_CONSTRUCT(additional_matches, ompi_list_t); + OBJ_CONSTRUCT(additional_matches, opal_list_t); } - ompi_list_append(additional_matches, (ompi_list_item_t *)frag); + opal_list_append(additional_matches, (opal_list_item_t *)frag); } else { /* if no match found, place on unexpected queue */ - ompi_list_append( &proc->unexpected_frags, (ompi_list_item_t *)frag); + opal_list_append( &proc->unexpected_frags, (opal_list_item_t *)frag); } diff --git a/ompi/mca/pml/ob1/pml_ob1_recvfrag.h b/ompi/mca/pml/ob1/pml_ob1_recvfrag.h index 785adcef46..78e0c61e56 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvfrag.h +++ b/ompi/mca/pml/ob1/pml_ob1_recvfrag.h @@ -24,7 +24,7 @@ #include "pml_ob1_hdr.h" struct mca_pml_ob1_buffer_t { - ompi_list_item_t super; + opal_list_item_t super; unsigned char addr[1]; }; typedef struct mca_pml_ob1_buffer_t mca_pml_ob1_buffer_t; @@ -33,7 +33,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_buffer_t); struct mca_pml_ob1_recv_frag_t { - ompi_list_item_t super; + opal_list_item_t super; mca_btl_base_module_t* btl; mca_pml_ob1_hdr_t hdr; struct mca_pml_ob1_recv_request_t* request; @@ -48,7 +48,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_recv_frag_t); #define MCA_PML_OB1_RECV_FRAG_ALLOC(frag,rc) \ do { \ - ompi_list_item_t* item; \ + opal_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) @@ -67,7 +67,7 @@ do { \ \ /* copy over data */ \ for(i=0; inum_segments; i++) { \ OMPI_FREE_LIST_RETURN(&mca_pml_ob1.buffers, \ - (ompi_list_item_t*)frag->buffers[i]); \ + (opal_list_item_t*)frag->buffers[i]); \ } \ frag->num_segments = 0; \ \ /* return recv_frag */ \ OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_frags, \ - (ompi_list_item_t*)frag); \ + (opal_list_item_t*)frag); \ } while(0) diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.c b/ompi/mca/pml/ob1/pml_ob1_recvreq.c index 4715d716c6..0291620373 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.c @@ -54,10 +54,10 @@ static int mca_pml_ob1_recv_request_cancel(struct ompi_request_t* ompi_request, OMPI_THREAD_LOCK(&comm->matching_lock); if( OMPI_ANY_TAG == ompi_request->req_status.MPI_TAG ) { /* the match has not been already done */ if( request->req_recv.req_base.req_peer == OMPI_ANY_SOURCE ) { - ompi_list_remove_item( &comm->wild_receives, (ompi_list_item_t*)request ); + opal_list_remove_item( &comm->wild_receives, (opal_list_item_t*)request ); } else { mca_pml_ob1_comm_proc_t* proc = comm->procs + request->req_recv.req_base.req_peer; - ompi_list_remove_item(&proc->specific_receives, (ompi_list_item_t*)request); + opal_list_remove_item(&proc->specific_receives, (opal_list_item_t*)request); } } OMPI_THREAD_UNLOCK(&comm->matching_lock); @@ -204,7 +204,7 @@ retry: frag->hdr.hdr_rndv = *hdr; frag->num_segments = 0; frag->request = recvreq; - ompi_list_append(&mca_pml_ob1.acks_pending, (ompi_list_item_t*)frag); + opal_list_append(&mca_pml_ob1.acks_pending, (opal_list_item_t*)frag); } @@ -407,7 +407,7 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq) #endif if(dst == NULL) { OMPI_THREAD_LOCK(&mca_pml_ob1.lock); - ompi_list_append(&mca_pml_ob1.recv_pending, (ompi_list_item_t*)recvreq); + opal_list_append(&mca_pml_ob1.recv_pending, (opal_list_item_t*)recvreq); OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock); break; } @@ -423,7 +423,7 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq) if(ctl == NULL) { ep->btl_free(ep->btl,dst); OMPI_THREAD_LOCK(&mca_pml_ob1.lock); - ompi_list_append(&mca_pml_ob1.recv_pending, (ompi_list_item_t*)recvreq); + opal_list_append(&mca_pml_ob1.recv_pending, (opal_list_item_t*)recvreq); OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock); break; } @@ -455,7 +455,7 @@ void mca_pml_ob1_recv_request_schedule(mca_pml_ob1_recv_request_t* recvreq) recvreq->req_rdma_offset -= size; OMPI_THREAD_ADD32(&recvreq->req_pipeline_depth,-1); OMPI_THREAD_LOCK(&mca_pml_ob1.lock); - ompi_list_append(&mca_pml_ob1.recv_pending, (ompi_list_item_t*)recvreq); + opal_list_append(&mca_pml_ob1.recv_pending, (opal_list_item_t*)recvreq); OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock); break; } @@ -484,7 +484,7 @@ void mca_pml_ob1_recv_request_match_specific(mca_pml_ob1_recv_request_t* request /* assign sequence number */ request->req_recv.req_base.req_sequence = comm->recv_sequence++; - if (ompi_list_get_size(&proc->unexpected_frags) > 0 && + if (opal_list_get_size(&proc->unexpected_frags) > 0 && (frag = mca_pml_ob1_recv_request_match_specific_proc(request, proc)) != NULL) { OMPI_THREAD_UNLOCK(&comm->matching_lock); @@ -500,7 +500,7 @@ void mca_pml_ob1_recv_request_match_specific(mca_pml_ob1_recv_request_t* request * it when the message comes in. */ if(request->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE) { - ompi_list_append(&proc->specific_receives, (ompi_list_item_t*)request); + opal_list_append(&proc->specific_receives, (opal_list_item_t*)request); } OMPI_THREAD_UNLOCK(&comm->matching_lock); } @@ -533,7 +533,7 @@ void mca_pml_ob1_recv_request_match_wild(mca_pml_ob1_recv_request_t* request) mca_pml_ob1_recv_frag_t* frag; /* continue if no frags to match */ - if (ompi_list_get_size(&proc->unexpected_frags) == 0) { + if (opal_list_get_size(&proc->unexpected_frags) == 0) { proc++; continue; } @@ -557,7 +557,7 @@ void mca_pml_ob1_recv_request_match_wild(mca_pml_ob1_recv_request_t* request) */ if(request->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE) - ompi_list_append(&comm->wild_receives, (ompi_list_item_t*)request); + opal_list_append(&comm->wild_receives, (opal_list_item_t*)request); OMPI_THREAD_UNLOCK(&comm->matching_lock); } @@ -571,15 +571,15 @@ static mca_pml_ob1_recv_frag_t* mca_pml_ob1_recv_request_match_specific_proc( mca_pml_ob1_recv_request_t* request, mca_pml_ob1_comm_proc_t* proc) { - ompi_list_t* unexpected_frags = &proc->unexpected_frags; + opal_list_t* unexpected_frags = &proc->unexpected_frags; mca_pml_ob1_recv_frag_t* frag; mca_pml_ob1_match_hdr_t* hdr; int tag = request->req_recv.req_base.req_tag; if( OMPI_ANY_TAG == tag ) { - for (frag = (mca_pml_ob1_recv_frag_t*)ompi_list_get_first(unexpected_frags); - frag != (mca_pml_ob1_recv_frag_t*)ompi_list_get_end(unexpected_frags); - frag = (mca_pml_ob1_recv_frag_t*)ompi_list_get_next(frag)) { + for (frag = (mca_pml_ob1_recv_frag_t*)opal_list_get_first(unexpected_frags); + frag != (mca_pml_ob1_recv_frag_t*)opal_list_get_end(unexpected_frags); + frag = (mca_pml_ob1_recv_frag_t*)opal_list_get_next(frag)) { hdr = &(frag->hdr.hdr_match); /* check first frag - we assume that process matching has been done already */ @@ -588,9 +588,9 @@ static mca_pml_ob1_recv_frag_t* mca_pml_ob1_recv_request_match_specific_proc( } } } else { - for (frag = (mca_pml_ob1_recv_frag_t*)ompi_list_get_first(unexpected_frags); - frag != (mca_pml_ob1_recv_frag_t*)ompi_list_get_end(unexpected_frags); - frag = (mca_pml_ob1_recv_frag_t*)ompi_list_get_next(frag)) { + for (frag = (mca_pml_ob1_recv_frag_t*)opal_list_get_first(unexpected_frags); + frag != (mca_pml_ob1_recv_frag_t*)opal_list_get_end(unexpected_frags); + frag = (mca_pml_ob1_recv_frag_t*)opal_list_get_next(frag)) { hdr = &(frag->hdr.hdr_match); /* check first frag - we assume that process matching has been done already */ @@ -605,7 +605,7 @@ static mca_pml_ob1_recv_frag_t* mca_pml_ob1_recv_request_match_specific_proc( MCA_PML_OB1_RECV_REQUEST_MATCHED(request, hdr); if( !((MCA_PML_REQUEST_IPROBE == request->req_recv.req_base.req_type) || (MCA_PML_REQUEST_PROBE == request->req_recv.req_base.req_type)) ) { - ompi_list_remove_item(unexpected_frags, (ompi_list_item_t*)frag); + opal_list_remove_item(unexpected_frags, (opal_list_item_t*)frag); frag->request = request; } return frag; diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.h b/ompi/mca/pml/ob1/pml_ob1_recvreq.h index 1f96eee5af..152e8fcbb1 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.h @@ -73,7 +73,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_recv_request_t); */ #define MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq, rc) \ do { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ rc = OMPI_SUCCESS; \ OMPI_FREE_LIST_GET(&mca_pml_ob1.recv_requests, item, rc); \ recvreq = (mca_pml_ob1_recv_request_t*)item; \ @@ -129,7 +129,7 @@ do { } \ \ MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \ - OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_requests, (ompi_list_item_t*)(recvreq)); \ + OMPI_FREE_LIST_RETURN(&mca_pml_ob1.recv_requests, (opal_list_item_t*)(recvreq)); \ } while(0) /** diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.c b/ompi/mca/pml/ob1/pml_ob1_sendreq.c index f89f3c0f2b..debe076fb1 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.c @@ -173,7 +173,7 @@ static void mca_pml_ob1_send_completion( break; } OMPI_THREAD_LOCK(&mca_pml_ob1.ob1_lock); - sendreq = (mca_pml_ob1_send_request_t*)ompi_list_remove_first(&mca_pml_ob1.send_pending); + sendreq = (mca_pml_ob1_send_request_t*)opal_list_remove_first(&mca_pml_ob1.send_pending); OMPI_THREAD_UNLOCK(&mca_pml_ob1.ob1_lock); } } @@ -423,7 +423,7 @@ int mca_pml_ob1_send_request_schedule(mca_pml_ob1_send_request_t* sendreq) &size); if(des == NULL) { OMPI_THREAD_LOCK(&mca_pml_ob1.lock); - ompi_list_append(&mca_pml_ob1.send_pending, (ompi_list_item_t*)sendreq); + opal_list_append(&mca_pml_ob1.send_pending, (opal_list_item_t*)sendreq); OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock); break; } @@ -452,7 +452,7 @@ int mca_pml_ob1_send_request_schedule(mca_pml_ob1_send_request_t* sendreq) OMPI_THREAD_ADD32(&sendreq->req_pipeline_depth,-1); ep->btl_free(ep->btl,des); OMPI_THREAD_LOCK(&mca_pml_ob1.lock); - ompi_list_append(&mca_pml_ob1.send_pending, (ompi_list_item_t*)sendreq); + opal_list_append(&mca_pml_ob1.send_pending, (opal_list_item_t*)sendreq); OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock); break; } @@ -533,7 +533,7 @@ static void mca_pml_ob1_put_completion( MCA_PML_OB1_ENDPOINT_DES_ALLOC(frag->rdma_ep, fin, sizeof(mca_pml_ob1_fin_hdr_t)); if(NULL == fin) { OMPI_THREAD_LOCK(&mca_pml_ob1.lock); - ompi_list_append(&mca_pml_ob1.rdma_pending, (ompi_list_item_t*)frag); + opal_list_append(&mca_pml_ob1.rdma_pending, (opal_list_item_t*)frag); OMPI_THREAD_LOCK(&mca_pml_ob1.lock); goto cleanup; } @@ -560,7 +560,7 @@ static void mca_pml_ob1_put_completion( btl->btl_free(btl, fin); if(rc == OMPI_ERR_OUT_OF_RESOURCE) { OMPI_THREAD_LOCK(&mca_pml_ob1.lock); - ompi_list_append(&mca_pml_ob1.rdma_pending, (ompi_list_item_t*)frag); + opal_list_append(&mca_pml_ob1.rdma_pending, (opal_list_item_t*)frag); OMPI_THREAD_LOCK(&mca_pml_ob1.lock); } else { /* TSW - FIX */ @@ -647,7 +647,7 @@ void mca_pml_ob1_send_request_put( &size); if(NULL == des) { OMPI_THREAD_LOCK(&mca_pml_ob1.lock); - ompi_list_append(&mca_pml_ob1.rdma_pending, (ompi_list_item_t*)frag); + opal_list_append(&mca_pml_ob1.rdma_pending, (opal_list_item_t*)frag); OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock); } frag->rdma_state = MCA_PML_OB1_RDMA_PUT; @@ -668,7 +668,7 @@ void mca_pml_ob1_send_request_put( if(OMPI_SUCCESS != (rc = btl->btl_put(btl, ep->btl_endpoint, des))) { if(rc == OMPI_ERR_OUT_OF_RESOURCE) { OMPI_THREAD_LOCK(&mca_pml_ob1.lock); - ompi_list_append(&mca_pml_ob1.rdma_pending, (ompi_list_item_t*)frag); + opal_list_append(&mca_pml_ob1.rdma_pending, (opal_list_item_t*)frag); OMPI_THREAD_UNLOCK(&mca_pml_ob1.lock); } else { /* TSW - FIX */ diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.h b/ompi/mca/pml/ob1/pml_ob1_sendreq.h index ffe76c4055..9ef7d48191 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.h @@ -78,7 +78,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_send_request_t); rc) \ { \ mca_pml_ob1_proc_t *proc = comm->c_pml_procs[dst]; \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ \ if(NULL == proc) { \ rc = OMPI_ERR_OUT_OF_RESOURCE; \ @@ -238,7 +238,7 @@ OBJ_CLASS_DECLARATION(mca_pml_ob1_send_request_t); /* 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, (ompi_list_item_t*)sendreq); \ + &mca_pml_ob1.send_requests, (opal_list_item_t*)sendreq); \ } /** diff --git a/ompi/mca/pml/pml.h b/ompi/mca/pml/pml.h index 2f48c7d8e5..aaa5dfa23e 100644 --- a/ompi/mca/pml/pml.h +++ b/ompi/mca/pml/pml.h @@ -58,7 +58,7 @@ #define MCA_PML_H #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "communicator/communicator.h" #include "request/request.h" #include "mca/mca.h" diff --git a/ompi/mca/pml/teg/pml_teg.c b/ompi/mca/pml/teg/pml_teg.c index 75caf8d996..82aa96e76a 100644 --- a/ompi/mca/pml/teg/pml_teg.c +++ b/ompi/mca/pml/teg/pml_teg.c @@ -94,7 +94,7 @@ int mca_pml_teg_add_ptls(void) { /* build an array of ptls and ptl modules */ mca_ptl_base_selected_module_t* selected_ptl; - size_t num_ptls = ompi_list_get_size(&mca_ptl_base_modules_initialized); + size_t num_ptls = opal_list_get_size(&mca_ptl_base_modules_initialized); size_t cache_bytes = 0; mca_pml_teg.teg_num_ptl_modules = 0; mca_pml_teg.teg_num_ptl_progress = 0; @@ -109,10 +109,10 @@ int mca_pml_teg_add_ptls(void) } for(selected_ptl = (mca_ptl_base_selected_module_t*) - ompi_list_get_first(&mca_ptl_base_modules_initialized); + opal_list_get_first(&mca_ptl_base_modules_initialized); selected_ptl != (mca_ptl_base_selected_module_t*) - ompi_list_get_end(&mca_ptl_base_modules_initialized); - selected_ptl = (mca_ptl_base_selected_module_t*)ompi_list_get_next(selected_ptl)) { + opal_list_get_end(&mca_ptl_base_modules_initialized); + selected_ptl = (mca_ptl_base_selected_module_t*)opal_list_get_next(selected_ptl)) { mca_ptl_base_module_t *ptl = selected_ptl->pbsm_module; size_t i; diff --git a/ompi/mca/pml/teg/pml_teg.h b/ompi/mca/pml/teg/pml_teg.h index 1f034f7573..3aef60a7b7 100644 --- a/ompi/mca/pml/teg/pml_teg.h +++ b/ompi/mca/pml/teg/pml_teg.h @@ -51,7 +51,7 @@ struct mca_pml_teg_t { mca_ptl_base_component_progress_fn_t* teg_ptl_progress; size_t teg_num_ptl_progress; - ompi_list_t teg_procs; + opal_list_t teg_procs; ompi_mutex_t teg_lock; int teg_priority; @@ -66,7 +66,7 @@ struct mca_pml_teg_t { ompi_free_list_t teg_recv_requests; /* list of pending send requests */ - ompi_list_t teg_send_pending; + opal_list_t teg_send_pending; }; typedef struct mca_pml_teg_t mca_pml_teg_t; diff --git a/ompi/mca/pml/teg/pml_teg_component.c b/ompi/mca/pml/teg/pml_teg_component.c index 3be3a20b13..b024368097 100644 --- a/ompi/mca/pml/teg/pml_teg_component.c +++ b/ompi/mca/pml/teg/pml_teg_component.c @@ -84,8 +84,8 @@ int mca_pml_teg_component_open(void) OBJ_CONSTRUCT(&mca_pml_teg.teg_lock, ompi_mutex_t); OBJ_CONSTRUCT(&mca_pml_teg.teg_send_requests, ompi_free_list_t); OBJ_CONSTRUCT(&mca_pml_teg.teg_recv_requests, ompi_free_list_t); - OBJ_CONSTRUCT(&mca_pml_teg.teg_procs, ompi_list_t); - OBJ_CONSTRUCT(&mca_pml_teg.teg_send_pending, ompi_list_t); + OBJ_CONSTRUCT(&mca_pml_teg.teg_procs, opal_list_t); + OBJ_CONSTRUCT(&mca_pml_teg.teg_send_pending, opal_list_t); mca_pml_teg.teg_ptl_components = NULL; mca_pml_teg.teg_num_ptl_components = 0; @@ -122,10 +122,10 @@ int mca_pml_teg_component_close(void) #if OMPI_ENABLE_DEBUG if (mca_pml_teg.teg_recv_requests.fl_num_allocated != - mca_pml_teg.teg_recv_requests.super.ompi_list_length) { + mca_pml_teg.teg_recv_requests.super.opal_list_length) { ompi_output(0, "teg recv requests: %d allocated %d returned\n", mca_pml_teg.teg_recv_requests.fl_num_allocated, - mca_pml_teg.teg_recv_requests.super.ompi_list_length); + mca_pml_teg.teg_recv_requests.super.opal_list_length); } #endif diff --git a/ompi/mca/pml/teg/pml_teg_proc.c b/ompi/mca/pml/teg/pml_teg_proc.c index 5b0bc71320..15e2bdf220 100644 --- a/ompi/mca/pml/teg/pml_teg_proc.c +++ b/ompi/mca/pml/teg/pml_teg_proc.c @@ -31,7 +31,7 @@ static void mca_pml_teg_proc_construct(mca_pml_proc_t* proc) OBJ_CONSTRUCT(&proc->proc_ptl_next, mca_pml_teg_ptl_array_t); OMPI_THREAD_LOCK(&mca_pml_teg.teg_lock); - ompi_list_append(&mca_pml_teg.teg_procs, (ompi_list_item_t*)proc); + opal_list_append(&mca_pml_teg.teg_procs, (opal_list_item_t*)proc); OMPI_THREAD_UNLOCK(&mca_pml_teg.teg_lock); } @@ -39,7 +39,7 @@ static void mca_pml_teg_proc_construct(mca_pml_proc_t* proc) static void mca_pml_teg_proc_destruct(mca_pml_proc_t* proc) { OMPI_THREAD_LOCK(&mca_pml_teg.teg_lock); - ompi_list_remove_item(&mca_pml_teg.teg_procs, (ompi_list_item_t*)proc); + opal_list_remove_item(&mca_pml_teg.teg_procs, (opal_list_item_t*)proc); OMPI_THREAD_UNLOCK(&mca_pml_teg.teg_lock); OBJ_DESTRUCT(&proc->proc_lock); @@ -49,7 +49,7 @@ static void mca_pml_teg_proc_destruct(mca_pml_proc_t* proc) OBJ_CLASS_INSTANCE( mca_pml_teg_proc_t, - ompi_list_item_t, + opal_list_item_t, mca_pml_teg_proc_construct, mca_pml_teg_proc_destruct ); diff --git a/ompi/mca/pml/teg/pml_teg_proc.h b/ompi/mca/pml/teg/pml_teg_proc.h index 825c50dee9..8bc06ec68c 100644 --- a/ompi/mca/pml/teg/pml_teg_proc.h +++ b/ompi/mca/pml/teg/pml_teg_proc.h @@ -33,7 +33,7 @@ extern "C" { * to the PML. Note that this name is not PML specific. */ struct mca_pml_proc_t { - ompi_list_item_t super; + opal_list_item_t super; ompi_proc_t *proc_ompi; /**< back-pointer to ompi_proc_t */ ompi_mutex_t proc_lock; /**< lock to protect against concurrent access */ mca_ptl_array_t proc_ptl_first; /**< array of ptls to use for first fragments */ diff --git a/ompi/mca/pml/teg/pml_teg_ptl.c b/ompi/mca/pml/teg/pml_teg_ptl.c index 5b803aa9da..e348c9f24d 100644 --- a/ompi/mca/pml/teg/pml_teg_ptl.c +++ b/ompi/mca/pml/teg/pml_teg_ptl.c @@ -21,7 +21,7 @@ static void mca_pml_base_ptl_construct(mca_pml_base_ptl_t* ptl) { - OBJ_CONSTRUCT(&ptl->ptl_cache, ompi_list_t); + OBJ_CONSTRUCT(&ptl->ptl_cache, opal_list_t); OBJ_CONSTRUCT(&ptl->ptl_cache_lock, ompi_mutex_t); ptl->ptl = NULL; ptl->ptl_cache_size = 0; @@ -36,7 +36,7 @@ static void mca_pml_base_ptl_destruct(mca_pml_base_ptl_t* ptl) OBJ_CLASS_INSTANCE( mca_pml_base_ptl_t, - ompi_list_t, + opal_list_t, mca_pml_base_ptl_construct, mca_pml_base_ptl_destruct ); diff --git a/ompi/mca/pml/teg/pml_teg_ptl.h b/ompi/mca/pml/teg/pml_teg_ptl.h index 400da7c4a9..7ecd205be8 100644 --- a/ompi/mca/pml/teg/pml_teg_ptl.h +++ b/ompi/mca/pml/teg/pml_teg_ptl.h @@ -26,7 +26,7 @@ extern "C" { struct mca_pml_base_ptl_t { - ompi_list_t ptl_cache; /**< cache of send requests */ + opal_list_t ptl_cache; /**< cache of send requests */ size_t ptl_cache_size; /**< maximum size of cache */ size_t ptl_cache_alloc; /**< current number of allocated items */ ompi_mutex_t ptl_cache_lock; /**< lock for queue access */ diff --git a/ompi/mca/pml/teg/pml_teg_recvfrag.c b/ompi/mca/pml/teg/pml_teg_recvfrag.c index bddd01f2b3..60b9a07ec0 100644 --- a/ompi/mca/pml/teg/pml_teg_recvfrag.c +++ b/ompi/mca/pml/teg/pml_teg_recvfrag.c @@ -43,9 +43,9 @@ bool mca_pml_teg_recv_frag_match( { bool matched; bool matches = false; - ompi_list_t matched_frags; + opal_list_t matched_frags; if((matched = mca_ptl_base_match(header, frag, &matched_frags, &matches)) == false) { - frag = (matches ? (mca_ptl_base_recv_frag_t*)ompi_list_remove_first(&matched_frags) : NULL); + frag = (matches ? (mca_ptl_base_recv_frag_t*)opal_list_remove_first(&matched_frags) : NULL); } while(NULL != frag) { @@ -83,7 +83,7 @@ bool mca_pml_teg_recv_frag_match( }; /* process any additional fragments that arrived out of order */ - frag = (matches ? (mca_ptl_base_recv_frag_t*)ompi_list_remove_first(&matched_frags) : NULL); + frag = (matches ? (mca_ptl_base_recv_frag_t*)opal_list_remove_first(&matched_frags) : NULL); }; return matched; } diff --git a/ompi/mca/pml/teg/pml_teg_recvreq.c b/ompi/mca/pml/teg/pml_teg_recvreq.c index d5c495d809..87229a5283 100644 --- a/ompi/mca/pml/teg/pml_teg_recvreq.c +++ b/ompi/mca/pml/teg/pml_teg_recvreq.c @@ -54,11 +54,11 @@ static int mca_pml_teg_recv_request_cancel(struct ompi_request_t* request, int c if( OMPI_ANY_TAG == request->req_status.MPI_TAG ) { /* the match have not been already done */ if( teg_request->req_peer == OMPI_ANY_SOURCE ) { - ompi_list_remove_item( &(pml_comm->c_wild_receives), - (ompi_list_item_t*)request ); + opal_list_remove_item( &(pml_comm->c_wild_receives), + (opal_list_item_t*)request ); } else { - ompi_list_remove_item( pml_comm->c_specific_receives + teg_request->req_peer, - (ompi_list_item_t*)request ); + opal_list_remove_item( pml_comm->c_specific_receives + teg_request->req_peer, + (opal_list_item_t*)request ); } } @@ -142,7 +142,7 @@ void mca_pml_teg_recv_request_match_specific(mca_ptl_base_recv_request_t* reques /* assign sequence number */ request->req_recv.req_base.req_sequence = pml_comm->c_recv_seq++; - if (ompi_list_get_size(&pml_comm->c_unexpected_frags[req_peer]) > 0 && + if (opal_list_get_size(&pml_comm->c_unexpected_frags[req_peer]) > 0 && (frag = mca_pml_teg_recv_request_match_specific_proc(request, req_peer)) != NULL) { mca_ptl_base_module_t* ptl = frag->frag_base.frag_owner; /* setup pointer to ptls peer */ @@ -160,7 +160,7 @@ void mca_pml_teg_recv_request_match_specific(mca_ptl_base_recv_request_t* reques * it when the message comes in. */ if(request->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE) { - ompi_list_append(pml_comm->c_specific_receives+req_peer, (ompi_list_item_t*)request); + opal_list_append(pml_comm->c_specific_receives+req_peer, (opal_list_item_t*)request); } OMPI_THREAD_UNLOCK(&pml_comm->c_matching_lock); } @@ -193,7 +193,7 @@ void mca_pml_teg_recv_request_match_wild(mca_ptl_base_recv_request_t* request) mca_ptl_base_recv_frag_t* frag; /* continue if no frags to match */ - if (ompi_list_get_size(&pml_comm->c_unexpected_frags[proc]) == 0) + if (opal_list_get_size(&pml_comm->c_unexpected_frags[proc]) == 0) continue; /* loop over messages from the current proc */ @@ -216,7 +216,7 @@ void mca_pml_teg_recv_request_match_wild(mca_ptl_base_recv_request_t* request) */ if(request->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE) - ompi_list_append(&pml_comm->c_wild_receives, (ompi_list_item_t*)request); + opal_list_append(&pml_comm->c_wild_receives, (opal_list_item_t*)request); OMPI_THREAD_UNLOCK(&pml_comm->c_matching_lock); } @@ -230,15 +230,15 @@ static mca_ptl_base_recv_frag_t* mca_pml_teg_recv_request_match_specific_proc( mca_ptl_base_recv_request_t* request, int proc) { mca_pml_ptl_comm_t *pml_comm = request->req_recv.req_base.req_comm->c_pml_comm; - ompi_list_t* unexpected_frags = pml_comm->c_unexpected_frags+proc; + opal_list_t* unexpected_frags = pml_comm->c_unexpected_frags+proc; mca_ptl_base_recv_frag_t* frag; mca_ptl_base_match_header_t* header; int tag = request->req_recv.req_base.req_tag; if( OMPI_ANY_TAG == tag ) { - for (frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_first(unexpected_frags); - frag != (mca_ptl_base_recv_frag_t*)ompi_list_get_end(unexpected_frags); - frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_next(frag)) { + for (frag = (mca_ptl_base_recv_frag_t*)opal_list_get_first(unexpected_frags); + frag != (mca_ptl_base_recv_frag_t*)opal_list_get_end(unexpected_frags); + frag = (mca_ptl_base_recv_frag_t*)opal_list_get_next(frag)) { header = &(frag->frag_base.frag_header.hdr_match); /* check first frag - we assume that process matching has been done already */ @@ -247,9 +247,9 @@ static mca_ptl_base_recv_frag_t* mca_pml_teg_recv_request_match_specific_proc( } } } else { - for (frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_first(unexpected_frags); - frag != (mca_ptl_base_recv_frag_t*)ompi_list_get_end(unexpected_frags); - frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_next(frag)) { + for (frag = (mca_ptl_base_recv_frag_t*)opal_list_get_first(unexpected_frags); + frag != (mca_ptl_base_recv_frag_t*)opal_list_get_end(unexpected_frags); + frag = (mca_ptl_base_recv_frag_t*)opal_list_get_next(frag)) { header = &(frag->frag_base.frag_header.hdr_match); /* check first frag - we assume that process matching has been done already */ @@ -267,7 +267,7 @@ static mca_ptl_base_recv_frag_t* mca_pml_teg_recv_request_match_specific_proc( if( !((MCA_PML_REQUEST_IPROBE == request->req_recv.req_base.req_type) || (MCA_PML_REQUEST_PROBE == request->req_recv.req_base.req_type)) ) { - ompi_list_remove_item(unexpected_frags, (ompi_list_item_t*)frag); + opal_list_remove_item(unexpected_frags, (opal_list_item_t*)frag); frag->frag_request = request; } else { /* it's a probe, therefore report it's completion */ diff --git a/ompi/mca/pml/teg/pml_teg_recvreq.h b/ompi/mca/pml/teg/pml_teg_recvreq.h index e53d1d9cf2..f8b32d1624 100644 --- a/ompi/mca/pml/teg/pml_teg_recvreq.h +++ b/ompi/mca/pml/teg/pml_teg_recvreq.h @@ -40,7 +40,7 @@ OBJ_CLASS_DECLARATION(mca_pml_teg_recv_request_t); */ #define MCA_PML_TEG_RECV_REQUEST_ALLOC(recvreq, rc) \ do { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_GET(&mca_pml_teg.teg_recv_requests, item, rc); \ recvreq = (mca_ptl_base_recv_request_t*)item; \ } while(0) @@ -80,7 +80,7 @@ OBJ_CLASS_DECLARATION(mca_pml_teg_recv_request_t); #define MCA_PML_TEG_RECV_REQUEST_RETURN(request) \ do { \ MCA_PML_BASE_RECV_REQUEST_FINI( &request->req_recv ); \ - OMPI_FREE_LIST_RETURN(&mca_pml_teg.teg_recv_requests, (ompi_list_item_t*)request); \ + OMPI_FREE_LIST_RETURN(&mca_pml_teg.teg_recv_requests, (opal_list_item_t*)request); \ } while(0) /** diff --git a/ompi/mca/pml/teg/pml_teg_sendreq.c b/ompi/mca/pml/teg/pml_teg_sendreq.c index 9a5ba2b997..a523e66265 100644 --- a/ompi/mca/pml/teg/pml_teg_sendreq.c +++ b/ompi/mca/pml/teg/pml_teg_sendreq.c @@ -136,7 +136,7 @@ int mca_pml_teg_send_request_schedule(mca_ptl_base_send_request_t* req) /* unable to complete send - queue for later */ if(send_count == 0) { OMPI_THREAD_LOCK(&mca_pml_teg.teg_lock); - ompi_list_append(&mca_pml_teg.teg_send_pending, (ompi_list_item_t*)req); + opal_list_append(&mca_pml_teg.teg_send_pending, (opal_list_item_t*)req); OMPI_THREAD_UNLOCK(&mca_pml_teg.teg_lock); req->req_lock = 0; return OMPI_ERR_OUT_OF_RESOURCE; @@ -204,9 +204,9 @@ void mca_pml_teg_send_request_progress( } /* check for pending requests that need to be progressed */ - while(ompi_list_get_size(&mca_pml_teg.teg_send_pending) != 0) { + while(opal_list_get_size(&mca_pml_teg.teg_send_pending) != 0) { OMPI_THREAD_LOCK(&mca_pml_teg.teg_lock); - req = (mca_ptl_base_send_request_t*)ompi_list_remove_first(&mca_pml_teg.teg_send_pending); + req = (mca_ptl_base_send_request_t*)opal_list_remove_first(&mca_pml_teg.teg_send_pending); OMPI_THREAD_UNLOCK(&mca_pml_teg.teg_lock); if(req == NULL) break; diff --git a/ompi/mca/pml/teg/pml_teg_sendreq.h b/ompi/mca/pml/teg/pml_teg_sendreq.h index b2f8f8e4e2..dde9bc300b 100644 --- a/ompi/mca/pml/teg/pml_teg_sendreq.h +++ b/ompi/mca/pml/teg/pml_teg_sendreq.h @@ -58,7 +58,7 @@ OBJ_CLASS_DECLARATION(mca_pml_teg_send_request_t); if(NULL != ptl_base) { \ OMPI_THREAD_LOCK(&ptl_base->ptl_cache_lock); \ sendreq = (mca_pml_teg_send_request_t*) \ - ompi_list_remove_first(&ptl_base->ptl_cache); \ + opal_list_remove_first(&ptl_base->ptl_cache); \ if(NULL != sendreq) { \ OMPI_THREAD_UNLOCK(&ptl_base->ptl_cache_lock); \ rc = OMPI_SUCCESS; \ @@ -67,7 +67,7 @@ OBJ_CLASS_DECLARATION(mca_pml_teg_send_request_t); * allocate an additional request to the cache \ */ \ mca_ptl_base_module_t* ptl = ptl_base->ptl; \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_WAIT(&mca_pml_teg.teg_send_requests, item, rc); \ sendreq = (mca_pml_teg_send_request_t*)item; \ sendreq->req_ptl = ptl; \ @@ -80,7 +80,7 @@ OBJ_CLASS_DECLARATION(mca_pml_teg_send_request_t); /* \ * take a request from the global pool \ */ \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_THREAD_UNLOCK(&ptl_base->ptl_cache_lock); \ OMPI_FREE_LIST_WAIT(&mca_pml_teg.teg_send_requests, item, rc); \ sendreq = (mca_pml_teg_send_request_t*)item; \ @@ -89,7 +89,7 @@ OBJ_CLASS_DECLARATION(mca_pml_teg_send_request_t); \ /* otherwise - take the allocation from the global list */ \ } else { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_WAIT(&mca_pml_teg.teg_send_requests, item, rc); \ sendreq = (mca_pml_teg_send_request_t*)item; \ sendreq->req_ptl = ptl_proc->ptl; \ @@ -136,12 +136,12 @@ OBJ_CLASS_DECLARATION(mca_pml_teg_send_request_t); */ \ if(NULL != ptl->ptl_base && (sendreq)->req_cached) { \ OMPI_THREAD_LOCK(&ptl_base->ptl_cache_lock); \ - ompi_list_prepend(&ptl_base->ptl_cache, \ - (ompi_list_item_t*)sendreq); \ + opal_list_prepend(&ptl_base->ptl_cache, \ + (opal_list_item_t*)sendreq); \ OMPI_THREAD_UNLOCK(&ptl_base->ptl_cache_lock); \ } else { \ OMPI_FREE_LIST_RETURN( \ - &mca_pml_teg.teg_send_requests, (ompi_list_item_t*)sendreq); \ + &mca_pml_teg.teg_send_requests, (opal_list_item_t*)sendreq); \ } \ } diff --git a/ompi/mca/pml/uniq/pml_uniq.c b/ompi/mca/pml/uniq/pml_uniq.c index 39213bb131..adedf8e317 100644 --- a/ompi/mca/pml/uniq/pml_uniq.c +++ b/ompi/mca/pml/uniq/pml_uniq.c @@ -95,7 +95,7 @@ int mca_pml_uniq_add_ptls( void ) { /* build an array of ptls and ptl modules */ mca_ptl_base_selected_module_t* selected_ptl; - size_t num_ptls = ompi_list_get_size(&mca_ptl_base_modules_initialized); + size_t num_ptls = opal_list_get_size(&mca_ptl_base_modules_initialized); size_t cache_bytes = 0; mca_pml_uniq.uniq_num_ptl_modules = 0; mca_pml_uniq.uniq_num_ptl_progress = 0; @@ -110,10 +110,10 @@ int mca_pml_uniq_add_ptls( void ) } for(selected_ptl = (mca_ptl_base_selected_module_t*) - ompi_list_get_first(&mca_ptl_base_modules_initialized); + opal_list_get_first(&mca_ptl_base_modules_initialized); selected_ptl != (mca_ptl_base_selected_module_t*) - ompi_list_get_end(&mca_ptl_base_modules_initialized); - selected_ptl = (mca_ptl_base_selected_module_t*)ompi_list_get_next(selected_ptl)) { + opal_list_get_end(&mca_ptl_base_modules_initialized); + selected_ptl = (mca_ptl_base_selected_module_t*)opal_list_get_next(selected_ptl)) { mca_ptl_base_module_t *ptl = selected_ptl->pbsm_module; size_t i; diff --git a/ompi/mca/pml/uniq/pml_uniq.h b/ompi/mca/pml/uniq/pml_uniq.h index d18772ed04..d7a18fb375 100644 --- a/ompi/mca/pml/uniq/pml_uniq.h +++ b/ompi/mca/pml/uniq/pml_uniq.h @@ -51,7 +51,7 @@ struct mca_pml_uniq_t { mca_ptl_base_component_progress_fn_t* uniq_ptl_progress; size_t uniq_num_ptl_progress; - ompi_list_t uniq_procs; + opal_list_t uniq_procs; ompi_mutex_t uniq_lock; int uniq_free_list_num; /* initial size of free list */ @@ -64,7 +64,7 @@ struct mca_pml_uniq_t { ompi_free_list_t uniq_recv_requests; /* list of pending send requests */ - ompi_list_t uniq_send_pending; + opal_list_t uniq_send_pending; }; typedef struct mca_pml_uniq_t mca_pml_uniq_t; diff --git a/ompi/mca/pml/uniq/pml_uniq_component.c b/ompi/mca/pml/uniq/pml_uniq_component.c index 577e3d2eb0..a3d7a77933 100644 --- a/ompi/mca/pml/uniq/pml_uniq_component.c +++ b/ompi/mca/pml/uniq/pml_uniq_component.c @@ -84,8 +84,8 @@ int mca_pml_uniq_component_open(void) OBJ_CONSTRUCT(&mca_pml_uniq.uniq_lock, ompi_mutex_t); OBJ_CONSTRUCT(&mca_pml_uniq.uniq_send_requests, ompi_free_list_t); OBJ_CONSTRUCT(&mca_pml_uniq.uniq_recv_requests, ompi_free_list_t); - OBJ_CONSTRUCT(&mca_pml_uniq.uniq_procs, ompi_list_t); - OBJ_CONSTRUCT(&mca_pml_uniq.uniq_send_pending, ompi_list_t); + OBJ_CONSTRUCT(&mca_pml_uniq.uniq_procs, opal_list_t); + OBJ_CONSTRUCT(&mca_pml_uniq.uniq_send_pending, opal_list_t); mca_pml_uniq.uniq_ptl_components = NULL; mca_pml_uniq.uniq_num_ptl_components = 0; @@ -120,10 +120,10 @@ int mca_pml_uniq_component_close(void) #if OMPI_ENABLE_DEBUG if (mca_pml_uniq.uniq_recv_requests.fl_num_allocated != - mca_pml_uniq.uniq_recv_requests.super.ompi_list_length) { + mca_pml_uniq.uniq_recv_requests.super.opal_list_length) { ompi_output(0, "uniq recv requests: %d allocated %d returned\n", mca_pml_uniq.uniq_recv_requests.fl_num_allocated, - mca_pml_uniq.uniq_recv_requests.super.ompi_list_length); + mca_pml_uniq.uniq_recv_requests.super.opal_list_length); } #endif diff --git a/ompi/mca/pml/uniq/pml_uniq_proc.c b/ompi/mca/pml/uniq/pml_uniq_proc.c index a6332e53c3..d2baa8b145 100644 --- a/ompi/mca/pml/uniq/pml_uniq_proc.c +++ b/ompi/mca/pml/uniq/pml_uniq_proc.c @@ -36,7 +36,7 @@ static void mca_pml_uniq_proc_construct(mca_pml_proc_t* proc) proc->proc_ptl_next.ptl = NULL; #endif /* PML_UNIQ_ACCEPT_NEXT_PTL */ OMPI_THREAD_LOCK(&mca_pml_uniq.uniq_lock); - ompi_list_append(&mca_pml_uniq.uniq_procs, (ompi_list_item_t*)proc); + opal_list_append(&mca_pml_uniq.uniq_procs, (opal_list_item_t*)proc); OMPI_THREAD_UNLOCK(&mca_pml_uniq.uniq_lock); } @@ -44,7 +44,7 @@ static void mca_pml_uniq_proc_construct(mca_pml_proc_t* proc) static void mca_pml_uniq_proc_destruct(mca_pml_proc_t* proc) { OMPI_THREAD_LOCK(&mca_pml_uniq.uniq_lock); - ompi_list_remove_item(&mca_pml_uniq.uniq_procs, (ompi_list_item_t*)proc); + opal_list_remove_item(&mca_pml_uniq.uniq_procs, (opal_list_item_t*)proc); OMPI_THREAD_UNLOCK(&mca_pml_uniq.uniq_lock); OBJ_DESTRUCT(&proc->proc_lock); @@ -52,7 +52,7 @@ static void mca_pml_uniq_proc_destruct(mca_pml_proc_t* proc) OBJ_CLASS_INSTANCE( mca_pml_uniq_proc_t, - ompi_list_item_t, + opal_list_item_t, mca_pml_uniq_proc_construct, mca_pml_uniq_proc_destruct ); diff --git a/ompi/mca/pml/uniq/pml_uniq_proc.h b/ompi/mca/pml/uniq/pml_uniq_proc.h index a5d0c3bbb2..02ef838516 100644 --- a/ompi/mca/pml/uniq/pml_uniq_proc.h +++ b/ompi/mca/pml/uniq/pml_uniq_proc.h @@ -50,7 +50,7 @@ extern "C" { * to the PML. Note that this name is not PML specific. */ struct mca_pml_proc_t { - ompi_list_item_t super; + opal_list_item_t super; ompi_proc_t *proc_ompi; /**< back-pointer to ompi_proc_t */ ompi_mutex_t proc_lock; /**< lock to protect against concurrent access */ mca_ptl_proc_t proc_ptl_first; /**< ptl for the first fragment */ diff --git a/ompi/mca/pml/uniq/pml_uniq_ptl.c b/ompi/mca/pml/uniq/pml_uniq_ptl.c index 141c07a893..78cf6ad2eb 100644 --- a/ompi/mca/pml/uniq/pml_uniq_ptl.c +++ b/ompi/mca/pml/uniq/pml_uniq_ptl.c @@ -21,7 +21,7 @@ static void mca_pml_base_ptl_construct(mca_pml_base_ptl_t* ptl) { - OBJ_CONSTRUCT(&ptl->ptl_cache, ompi_list_t); + OBJ_CONSTRUCT(&ptl->ptl_cache, opal_list_t); OBJ_CONSTRUCT(&ptl->ptl_cache_lock, ompi_mutex_t); ptl->ptl = NULL; ptl->ptl_cache_size = 0; @@ -36,7 +36,7 @@ static void mca_pml_base_ptl_destruct(mca_pml_base_ptl_t* ptl) OBJ_CLASS_INSTANCE( mca_pml_base_ptl_t, - ompi_list_t, + opal_list_t, mca_pml_base_ptl_construct, mca_pml_base_ptl_destruct ); diff --git a/ompi/mca/pml/uniq/pml_uniq_ptl.h b/ompi/mca/pml/uniq/pml_uniq_ptl.h index 400da7c4a9..7ecd205be8 100644 --- a/ompi/mca/pml/uniq/pml_uniq_ptl.h +++ b/ompi/mca/pml/uniq/pml_uniq_ptl.h @@ -26,7 +26,7 @@ extern "C" { struct mca_pml_base_ptl_t { - ompi_list_t ptl_cache; /**< cache of send requests */ + opal_list_t ptl_cache; /**< cache of send requests */ size_t ptl_cache_size; /**< maximum size of cache */ size_t ptl_cache_alloc; /**< current number of allocated items */ ompi_mutex_t ptl_cache_lock; /**< lock for queue access */ diff --git a/ompi/mca/pml/uniq/pml_uniq_recvfrag.c b/ompi/mca/pml/uniq/pml_uniq_recvfrag.c index 5d35d5b870..913e3eb5d1 100644 --- a/ompi/mca/pml/uniq/pml_uniq_recvfrag.c +++ b/ompi/mca/pml/uniq/pml_uniq_recvfrag.c @@ -43,9 +43,9 @@ bool mca_pml_uniq_recv_frag_match( { bool matched; bool matches = false; - ompi_list_t matched_frags; + opal_list_t matched_frags; if((matched = mca_ptl_base_match(header, frag, &matched_frags, &matches)) == false) { - frag = (matches ? (mca_ptl_base_recv_frag_t*)ompi_list_remove_first(&matched_frags) : NULL); + frag = (matches ? (mca_ptl_base_recv_frag_t*)opal_list_remove_first(&matched_frags) : NULL); } while(NULL != frag) { @@ -82,7 +82,7 @@ bool mca_pml_uniq_recv_frag_match( }; /* process any additional fragments that arrived out of order */ - frag = (matches ? (mca_ptl_base_recv_frag_t*)ompi_list_remove_first(&matched_frags) : NULL); + frag = (matches ? (mca_ptl_base_recv_frag_t*)opal_list_remove_first(&matched_frags) : NULL); }; return matched; } diff --git a/ompi/mca/pml/uniq/pml_uniq_recvreq.c b/ompi/mca/pml/uniq/pml_uniq_recvreq.c index fad2c2c2c8..8ca62941a2 100644 --- a/ompi/mca/pml/uniq/pml_uniq_recvreq.c +++ b/ompi/mca/pml/uniq/pml_uniq_recvreq.c @@ -56,11 +56,11 @@ static int mca_pml_uniq_recv_request_cancel(struct ompi_request_t* request, int if( OMPI_ANY_TAG == request->req_status.MPI_TAG ) { /* the match have not been already done */ if( uniq_request->req_peer == OMPI_ANY_SOURCE ) { - ompi_list_remove_item( &(pml_comm->c_wild_receives), - (ompi_list_item_t*)request ); + opal_list_remove_item( &(pml_comm->c_wild_receives), + (opal_list_item_t*)request ); } else { - ompi_list_remove_item( pml_comm->c_specific_receives + uniq_request->req_peer, - (ompi_list_item_t*)request ); + opal_list_remove_item( pml_comm->c_specific_receives + uniq_request->req_peer, + (opal_list_item_t*)request ); } } @@ -144,7 +144,7 @@ void mca_pml_uniq_recv_request_match_specific(mca_ptl_base_recv_request_t* reque /* assign sequence number */ request->req_recv.req_base.req_sequence = pml_comm->c_recv_seq++; - if (ompi_list_get_size(&pml_comm->c_unexpected_frags[req_peer]) > 0 && + if (opal_list_get_size(&pml_comm->c_unexpected_frags[req_peer]) > 0 && (frag = mca_pml_uniq_recv_request_match_specific_proc(request, req_peer)) != NULL) { mca_ptl_base_module_t* ptl = frag->frag_base.frag_owner; /* setup pointer to ptls peer */ @@ -162,7 +162,7 @@ void mca_pml_uniq_recv_request_match_specific(mca_ptl_base_recv_request_t* reque * it when the message comes in. */ if(request->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE) { - ompi_list_append(pml_comm->c_specific_receives+req_peer, (ompi_list_item_t*)request); + opal_list_append(pml_comm->c_specific_receives+req_peer, (opal_list_item_t*)request); } OMPI_THREAD_UNLOCK(&pml_comm->c_matching_lock); } @@ -195,7 +195,7 @@ void mca_pml_uniq_recv_request_match_wild(mca_ptl_base_recv_request_t* request) mca_ptl_base_recv_frag_t* frag; /* continue if no frags to match */ - if (ompi_list_get_size(&pml_comm->c_unexpected_frags[proc]) == 0) + if (opal_list_get_size(&pml_comm->c_unexpected_frags[proc]) == 0) continue; /* loop over messages from the current proc */ @@ -218,7 +218,7 @@ void mca_pml_uniq_recv_request_match_wild(mca_ptl_base_recv_request_t* request) */ if(request->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE) - ompi_list_append(&pml_comm->c_wild_receives, (ompi_list_item_t*)request); + opal_list_append(&pml_comm->c_wild_receives, (opal_list_item_t*)request); OMPI_THREAD_UNLOCK(&pml_comm->c_matching_lock); } @@ -232,15 +232,15 @@ static mca_ptl_base_recv_frag_t* mca_pml_uniq_recv_request_match_specific_proc( mca_ptl_base_recv_request_t* request, int proc) { mca_pml_ptl_comm_t *pml_comm = request->req_recv.req_base.req_comm->c_pml_comm; - ompi_list_t* unexpected_frags = pml_comm->c_unexpected_frags+proc; + opal_list_t* unexpected_frags = pml_comm->c_unexpected_frags+proc; mca_ptl_base_recv_frag_t* frag; mca_ptl_base_match_header_t* header; int tag = request->req_recv.req_base.req_tag; if( OMPI_ANY_TAG == tag ) { - for (frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_first(unexpected_frags); - frag != (mca_ptl_base_recv_frag_t*)ompi_list_get_end(unexpected_frags); - frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_next(frag)) { + for (frag = (mca_ptl_base_recv_frag_t*)opal_list_get_first(unexpected_frags); + frag != (mca_ptl_base_recv_frag_t*)opal_list_get_end(unexpected_frags); + frag = (mca_ptl_base_recv_frag_t*)opal_list_get_next(frag)) { header = &(frag->frag_base.frag_header.hdr_match); /* check first frag - we assume that process matching has been done already */ @@ -249,9 +249,9 @@ static mca_ptl_base_recv_frag_t* mca_pml_uniq_recv_request_match_specific_proc( } } } else { - for (frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_first(unexpected_frags); - frag != (mca_ptl_base_recv_frag_t*)ompi_list_get_end(unexpected_frags); - frag = (mca_ptl_base_recv_frag_t*)ompi_list_get_next(frag)) { + for (frag = (mca_ptl_base_recv_frag_t*)opal_list_get_first(unexpected_frags); + frag != (mca_ptl_base_recv_frag_t*)opal_list_get_end(unexpected_frags); + frag = (mca_ptl_base_recv_frag_t*)opal_list_get_next(frag)) { header = &(frag->frag_base.frag_header.hdr_match); /* check first frag - we assume that process matching has been done already */ @@ -269,7 +269,7 @@ static mca_ptl_base_recv_frag_t* mca_pml_uniq_recv_request_match_specific_proc( if( !((MCA_PML_REQUEST_IPROBE == request->req_recv.req_base.req_type) || (MCA_PML_REQUEST_PROBE == request->req_recv.req_base.req_type)) ) { - ompi_list_remove_item(unexpected_frags, (ompi_list_item_t*)frag); + opal_list_remove_item(unexpected_frags, (opal_list_item_t*)frag); frag->frag_request = request; } else { /* it's a probe, therefore report it's completion */ diff --git a/ompi/mca/pml/uniq/pml_uniq_recvreq.h b/ompi/mca/pml/uniq/pml_uniq_recvreq.h index a6d7835851..addc68fd54 100644 --- a/ompi/mca/pml/uniq/pml_uniq_recvreq.h +++ b/ompi/mca/pml/uniq/pml_uniq_recvreq.h @@ -40,7 +40,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_recv_request_t); */ #define MCA_PML_UNIQ_RECV_REQUEST_ALLOC(recvreq, rc) \ do { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_GET(&mca_pml_uniq.uniq_recv_requests, item, rc); \ recvreq = (mca_ptl_base_recv_request_t*)item; \ } while(0) @@ -78,7 +78,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_recv_request_t); #define MCA_PML_UNIQ_RECV_REQUEST_RETURN(request) \ do { \ MCA_PML_BASE_RECV_REQUEST_FINI( &((request)->req_recv) ); \ - OMPI_FREE_LIST_RETURN(&mca_pml_uniq.uniq_recv_requests, (ompi_list_item_t*)(request)); \ + OMPI_FREE_LIST_RETURN(&mca_pml_uniq.uniq_recv_requests, (opal_list_item_t*)(request)); \ } while(0) /** diff --git a/ompi/mca/pml/uniq/pml_uniq_sendreq.c b/ompi/mca/pml/uniq/pml_uniq_sendreq.c index 85889b493e..8b56e6da3d 100644 --- a/ompi/mca/pml/uniq/pml_uniq_sendreq.c +++ b/ompi/mca/pml/uniq/pml_uniq_sendreq.c @@ -113,7 +113,7 @@ int mca_pml_uniq_send_request_schedule(mca_ptl_base_send_request_t* req) bytes_remaining = req->req_send.req_bytes_packed - req->req_offset; } else { /* unable to complete send - queue for later */ OMPI_THREAD_LOCK(&mca_pml_uniq.uniq_lock); - ompi_list_append(&mca_pml_uniq.uniq_send_pending, (ompi_list_item_t*)req); + opal_list_append(&mca_pml_uniq.uniq_send_pending, (opal_list_item_t*)req); OMPI_THREAD_UNLOCK(&mca_pml_uniq.uniq_lock); req->req_lock = 0; return OMPI_ERR_OUT_OF_RESOURCE; @@ -180,9 +180,9 @@ void mca_pml_uniq_send_request_progress( } /* check for pending requests that need to be progressed */ - while(ompi_list_get_size(&mca_pml_uniq.uniq_send_pending) != 0) { + while(opal_list_get_size(&mca_pml_uniq.uniq_send_pending) != 0) { OMPI_THREAD_LOCK(&mca_pml_uniq.uniq_lock); - req = (mca_ptl_base_send_request_t*)ompi_list_remove_first(&mca_pml_uniq.uniq_send_pending); + req = (mca_ptl_base_send_request_t*)opal_list_remove_first(&mca_pml_uniq.uniq_send_pending); OMPI_THREAD_UNLOCK(&mca_pml_uniq.uniq_lock); if(req == NULL) break; diff --git a/ompi/mca/pml/uniq/pml_uniq_sendreq.h b/ompi/mca/pml/uniq/pml_uniq_sendreq.h index f4d37a4848..6ecb16ce4d 100644 --- a/ompi/mca/pml/uniq/pml_uniq_sendreq.h +++ b/ompi/mca/pml/uniq/pml_uniq_sendreq.h @@ -54,7 +54,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_send_request_t); if(NULL != ptl_base) { \ OMPI_THREAD_LOCK(&ptl_base->ptl_cache_lock); \ sendreq = (mca_ptl_base_send_request_t*) \ - ompi_list_remove_first(&ptl_base->ptl_cache); \ + opal_list_remove_first(&ptl_base->ptl_cache); \ if(NULL != sendreq) { \ OMPI_THREAD_UNLOCK(&ptl_base->ptl_cache_lock); \ rc = OMPI_SUCCESS; \ @@ -63,7 +63,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_send_request_t); * allocate an additional request to the cache \ */ \ mca_ptl_base_module_t* ptl = ptl_base->ptl; \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_WAIT(&mca_pml_uniq.uniq_send_requests, item, rc); \ sendreq = (mca_ptl_base_send_request_t*)item; \ sendreq->req_ptl = ptl; \ @@ -76,7 +76,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_send_request_t); /* \ * take a request from the global pool \ */ \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_THREAD_UNLOCK(&ptl_base->ptl_cache_lock); \ OMPI_FREE_LIST_WAIT(&mca_pml_uniq.uniq_send_requests, item, rc); \ sendreq = (mca_ptl_base_send_request_t*)item; \ @@ -85,7 +85,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_send_request_t); \ /* otherwise - take the allocation from the global list */ \ } else { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_WAIT(&mca_pml_uniq.uniq_send_requests, item, rc); \ sendreq = (mca_ptl_base_send_request_t*)item; \ sendreq->req_ptl = proc->proc_ptl_first.ptl; \ @@ -130,12 +130,12 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_send_request_t); */ \ if(NULL != ptl->ptl_base && (sendreq)->req_cached) { \ OMPI_THREAD_LOCK(&ptl_base->ptl_cache_lock); \ - ompi_list_prepend(&ptl_base->ptl_cache, \ - (ompi_list_item_t*)sendreq); \ + opal_list_prepend(&ptl_base->ptl_cache, \ + (opal_list_item_t*)sendreq); \ OMPI_THREAD_UNLOCK(&ptl_base->ptl_cache_lock); \ } else { \ OMPI_FREE_LIST_RETURN( \ - &mca_pml_uniq.uniq_send_requests, (ompi_list_item_t*)(sendreq)); \ + &mca_pml_uniq.uniq_send_requests, (opal_list_item_t*)(sendreq)); \ } \ } diff --git a/ompi/mca/ptl/base/base.h b/ompi/mca/ptl/base/base.h index b87f6da8e9..64fc52fd85 100644 --- a/ompi/mca/ptl/base/base.h +++ b/ompi/mca/ptl/base/base.h @@ -21,7 +21,7 @@ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/ptl/ptl.h" @@ -30,7 +30,7 @@ extern "C" { #endif struct mca_ptl_base_selected_module_t { - ompi_list_item_t super; + opal_list_item_t super; mca_ptl_base_component_t *pbsm_component; mca_ptl_base_module_t *pbsm_module; @@ -54,8 +54,8 @@ OMPI_DECLSPEC int mca_ptl_base_close(void); OMPI_DECLSPEC extern int mca_ptl_base_output; OMPI_DECLSPEC extern char* mca_ptl_base_include; OMPI_DECLSPEC extern char* mca_ptl_base_exclude; -OMPI_DECLSPEC extern ompi_list_t mca_ptl_base_components_opened; -OMPI_DECLSPEC extern ompi_list_t mca_ptl_base_modules_initialized; +OMPI_DECLSPEC extern opal_list_t mca_ptl_base_components_opened; +OMPI_DECLSPEC extern opal_list_t mca_ptl_base_modules_initialized; #if defined(c_plusplus) || defined(__cplusplus) } diff --git a/ompi/mca/ptl/base/ptl_base_close.c b/ompi/mca/ptl/base/ptl_base_close.c index 9ea690944d..6de5f9c82b 100644 --- a/ompi/mca/ptl/base/ptl_base_close.c +++ b/ompi/mca/ptl/base/ptl_base_close.c @@ -29,7 +29,7 @@ int mca_ptl_base_close(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_ptl_base_selected_module_t *sm; /* disable event processing while cleaning up ptls */ @@ -37,9 +37,9 @@ int mca_ptl_base_close(void) /* Finalize all the ptl components and free their list items */ - for (item = ompi_list_remove_first(&mca_ptl_base_modules_initialized); + for (item = opal_list_remove_first(&mca_ptl_base_modules_initialized); NULL != item; - item = ompi_list_remove_first(&mca_ptl_base_modules_initialized)) { + item = opal_list_remove_first(&mca_ptl_base_modules_initialized)) { sm = (mca_ptl_base_selected_module_t *) item; /* Blatently ignore the return code (what would we do to recover, @@ -53,7 +53,7 @@ int mca_ptl_base_close(void) /* Close all remaining opened components (may be one if this is a OMPI RTE program, or [possibly] multiple if this is ompi_info) */ - if (0 != ompi_list_get_size(&mca_ptl_base_components_opened)) { + if (0 != opal_list_get_size(&mca_ptl_base_components_opened)) { mca_base_components_close(mca_ptl_base_output, &mca_ptl_base_components_opened, NULL); } diff --git a/ompi/mca/ptl/base/ptl_base_comm.c b/ompi/mca/ptl/base/ptl_base_comm.c index c36bf23c08..89bd6dfb4c 100644 --- a/ompi/mca/ptl/base/ptl_base_comm.c +++ b/ompi/mca/ptl/base/ptl_base_comm.c @@ -34,7 +34,7 @@ opal_class_t mca_pml_ptl_comm_t_class = { static void mca_pml_ptl_comm_construct(mca_pml_ptl_comm_t* comm) { - OBJ_CONSTRUCT(&comm->c_wild_receives, ompi_list_t); + OBJ_CONSTRUCT(&comm->c_wild_receives, opal_list_t); OBJ_CONSTRUCT(&comm->c_matching_lock, ompi_mutex_t); comm->c_recv_seq = 0; } @@ -69,30 +69,30 @@ int mca_pml_ptl_comm_init_size(mca_pml_ptl_comm_t* comm, size_t size) memset(comm->c_next_msg_seq, 0, sizeof(uint16_t) * size); /* unexpected fragments queues */ - comm->c_unexpected_frags = malloc(sizeof(ompi_list_t) * size); + comm->c_unexpected_frags = malloc(sizeof(opal_list_t) * size); if(NULL == comm->c_unexpected_frags) return OMPI_ERR_OUT_OF_RESOURCE; for(i=0; ic_unexpected_frags+i; - OBJ_CONSTRUCT(object, ompi_list_t); + opal_list_t* object = comm->c_unexpected_frags+i; + OBJ_CONSTRUCT(object, opal_list_t); } /* out-of-order fragments queues */ - comm->c_frags_cant_match = malloc(sizeof(ompi_list_t) * size); + comm->c_frags_cant_match = malloc(sizeof(opal_list_t) * size); if(NULL == comm->c_frags_cant_match) return OMPI_ERR_OUT_OF_RESOURCE; for(i=0; ic_frags_cant_match+i; - OBJ_CONSTRUCT(object, ompi_list_t); + opal_list_t* object = comm->c_frags_cant_match+i; + OBJ_CONSTRUCT(object, opal_list_t); } /* queues of unmatched specific (source process specified) receives */ - comm->c_specific_receives = malloc(sizeof(ompi_list_t) * size); + comm->c_specific_receives = malloc(sizeof(opal_list_t) * size); if(NULL == comm->c_specific_receives) return OMPI_ERR_OUT_OF_RESOURCE; for(i=0; ic_specific_receives+i; - OBJ_CONSTRUCT(object, ompi_list_t); + opal_list_t *object = comm->c_specific_receives+i; + OBJ_CONSTRUCT(object, opal_list_t); } return OMPI_SUCCESS; } diff --git a/ompi/mca/ptl/base/ptl_base_comm.h b/ompi/mca/ptl/base/ptl_base_comm.h index 60adc31cc5..cddc76bff5 100644 --- a/ompi/mca/ptl/base/ptl_base_comm.h +++ b/ompi/mca/ptl/base/ptl_base_comm.h @@ -22,7 +22,7 @@ #include "threads/mutex.h" #include "threads/condition.h" #include "mca/ptl/ptl.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #if defined(c_plusplus) || defined(__cplusplus) extern "C" { #endif @@ -38,10 +38,10 @@ struct mca_pml_comm_t { uint16_t *c_next_msg_seq; /**< send message sequence number - receiver side */ mca_ptl_sequence_t c_recv_seq; /**< recv request sequence number - receiver side */ ompi_mutex_t c_matching_lock; /**< matching lock */ - ompi_list_t *c_unexpected_frags; /**< unexpected fragment queues */ - ompi_list_t *c_frags_cant_match; /**< out-of-order fragment queues */ - ompi_list_t *c_specific_receives; /**< queues of unmatched specific (source process specified) receives */ - ompi_list_t c_wild_receives; /**< queue of unmatched wild (source process not specified) receives */ + opal_list_t *c_unexpected_frags; /**< unexpected fragment queues */ + opal_list_t *c_frags_cant_match; /**< out-of-order fragment queues */ + opal_list_t *c_specific_receives; /**< queues of unmatched specific (source process specified) receives */ + opal_list_t c_wild_receives; /**< queue of unmatched wild (source process not specified) receives */ }; typedef struct mca_pml_comm_t mca_pml_ptl_comm_t; diff --git a/ompi/mca/ptl/base/ptl_base_fragment.c b/ompi/mca/ptl/base/ptl_base_fragment.c index a3fb95b2bc..f9edc5b07e 100644 --- a/ompi/mca/ptl/base/ptl_base_fragment.c +++ b/ompi/mca/ptl/base/ptl_base_fragment.c @@ -16,7 +16,7 @@ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/ptl/base/ptl_base_fragment.h" static void mca_ptl_base_frag_construct(mca_ptl_base_frag_t* frag); @@ -25,7 +25,7 @@ static void mca_ptl_base_frag_destruct(mca_ptl_base_frag_t* frag); opal_class_t mca_ptl_base_frag_t_class = { "mca_ptl_base_frag_t", - OBJ_CLASS(ompi_list_item_t), + OBJ_CLASS(opal_list_item_t), (opal_construct_t) mca_ptl_base_frag_construct, (opal_destruct_t) mca_ptl_base_frag_destruct }; diff --git a/ompi/mca/ptl/base/ptl_base_fragment.h b/ompi/mca/ptl/base/ptl_base_fragment.h index 6793c0cc41..ad1e429a25 100644 --- a/ompi/mca/ptl/base/ptl_base_fragment.h +++ b/ompi/mca/ptl/base/ptl_base_fragment.h @@ -19,7 +19,7 @@ #ifndef MCA_PTL_BASE_FRAGMENT_H #define MCA_PTL_BASE_FRAGMENT_H -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/pml/pml.h" #include "mca/ptl/ptl.h" #include "datatype/datatype.h" @@ -43,7 +43,7 @@ typedef enum { * Base type for fragment descriptors. */ struct mca_ptl_base_frag_t { - ompi_list_item_t super; /**< allow the fragment to be placed on a list */ + opal_list_item_t super; /**< allow the fragment to be placed on a list */ mca_ptl_base_header_t frag_header; /**< header used for fragment matching */ struct mca_ptl_base_module_t* frag_owner; /**< PTL that allocated this fragment */ struct mca_ptl_base_peer_t* frag_peer; /**< PTL specific addressing info */ diff --git a/ompi/mca/ptl/base/ptl_base_match.c b/ompi/mca/ptl/base/ptl_base_match.c index a3852f830b..cfbb4e6134 100644 --- a/ompi/mca/ptl/base/ptl_base_match.c +++ b/ompi/mca/ptl/base/ptl_base_match.c @@ -19,7 +19,7 @@ #include "ompi_config.h" #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/mutex.h" #include "include/constants.h" #include "communicator/communicator.h" @@ -49,7 +49,7 @@ #define MCA_PTL_BASE_CHECK_WILD_RECEIVES_FOR_MATCH(frag_header,pml_comm,return_match) \ do { \ /* local parameters */ \ - ompi_list_t* wild_receives = &pml_comm->c_wild_receives; \ + opal_list_t* wild_receives = &pml_comm->c_wild_receives; \ mca_ptl_base_recv_request_t *wild_recv; \ int frag_tag,recv_tag; \ \ @@ -62,11 +62,11 @@ do { \ * change this list. \ */ \ for(wild_recv = (mca_ptl_base_recv_request_t *) \ - ompi_list_get_first(wild_receives); \ + opal_list_get_first(wild_receives); \ wild_recv != (mca_ptl_base_recv_request_t *) \ - ompi_list_get_end(wild_receives); \ + opal_list_get_end(wild_receives); \ wild_recv = (mca_ptl_base_recv_request_t *) \ - ((ompi_list_item_t *)wild_recv)->ompi_list_next) { \ + ((opal_list_item_t *)wild_recv)->opal_list_next) { \ \ recv_tag = wild_recv->req_recv.req_base.req_tag; \ if ( \ @@ -84,8 +84,8 @@ do { \ return_match = wild_recv; \ \ /* remove this irecv from the postd wild ireceive list */ \ - ompi_list_remove_item(wild_receives, \ - (ompi_list_item_t *)wild_recv); \ + opal_list_remove_item(wild_receives, \ + (opal_list_item_t *)wild_recv); \ \ /* found match - no need to continue */ \ break; \ @@ -111,7 +111,7 @@ do { \ #define MCA_PTL_BASE_CHECK_SPECIFIC_RECEIVES_FOR_MATCH(frag_header, pml_comm, return_match) \ do { \ /* local variables */ \ - ompi_list_t* specific_receives = (pml_comm->c_specific_receives)+frag_src; \ + opal_list_t* specific_receives = (pml_comm->c_specific_receives)+frag_src; \ mca_ptl_base_recv_request_t *specific_recv; \ int frag_src,recv_tag,frag_tag; \ \ @@ -123,11 +123,11 @@ do { \ * Loop over the specific irecvs. \ */ \ for(specific_recv = (mca_ptl_base_recv_request_t *) \ - ompi_list_get_first(specific_receives); \ + opal_list_get_first(specific_receives); \ specific_recv != (mca_ptl_base_recv_request_t *) \ - ompi_list_get_end(specific_receives); \ + opal_list_get_end(specific_receives); \ specific_recv = (mca_ptl_base_recv_request_t *) \ - ((ompi_list_item_t *)specific_recv)->ompi_list_next) { \ + ((opal_list_item_t *)specific_recv)->opal_list_next) { \ /* \ * Check for a match \ */ \ @@ -141,8 +141,8 @@ do { \ return_match = specific_recv; \ \ /* remove descriptor from posted specific ireceive list */ \ - ompi_list_remove_item(specific_receives, \ - (ompi_list_item_t *)specific_recv); \ + opal_list_remove_item(specific_receives, \ + (opal_list_item_t *)specific_recv); \ \ break; \ } \ @@ -183,9 +183,9 @@ do { \ * have been posted. \ */ \ specific_recv = (mca_ptl_base_recv_request_t *) \ - ompi_list_get_first((pml_comm->c_specific_receives)+frag_src); \ + opal_list_get_first((pml_comm->c_specific_receives)+frag_src); \ wild_recv = (mca_ptl_base_recv_request_t *) \ - ompi_list_get_first(&(pml_comm->c_wild_receives)); \ + opal_list_get_first(&(pml_comm->c_wild_receives)); \ \ specific_recv_seq = specific_recv->req_recv.req_base.req_sequence; \ wild_recv_seq = wild_recv->req_recv.req_base.req_sequence; \ @@ -207,8 +207,8 @@ do { \ return_match=wild_recv; \ \ /* remove this recv from the wild receive queue */ \ - ompi_list_remove_item(&(pml_comm->c_wild_receives), \ - (ompi_list_item_t *)wild_recv); \ + opal_list_remove_item(&(pml_comm->c_wild_receives), \ + (opal_list_item_t *)wild_recv); \ break; \ } \ \ @@ -216,14 +216,14 @@ do { \ * No match, go to the next. \ */ \ wild_recv=(mca_ptl_base_recv_request_t *) \ - ((ompi_list_item_t *)wild_recv)->ompi_list_next; \ + ((opal_list_item_t *)wild_recv)->opal_list_next; \ \ /* \ * If that was the last wild one, just look at the \ * rest of the specific ones. \ */ \ if (wild_recv == (mca_ptl_base_recv_request_t *) \ - ompi_list_get_end(&(pml_comm->c_wild_receives)) ) \ + opal_list_get_end(&(pml_comm->c_wild_receives)) ) \ { \ MCA_PTL_BASE_CHECK_SPECIFIC_RECEIVES_FOR_MATCH(frag_header, pml_comm, return_match); \ break; \ @@ -248,8 +248,8 @@ do { \ */ \ return_match = specific_recv; \ /* remove descriptor from specific receive list */ \ - ompi_list_remove_item((pml_comm->c_specific_receives)+frag_src, \ - (ompi_list_item_t *)specific_recv); \ + opal_list_remove_item((pml_comm->c_specific_receives)+frag_src, \ + (opal_list_item_t *)specific_recv); \ break; \ } \ \ @@ -257,14 +257,14 @@ do { \ * No match, go on to the next specific irecv. \ */ \ specific_recv = (mca_ptl_base_recv_request_t *) \ - ((ompi_list_item_t *)specific_recv)->ompi_list_next; \ + ((opal_list_item_t *)specific_recv)->opal_list_next; \ \ /* \ * If that was the last specific irecv, process the \ * rest of the wild ones. \ */ \ if (specific_recv == (mca_ptl_base_recv_request_t *) \ - ompi_list_get_end((pml_comm->c_specific_receives)+frag_src) ) \ + opal_list_get_end((pml_comm->c_specific_receives)+frag_src) ) \ { \ MCA_PTL_BASE_CHECK_WILD_RECEIVES_FOR_MATCH(frag_header, pml_comm, return_match); \ break; \ @@ -284,7 +284,7 @@ do { \ */ static bool mca_ptl_base_check_cantmatch_for_match( - ompi_list_t *additional_matches, + opal_list_t *additional_matches, mca_pml_ptl_comm_t *pml_comm, int frag_src); @@ -321,7 +321,7 @@ static bool mca_ptl_base_check_cantmatch_for_match( bool mca_ptl_base_match( mca_ptl_base_match_header_t *frag_header, mca_ptl_base_recv_frag_t *frag_desc, - ompi_list_t *additional_matches, + opal_list_t *additional_matches, bool* additional_match) { /* local variables */ @@ -370,13 +370,13 @@ bool mca_ptl_base_match( * look only at "specific" receives, or "wild" receives, * or if we need to traverse both sets at the same time. */ - if (ompi_list_get_size((pml_comm->c_specific_receives)+frag_src) == 0 ){ + if (opal_list_get_size((pml_comm->c_specific_receives)+frag_src) == 0 ){ /* * There are only wild irecvs, so specialize the algorithm. */ MCA_PTL_BASE_CHECK_WILD_RECEIVES_FOR_MATCH(frag_header, pml_comm, matched_receive); - } else if (ompi_list_get_size(&(pml_comm->c_wild_receives)) == 0 ) { + } else if (opal_list_get_size(&(pml_comm->c_wild_receives)) == 0 ) { /* * There are only specific irecvs, so specialize the algorithm. */ @@ -409,8 +409,8 @@ bool mca_ptl_base_match( } } else { /* if no match found, place on unexpected queue */ - ompi_list_append( ((pml_comm->c_unexpected_frags)+frag_src), - (ompi_list_item_t *)frag_desc ); + opal_list_append( ((pml_comm->c_unexpected_frags)+frag_src), + (opal_list_item_t *)frag_desc ); } /* @@ -418,7 +418,7 @@ bool mca_ptl_base_match( * any fragments on the c_c_frags_cant_match list * may now be used to form new matchs */ - if (0 < ompi_list_get_size((pml_comm->c_frags_cant_match)+frag_src)) { + if (0 < opal_list_get_size((pml_comm->c_frags_cant_match)+frag_src)) { *additional_match = mca_ptl_base_check_cantmatch_for_match(additional_matches,pml_comm,frag_src); @@ -430,8 +430,8 @@ bool mca_ptl_base_match( * This message comes after the next expected, so it * is ahead of sequence. Save it for later. */ - ompi_list_append( ((pml_comm->c_frags_cant_match)+frag_src), - (ompi_list_item_t *)frag_desc); + opal_list_append( ((pml_comm->c_frags_cant_match)+frag_src), + (opal_list_item_t *)frag_desc); } OMPI_THREAD_UNLOCK(&pml_comm->c_matching_lock); @@ -454,7 +454,7 @@ bool mca_ptl_base_match( * set by the upper level routine. */ -static bool mca_ptl_base_check_cantmatch_for_match(ompi_list_t *additional_matches, +static bool mca_ptl_base_check_cantmatch_for_match(opal_list_t *additional_matches, mca_pml_ptl_comm_t *pml_comm, int frag_src) { /* local parameters */ @@ -470,7 +470,7 @@ static bool mca_ptl_base_check_cantmatch_for_match(ompi_list_t *additional_match */ match_found = 1; - while ((0 < ompi_list_get_size((pml_comm->c_frags_cant_match)+frag_src)) && + while ((0 < opal_list_get_size((pml_comm->c_frags_cant_match)+frag_src)) && match_found) { /* initialize match flag for this search */ @@ -483,11 +483,11 @@ static bool mca_ptl_base_check_cantmatch_for_match(ompi_list_t *additional_match * number next_msg_seq_expected */ for(frag_desc = (mca_ptl_base_recv_frag_t *) - ompi_list_get_first((pml_comm->c_frags_cant_match)+frag_src); + opal_list_get_first((pml_comm->c_frags_cant_match)+frag_src); frag_desc != (mca_ptl_base_recv_frag_t *) - ompi_list_get_end((pml_comm->c_frags_cant_match)+frag_src); + opal_list_get_end((pml_comm->c_frags_cant_match)+frag_src); frag_desc = (mca_ptl_base_recv_frag_t *) - ompi_list_get_next(frag_desc)) + opal_list_get_next(frag_desc)) { /* * If the message has the next expected seq from that proc... @@ -506,8 +506,8 @@ static bool mca_ptl_base_check_cantmatch_for_match(ompi_list_t *additional_match /* * remove frag_desc from list */ - ompi_list_remove_item((pml_comm->c_frags_cant_match)+frag_src, - (ompi_list_item_t *)frag_desc); + opal_list_remove_item((pml_comm->c_frags_cant_match)+frag_src, + (opal_list_item_t *)frag_desc); /* * figure out what sort of matching logic to use, if need to @@ -515,12 +515,12 @@ static bool mca_ptl_base_check_cantmatch_for_match(ompi_list_t *additional_match * or if we need to traverse both sets at the same time. */ frag_src = frag_header->hdr_src; - if (ompi_list_get_size((pml_comm->c_specific_receives)+frag_src) == 0 ) { + if (opal_list_get_size((pml_comm->c_specific_receives)+frag_src) == 0 ) { /* * There are only wild irecvs, so specialize the algorithm. */ MCA_PTL_BASE_CHECK_WILD_RECEIVES_FOR_MATCH(frag_header, pml_comm, matched_receive); - } else if (ompi_list_get_size(&(pml_comm->c_wild_receives)) == 0 ) { + } else if (opal_list_get_size(&(pml_comm->c_wild_receives)) == 0 ) { /* * There are only specific irecvs, so specialize the algorithm. */ @@ -544,15 +544,15 @@ static bool mca_ptl_base_check_cantmatch_for_match(ompi_list_t *additional_match */ if(match_made == false) { match_made = true; - OBJ_CONSTRUCT(additional_matches, ompi_list_t); + OBJ_CONSTRUCT(additional_matches, opal_list_t); } - ompi_list_append(additional_matches, (ompi_list_item_t *)frag_desc); + opal_list_append(additional_matches, (opal_list_item_t *)frag_desc); } else { /* if no match found, place on unexpected queue */ - ompi_list_append( ((pml_comm->c_unexpected_frags)+frag_src), - (ompi_list_item_t *)frag_desc); + opal_list_append( ((pml_comm->c_unexpected_frags)+frag_src), + (opal_list_item_t *)frag_desc); } @@ -631,13 +631,13 @@ bool mca_ptl_base_match_in_order_network_delivery( * look only at "specific" receives, or "wild" receives, * or if we need to traverse both sets at the same time. */ - if (ompi_list_get_size((pml_comm->c_specific_receives)+frag_src) == 0 ){ + if (opal_list_get_size((pml_comm->c_specific_receives)+frag_src) == 0 ){ /* * There are only wild irecvs, so specialize the algorithm. */ MCA_PTL_BASE_CHECK_WILD_RECEIVES_FOR_MATCH(frag_header, pml_comm, matched_receive); - } else if (ompi_list_get_size(&(pml_comm->c_wild_receives)) == 0 ) { + } else if (opal_list_get_size(&(pml_comm->c_wild_receives)) == 0 ) { /* * There are only specific irecvs, so specialize the algorithm. */ @@ -662,8 +662,8 @@ bool mca_ptl_base_match_in_order_network_delivery( } else { /* if no match found, place on unexpected queue */ - ompi_list_append( ((pml_comm->c_unexpected_frags)+frag_src), - (ompi_list_item_t *)frag_desc); + opal_list_append( ((pml_comm->c_unexpected_frags)+frag_src), + (opal_list_item_t *)frag_desc); } diff --git a/ompi/mca/ptl/base/ptl_base_match.h b/ompi/mca/ptl/base/ptl_base_match.h index 20721c7b44..8232a91eef 100644 --- a/ompi/mca/ptl/base/ptl_base_match.h +++ b/ompi/mca/ptl/base/ptl_base_match.h @@ -38,7 +38,7 @@ struct mca_ptl_base_recv_frag_t; OMPI_DECLSPEC bool mca_ptl_base_match( mca_ptl_base_match_header_t *frag_header, struct mca_ptl_base_recv_frag_t *frag_desc, - ompi_list_t *additional_matches, + opal_list_t *additional_matches, bool* additional_matched); /** diff --git a/ompi/mca/ptl/base/ptl_base_open.c b/ompi/mca/ptl/base/ptl_base_open.c index 5276046c9d..b6d6619122 100644 --- a/ompi/mca/ptl/base/ptl_base_open.c +++ b/ompi/mca/ptl/base/ptl_base_open.c @@ -41,8 +41,8 @@ int mca_ptl_base_output = -1; char* mca_ptl_base_include = NULL; char* mca_ptl_base_exclude = NULL; -ompi_list_t mca_ptl_base_components_opened; -ompi_list_t mca_ptl_base_modules_initialized; +opal_list_t mca_ptl_base_components_opened; +opal_list_t mca_ptl_base_modules_initialized; /** @@ -63,7 +63,7 @@ int mca_ptl_base_open(void) iterate over it (even if it's empty, as in the case of ompi_info) */ - OBJ_CONSTRUCT(&mca_ptl_base_modules_initialized, ompi_list_t); + OBJ_CONSTRUCT(&mca_ptl_base_modules_initialized, opal_list_t); /* register parameters */ mca_base_param_lookup_string( diff --git a/ompi/mca/ptl/base/ptl_base_select.c b/ompi/mca/ptl/base/ptl_base_select.c index b36df93d48..350e7353ac 100644 --- a/ompi/mca/ptl/base/ptl_base_select.c +++ b/ompi/mca/ptl/base/ptl_base_select.c @@ -30,13 +30,13 @@ * Call the init function on all available components to find out if * they want to run. Select all components that don't fail. Failing * components will be closed and unloaded. The selected modules will - * be returned to the caller in a ompi_list_t. + * be returned to the caller in a opal_list_t. */ int mca_ptl_base_select(bool enable_progress_threads, bool enable_mpi_threads) { int i, num_ptls; - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; mca_ptl_base_component_t *component; mca_ptl_base_module_t **modules; @@ -48,9 +48,9 @@ int mca_ptl_base_select(bool enable_progress_threads, /* Traverse the list of opened modules; call their init functions. */ - item = ompi_list_get_first(&mca_ptl_base_components_opened); - while(item != ompi_list_get_end(&mca_ptl_base_components_opened)) { - ompi_list_item_t *next = ompi_list_get_next(item); + item = opal_list_get_first(&mca_ptl_base_components_opened); + while(item != opal_list_get_end(&mca_ptl_base_components_opened)) { + opal_list_item_t *next = opal_list_get_next(item); cli = (mca_base_component_list_item_t *) item; component = (mca_ptl_base_component_t *) cli->cli_component; @@ -110,7 +110,7 @@ int mca_ptl_base_select(bool enable_progress_threads, component->ptlm_version.mca_component_name); mca_base_component_repository_release((mca_base_component_t *) component); - ompi_list_remove_item(&mca_ptl_base_components_opened, item); + opal_list_remove_item(&mca_ptl_base_components_opened, item); } /* Otherwise, it initialized properly. Save it. */ @@ -124,11 +124,11 @@ int mca_ptl_base_select(bool enable_progress_threads, if (NULL == sm) { return OMPI_ERR_OUT_OF_RESOURCE; } - OBJ_CONSTRUCT(sm, ompi_list_item_t); + OBJ_CONSTRUCT(sm, opal_list_item_t); sm->pbsm_component = component; sm->pbsm_module = modules[i]; - ompi_list_append(&mca_ptl_base_modules_initialized, - (ompi_list_item_t*) sm); + opal_list_append(&mca_ptl_base_modules_initialized, + (opal_list_item_t*) sm); } free(modules); } @@ -138,7 +138,7 @@ int mca_ptl_base_select(bool enable_progress_threads, /* Finished querying all components. Check for the bozo case. */ - if (0 == ompi_list_get_size(&mca_ptl_base_modules_initialized)) { + if (0 == opal_list_get_size(&mca_ptl_base_modules_initialized)) { /* JMS Replace with show_help */ orte_abort(1, "No ptl components available. This shouldn't happen."); } diff --git a/ompi/mca/ptl/elan/src/ptl_elan.c b/ompi/mca/ptl/elan/src/ptl_elan.c index 801012395b..23f5cecaab 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan.c +++ b/ompi/mca/ptl/elan/src/ptl_elan.c @@ -215,7 +215,7 @@ mca_ptl_elan_req_fini (struct mca_ptl_base_module_t *ptl, /* return the fragment and update the status */ queue = ((struct mca_ptl_elan_module_t * )ptl)->queue; desc = ((mca_ptl_elan_send_request_t *) request)->req_frag; - OMPI_FREE_LIST_RETURN (&queue->tx_desc_free, (ompi_list_item_t *) desc); + OMPI_FREE_LIST_RETURN (&queue->tx_desc_free, (opal_list_item_t *) desc); desc->desc->desc_status = MCA_PTL_ELAN_DESC_LOCAL; return; } @@ -226,7 +226,7 @@ mca_ptl_elan_recv_frag_return (struct mca_ptl_base_module_t *ptl, struct mca_ptl_elan_recv_frag_t *frag) { OMPI_FREE_LIST_RETURN(&mca_ptl_elan_component.elan_recv_frags_free, - (ompi_list_item_t*)frag); + (opal_list_item_t*)frag); return; } @@ -425,8 +425,8 @@ mca_ptl_elan_matched (mca_ptl_base_module_t * ptl, __FILE__, __LINE__); OMPI_THREAD_LOCK(&mca_ptl_elan_component.elan_lock); recv_frag->frag_ack_pending = true; - ompi_list_append(&((mca_ptl_elan_module_t * )ptl)->pending_acks, - (ompi_list_item_t*)frag); + opal_list_append(&((mca_ptl_elan_module_t * )ptl)->pending_acks, + (opal_list_item_t*)frag); OMPI_THREAD_UNLOCK(&mca_ptl_elan_component.elan_lock); } else { /* XXX: recv_frag is released a few lines below, diff --git a/ompi/mca/ptl/elan/src/ptl_elan.h b/ompi/mca/ptl/elan/src/ptl_elan.h index 0043ac56ac..d8388d136e 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan.h +++ b/ompi/mca/ptl/elan/src/ptl_elan.h @@ -57,9 +57,9 @@ struct mca_ptl_elan_module_t { unsigned int elan_vp; /**< elan vpid, not ompi vpid */ unsigned int elan_nvp; /**< total # of elan vpid */ - ompi_list_t send_frags; /**< outstanding send/put/get */ - ompi_list_t recv_frags; /**< outstanding recv's */ - ompi_list_t pending_acks; + opal_list_t send_frags; /**< outstanding send/put/get */ + opal_list_t recv_frags; /**< outstanding recv's */ + opal_list_t pending_acks; struct ompi_ptl_elan_comp_queue_t *comp; /**< completion queue */ struct ompi_ptl_elan_queue_ctrl_t *queue; /**< Queue ctrl struct*/ @@ -89,7 +89,7 @@ struct mca_ptl_elan_component_t { struct ompi_ptl_elan_thread_t **send_threads; /**< recv-related threads*/ ompi_mutex_t elan_lock; /**< lock for module state */ - ompi_list_t elan_procs; /**< elan proc's */ + opal_list_t elan_procs; /**< elan proc's */ ompi_free_list_t elan_recv_frags_free; }; typedef struct mca_ptl_elan_component_t mca_ptl_elan_component_t; diff --git a/ompi/mca/ptl/elan/src/ptl_elan_comm_init.c b/ompi/mca/ptl/elan/src/ptl_elan_comm_init.c index 77322f3390..e3f01025c7 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_comm_init.c +++ b/ompi/mca/ptl/elan/src/ptl_elan_comm_init.c @@ -104,7 +104,7 @@ ompi_init_elan_queue_events (mca_ptl_elan_module_t * ptl, OMPI_PTL_ELAN_CHECK_UNEX (elan_ptr, NULL, OMPI_ERROR, 0); for (i = 0; i < flist->fl_num_per_alloc; i++) { - ompi_list_item_t *item; + opal_list_item_t *item; desc->ptl = ptl; desc->elan_event = (E4_Event *) elan_ptr; @@ -160,8 +160,8 @@ ompi_init_elan_queue_events (mca_ptl_elan_module_t * ptl, PRIMEEVENT_WORD (ctx, desc->elan_event, 1); #endif - item = (ompi_list_item_t *) frag; - ompi_list_append (&flist->super, item); + item = (opal_list_item_t *) frag; + opal_list_append (&flist->super, item); /* Progress to the next element */ desc = (ompi_ptl_elan_qdma_desc_t *) ((char *) desc + main_size); @@ -277,7 +277,7 @@ mca_ptl_elan_putget_desc_construct ( do { \ int i; \ for (i = 0; i < flist->fl_num_per_alloc; i++) { \ - ompi_list_item_t *item; \ + opal_list_item_t *item; \ \ frag->desc = (ompi_ptl_elan_base_desc_t *)dp; \ \ @@ -285,8 +285,8 @@ do { \ mca_ptl_elan_putget_desc_construct (ptl, dp, \ eptr, 0, 0, local); \ \ - item = (ompi_list_item_t *) frag; \ - ompi_list_append (&flist->super, item); \ + item = (opal_list_item_t *) frag; \ + opal_list_append (&flist->super, item); \ \ /* Progress to the next element */ \ dp= (ompi_ptl_elan_putget_desc_t *) ((char *)dp + msize); \ diff --git a/ompi/mca/ptl/elan/src/ptl_elan_component.c b/ompi/mca/ptl/elan/src/ptl_elan_component.c index 588f2fb8af..545be833e7 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_component.c +++ b/ompi/mca/ptl/elan/src/ptl_elan_component.c @@ -136,7 +136,7 @@ mca_ptl_elan_component_open (void) elan_mp->free_list_inc = 32; /* initialize objects*/ - OBJ_CONSTRUCT (&elan_mp->elan_procs, ompi_list_t); + OBJ_CONSTRUCT (&elan_mp->elan_procs, opal_list_t); OBJ_CONSTRUCT (&elan_mp->elan_recv_frags_free, ompi_free_list_t); OBJ_CONSTRUCT (&elan_mp->elan_lock, ompi_mutex_t); @@ -176,12 +176,12 @@ mca_ptl_elan_component_close (void) * We need free all the memory allocated for this list * before desctructing this free_list */ if (elan_mp->elan_recv_frags_free.fl_num_allocated != - elan_mp->elan_recv_frags_free.super.ompi_list_length) { + elan_mp->elan_recv_frags_free.super.opal_list_length) { ompi_output (0, "[%s:%d] recv_frags : %d allocated %d returned\n", __FILE__, __LINE__, elan_mp->elan_recv_frags_free.fl_num_allocated, - elan_mp->elan_recv_frags_free.super.ompi_list_length); + elan_mp->elan_recv_frags_free.super.opal_list_length); } OBJ_DESTRUCT (&(elan_mp->elan_recv_frags_free)); diff --git a/ompi/mca/ptl/elan/src/ptl_elan_frag.c b/ompi/mca/ptl/elan/src/ptl_elan_frag.c index 02f5768cc8..86a0506c89 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_frag.c +++ b/ompi/mca/ptl/elan/src/ptl_elan_frag.c @@ -102,7 +102,7 @@ mca_ptl_elan_alloc_desc (struct mca_ptl_base_module_t *ptl_ptr, { ompi_free_list_t *flist; - ompi_list_item_t *item = NULL; + opal_list_item_t *item = NULL; mca_ptl_elan_send_frag_t *desc; /* TODO: Dynamically bind a base request to PUT/GET/QDMA/STEN */ @@ -120,18 +120,18 @@ mca_ptl_elan_alloc_desc (struct mca_ptl_base_module_t *ptl_ptr, } LOG_PRINT(PTL_ELAN_DEBUG_SEND, "flist %p length %d type %d\n", - flist, flist->super.ompi_list_length, desc_type); + flist, flist->super.opal_list_length, desc_type); if (ompi_using_threads ()) { ompi_mutex_lock(&flist->fl_lock); - item = ompi_list_remove_first (&((flist)->super)); + item = opal_list_remove_first (&((flist)->super)); while (NULL == item) { mca_ptl_tstamp_t tstamp = 0; ptl_ptr->ptl_component->ptlm_progress (tstamp); - item = ompi_list_remove_first (&((flist)->super)); + item = opal_list_remove_first (&((flist)->super)); } ompi_mutex_unlock(&flist->fl_lock); } else { - item = ompi_list_remove_first (&((flist)->super)); + item = opal_list_remove_first (&((flist)->super)); /* XXX: * Ouch..., this still does not trigger the progress on * PTL's from other modules. Wait for PML to change. @@ -139,7 +139,7 @@ mca_ptl_elan_alloc_desc (struct mca_ptl_base_module_t *ptl_ptr, while (NULL == item) { mca_ptl_tstamp_t tstamp = 0; ptl_ptr->ptl_component->ptlm_progress (tstamp); - item = ompi_list_remove_first (&((flist)->super)); + item = opal_list_remove_first (&((flist)->super)); } } desc = (mca_ptl_elan_send_frag_t *) item; @@ -182,7 +182,7 @@ mca_ptl_elan_send_desc_done ( ((ompi_ptl_elan_putget_desc_t *) frag->desc) ->chain_event->ev_Params[1], 8); OMPI_FREE_LIST_RETURN (&ptl->putget->get_desc_free, - (ompi_list_item_t *) frag); + (opal_list_item_t *) frag); return; } #endif @@ -195,7 +195,7 @@ mca_ptl_elan_send_desc_done ( if(NULL == req) { /* An ack descriptor */ OMPI_FREE_LIST_RETURN (&ptl->queue->tx_desc_free, - (ompi_list_item_t *) frag); + (opal_list_item_t *) frag); } else if (0 == (header->hdr_common.hdr_flags & MCA_PTL_FLAGS_ACK) || mca_pml_base_send_request_matched(req)) { if(ompi_atomic_fetch_and_set_int (&frag->frag_progressed, 1) == 0) @@ -219,12 +219,12 @@ mca_ptl_elan_send_desc_done ( } else { flist = &ptl->queue->tx_desc_free; } - OMPI_FREE_LIST_RETURN (flist, (ompi_list_item_t *) frag); + OMPI_FREE_LIST_RETURN (flist, (opal_list_item_t *) frag); } else { LOG_PRINT(PTL_ELAN_DEBUG_ACK, "PML will return frag to list %p, length %d\n", &ptl->queue->tx_desc_free, - ptl->queue->tx_desc_free.super.ompi_list_length); + ptl->queue->tx_desc_free.super.opal_list_length); } } } diff --git a/ompi/mca/ptl/elan/src/ptl_elan_init.c b/ompi/mca/ptl/elan/src/ptl_elan_init.c index eeaa7c6bd6..e9b66b4180 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_init.c +++ b/ompi/mca/ptl/elan/src/ptl_elan_init.c @@ -79,9 +79,9 @@ ompi_mca_ptl_elan_setup (mca_ptl_elan_state_t * ems) ptl->elan_vp = ems->elan_vp; ptl->elan_nvp = ems->elan_nvp; - OBJ_CONSTRUCT (&ptl->recv_frags, ompi_list_t); - OBJ_CONSTRUCT (&ptl->send_frags, ompi_list_t); - OBJ_CONSTRUCT (&ptl->pending_acks, ompi_list_t); + OBJ_CONSTRUCT (&ptl->recv_frags, opal_list_t); + OBJ_CONSTRUCT (&ptl->send_frags, opal_list_t); + OBJ_CONSTRUCT (&ptl->pending_acks, opal_list_t); emp->num_modules++; } while (emp->num_modules < rail_count); diff --git a/ompi/mca/ptl/elan/src/ptl_elan_peer.c b/ompi/mca/ptl/elan/src/ptl_elan_peer.c index 8eddc30ea1..d1f43553d3 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_peer.c +++ b/ompi/mca/ptl/elan/src/ptl_elan_peer.c @@ -46,7 +46,7 @@ mca_ptl_elan_peer_destruct (mca_ptl_elan_peer_t * ptl_peer) opal_class_t mca_ptl_elan_peer_t_class = { "mca_elan_ptl_peer_t", - OBJ_CLASS (ompi_list_item_t), + OBJ_CLASS (opal_list_item_t), (opal_construct_t) mca_ptl_elan_peer_construct, (opal_destruct_t) mca_ptl_elan_peer_destruct }; diff --git a/ompi/mca/ptl/elan/src/ptl_elan_peer.h b/ompi/mca/ptl/elan/src/ptl_elan_peer.h index 23a76a81a2..66eac62224 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_peer.h +++ b/ompi/mca/ptl/elan/src/ptl_elan_peer.h @@ -22,7 +22,7 @@ #include #include #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "event/event.h" #include "mca/pml/pml.h" #include "mca/ptl/ptl.h" @@ -35,7 +35,7 @@ extern "C" { * An abstraction that represents a connection to a peer process. */ struct mca_ptl_elan_peer_t { - ompi_list_item_t super; + opal_list_item_t super; struct mca_ptl_elan_module_t *peer_ptl; struct mca_ptl_elan_proc_t *peer_proc; diff --git a/ompi/mca/ptl/elan/src/ptl_elan_priv.c b/ompi/mca/ptl/elan/src/ptl_elan_priv.c index ecc22ee858..47ea09f696 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_priv.c +++ b/ompi/mca/ptl/elan/src/ptl_elan_priv.c @@ -35,7 +35,7 @@ mca_ptl_elan_data_frag (struct mca_ptl_elan_module_t *ptl, { /* Allocate a recv frag descriptor */ mca_ptl_elan_recv_frag_t *recv_frag; - ompi_list_item_t *item; + opal_list_item_t *item; bool matched; int rc = OMPI_SUCCESS; @@ -168,16 +168,16 @@ mca_ptl_elan_last_frag_ack (struct mca_ptl_elan_module_t *ptl, if ( (desc->desc->desc_status != MCA_PTL_ELAN_DESC_CACHED)){ if (desc->desc->desc_type == MCA_PTL_ELAN_DESC_PUT) { OMPI_FREE_LIST_RETURN (&ptl->putget->put_desc_free, - (ompi_list_item_t *) desc); + (opal_list_item_t *) desc); } else { OMPI_FREE_LIST_RETURN (&ptl->queue->tx_desc_free, - (ompi_list_item_t *) desc); + (opal_list_item_t *) desc); } } else { LOG_PRINT(PTL_ELAN_DEBUG_ACK, "PML will return frag to list %p, length %d\n", (void*)&ptl->queue->tx_desc_free, - ptl->queue->tx_desc_free.super.ompi_list_length); + ptl->queue->tx_desc_free.super.opal_list_length); } } @@ -808,7 +808,7 @@ mca_ptl_elan_start_get (mca_ptl_elan_send_frag_t * frag, E4_COOKIE_TYPE_STEN , destvp)); elan4_flush_cmdq_reorder (elan_ptl->putget->get_cmdq); MEMBAR_DRAIN(); - ompi_list_append (&elan_ptl->send_frags, (ompi_list_item_t *) frag); + opal_list_append (&elan_ptl->send_frags, (opal_list_item_t *) frag); /* XXX: fragment state, remember the recv_frag may be gone */ frag->desc->req = (mca_pml_base_request_t *) request ; /*recv req*/ @@ -843,7 +843,7 @@ mca_ptl_elan_start_desc (mca_ptl_elan_send_frag_t * frag, sendreq, offset, size, flags); elan4_run_dma_cmd (ptl->queue->tx_cmdq, (DMA *) & qdma->main_dma); elan4_flush_cmdq_reorder (ptl->queue->tx_cmdq); - ompi_list_append (&ptl->send_frags, (ompi_list_item_t *) frag); + opal_list_append (&ptl->send_frags, (opal_list_item_t *) frag); } else if (MCA_PTL_ELAN_DESC_PUT == frag->desc->desc_type) { @@ -856,7 +856,7 @@ mca_ptl_elan_start_desc (mca_ptl_elan_send_frag_t * frag, elan4_flush_cmdq_reorder (ptl->putget->put_cmdq); /* Insert frag into the list of outstanding DMA's */ - ompi_list_append (&ptl->send_frags, (ompi_list_item_t *) frag); + opal_list_append (&ptl->send_frags, (opal_list_item_t *) frag); } else { ompi_output (0, "To support GET and Other types of DMA " "are not supported right now \n"); @@ -928,7 +928,7 @@ mca_ptl_elan_get_with_ack ( mca_ptl_base_module_t * ptl, E4_COOKIE_TYPE_STEN , destvp)); elan4_flush_cmdq_reorder (elan_ptl->putget->get_cmdq); MEMBAR_DRAIN(); - ompi_list_append (&elan_ptl->send_frags, (ompi_list_item_t *) frag); + opal_list_append (&elan_ptl->send_frags, (opal_list_item_t *) frag); /* XXX: fragment state, remember recv_frag may be gone */ frag->desc->req = (mca_pml_base_request_t *) request ; /*recv req*/ @@ -1050,7 +1050,7 @@ mca_ptl_elan_start_ack ( mca_ptl_base_module_t * ptl, elan4_flush_cmdq_reorder (elan_ptl->queue->tx_cmdq); /* Insert desc into the list of outstanding DMA's */ - ompi_list_append (&elan_ptl->send_frags, (ompi_list_item_t *) desc); + opal_list_append (&elan_ptl->send_frags, (opal_list_item_t *) desc); /* fragment state */ desc->desc->req = NULL; @@ -1245,18 +1245,18 @@ ptl_elan_send_comp: #else ctx = ptl->ptl_elan_ctx; - while (ompi_list_get_size (&ptl->send_frags) > 0) { + while (opal_list_get_size (&ptl->send_frags) > 0) { mca_ptl_elan_send_frag_t *frag; frag = (mca_ptl_elan_send_frag_t *) - ompi_list_get_first (&ptl->send_frags); + opal_list_get_first (&ptl->send_frags); rc = * ((int *) (&frag->desc->main_doneWord)); if (rc) { ompi_ptl_elan_base_desc_t *basic; /* Remove the desc, update the request, return to free list */ frag = (mca_ptl_elan_send_frag_t *) - ompi_list_remove_first (&ptl->send_frags); + opal_list_remove_first (&ptl->send_frags); basic = (ompi_ptl_elan_base_desc_t*)frag->desc; LOG_PRINT(PTL_ELAN_DEBUG_SEND, "frag %p desc %p \n", frag, basic); diff --git a/ompi/mca/ptl/elan/src/ptl_elan_priv.h b/ompi/mca/ptl/elan/src/ptl_elan_priv.h index 3e84c3749d..5b61d1df5d 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_priv.h +++ b/ompi/mca/ptl/elan/src/ptl_elan_priv.h @@ -344,8 +344,8 @@ struct ompi_ptl_elan_putget_ctrl_t { E4_CmdQParams *pg_cmdPar; uint32_t *pg_pendingGetCount; - ompi_list_t put_desc; - ompi_list_t get_desc; + opal_list_t put_desc; + opal_list_t get_desc; ompi_free_list_t put_desc_free; ompi_free_list_t get_desc_free; diff --git a/ompi/mca/ptl/elan/src/ptl_elan_proc.c b/ompi/mca/ptl/elan/src/ptl_elan_proc.c index afaaac91f0..dea94518b4 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_proc.c +++ b/ompi/mca/ptl/elan/src/ptl_elan_proc.c @@ -33,7 +33,7 @@ static mca_ptl_elan_proc_t *mca_ptl_elan_proc_lookup_ompi (ompi_proc_t * opal_class_t mca_ptl_elan_proc_t_class = { "mca_ptl_elan_proc_t", - OBJ_CLASS (ompi_list_item_t), + OBJ_CLASS (opal_list_item_t), (opal_construct_t) mca_ptl_elan_proc_construct, (opal_destruct_t) mca_ptl_elan_proc_destruct }; @@ -59,7 +59,7 @@ mca_ptl_elan_proc_construct (mca_ptl_elan_proc_t * proc) /* add to list of all proc instance */ OMPI_THREAD_LOCK (&mca_ptl_elan_component.elan_lock); - ompi_list_append (&mca_ptl_elan_component.elan_procs, &proc->super); + opal_list_append (&mca_ptl_elan_component.elan_procs, &proc->super); OMPI_THREAD_UNLOCK (&mca_ptl_elan_component.elan_lock); return; @@ -75,7 +75,7 @@ mca_ptl_elan_proc_destruct (mca_ptl_elan_proc_t * proc) { /* remove from list of all proc instances */ OMPI_THREAD_LOCK (&mca_ptl_elan_component.elan_lock); - ompi_list_remove_item (&mca_ptl_elan_component.elan_procs, &proc->super); + opal_list_remove_item (&mca_ptl_elan_component.elan_procs, &proc->super); OMPI_THREAD_UNLOCK (&mca_ptl_elan_component.elan_lock); /* release resources */ @@ -161,12 +161,12 @@ mca_ptl_elan_proc_lookup_ompi (ompi_proc_t * ompi_proc) OMPI_THREAD_LOCK (&mca_ptl_elan_component.elan_lock); elan_proc = (mca_ptl_elan_proc_t *) - ompi_list_get_first (&mca_ptl_elan_component.elan_procs); + opal_list_get_first (&mca_ptl_elan_component.elan_procs); for (; elan_proc != (mca_ptl_elan_proc_t *) - ompi_list_get_end (&mca_ptl_elan_component.elan_procs); + opal_list_get_end (&mca_ptl_elan_component.elan_procs); elan_proc = - (mca_ptl_elan_proc_t *) ompi_list_get_next (elan_proc)) { + (mca_ptl_elan_proc_t *) opal_list_get_next (elan_proc)) { if (elan_proc->proc_ompi == ompi_proc) { OMPI_THREAD_UNLOCK (&mca_ptl_elan_component.elan_lock); return elan_proc; diff --git a/ompi/mca/ptl/elan/src/ptl_elan_proc.h b/ompi/mca/ptl/elan/src/ptl_elan_proc.h index 0bd3722bd1..50583371a7 100644 --- a/ompi/mca/ptl/elan/src/ptl_elan_proc.h +++ b/ompi/mca/ptl/elan/src/ptl_elan_proc.h @@ -37,7 +37,7 @@ extern opal_class_t mca_ptl_elan_proc_t_class; * PTL instance that attempts to open a connection to the process. */ struct mca_ptl_elan_proc_t { - ompi_list_item_t super; /**< allow proc to be placed on a list */ + opal_list_item_t super; /**< allow proc to be placed on a list */ ompi_proc_t *proc_ompi; /**< pointer to corresponding ompi_proc_t */ ompi_process_name_t proc_guid; /**< globally unique identifier diff --git a/ompi/mca/ptl/gm/ptl_gm.c b/ompi/mca/ptl/gm/ptl_gm.c index 13eaa34086..039f59dc6f 100644 --- a/ompi/mca/ptl/gm/ptl_gm.c +++ b/ompi/mca/ptl/gm/ptl_gm.c @@ -63,7 +63,7 @@ mca_ptl_gm_module_t mca_ptl_gm_module = { OBJ_CLASS_INSTANCE (mca_ptl_gm_send_request_t, mca_ptl_base_send_request_t, NULL, NULL); -OBJ_CLASS_INSTANCE (mca_ptl_gm_peer_t, ompi_list_item_t, NULL, NULL); +OBJ_CLASS_INSTANCE (mca_ptl_gm_peer_t, opal_list_item_t, NULL, NULL); int mca_ptl_gm_add_procs (struct mca_ptl_base_module_t *ptl, @@ -269,7 +269,7 @@ mca_ptl_gm_request_fini (struct mca_ptl_base_module_t *ptl, mca_ptl_gm_send_frag_t *frag; frag = ((mca_ptl_gm_send_request_t *)request)->req_frag; OMPI_FREE_LIST_RETURN(&(((mca_ptl_gm_module_t *)ptl)->gm_send_frags), - (ompi_list_item_t *)frag); + (opal_list_item_t *)frag); frag->status = 0; #endif @@ -320,7 +320,7 @@ static void mca_ptl_gm_basic_ack_callback( struct gm_port* port, void* context, gm_ptl = (mca_ptl_gm_module_t*)header->hdr_ack.hdr_dst_addr.pval; - OMPI_GM_FREE_LIST_RETURN( &(gm_ptl->gm_send_dma_frags), ((ompi_list_item_t*)header) ); + OMPI_GM_FREE_LIST_RETURN( &(gm_ptl->gm_send_dma_frags), ((opal_list_item_t*)header) ); /* release the send token */ ompi_atomic_add( &(gm_ptl->num_send_tokens), 1 ); } @@ -346,13 +346,13 @@ mca_ptl_gm_matched( mca_ptl_base_module_t* ptl, peer = (mca_ptl_gm_peer_t*)recv_frag->frag_recv.frag_base.frag_peer; if( frag->frag_base.frag_header.hdr_common.hdr_flags & MCA_PTL_FLAGS_ACK ) { /* need to send an ack back */ - ompi_list_item_t *item; + opal_list_item_t *item; OMPI_FREE_LIST_WAIT( &(gm_ptl->gm_send_dma_frags), item, rc ); if( NULL == item ) { ompi_output(0,"[%s:%d] unable to alloc a gm fragment\n", __FILE__,__LINE__); OMPI_THREAD_LOCK (&mca_ptl_gm_component.gm_lock); - ompi_list_append (&mca_ptl_gm_module.gm_pending_acks, (ompi_list_item_t *)frag); + opal_list_append (&mca_ptl_gm_module.gm_pending_acks, (opal_list_item_t *)frag); OMPI_THREAD_UNLOCK (&mca_ptl_gm_component.gm_lock); } else { ompi_atomic_sub( &(gm_ptl->num_send_tokens), 1 ); @@ -407,6 +407,6 @@ mca_ptl_gm_matched( mca_ptl_base_module_t* ptl, } /* I'm done with this fragment. Return it to the free list */ - OMPI_FREE_LIST_RETURN( &(gm_ptl->gm_recv_frags_free), (ompi_list_item_t*)frag ); + OMPI_FREE_LIST_RETURN( &(gm_ptl->gm_recv_frags_free), (opal_list_item_t*)frag ); } diff --git a/ompi/mca/ptl/gm/ptl_gm.h b/ompi/mca/ptl/gm/ptl_gm.h index 42033448c2..a342975065 100644 --- a/ompi/mca/ptl/gm/ptl_gm.h +++ b/ompi/mca/ptl/gm/ptl_gm.h @@ -65,8 +65,8 @@ extern "C" { char* gm_port_name; /**< the name used to get the port */ struct mca_ptl_gm_proc_t* gm_local; - ompi_list_t gm_procs; - ompi_list_t gm_send_req; + opal_list_t gm_procs; + opal_list_t gm_send_req; ompi_free_list_t gm_unexpected_frags_data; ompi_mutex_t gm_lock; /**< lock for accessing module state */ @@ -94,9 +94,9 @@ extern "C" { ompi_free_list_t gm_send_frags; ompi_free_list_t gm_send_dma_frags; ompi_free_list_t gm_recv_frags_free; - ompi_list_t gm_send_frags_queue; - ompi_list_t gm_pending_acks; - ompi_list_t gm_recv_outstanding_queue; + opal_list_t gm_send_frags_queue; + opal_list_t gm_pending_acks; + opal_list_t gm_recv_outstanding_queue; ompi_thread_t thread; #if MCA_PTL_GM_STATISTICS @@ -230,12 +230,12 @@ extern "C" { void mca_ptl_gm_dump_header( char* str, union mca_ptl_base_header_t* hdr ); #if OMPI_ENABLE_DEBUG -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" /* If debug is enabled we have to work around the item validity checks. */ #define OMPI_GM_FREE_LIST_RETURN( LIST, ITEM ) \ do { \ - (ITEM)->ompi_list_item_refcount = 0; \ - (ITEM)->ompi_list_item_belong_to = NULL; \ + (ITEM)->opal_list_item_refcount = 0; \ + (ITEM)->opal_list_item_belong_to = NULL; \ (ITEM)->super.cls_init_file_name = __FILE__; \ (ITEM)->super.cls_init_lineno = __LINE__; \ OMPI_FREE_LIST_RETURN( (LIST), (ITEM) ); \ diff --git a/ompi/mca/ptl/gm/ptl_gm_component.c b/ompi/mca/ptl/gm/ptl_gm_component.c index 3ab9170d94..981f9bee49 100644 --- a/ompi/mca/ptl/gm/ptl_gm_component.c +++ b/ompi/mca/ptl/gm/ptl_gm_component.c @@ -96,8 +96,8 @@ mca_ptl_gm_component_open(void) /* initialize objects */ OBJ_CONSTRUCT (&mca_ptl_gm_component.gm_lock, ompi_mutex_t); - OBJ_CONSTRUCT (&mca_ptl_gm_component.gm_procs, ompi_list_t); - OBJ_CONSTRUCT (&mca_ptl_gm_component.gm_send_req, ompi_list_t); + OBJ_CONSTRUCT (&mca_ptl_gm_component.gm_procs, opal_list_t); + OBJ_CONSTRUCT (&mca_ptl_gm_component.gm_send_req, opal_list_t); /* register GM component parameters */ mca_ptl_gm_component.gm_port_name = @@ -344,7 +344,7 @@ mca_ptl_gm_init_sendrecv (mca_ptl_gm_module_t * ptl) /* construct a list of send fragments */ OBJ_CONSTRUCT (&(ptl->gm_send_frags), ompi_free_list_t); OBJ_CONSTRUCT (&(ptl->gm_send_dma_frags), ompi_free_list_t); - OBJ_CONSTRUCT (&(ptl->gm_send_frags_queue), ompi_list_t); + OBJ_CONSTRUCT (&(ptl->gm_send_frags_queue), opal_list_t); /* We need a free list just to handle the send fragment that we provide. * Just to make sure that we dont waste memory, we dont allow this list to @@ -363,7 +363,7 @@ mca_ptl_gm_init_sendrecv (mca_ptl_gm_module_t * ptl) */ ompi_free_list_init( &(ptl->gm_send_dma_frags), mca_ptl_gm_component.gm_segment_size, - OBJ_CLASS (ompi_list_item_t), + OBJ_CLASS (opal_list_item_t), 0, /* do not allocate any items I'll provide them */ 0, /* maximum number of list allocated elements will be zero */ 0, @@ -381,9 +381,9 @@ mca_ptl_gm_init_sendrecv (mca_ptl_gm_module_t * ptl) } for (i = 0; i < ptl->num_send_tokens; i++) { sfragment->send_buf = NULL; - OMPI_GM_FREE_LIST_RETURN( &(ptl->gm_send_frags), (ompi_list_item_t*)sfragment ); + OMPI_GM_FREE_LIST_RETURN( &(ptl->gm_send_frags), (opal_list_item_t*)sfragment ); OMPI_GM_FREE_LIST_RETURN( &(ptl->gm_send_dma_frags), - (ompi_list_item_t*)((char*)ptl->gm_send_dma_memory + + (opal_list_item_t*)((char*)ptl->gm_send_dma_memory + i * mca_ptl_gm_component.gm_segment_size) ); sfragment++; } @@ -394,7 +394,7 @@ mca_ptl_gm_init_sendrecv (mca_ptl_gm_module_t * ptl) ompi_output (0, "unable to allow remote memory access\n"); } - OBJ_CONSTRUCT (&(ptl->gm_recv_outstanding_queue), ompi_list_t); + OBJ_CONSTRUCT (&(ptl->gm_recv_outstanding_queue), opal_list_t); /* construct the list of recv fragments free */ OBJ_CONSTRUCT (&(ptl->gm_recv_frags_free), ompi_free_list_t); @@ -420,21 +420,21 @@ mca_ptl_gm_init_sendrecv (mca_ptl_gm_module_t * ptl) } for( i = 0; i < 2; i++ ) { - OMPI_GM_FREE_LIST_RETURN( &(ptl->gm_recv_frags_free), (ompi_list_item_t *)free_rfragment ); + OMPI_GM_FREE_LIST_RETURN( &(ptl->gm_recv_frags_free), (opal_list_item_t *)free_rfragment ); free_rfragment++; gm_provide_receive_buffer( ptl->gm_port, (char*)ptl->gm_recv_dma_memory + i * mca_ptl_gm_component.gm_segment_size, GM_SIZE, GM_HIGH_PRIORITY ); } for( i = 2; i < ptl->num_recv_tokens; i++ ) { - OMPI_GM_FREE_LIST_RETURN( &(ptl->gm_recv_frags_free), (ompi_list_item_t *)free_rfragment ); + OMPI_GM_FREE_LIST_RETURN( &(ptl->gm_recv_frags_free), (opal_list_item_t *)free_rfragment ); free_rfragment++; gm_provide_receive_buffer( ptl->gm_port, (char*)ptl->gm_recv_dma_memory + i * mca_ptl_gm_component.gm_segment_size, GM_SIZE, GM_LOW_PRIORITY ); } - OBJ_CONSTRUCT( &(ptl->gm_pending_acks), ompi_list_t ); + OBJ_CONSTRUCT( &(ptl->gm_pending_acks), opal_list_t ); return OMPI_SUCCESS; } @@ -500,7 +500,7 @@ mca_ptl_gm_init( mca_ptl_gm_component_t * gm ) OBJ_CONSTRUCT( &(mca_ptl_gm_component.gm_unexpected_frags_data), ompi_free_list_t ); ompi_free_list_init( &(mca_ptl_gm_component.gm_unexpected_frags_data), mca_ptl_gm_component.gm_segment_size, - OBJ_CLASS (ompi_list_item_t), + OBJ_CLASS (opal_list_item_t), 16, /* keep is small in the begining */ 128, /* maximum number of list elements */ 16, /* Number of elements to grow by per allocation */ @@ -560,7 +560,7 @@ mca_ptl_gm_component_control (int param, void *value, size_t size) char* gm_get_local_buffer( void ) { - ompi_list_item_t* item; + opal_list_item_t* item; int rc; OMPI_FREE_LIST_WAIT( &(mca_ptl_gm_component.gm_unexpected_frags_data), item, rc ); @@ -569,7 +569,7 @@ char* gm_get_local_buffer( void ) void gm_release_local_buffer( char* ptr ) { - OMPI_GM_FREE_LIST_RETURN( &(mca_ptl_gm_component.gm_unexpected_frags_data), (ompi_list_item_t*)ptr ); + OMPI_GM_FREE_LIST_RETURN( &(mca_ptl_gm_component.gm_unexpected_frags_data), (opal_list_item_t*)ptr ); } /* diff --git a/ompi/mca/ptl/gm/ptl_gm_peer.h b/ompi/mca/ptl/gm/ptl_gm_peer.h index b77e6f4a37..1ada011b43 100644 --- a/ompi/mca/ptl/gm/ptl_gm_peer.h +++ b/ompi/mca/ptl/gm/ptl_gm_peer.h @@ -23,7 +23,7 @@ #ifndef MCA_PTL_GM_PEER_H #define MCA_PTL_GM_PEER_H -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "include/types.h" #if defined(c_plusplus) || defined(__cplusplus) @@ -49,7 +49,7 @@ typedef struct mca_ptl_gm_addr_t mca_ptl_gm_addr_t; * An abstraction that represents a connection to a peer process. */ struct mca_ptl_gm_peer_t { - ompi_list_item_t super; + opal_list_item_t super; struct mca_ptl_gm_module_t* peer_ptl; struct mca_ptl_gm_proc_t* peer_proc; struct mca_ptl_gm_addr_t peer_addr; /**< address of peer */ diff --git a/ompi/mca/ptl/gm/ptl_gm_priv.c b/ompi/mca/ptl/gm/ptl_gm_priv.c index 435c93811d..e4eb2febee 100644 --- a/ompi/mca/ptl/gm/ptl_gm_priv.c +++ b/ompi/mca/ptl/gm/ptl_gm_priv.c @@ -45,7 +45,7 @@ static void mca_ptl_gm_basic_frag_callback( struct gm_port* port, void* context, switch( status ) { case GM_SUCCESS: - OMPI_GM_FREE_LIST_RETURN( &(gm_ptl->gm_send_dma_frags), ((ompi_list_item_t*)header) ); + OMPI_GM_FREE_LIST_RETURN( &(gm_ptl->gm_send_dma_frags), ((opal_list_item_t*)header) ); /* release the send token */ ompi_atomic_add( &(gm_ptl->num_send_tokens), 1 ); break; @@ -171,7 +171,7 @@ int mca_ptl_gm_receiver_advance_pipeline( mca_ptl_gm_recv_frag_t* frag, int only peer->peer_ptl->super.ptl_recv_progress( (mca_ptl_base_module_t*)peer->peer_ptl, frag->frag_recv.frag_request, frag->frag_recv.frag_base.frag_size, frag->frag_recv.frag_base.frag_size ); - OMPI_FREE_LIST_RETURN( &(peer->peer_ptl->gm_recv_frags_free), (ompi_list_item_t*)frag ); + OMPI_FREE_LIST_RETURN( &(peer->peer_ptl->gm_recv_frags_free), (opal_list_item_t*)frag ); DO_DEBUG( count += sprintf( buffer + count, " finish" ); ) } DO_DEBUG( ompi_output( 0, "receiver %d %s", orte_process_info.my_name->vpid, buffer ); ) @@ -192,7 +192,7 @@ int mca_ptl_gm_sender_advance_pipeline( mca_ptl_gm_send_frag_t* frag ) /* send current segment */ send_line = &(frag->pipeline.lines[frag->pipeline.pos_transfert]); if( (send_line->flags & PTL_GM_PIPELINE_TRANSFERT) == PTL_GM_PIPELINE_TRANSFERT ) { - ompi_list_item_t* item; + opal_list_item_t* item; int32_t rc; OMPI_FREE_LIST_WAIT( &(peer->peer_ptl->gm_send_dma_frags), item, rc ); @@ -332,7 +332,7 @@ int mca_ptl_gm_send_burst_data( mca_ptl_gm_peer_t *ptl_peer, while( 0 < burst_length ) { /* send everything for the burst_length size */ if( NULL == hdr ) { - ompi_list_item_t* item; + opal_list_item_t* item; OMPI_FREE_LIST_WAIT( &(ptl_peer->peer_ptl->gm_send_dma_frags), item, rc ); ompi_atomic_sub( &(ptl_peer->peer_ptl->num_send_tokens), 1 ); hdr = (mca_ptl_base_frag_header_t*)item; @@ -384,7 +384,7 @@ int mca_ptl_gm_peer_send_continue( mca_ptl_gm_peer_t *ptl_peer, { mca_ptl_gm_frag_header_t* hdr; uint64_t remaining_bytes, burst_length; - ompi_list_item_t *item; + opal_list_item_t *item; int rc = 0; #if OMPI_MCA_PTL_GM_HAVE_RDMA_GET gm_status_t status; @@ -400,7 +400,7 @@ int mca_ptl_gm_peer_send_continue( mca_ptl_gm_peer_t *ptl_peer, fragment->frag_send.frag_base.frag_size ); DO_DEBUG( ompi_output( 0, "sender %d start new send length %ld offset %ld\n", orte_process_info.my_name->vpid, *size, offset ); ) /* The first DMA memory buffer has been alocated in same time as the fragment */ - item = (ompi_list_item_t*)fragment->send_buf; + item = (opal_list_item_t*)fragment->send_buf; hdr = (mca_ptl_gm_frag_header_t*)item; remaining_bytes = fragment->frag_send.frag_base.frag_size - fragment->frag_bytes_processed; if( remaining_bytes < mca_ptl_gm_component.gm_eager_limit ) { @@ -433,7 +433,7 @@ int mca_ptl_gm_peer_send_continue( mca_ptl_gm_peer_t *ptl_peer, ptl_peer->peer_ptl->super.ptl_send_progress( (mca_ptl_base_module_t*)ptl_peer->peer_ptl, fragment->frag_send.frag_request, (*size) ); - OMPI_FREE_LIST_RETURN( &(ptl_peer->peer_ptl->gm_send_frags), ((ompi_list_item_t*)fragment) ); + OMPI_FREE_LIST_RETURN( &(ptl_peer->peer_ptl->gm_send_frags), ((opal_list_item_t*)fragment) ); } return OMPI_SUCCESS; } @@ -494,7 +494,7 @@ static void send_match_callback( struct gm_port* port, void* context, gm_status_ gm_ptl = (mca_ptl_gm_module_t*)((long)header->hdr_rndv.hdr_frag_length); - OMPI_GM_FREE_LIST_RETURN( &(gm_ptl->gm_send_dma_frags), ((ompi_list_item_t*)header) ); + OMPI_GM_FREE_LIST_RETURN( &(gm_ptl->gm_send_dma_frags), ((opal_list_item_t*)header) ); /* release the send token */ ompi_atomic_add( &(gm_ptl->num_send_tokens), 1 ); } @@ -519,7 +519,7 @@ int mca_ptl_gm_peer_send( struct mca_ptl_base_module_t* ptl, int rc, freeAfter; size_t max_data = 0; mca_ptl_gm_peer_t* ptl_peer = (mca_ptl_gm_peer_t*)ptl_base_peer; - ompi_list_item_t *item; + opal_list_item_t *item; char* sendbuf; OMPI_FREE_LIST_WAIT( &(ptl_gm->gm_send_dma_frags), item, rc ); @@ -655,7 +655,7 @@ static void recv_short_callback( struct gm_port* port, void* context, gm_status_ frag_base = (mca_ptl_base_frag_t*)header->hdr_dst_match.pval; gm_ptl = (mca_ptl_gm_module_t *)frag_base->frag_owner; - OMPI_GM_FREE_LIST_RETURN( &(gm_ptl->gm_send_dma_frags), ((ompi_list_item_t*)header) ); + OMPI_GM_FREE_LIST_RETURN( &(gm_ptl->gm_send_dma_frags), ((opal_list_item_t*)header) ); /* release the send token */ ompi_atomic_add( &(gm_ptl->num_send_tokens), 1 ); } @@ -663,7 +663,7 @@ static void recv_short_callback( struct gm_port* port, void* context, gm_status_ static int mca_ptl_gm_send_quick_fin_message( struct mca_ptl_gm_peer_t* ptl_peer, struct mca_ptl_base_frag_t* frag ) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_ptl_base_header_t *hdr; int rc; @@ -776,7 +776,7 @@ mca_ptl_gm_recv_frag_frag( struct mca_ptl_gm_module_t* ptl, ptl->super.ptl_recv_progress( (mca_ptl_base_module_t*)ptl, request, frag->frag_recv.frag_base.frag_size, frag->frag_recv.frag_base.frag_size ); - OMPI_FREE_LIST_RETURN( &(((mca_ptl_gm_peer_t*)frag->frag_recv.frag_base.frag_peer)->peer_ptl->gm_recv_frags_free), (ompi_list_item_t*)frag ); + OMPI_FREE_LIST_RETURN( &(((mca_ptl_gm_peer_t*)frag->frag_recv.frag_base.frag_peer)->peer_ptl->gm_recv_frags_free), (opal_list_item_t*)frag ); } DO_DEBUG( ompi_output( 0, "receiver %d waiting for burst with fragment ...", orte_process_info.my_name->vpid ); ); return NULL; @@ -855,7 +855,7 @@ mca_ptl_gm_recv_frag_fin( struct mca_ptl_gm_module_t* ptl, ptl->super.ptl_send_progress( (mca_ptl_base_module_t*)ptl, frag->frag_send.frag_request, frag->frag_bytes_validated ); - OMPI_FREE_LIST_RETURN( &(ptl->gm_send_frags), (ompi_list_item_t*)frag ); + OMPI_FREE_LIST_RETURN( &(ptl->gm_send_frags), (opal_list_item_t*)frag ); } return NULL; @@ -867,23 +867,23 @@ void mca_ptl_gm_outstanding_recv( struct mca_ptl_gm_module_t *ptl ) int size; bool matched; - size = ompi_list_get_size (&ptl->gm_recv_outstanding_queue); + size = opal_list_get_size (&ptl->gm_recv_outstanding_queue); if (size > 0) { frag = (mca_ptl_gm_recv_frag_t *) - ompi_list_remove_first( (ompi_list_t *)&(ptl->gm_recv_outstanding_queue) ); + opal_list_remove_first( (opal_list_t *)&(ptl->gm_recv_outstanding_queue) ); matched = ptl->super.ptl_match( &(ptl->super), &(frag->frag_recv), &(frag->frag_recv.frag_base.frag_header.hdr_match) ); if(!matched) { - ompi_list_append((ompi_list_t *)&(ptl->gm_recv_outstanding_queue), - (ompi_list_item_t *) frag); + opal_list_append((opal_list_t *)&(ptl->gm_recv_outstanding_queue), + (opal_list_item_t *) frag); } else { /* if allocated buffer, free the buffer */ /* return the recv descriptor to the free list */ - OMPI_FREE_LIST_RETURN(&(ptl->gm_recv_frags_free), (ompi_list_item_t *)frag); + OMPI_FREE_LIST_RETURN(&(ptl->gm_recv_frags_free), (opal_list_item_t *)frag); } } } diff --git a/ompi/mca/ptl/gm/ptl_gm_proc.c b/ompi/mca/ptl/gm/ptl_gm_proc.c index daf10d10b1..ff1aacf2b9 100644 --- a/ompi/mca/ptl/gm/ptl_gm_proc.c +++ b/ompi/mca/ptl/gm/ptl_gm_proc.c @@ -37,7 +37,7 @@ static mca_ptl_gm_proc_t *mca_ptl_gm_proc_lookup_ompi (ompi_proc_t * opal_class_t mca_ptl_gm_proc_t_class = { "mca_ptl_gm_proc_t", - OBJ_CLASS (ompi_list_item_t), + OBJ_CLASS (opal_list_item_t), (opal_construct_t) mca_ptl_gm_proc_construct, (opal_destruct_t) mca_ptl_gm_proc_destruct }; @@ -60,7 +60,7 @@ mca_ptl_gm_proc_construct (mca_ptl_gm_proc_t * proc) /* add to list of all proc instance */ OMPI_THREAD_LOCK (&mca_ptl_gm_component.gm_lock); - ompi_list_append (&mca_ptl_gm_component.gm_procs, &proc->super); + opal_list_append (&mca_ptl_gm_component.gm_procs, &proc->super); OMPI_THREAD_UNLOCK (&mca_ptl_gm_component.gm_lock); return; @@ -76,7 +76,7 @@ mca_ptl_gm_proc_destruct (mca_ptl_gm_proc_t * proc) { /* remove from list of all proc instances */ OMPI_THREAD_LOCK (&mca_ptl_gm_component.gm_lock); - ompi_list_remove_item (&mca_ptl_gm_component.gm_procs, &proc->super); + opal_list_remove_item (&mca_ptl_gm_component.gm_procs, &proc->super); OMPI_THREAD_UNLOCK (&mca_ptl_gm_component.gm_lock); /* release resources */ @@ -164,11 +164,11 @@ mca_ptl_gm_proc_lookup_ompi (ompi_proc_t * ompi_proc) OMPI_THREAD_LOCK (&mca_ptl_gm_component.gm_lock); gm_proc = (mca_ptl_gm_proc_t *) - ompi_list_get_first (&mca_ptl_gm_component.gm_procs); + opal_list_get_first (&mca_ptl_gm_component.gm_procs); for (; gm_proc != (mca_ptl_gm_proc_t *) - ompi_list_get_end (&mca_ptl_gm_component.gm_procs); - gm_proc = (mca_ptl_gm_proc_t *) ompi_list_get_next (gm_proc)) { + opal_list_get_end (&mca_ptl_gm_component.gm_procs); + gm_proc = (mca_ptl_gm_proc_t *) opal_list_get_next (gm_proc)) { if (gm_proc->proc_ompi == ompi_proc) { OMPI_THREAD_UNLOCK (&mca_ptl_gm_component.gm_lock); return gm_proc; diff --git a/ompi/mca/ptl/gm/ptl_gm_proc.h b/ompi/mca/ptl/gm/ptl_gm_proc.h index eb49cfbf9c..1fd6bb4c62 100644 --- a/ompi/mca/ptl/gm/ptl_gm_proc.h +++ b/ompi/mca/ptl/gm/ptl_gm_proc.h @@ -32,7 +32,7 @@ extern "C" { extern opal_class_t mca_ptl_gm_proc_t_class; struct mca_ptl_gm_proc_t { - ompi_list_item_t super; /**< allow proc to be placed on a list */ + opal_list_item_t super; /**< allow proc to be placed on a list */ struct ompi_proc_t *proc_ompi; /**< pointer to corresponding orte_process_name_t */ struct mca_ptl_gm_addr_t *proc_addrs; /**< array of addresses published by peer */ ompi_mutex_t proc_lock; /**< lock to protect against concurrent access to proc state */ diff --git a/ompi/mca/ptl/gm/ptl_gm_sendfrag.c b/ompi/mca/ptl/gm/ptl_gm_sendfrag.c index a4f442d660..184f0ae09c 100644 --- a/ompi/mca/ptl/gm/ptl_gm_sendfrag.c +++ b/ompi/mca/ptl/gm/ptl_gm_sendfrag.c @@ -48,7 +48,7 @@ mca_ptl_gm_send_frag_t* mca_ptl_gm_alloc_send_frag( struct mca_ptl_gm_module_t* ptl, struct mca_ptl_base_send_request_t* sendreq ) { - ompi_list_item_t* item; + opal_list_item_t* item; mca_ptl_gm_send_frag_t* frag; int32_t rc; diff --git a/ompi/mca/ptl/gm/ptl_gm_sendfrag.h b/ompi/mca/ptl/gm/ptl_gm_sendfrag.h index aa5e52b62f..6719becd18 100644 --- a/ompi/mca/ptl/gm/ptl_gm_sendfrag.h +++ b/ompi/mca/ptl/gm/ptl_gm_sendfrag.h @@ -136,11 +136,11 @@ typedef mca_ptl_gm_recv_frag_t* (frag_management_fct_t)( struct mca_ptl_gm_modul if(ompi_using_threads()) { \ if( ompi_mutex_trylock( &((fl)->fl_lock)) ) { \ /* We get the lock. Now let's remove one of the elements */ \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ ompi_mutex_unlock(&((fl)->fl_lock)); \ } \ } else { \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ } \ } @@ -203,7 +203,7 @@ typedef mca_ptl_gm_recv_frag_t* (frag_management_fct_t)( struct mca_ptl_gm_modul mca_ptl_gm_alloc_recv_frag( struct mca_ptl_base_module_t *ptl ) { int rc; - ompi_list_item_t* item; + opal_list_item_t* item; mca_ptl_gm_recv_frag_t* frag; OMPI_FREE_LIST_GET( &(((mca_ptl_gm_module_t *)ptl)->gm_recv_frags_free), item, rc ); diff --git a/ompi/mca/ptl/mx/ptl_mx.c b/ompi/mca/ptl/mx/ptl_mx.c index c6b2b5106f..71b7fdcaaf 100644 --- a/ompi/mca/ptl/mx/ptl_mx.c +++ b/ompi/mca/ptl/mx/ptl_mx.c @@ -158,7 +158,7 @@ int mca_ptl_mx_send( if (sendreq->req_cached) { sendfrag = (mca_ptl_mx_send_frag_t*)(sendreq+1); } else { - ompi_list_item_t* item; + opal_list_item_t* item; OMPI_FREE_LIST_GET(&mca_ptl_mx_component.mx_send_frags, item, rc); if(NULL == (sendfrag = (mca_ptl_mx_send_frag_t*)item)) return rc; @@ -460,7 +460,7 @@ void mca_ptl_mx_matched( if(NULL == ack) { OMPI_THREAD_LOCK(&mca_ptl_mx_component.mx_lock); ack_pending = true; - ompi_list_append(&mca_ptl_mx_component.mx_pending_acks, (ompi_list_item_t*)frag); + opal_list_append(&mca_ptl_mx_component.mx_pending_acks, (opal_list_item_t*)frag); OMPI_THREAD_UNLOCK(&mca_ptl_mx_component.mx_lock); } else { mx_return_t mx_return; @@ -482,7 +482,7 @@ void mca_ptl_mx_matched( ompi_output(0, "mca_ptl_mx_matched: mx_isend() failed with return value=%d\n", mx_return); OMPI_THREAD_LOCK(&mca_ptl_mx_component.mx_lock); ack_pending = true; - ompi_list_append(&mca_ptl_mx_component.mx_pending_acks, (ompi_list_item_t*)frag); + opal_list_append(&mca_ptl_mx_component.mx_pending_acks, (opal_list_item_t*)frag); OMPI_THREAD_UNLOCK(&mca_ptl_mx_component.mx_lock); } } diff --git a/ompi/mca/ptl/mx/ptl_mx.h b/ompi/mca/ptl/mx/ptl_mx.h index 79e4a34b29..ae99af1d8f 100644 --- a/ompi/mca/ptl/mx/ptl_mx.h +++ b/ompi/mca/ptl/mx/ptl_mx.h @@ -46,7 +46,7 @@ struct mca_ptl_mx_component_t { ompi_free_list_t mx_send_frags; /**< free list of mx send fragments */ ompi_free_list_t mx_recv_frags; /**< free list of mx recv fragments */ ompi_hash_table_t mx_procs; /**< hash table of procs */ - ompi_list_t mx_pending_acks; /**< queue of pending sends */ + opal_list_t mx_pending_acks; /**< queue of pending sends */ ompi_mutex_t mx_lock; /**< lock for accessing module state */ }; @@ -133,7 +133,7 @@ extern int mca_ptl_mx_component_progress( */ struct mca_ptl_mx_module_t { mca_ptl_base_module_t super; /**< base PTL module interface */ - ompi_list_t mx_peers; /**< list of peers */ + opal_list_t mx_peers; /**< list of peers */ uint64_t mx_nic_addr; /**< NIC MAC address */ uint32_t mx_filter; /**< endpoint filter */ uint32_t mx_endpoint_id; /**< endpoint ID */ diff --git a/ompi/mca/ptl/mx/ptl_mx_component.c b/ompi/mca/ptl/mx/ptl_mx_component.c index 3272e42b8b..2436101d63 100644 --- a/ompi/mca/ptl/mx/ptl_mx_component.c +++ b/ompi/mca/ptl/mx/ptl_mx_component.c @@ -138,18 +138,18 @@ int mca_ptl_mx_component_close(void) #if OMPI_ENABLE_DEBUG if (mca_ptl_mx_component.mx_send_frags.fl_num_allocated && mca_ptl_mx_component.mx_send_frags.fl_num_allocated != - mca_ptl_mx_component.mx_send_frags.super.ompi_list_length) { + mca_ptl_mx_component.mx_send_frags.super.opal_list_length) { ompi_output(0, "mx send frags: %d allocated %d returned\n", mca_ptl_mx_component.mx_send_frags.fl_num_allocated, - mca_ptl_mx_component.mx_send_frags.super.ompi_list_length); + mca_ptl_mx_component.mx_send_frags.super.opal_list_length); } /* allow for pre-posted receives */ if (mca_ptl_mx_component.mx_recv_frags.fl_num_allocated && mca_ptl_mx_component.mx_recv_frags.fl_num_allocated - 3 > - mca_ptl_mx_component.mx_recv_frags.super.ompi_list_length) { + mca_ptl_mx_component.mx_recv_frags.super.opal_list_length) { ompi_output(0, "mx recv frags: %d allocated %d returned\n", mca_ptl_mx_component.mx_recv_frags.fl_num_allocated, - mca_ptl_mx_component.mx_recv_frags.super.ompi_list_length); + mca_ptl_mx_component.mx_recv_frags.super.opal_list_length); } #endif diff --git a/ompi/mca/ptl/mx/ptl_mx_module.c b/ompi/mca/ptl/mx/ptl_mx_module.c index fdf3965197..c3d5f1beba 100644 --- a/ompi/mca/ptl/mx/ptl_mx_module.c +++ b/ompi/mca/ptl/mx/ptl_mx_module.c @@ -287,7 +287,7 @@ static mca_ptl_mx_module_t* mca_ptl_mx_create(uint64_t addr) /* copy over default settings */ memcpy(ptl, &mca_ptl_mx_module, sizeof(mca_ptl_mx_module_t)); - OBJ_CONSTRUCT(&ptl->mx_peers, ompi_list_t); + OBJ_CONSTRUCT(&ptl->mx_peers, opal_list_t); /* open local endpoint */ status = mx_open_endpoint( @@ -455,7 +455,7 @@ int mca_ptl_mx_add_procs( ompi_bitmap_set_bit(reachable, n); OMPI_THREAD_UNLOCK(&ptl_proc->proc_lock); peers[n] = ptl_peer; - ompi_list_append(&ptl_mx->mx_peers, (ompi_list_item_t*)ptl_peer); + opal_list_append(&ptl_mx->mx_peers, (opal_list_item_t*)ptl_peer); } return OMPI_SUCCESS; } diff --git a/ompi/mca/ptl/mx/ptl_mx_peer.c b/ompi/mca/ptl/mx/ptl_mx_peer.c index 54cc53b592..54ca1e8b94 100644 --- a/ompi/mca/ptl/mx/ptl_mx_peer.c +++ b/ompi/mca/ptl/mx/ptl_mx_peer.c @@ -22,7 +22,7 @@ static void mca_ptl_mx_peer_destruct(mca_ptl_base_peer_t* ptl_peer); OBJ_CLASS_INSTANCE( mca_ptl_mx_peer_t, - ompi_list_item_t, + opal_list_item_t, mca_ptl_mx_peer_construct, mca_ptl_mx_peer_destruct); diff --git a/ompi/mca/ptl/mx/ptl_mx_peer.h b/ompi/mca/ptl/mx/ptl_mx_peer.h index 26b4941d4a..e1bb00b2a9 100644 --- a/ompi/mca/ptl/mx/ptl_mx_peer.h +++ b/ompi/mca/ptl/mx/ptl_mx_peer.h @@ -26,7 +26,7 @@ * An abstraction that represents a a peer process. */ struct mca_ptl_base_peer_t { - ompi_list_item_t peer_item; + opal_list_item_t peer_item; mx_endpoint_addr_t peer_addr; struct mca_ptl_mx_module_t* peer_ptl; struct mca_ptl_mx_proc_t* peer_proc; diff --git a/ompi/mca/ptl/mx/ptl_mx_proc.c b/ompi/mca/ptl/mx/ptl_mx_proc.c index d0f0718dfc..3db3b1b9da 100644 --- a/ompi/mca/ptl/mx/ptl_mx_proc.c +++ b/ompi/mca/ptl/mx/ptl_mx_proc.c @@ -31,7 +31,7 @@ static void mca_ptl_mx_proc_destruct(mca_ptl_mx_proc_t* proc); OBJ_CLASS_INSTANCE( mca_ptl_mx_proc_t, - ompi_list_item_t, + opal_list_item_t, mca_ptl_mx_proc_construct, mca_ptl_mx_proc_destruct ); diff --git a/ompi/mca/ptl/mx/ptl_mx_proc.h b/ompi/mca/ptl/mx/ptl_mx_proc.h index 995ac9021c..9e0a5c2b5c 100644 --- a/ompi/mca/ptl/mx/ptl_mx_proc.h +++ b/ompi/mca/ptl/mx/ptl_mx_proc.h @@ -38,7 +38,7 @@ extern "C" { * PTL instance that attempts to open a connection to the process. */ struct mca_ptl_mx_proc_t { - ompi_list_item_t super; /**< allow proc to be placed on a list */ + opal_list_item_t super; /**< allow proc to be placed on a list */ ompi_proc_t *proc_ompi; /**< pointer to corresponding ompi_proc_t */ ompi_process_name_t proc_name; /**< globally unique identifier for the process */ mx_endpoint_addr_t *proc_addrs; /**< peer endpoint address */ diff --git a/ompi/mca/ptl/mx/ptl_mx_recvfrag.h b/ompi/mca/ptl/mx/ptl_mx_recvfrag.h index 0b64e3b332..d67ad2e271 100644 --- a/ompi/mca/ptl/mx/ptl_mx_recvfrag.h +++ b/ompi/mca/ptl/mx/ptl_mx_recvfrag.h @@ -42,7 +42,7 @@ OBJ_CLASS_DECLARATION(mca_ptl_mx_recv_frag_t); #define MCA_PTL_MX_RECV_FRAG_ALLOC(frag, rc) \ { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_GET(&mca_ptl_mx_component.mx_recv_frags, item, rc); \ frag = (mca_ptl_mx_recv_frag_t*)item; \ } @@ -53,7 +53,7 @@ OBJ_CLASS_DECLARATION(mca_ptl_mx_recv_frag_t); frag->frag_data != frag->frag_recv.frag_base.frag_addr) { \ free(frag->frag_recv.frag_base.frag_addr); \ } \ - OMPI_FREE_LIST_RETURN(&mca_ptl_mx_component.mx_recv_frags, (ompi_list_item_t*)frag); \ + OMPI_FREE_LIST_RETURN(&mca_ptl_mx_component.mx_recv_frags, (opal_list_item_t*)frag); \ } diff --git a/ompi/mca/ptl/mx/ptl_mx_sendfrag.h b/ompi/mca/ptl/mx/ptl_mx_sendfrag.h index 0753b54b94..d7e0fb4391 100644 --- a/ompi/mca/ptl/mx/ptl_mx_sendfrag.h +++ b/ompi/mca/ptl/mx/ptl_mx_sendfrag.h @@ -45,7 +45,7 @@ OBJ_CLASS_DECLARATION(mca_ptl_mx_send_frag_t); #define MCA_PTL_MX_SEND_FRAG_ALLOC(sendfrag, rc) \ { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_GET(&mca_ptl_mx_component.mx_send_frags, item, rc); \ sendfrag = (mca_ptl_mx_send_frag_t*)item; \ } @@ -61,7 +61,7 @@ OBJ_CLASS_DECLARATION(mca_ptl_mx_send_frag_t); seg_free >>= 1; \ seg_ptr++; \ } \ - OMPI_FREE_LIST_RETURN(&mca_ptl_mx_component.mx_send_frags, (ompi_list_item_t*)sendfrag); \ + OMPI_FREE_LIST_RETURN(&mca_ptl_mx_component.mx_send_frags, (opal_list_item_t*)sendfrag); \ } #define MCA_PTL_MX_SEND_FRAG_INIT_ACK(ack,ptl,frag) \ diff --git a/ompi/mca/ptl/portals/src/ptl_portals.h b/ompi/mca/ptl/portals/src/ptl_portals.h index 1162bdda94..faf9e84412 100644 --- a/ompi/mca/ptl/portals/src/ptl_portals.h +++ b/ompi/mca/ptl/portals/src/ptl_portals.h @@ -73,7 +73,7 @@ struct mca_ptl_portals_component_t { ompi_free_list_t portals_recv_frags; /* queue of pending sends */ - ompi_list_t portals_pending_acks; + opal_list_t portals_pending_acks; /* lock for accessing component */ ompi_mutex_t portals_lock; diff --git a/ompi/mca/ptl/portals/src/ptl_portals_component.c b/ompi/mca/ptl/portals/src/ptl_portals_component.c index 2bc3fdb525..282e55d355 100644 --- a/ompi/mca/ptl/portals/src/ptl_portals_component.c +++ b/ompi/mca/ptl/portals/src/ptl_portals_component.c @@ -117,7 +117,7 @@ mca_ptl_portals_component_open(void) OBJ_CONSTRUCT(&mca_ptl_portals_component.portals_recv_frags, ompi_free_list_t); OBJ_CONSTRUCT(&mca_ptl_portals_component.portals_pending_acks, - ompi_list_t); + opal_list_t); OBJ_CONSTRUCT(&mca_ptl_portals_component.portals_lock, ompi_mutex_t); diff --git a/ompi/mca/ptl/portals/src/ptl_portals_recv.h b/ompi/mca/ptl/portals/src/ptl_portals_recv.h index 231271ca62..4e11bce0a4 100644 --- a/ompi/mca/ptl/portals/src/ptl_portals_recv.h +++ b/ompi/mca/ptl/portals/src/ptl_portals_recv.h @@ -48,7 +48,7 @@ mca_ptl_portals_recv_get_frag(struct mca_ptl_portals_module_t *ptl, size_t header_size) { mca_ptl_portals_recv_frag_t * recvfrag; - ompi_list_item_t *item; + opal_list_item_t *item; int ret; /* get a fragment header */ diff --git a/ompi/mca/ptl/portals/src/ptl_portals_send.c b/ompi/mca/ptl/portals/src/ptl_portals_send.c index eb92295059..553093bcf2 100644 --- a/ompi/mca/ptl/portals/src/ptl_portals_send.c +++ b/ompi/mca/ptl/portals/src/ptl_portals_send.c @@ -60,7 +60,7 @@ mca_ptl_portals_send(struct mca_ptl_base_module_t *ptl_base, if (sendreq->req_cached && offset == 0) { sendfrag = (mca_ptl_portals_send_frag_t*)(sendreq+1); } else { - ompi_list_item_t *item; + opal_list_item_t *item; OMPI_FREE_LIST_GET(&mca_ptl_portals_component.portals_send_frags, item, ret); if (NULL == item) return ret; @@ -209,7 +209,7 @@ mca_ptl_portals_process_send_event(ptl_event_t *ev) /* if request is NULL, it's an ACK - just return the frag to the pool */ OMPI_FREE_LIST_RETURN(&mca_ptl_portals_component.portals_send_frags, - (ompi_list_item_t*) frag); + (opal_list_item_t*) frag); } else { bool frag_ack; diff --git a/ompi/mca/ptl/portals/src/ptl_portals_send.h b/ompi/mca/ptl/portals/src/ptl_portals_send.h index 1f0e68d0b8..48b58f7cf1 100644 --- a/ompi/mca/ptl/portals/src/ptl_portals_send.h +++ b/ompi/mca/ptl/portals/src/ptl_portals_send.h @@ -92,7 +92,7 @@ mca_ptl_portals_send_ack(struct mca_ptl_portals_module_t *ptl, { mca_ptl_base_header_t* hdr; mca_ptl_portals_send_frag_t* sendfrag; - ompi_list_item_t *item; + opal_list_item_t *item; mca_ptl_base_recv_request_t* request = recvfrag->frag_recv.frag_request; int ret; @@ -156,7 +156,7 @@ mca_ptl_portals_complete_send_event(mca_ptl_portals_send_frag_t* frag) free(frag->frag_vector[1].iov_base); } OMPI_FREE_LIST_RETURN(&mca_ptl_portals_component.portals_send_frags, - (ompi_list_item_t*) frag); + (opal_list_item_t*) frag); } } diff --git a/ompi/mca/ptl/ptl.h b/ompi/mca/ptl/ptl.h index d13f97ef38..c6b51f9553 100644 --- a/ompi/mca/ptl/ptl.h +++ b/ompi/mca/ptl/ptl.h @@ -266,7 +266,7 @@ struct mca_ptl_base_match_header_t; typedef uint64_t mca_ptl_sequence_t; typedef uint64_t mca_ptl_tstamp_t; -typedef struct ompi_list_t mca_ptl_queue_t; +typedef struct opal_list_t mca_ptl_queue_t; typedef enum { MCA_PTL_ENABLE diff --git a/ompi/mca/ptl/self/ptl_self_component.c b/ompi/mca/ptl/self/ptl_self_component.c index ae6e2f8fd4..51381e56db 100644 --- a/ompi/mca/ptl/self/ptl_self_component.c +++ b/ompi/mca/ptl/self/ptl_self_component.c @@ -134,10 +134,10 @@ int mca_ptl_self_component_open(void) int mca_ptl_self_component_close(void) { if (mca_ptl_self_component.self_send_requests.fl_num_allocated != - mca_ptl_self_component.self_send_requests.super.ompi_list_length) { + mca_ptl_self_component.self_send_requests.super.opal_list_length) { ompi_output(0, "self send requests: %d allocated %d returned\n", mca_ptl_self_component.self_send_requests.fl_num_allocated, - mca_ptl_self_component.self_send_requests.super.ompi_list_length); + mca_ptl_self_component.self_send_requests.super.opal_list_length); } #if 0 diff --git a/ompi/mca/ptl/sm/src/ptl_sm.c b/ompi/mca/ptl/sm/src/ptl_sm.c index 229216b59e..4210493cca 100644 --- a/ompi/mca/ptl/sm/src/ptl_sm.c +++ b/ompi/mca/ptl/sm/src/ptl_sm.c @@ -718,7 +718,7 @@ int mca_ptl_sm_finalize(struct mca_ptl_base_module_t* ptl) int mca_ptl_sm_request_alloc(struct mca_ptl_base_module_t* ptl, struct mca_ptl_base_send_request_t* request) { mca_ptl_sm_send_request_t *sm_request; - ompi_list_item_t* item; + opal_list_item_t* item; int rc; /* allocate shared memory, first fragment */ @@ -738,11 +738,11 @@ int mca_ptl_sm_request_alloc(struct mca_ptl_base_module_t* ptl, struct mca_ptl_b void mca_ptl_sm_request_return(struct mca_ptl_base_module_t* ptl, struct mca_ptl_base_send_request_t* request) { mca_ptl_sm_send_request_t *sm_request; - ompi_list_item_t* item; + opal_list_item_t* item; /* return the fragment descriptor to the free list */ sm_request=(mca_ptl_sm_send_request_t *)request; - item=(ompi_list_item_t *)sm_request->req_frag; + item=(opal_list_item_t *)sm_request->req_frag; OMPI_FREE_LIST_RETURN(&(mca_ptl_sm_component.sm_first_frags),item); } @@ -909,7 +909,7 @@ int mca_ptl_sm_send_continue( ompi_fifo_t *send_fifo; mca_ptl_base_header_t* hdr; void *sm_data_ptr ; - ompi_list_item_t* item; + opal_list_item_t* item; mca_ptl_sm_second_frag_t *send_frag; ompi_convertor_t *convertor; struct iovec address; diff --git a/ompi/mca/ptl/sm/src/ptl_sm.h b/ompi/mca/ptl/sm/src/ptl_sm.h index 46f28f1f02..e3602f65c7 100644 --- a/ompi/mca/ptl/sm/src/ptl_sm.h +++ b/ompi/mca/ptl/sm/src/ptl_sm.h @@ -124,7 +124,7 @@ struct mca_ptl_sm_component_t { fragments that are awaiting resources */ ompi_mutex_t sm_pending_ack_lock; - ompi_list_t sm_pending_ack; /**< list of fragmnent that need to be + opal_list_t sm_pending_ack; /**< list of fragmnent that need to be acked */ struct mca_ptl_base_peer_t **sm_peers; diff --git a/ompi/mca/ptl/sm/src/ptl_sm_component.c b/ompi/mca/ptl/sm/src/ptl_sm_component.c index 157b4e5f98..e8dcef3fcc 100644 --- a/ompi/mca/ptl/sm/src/ptl_sm_component.c +++ b/ompi/mca/ptl/sm/src/ptl_sm_component.c @@ -170,7 +170,7 @@ int mca_ptl_sm_component_open(void) OBJ_CONSTRUCT(&mca_ptl_sm_component.sm_first_frags, ompi_free_list_t); OBJ_CONSTRUCT(&mca_ptl_sm_component.sm_second_frags, ompi_free_list_t); OBJ_CONSTRUCT(&mca_ptl_sm_component.sm_pending_ack_lock, ompi_mutex_t); - OBJ_CONSTRUCT(&mca_ptl_sm_component.sm_pending_ack, ompi_list_t); + OBJ_CONSTRUCT(&mca_ptl_sm_component.sm_pending_ack, opal_list_t); return OMPI_SUCCESS; } @@ -363,7 +363,7 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp) bool frag_matched; mca_ptl_base_match_header_t *matching_header; mca_ptl_base_send_request_t *base_send_req; - ompi_list_item_t *item; + opal_list_item_t *item; int return_status = 0; my_local_smp_rank=mca_ptl_sm_component.my_smp_rank; @@ -460,7 +460,7 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp) * the PML */ if( 0 < header_ptr->send_offset ) { OMPI_FREE_LIST_RETURN(&mca_ptl_sm_component.sm_second_frags, - (ompi_list_item_t *)header_ptr); + (opal_list_item_t *)header_ptr); } break; @@ -563,7 +563,7 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp) * the PML */ if( 0 < header_ptr->send_offset ) { OMPI_FREE_LIST_RETURN(&mca_ptl_sm_component.sm_second_frags, - (ompi_list_item_t *)header_ptr); + (opal_list_item_t *)header_ptr); } break; @@ -577,7 +577,7 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp) /* progress acks */ - if( !ompi_list_is_empty(&(mca_ptl_sm_component.sm_pending_ack)) ) { + if( !opal_list_is_empty(&(mca_ptl_sm_component.sm_pending_ack)) ) { OMPI_THREAD_LOCK(&(mca_ptl_sm_component.sm_pending_ack_lock)); @@ -585,8 +585,8 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp) * sending the ack, so that when the ack is recieved, * manipulated, and put on a new list, it is not also * on a different list */ - item = ompi_list_remove_first(&(mca_ptl_sm_component.sm_pending_ack)); - while ( item != ompi_list_get_end(&(mca_ptl_sm_component.sm_pending_ack)) ) { + item = opal_list_remove_first(&(mca_ptl_sm_component.sm_pending_ack)); + while ( item != opal_list_get_end(&(mca_ptl_sm_component.sm_pending_ack)) ) { int rc; /* get fragment pointer */ header_ptr = (mca_ptl_sm_frag_t *)item; @@ -603,13 +603,13 @@ int mca_ptl_sm_component_progress(mca_ptl_tstamp_t tstamp) /* if ack failed, break */ if( 0 > rc ) { /* put the descriptor back on the list */ - ompi_list_prepend(&(mca_ptl_sm_component.sm_pending_ack),item); + opal_list_prepend(&(mca_ptl_sm_component.sm_pending_ack),item); break; } MCA_PTL_SM_SIGNAL_PEER(mca_ptl_sm_component.sm_peers[header_ptr->queue_index]); /* get next fragment to ack */ - item = ompi_list_remove_first(&(mca_ptl_sm_component.sm_pending_ack)); + item = opal_list_remove_first(&(mca_ptl_sm_component.sm_pending_ack)); } diff --git a/ompi/mca/ptl/sm/src/ptl_sm_send.c b/ompi/mca/ptl/sm/src/ptl_sm_send.c index 504f30ad22..1b0caade00 100644 --- a/ompi/mca/ptl/sm/src/ptl_sm_send.c +++ b/ompi/mca/ptl/sm/src/ptl_sm_send.c @@ -157,8 +157,8 @@ void mca_ptl_sm_matched( /* if can't ack, put on list for later delivery */ if( 0 > return_status ) { OMPI_THREAD_LOCK(&(mca_ptl_sm_component.sm_pending_ack_lock)); - ompi_list_append(&(mca_ptl_sm_component.sm_pending_ack), - (ompi_list_item_t *)sm_frag_desc); + opal_list_append(&(mca_ptl_sm_component.sm_pending_ack), + (opal_list_item_t *)sm_frag_desc); OMPI_THREAD_UNLOCK(&(mca_ptl_sm_component.sm_pending_ack_lock)); } else { MCA_PTL_SM_SIGNAL_PEER(mca_ptl_sm_component.sm_peers[peer_local_smp_rank]); diff --git a/ompi/mca/ptl/sm/src/ptl_sm_sendreq.c b/ompi/mca/ptl/sm/src/ptl_sm_sendreq.c index c96326c50b..a4b3a0f24a 100644 --- a/ompi/mca/ptl/sm/src/ptl_sm_sendreq.c +++ b/ompi/mca/ptl/sm/src/ptl_sm_sendreq.c @@ -72,7 +72,7 @@ int mca_ptl_sm_send_request_init(struct mca_ptl_base_module_t* ptl, * returned is valid only in this process, since different * processes may have different base addresses */ - sm_request->req_frag=(mca_ptl_sm_frag_t *)ompi_list_get_first( + sm_request->req_frag=(mca_ptl_sm_frag_t *)opal_list_get_first( (void *)&(mca_ptl_sm_component.sm_first_frags)); if(NULL == sm_request->req_frag){ return_value=OMPI_ERR_OUT_OF_RESOURCE; diff --git a/ompi/mca/ptl/tcp/ptl_tcp.c b/ompi/mca/ptl/tcp/ptl_tcp.c index 0a8133951a..078d907b28 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp.c +++ b/ompi/mca/ptl/tcp/ptl_tcp.c @@ -127,7 +127,7 @@ int mca_ptl_tcp_add_procs( ompi_bitmap_set_bit(reachable, i); OMPI_THREAD_UNLOCK(&ptl_proc->proc_lock); peers[i] = ptl_peer; - ompi_list_append(&ptl_tcp->ptl_peers, (ompi_list_item_t*)ptl_peer); + opal_list_append(&ptl_tcp->ptl_peers, (opal_list_item_t*)ptl_peer); /* we increase the count of MPI users of the event library once per peer, so that we are used until we aren't connected to a peer */ @@ -147,7 +147,7 @@ int mca_ptl_tcp_del_procs(struct mca_ptl_base_module_t* ptl, size_t nprocs, stru mca_ptl_tcp_module_t *ptl_tcp = (mca_ptl_tcp_module_t*)ptl; for(i=0; iptl_peers, (ompi_list_item_t*)peers[i]); + opal_list_remove_item(&ptl_tcp->ptl_peers, (opal_list_item_t*)peers[i]); OBJ_RELEASE(peers[i]); ompi_progress_event_decrement(); } @@ -160,11 +160,11 @@ int mca_ptl_tcp_del_procs(struct mca_ptl_base_module_t* ptl, size_t nprocs, stru int mca_ptl_tcp_finalize(struct mca_ptl_base_module_t* ptl) { - ompi_list_item_t* item; + opal_list_item_t* item; mca_ptl_tcp_module_t *ptl_tcp = (mca_ptl_tcp_module_t*)ptl; - for( item = ompi_list_remove_first(&ptl_tcp->ptl_peers); + for( item = opal_list_remove_first(&ptl_tcp->ptl_peers); item != NULL; - item = ompi_list_remove_first(&ptl_tcp->ptl_peers)) { + item = opal_list_remove_first(&ptl_tcp->ptl_peers)) { mca_ptl_tcp_peer_t *peer = (mca_ptl_tcp_peer_t*)item; OBJ_RELEASE(peer); ompi_progress_event_decrement(); @@ -202,19 +202,19 @@ void mca_ptl_tcp_recv_frag_return(struct mca_ptl_base_module_t* ptl, struct mca_ frag->frag_recv.frag_is_buffered = false; frag->frag_recv.frag_base.frag_addr = NULL; } - OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (ompi_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (opal_list_item_t*)frag); } void mca_ptl_tcp_send_frag_return(struct mca_ptl_base_module_t* ptl, struct mca_ptl_tcp_send_frag_t* frag) { - if(ompi_list_get_size(&mca_ptl_tcp_component.tcp_pending_acks)) { + if(opal_list_get_size(&mca_ptl_tcp_component.tcp_pending_acks)) { mca_ptl_tcp_recv_frag_t* pending; OMPI_THREAD_LOCK(&mca_ptl_tcp_component.tcp_lock); - pending = (mca_ptl_tcp_recv_frag_t*)ompi_list_remove_first(&mca_ptl_tcp_component.tcp_pending_acks); + pending = (mca_ptl_tcp_recv_frag_t*)opal_list_remove_first(&mca_ptl_tcp_component.tcp_pending_acks); if(NULL == pending) { OMPI_THREAD_UNLOCK(&mca_ptl_tcp_component.tcp_lock); - OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_send_frags, (ompi_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_send_frags, (opal_list_item_t*)frag); return; } OMPI_THREAD_UNLOCK(&mca_ptl_tcp_component.tcp_lock); @@ -225,7 +225,7 @@ void mca_ptl_tcp_send_frag_return(struct mca_ptl_base_module_t* ptl, struct mca_ mca_ptl_tcp_peer_send(pending->frag_recv.frag_base.frag_peer, frag, 0); mca_ptl_tcp_recv_frag_return(ptl, pending); } else { - OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_send_frags, (ompi_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_send_frags, (opal_list_item_t*)frag); } } @@ -249,7 +249,7 @@ int mca_ptl_tcp_send( if (offset == 0 && sendreq->req_cached) { sendfrag = &((mca_ptl_tcp_send_request_t*)sendreq)->req_frag; } else { - ompi_list_item_t* item; + opal_list_item_t* item; OMPI_FREE_LIST_GET(&mca_ptl_tcp_component.tcp_send_frags, item, rc); if(NULL == (sendfrag = (mca_ptl_tcp_send_frag_t*)item)) return rc; @@ -280,14 +280,14 @@ void mca_ptl_tcp_matched( int rc; mca_ptl_tcp_send_frag_t* ack; mca_ptl_tcp_recv_frag_t* recv_frag = (mca_ptl_tcp_recv_frag_t*)frag; - ompi_list_item_t* item; + opal_list_item_t* item; MCA_PTL_TCP_SEND_FRAG_ALLOC(item, rc); ack = (mca_ptl_tcp_send_frag_t*)item; if(NULL == ack) { OMPI_THREAD_LOCK(&mca_ptl_tcp_component.tcp_lock); recv_frag->frag_ack_pending = true; - ompi_list_append(&mca_ptl_tcp_component.tcp_pending_acks, (ompi_list_item_t*)frag); + opal_list_append(&mca_ptl_tcp_component.tcp_pending_acks, (opal_list_item_t*)frag); OMPI_THREAD_UNLOCK(&mca_ptl_tcp_component.tcp_lock); } else { mca_ptl_tcp_send_frag_init_ack(ack, ptl, recv_frag->frag_recv.frag_base.frag_peer, recv_frag); diff --git a/ompi/mca/ptl/tcp/ptl_tcp.h b/ompi/mca/ptl/tcp/ptl_tcp.h index cf209e9974..3916422674 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp.h +++ b/ompi/mca/ptl/tcp/ptl_tcp.h @@ -60,8 +60,8 @@ struct mca_ptl_tcp_component_t { ompi_free_list_t tcp_send_frags; /**< free list of tcp send fragments */ ompi_free_list_t tcp_recv_frags; /**< free list of tcp recv fragments */ ompi_hash_table_t tcp_procs; /**< hash table of tcp proc structures */ - ompi_list_t tcp_pending_acks; /**< list of pending acks - retry as sends complete */ - ompi_list_t tcp_events; /**< list of pending events */ + opal_list_t tcp_pending_acks; /**< list of pending acks - retry as sends complete */ + opal_list_t tcp_events; /**< list of pending events */ struct mca_ptl_tcp_proc_t* tcp_local; /**< the tcp proc instance corresponding to the local process */ ompi_event_t tcp_send_event; /**< event structure for sends */ ompi_event_t tcp_recv_event; /**< event structure for recvs */ @@ -126,7 +126,7 @@ struct mca_ptl_tcp_module_t { int ptl_ifindex; /**< PTL interface index */ struct sockaddr_in ptl_ifaddr; /**< PTL interface address */ struct sockaddr_in ptl_ifmask; /**< PTL interface netmask */ - ompi_list_t ptl_peers; /**< List of all peers for this PTL */ + opal_list_t ptl_peers; /**< List of all peers for this PTL */ #if MCA_PTL_TCP_STATISTICS size_t ptl_bytes_sent; size_t ptl_bytes_recv; diff --git a/ompi/mca/ptl/tcp/ptl_tcp_component.c b/ompi/mca/ptl/tcp/ptl_tcp_component.c index f9dcd5f077..8516cb0b99 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp_component.c +++ b/ompi/mca/ptl/tcp/ptl_tcp_component.c @@ -63,7 +63,7 @@ */ struct mca_ptl_tcp_event_t { - ompi_list_item_t item; + opal_list_item_t item; ompi_event_t event; }; typedef struct mca_ptl_tcp_event_t mca_ptl_tcp_event_t; @@ -71,20 +71,20 @@ typedef struct mca_ptl_tcp_event_t mca_ptl_tcp_event_t; static void mca_ptl_tcp_event_construct(mca_ptl_tcp_event_t* event) { OMPI_THREAD_LOCK(&mca_ptl_tcp_component.tcp_lock); - ompi_list_append(&mca_ptl_tcp_component.tcp_events, &event->item); + opal_list_append(&mca_ptl_tcp_component.tcp_events, &event->item); OMPI_THREAD_UNLOCK(&mca_ptl_tcp_component.tcp_lock); } static void mca_ptl_tcp_event_destruct(mca_ptl_tcp_event_t* event) { OMPI_THREAD_LOCK(&mca_ptl_tcp_component.tcp_lock); - ompi_list_remove_item(&mca_ptl_tcp_component.tcp_events, &event->item); + opal_list_remove_item(&mca_ptl_tcp_component.tcp_events, &event->item); OMPI_THREAD_UNLOCK(&mca_ptl_tcp_component.tcp_lock); } OBJ_CLASS_INSTANCE( mca_ptl_tcp_event_t, - ompi_list_item_t, + opal_list_item_t, mca_ptl_tcp_event_construct, mca_ptl_tcp_event_destruct); @@ -179,8 +179,8 @@ int mca_ptl_tcp_component_open(void) /* initialize objects */ OBJ_CONSTRUCT(&mca_ptl_tcp_component.tcp_lock, ompi_mutex_t); OBJ_CONSTRUCT(&mca_ptl_tcp_component.tcp_procs, ompi_hash_table_t); - OBJ_CONSTRUCT(&mca_ptl_tcp_component.tcp_pending_acks, ompi_list_t); - OBJ_CONSTRUCT(&mca_ptl_tcp_component.tcp_events, ompi_list_t); + OBJ_CONSTRUCT(&mca_ptl_tcp_component.tcp_pending_acks, opal_list_t); + OBJ_CONSTRUCT(&mca_ptl_tcp_component.tcp_events, opal_list_t); OBJ_CONSTRUCT(&mca_ptl_tcp_component.tcp_send_frags, ompi_free_list_t); OBJ_CONSTRUCT(&mca_ptl_tcp_component.tcp_recv_frags, ompi_free_list_t); ompi_hash_table_init(&mca_ptl_tcp_component.tcp_procs, 256); @@ -225,22 +225,22 @@ int mca_ptl_tcp_component_open(void) int mca_ptl_tcp_component_close(void) { - ompi_list_item_t* item; + opal_list_item_t* item; #ifdef WIN32 WSACleanup(); #endif #if OMPI_ENABLE_DEBUG if (mca_ptl_tcp_component.tcp_send_frags.fl_num_allocated != - mca_ptl_tcp_component.tcp_send_frags.super.ompi_list_length) { + mca_ptl_tcp_component.tcp_send_frags.super.opal_list_length) { ompi_output(0, "tcp send frags: %d allocated %d returned\n", mca_ptl_tcp_component.tcp_send_frags.fl_num_allocated, - mca_ptl_tcp_component.tcp_send_frags.super.ompi_list_length); + mca_ptl_tcp_component.tcp_send_frags.super.opal_list_length); } if (mca_ptl_tcp_component.tcp_recv_frags.fl_num_allocated != - mca_ptl_tcp_component.tcp_recv_frags.super.ompi_list_length) { + mca_ptl_tcp_component.tcp_recv_frags.super.opal_list_length) { ompi_output(0, "tcp recv frags: %d allocated %d returned\n", mca_ptl_tcp_component.tcp_recv_frags.fl_num_allocated, - mca_ptl_tcp_component.tcp_recv_frags.super.ompi_list_length); + mca_ptl_tcp_component.tcp_recv_frags.super.opal_list_length); } #endif @@ -259,9 +259,9 @@ int mca_ptl_tcp_component_close(void) /* cleanup any pending events */ OMPI_THREAD_LOCK(&mca_ptl_tcp_component.tcp_lock); - for(item = ompi_list_remove_first(&mca_ptl_tcp_component.tcp_events); + for(item = opal_list_remove_first(&mca_ptl_tcp_component.tcp_events); item != NULL; - item = ompi_list_remove_first(&mca_ptl_tcp_component.tcp_events)) { + item = opal_list_remove_first(&mca_ptl_tcp_component.tcp_events)) { mca_ptl_tcp_event_t* event = (mca_ptl_tcp_event_t*)item; ompi_event_del(&event->event); OBJ_RELEASE(event); @@ -290,7 +290,7 @@ static int mca_ptl_tcp_create(int if_index, const char* if_name) if(NULL == ptl) return OMPI_ERR_OUT_OF_RESOURCE; memcpy(ptl, &mca_ptl_tcp_module, sizeof(mca_ptl_tcp_module)); - OBJ_CONSTRUCT(&ptl->ptl_peers, ompi_list_t); + OBJ_CONSTRUCT(&ptl->ptl_peers, opal_list_t); mca_ptl_tcp_component.tcp_ptl_modules[mca_ptl_tcp_component.tcp_num_ptl_modules++] = ptl; /* initialize the ptl */ diff --git a/ompi/mca/ptl/tcp/ptl_tcp_peer.c b/ompi/mca/ptl/tcp/ptl_tcp_peer.c index 46d9a3b011..7479c45cee 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp_peer.c +++ b/ompi/mca/ptl/tcp/ptl_tcp_peer.c @@ -68,7 +68,7 @@ static void mca_ptl_tcp_peer_send_handler(int sd, short flags, void* user); opal_class_t mca_ptl_tcp_peer_t_class = { "mca_tcp_ptl_peer_t", - OBJ_CLASS(ompi_list_item_t), + OBJ_CLASS(opal_list_item_t), (opal_construct_t)mca_ptl_tcp_peer_construct, (opal_destruct_t)mca_ptl_tcp_peer_destruct }; @@ -90,7 +90,7 @@ static void mca_ptl_tcp_peer_construct(mca_ptl_base_peer_t* ptl_peer) ptl_peer->peer_state = MCA_PTL_TCP_CLOSED; ptl_peer->peer_retries = 0; ptl_peer->peer_nbo = false; - OBJ_CONSTRUCT(&ptl_peer->peer_frags, ompi_list_t); + OBJ_CONSTRUCT(&ptl_peer->peer_frags, opal_list_t); OBJ_CONSTRUCT(&ptl_peer->peer_send_lock, ompi_mutex_t); OBJ_CONSTRUCT(&ptl_peer->peer_recv_lock, ompi_mutex_t); } @@ -197,7 +197,7 @@ int mca_ptl_tcp_peer_send(mca_ptl_base_peer_t* ptl_peer, mca_ptl_tcp_send_frag_t case MCA_PTL_TCP_CONNECTING: case MCA_PTL_TCP_CONNECT_ACK: case MCA_PTL_TCP_CLOSED: - ompi_list_append(&ptl_peer->peer_frags, (ompi_list_item_t*)frag); + opal_list_append(&ptl_peer->peer_frags, (opal_list_item_t*)frag); if(ptl_peer->peer_state == MCA_PTL_TCP_CLOSED) rc = mca_ptl_tcp_peer_start_connect(ptl_peer); break; @@ -206,7 +206,7 @@ int mca_ptl_tcp_peer_send(mca_ptl_base_peer_t* ptl_peer, mca_ptl_tcp_send_frag_t break; case MCA_PTL_TCP_CONNECTED: if (NULL != ptl_peer->peer_send_frag) { - ompi_list_append(&ptl_peer->peer_frags, (ompi_list_item_t*)frag); + opal_list_append(&ptl_peer->peer_frags, (opal_list_item_t*)frag); } else if (offset == 0) { if(mca_ptl_tcp_send_frag_handler(frag, ptl_peer->peer_sd)) { OMPI_THREAD_UNLOCK(&ptl_peer->peer_send_lock); @@ -365,10 +365,10 @@ static void mca_ptl_tcp_peer_connected(mca_ptl_base_peer_t* ptl_peer) /* setup socket options */ ptl_peer->peer_state = MCA_PTL_TCP_CONNECTED; ptl_peer->peer_retries = 0; - if(ompi_list_get_size(&ptl_peer->peer_frags) > 0) { + if(opal_list_get_size(&ptl_peer->peer_frags) > 0) { if(NULL == ptl_peer->peer_send_frag) ptl_peer->peer_send_frag = (mca_ptl_tcp_send_frag_t*) - ompi_list_remove_first(&ptl_peer->peer_frags); + opal_list_remove_first(&ptl_peer->peer_frags); ompi_event_add(&ptl_peer->peer_send_event, 0); } } @@ -653,7 +653,7 @@ static void mca_ptl_tcp_peer_send_handler(int sd, short flags, void* user) /* progress any pending sends */ ptl_peer->peer_send_frag = (mca_ptl_tcp_send_frag_t*) - ompi_list_remove_first(&ptl_peer->peer_frags); + opal_list_remove_first(&ptl_peer->peer_frags); } while (NULL != ptl_peer->peer_send_frag); /* if nothing else to do unregister for send event notifications */ diff --git a/ompi/mca/ptl/tcp/ptl_tcp_peer.h b/ompi/mca/ptl/tcp/ptl_tcp_peer.h index 5ea5b6a5d7..e16389e83f 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp_peer.h +++ b/ompi/mca/ptl/tcp/ptl_tcp_peer.h @@ -28,7 +28,7 @@ #ifdef HAVE_NETINET_IN_H #include #endif -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "event/event.h" #include "mca/pml/pml.h" #include "mca/ptl/ptl.h" @@ -57,7 +57,7 @@ typedef enum { * are established dynamically on an as-needed basis: */ struct mca_ptl_base_peer_t { - ompi_list_item_t super; + opal_list_item_t super; struct mca_ptl_tcp_module_t* peer_ptl; /**< PTL instance that created this connection */ struct mca_ptl_tcp_proc_t* peer_proc; /**< proc structure corresponding to peer */ struct mca_ptl_tcp_addr_t* peer_addr; /**< address of peer */ @@ -66,7 +66,7 @@ struct mca_ptl_base_peer_t { struct mca_ptl_tcp_recv_frag_t* peer_recv_frag; /**< current recv frag being processed */ mca_ptl_tcp_state_t peer_state; /**< current state of the connection */ size_t peer_retries; /**< number of connection retries attempted */ - ompi_list_t peer_frags; /**< list of pending frags to send */ + opal_list_t peer_frags; /**< list of pending frags to send */ ompi_mutex_t peer_send_lock; /**< lock for concurrent access to peer state */ ompi_mutex_t peer_recv_lock; /**< lock for concurrent access to peer state */ ompi_event_t peer_send_event; /**< event for async processing of send frags */ diff --git a/ompi/mca/ptl/tcp/ptl_tcp_proc.c b/ompi/mca/ptl/tcp/ptl_tcp_proc.c index ea3678961e..b8597012d6 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp_proc.c +++ b/ompi/mca/ptl/tcp/ptl_tcp_proc.c @@ -33,7 +33,7 @@ static void mca_ptl_tcp_proc_destruct(mca_ptl_tcp_proc_t* proc); OBJ_CLASS_INSTANCE( mca_ptl_tcp_proc_t, - ompi_list_item_t, + opal_list_item_t, mca_ptl_tcp_proc_construct, mca_ptl_tcp_proc_destruct ); diff --git a/ompi/mca/ptl/tcp/ptl_tcp_proc.h b/ompi/mca/ptl/tcp/ptl_tcp_proc.h index 3ea48a4a48..3f5e6c98b0 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp_proc.h +++ b/ompi/mca/ptl/tcp/ptl_tcp_proc.h @@ -45,7 +45,7 @@ extern "C" { * PTL instance that attempts to open a connection to the process. */ struct mca_ptl_tcp_proc_t { - ompi_list_item_t super; /**< allow proc to be placed on a list */ + opal_list_item_t super; /**< allow proc to be placed on a list */ ompi_proc_t *proc_ompi; /**< pointer to corresponding ompi_proc_t */ orte_process_name_t proc_name; /**< globally unique identifier for the process */ struct mca_ptl_tcp_addr_t *proc_addrs; /**< array of addresses published by peer */ diff --git a/ompi/mca/ptl/tcp/ptl_tcp_recvfrag.c b/ompi/mca/ptl/tcp/ptl_tcp_recvfrag.c index 27b5cc95bc..555ea57ed8 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp_recvfrag.c +++ b/ompi/mca/ptl/tcp/ptl_tcp_recvfrag.c @@ -151,7 +151,7 @@ static bool mca_ptl_tcp_recv_frag_header(mca_ptl_tcp_recv_frag_t* frag, int sd, int cnt = recv(sd, (char *)(ptr + frag->frag_hdr_cnt), size - frag->frag_hdr_cnt, 0); if(cnt == 0) { mca_ptl_tcp_peer_close(frag->frag_recv.frag_base.frag_peer); - OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (ompi_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (opal_list_item_t*)frag); return false; } if(cnt < 0) { @@ -164,7 +164,7 @@ static bool mca_ptl_tcp_recv_frag_header(mca_ptl_tcp_recv_frag_t* frag, int sd, default: ompi_output(0, "mca_ptl_tcp_recv_frag_header: recv() failed with errno=%d", ompi_socket_errno); mca_ptl_tcp_peer_close(frag->frag_recv.frag_base.frag_peer); - OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (ompi_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (opal_list_item_t*)frag); return false; } } @@ -262,7 +262,7 @@ static bool mca_ptl_tcp_recv_frag_data(mca_ptl_tcp_recv_frag_t* frag, int sd) frag->frag_recv.frag_base.frag_size-frag->frag_msg_cnt, 0); if(cnt == 0) { mca_ptl_tcp_peer_close(frag->frag_recv.frag_base.frag_peer); - OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (ompi_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (opal_list_item_t*)frag); return false; } if(cnt < 0) { @@ -274,7 +274,7 @@ static bool mca_ptl_tcp_recv_frag_data(mca_ptl_tcp_recv_frag_t* frag, int sd) default: ompi_output(0, "mca_ptl_tcp_recv_frag_data: recv() failed with errno=%d", ompi_socket_errno); mca_ptl_tcp_peer_close(frag->frag_recv.frag_base.frag_peer); - OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (ompi_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (opal_list_item_t*)frag); return false; } } @@ -301,7 +301,7 @@ static bool mca_ptl_tcp_recv_frag_discard(mca_ptl_tcp_recv_frag_t* frag, int sd) free(rbuf); if(cnt == 0) { mca_ptl_tcp_peer_close(frag->frag_recv.frag_base.frag_peer); - OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (ompi_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (opal_list_item_t*)frag); return false; } if(cnt < 0) { @@ -314,7 +314,7 @@ static bool mca_ptl_tcp_recv_frag_discard(mca_ptl_tcp_recv_frag_t* frag, int sd) default: ompi_output(0, "mca_ptl_tcp_recv_frag_discard: recv() failed with errno=%d", ompi_socket_errno); mca_ptl_tcp_peer_close(frag->frag_recv.frag_base.frag_peer); - OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (ompi_list_item_t*)frag); + OMPI_FREE_LIST_RETURN(&mca_ptl_tcp_component.tcp_recv_frags, (opal_list_item_t*)frag); return false; } } diff --git a/ompi/mca/ptl/tcp/ptl_tcp_recvfrag.h b/ompi/mca/ptl/tcp/ptl_tcp_recvfrag.h index c2e00dfa9c..580c4f350a 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp_recvfrag.h +++ b/ompi/mca/ptl/tcp/ptl_tcp_recvfrag.h @@ -56,7 +56,7 @@ typedef struct mca_ptl_tcp_recv_frag_t mca_ptl_tcp_recv_frag_t; #define MCA_PTL_TCP_RECV_FRAG_ALLOC(frag, rc) \ { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OMPI_FREE_LIST_GET(&mca_ptl_tcp_component.tcp_recv_frags, item, rc); \ frag = (mca_ptl_tcp_recv_frag_t*)item; \ } diff --git a/ompi/mca/topo/base/base.h b/ompi/mca/topo/base/base.h index ee4c2a7c66..5e05a3a120 100644 --- a/ompi/mca/topo/base/base.h +++ b/ompi/mca/topo/base/base.h @@ -20,7 +20,7 @@ #include "ompi_config.h" #include "mpi.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/topo/topo.h" #include "proc/proc.h" @@ -126,8 +126,8 @@ OMPI_DECLSPEC int mca_topo_base_graph_neighbors_count (struct ompi_communicat OMPI_DECLSPEC extern int mca_topo_base_output; OMPI_DECLSPEC extern int mca_topo_base_param; -OMPI_DECLSPEC extern ompi_list_t mca_topo_base_components_available; -OMPI_DECLSPEC extern ompi_list_t mca_topo_base_components_opened; +OMPI_DECLSPEC extern opal_list_t mca_topo_base_components_available; +OMPI_DECLSPEC extern opal_list_t mca_topo_base_components_opened; OMPI_DECLSPEC extern bool mca_topo_base_components_opened_valid; OMPI_DECLSPEC extern bool mca_topo_base_components_available_valid; diff --git a/ompi/mca/topo/base/topo_base_comm_select.c b/ompi/mca/topo/base/topo_base_comm_select.c index 02db4ec93d..b1da21ad97 100644 --- a/ompi/mca/topo/base/topo_base_comm_select.c +++ b/ompi/mca/topo/base/topo_base_comm_select.c @@ -18,7 +18,7 @@ #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/argv.h" #include "runtime/runtime.h" #include "mca/mca.h" @@ -38,16 +38,16 @@ static void fill_null_pointers(mca_topo_base_module_t *module); /* * This structure is needed so that we can close the modules * which are not selected but were opened. mca_base_modules_close - * which does this job for us requires a ompi_list_t which contains + * which does this job for us requires a opal_list_t which contains * these modules */ struct queried_module_t { - ompi_list_item_t super; + opal_list_item_t super; mca_topo_base_component_t *om_component; mca_topo_base_module_t *om_module; }; typedef struct queried_module_t queried_module_t; -static OBJ_CLASS_INSTANCE(queried_module_t, ompi_list_item_t, NULL, NULL); +static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); /* @@ -74,8 +74,8 @@ int mca_topo_base_comm_select (struct ompi_communicator_t *comm, int priority; int best_priority; char name[MPI_MAX_OBJECT_NAME+32]; - ompi_list_item_t *item; - ompi_list_item_t *next_item; + opal_list_item_t *item; + opal_list_item_t *next_item; mca_base_component_priority_list_item_t *selectable_item; char *names, **name_array; int num_names; @@ -83,9 +83,9 @@ int mca_topo_base_comm_select (struct ompi_communicator_t *comm, mca_topo_base_component_t *component; mca_topo_base_component_t *best_component; mca_topo_base_module_t *module; - ompi_list_t queried; + opal_list_t queried; queried_module_t *om; - ompi_list_t *selectable; + opal_list_t *selectable; char *str; int err = MPI_SUCCESS; int i; @@ -172,16 +172,16 @@ int mca_topo_base_comm_select (struct ompi_communicator_t *comm, if the intersection is NULL, then we barf saying that the requested modules are not being available */ - selectable = OBJ_NEW(ompi_list_t); + selectable = OBJ_NEW(opal_list_t); was_selectable_constructed = true; /* go through the compoents_available list and check against the names * to see whether this can be added or not */ - for (item = ompi_list_get_first(&mca_topo_base_components_available); - item != ompi_list_get_end(&mca_topo_base_components_available); - item = ompi_list_get_next(item)) { - /* convert the ompi_list_item_t returned into the proper type */ + for (item = opal_list_get_first(&mca_topo_base_components_available); + item != opal_list_get_end(&mca_topo_base_components_available); + item = opal_list_get_next(item)) { + /* convert the opal_list_item_t returned into the proper type */ cpli = (mca_base_component_priority_list_item_t *) item; component = (mca_topo_base_component_t *) cpli->super.cli_component; ompi_output_verbose(10, mca_topo_base_output, @@ -199,7 +199,7 @@ int mca_topo_base_comm_select (struct ompi_communicator_t *comm, selectable_item = OBJ_NEW (mca_base_component_priority_list_item_t); *selectable_item = *cpli; - ompi_list_append (selectable, (ompi_list_item_t *)selectable_item); + opal_list_append (selectable, (opal_list_item_t *)selectable_item); break; } } @@ -208,7 +208,7 @@ int mca_topo_base_comm_select (struct ompi_communicator_t *comm, /* check for a NULL intersection between the available list and the * list which was asked for */ - if (0 == ompi_list_get_size(selectable)) { + if (0 == opal_list_get_size(selectable)) { was_selectable_constructed = true; OBJ_RELEASE (selectable); ompi_output_verbose (10, mca_topo_base_output, @@ -222,13 +222,13 @@ int mca_topo_base_comm_select (struct ompi_communicator_t *comm, best_component = NULL; best_priority = -1; - OBJ_CONSTRUCT(&queried, ompi_list_t); + OBJ_CONSTRUCT(&queried, opal_list_t); - for (item = ompi_list_get_first(selectable); - item != ompi_list_get_end(selectable); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(selectable); + item != opal_list_get_end(selectable); + item = opal_list_get_next(item)) { /* - * convert the ompi_list_item_t returned into the proper type + * convert the opal_list_item_t returned into the proper type */ cpli = (mca_base_component_priority_list_item_t *) item; component = (mca_topo_base_component_t *) cpli->super.cli_component; @@ -280,7 +280,7 @@ int mca_topo_base_comm_select (struct ompi_communicator_t *comm, } om->om_component = component; om->om_module = module; - ompi_list_append(&queried, (ompi_list_item_t *)om); + opal_list_append(&queried, (opal_list_item_t *)om); } /* end else of if (NULL == module) */ } /* end else of if (NULL == component->topom_init) */ } /* end for ... end of traversal */ @@ -292,10 +292,10 @@ int mca_topo_base_comm_select (struct ompi_communicator_t *comm, if (was_selectable_constructed) { /* remove all the items first */ - for (item = ompi_list_get_first(&mca_topo_base_components_available); - item != ompi_list_get_end(&mca_topo_base_components_available); + for (item = opal_list_get_first(&mca_topo_base_components_available); + item != opal_list_get_end(&mca_topo_base_components_available); item = next_item) { - next_item = ompi_list_get_next(item); + next_item = opal_list_get_next(item); OBJ_RELEASE (item); } @@ -327,9 +327,9 @@ int mca_topo_base_comm_select (struct ompi_communicator_t *comm, * unquery() those components which have not been selected and * init() the component which was selected */ - for (item = ompi_list_remove_first(&queried); + for (item = opal_list_remove_first(&queried); NULL != item; - item = ompi_list_remove_first(&queried)) { + item = opal_list_remove_first(&queried)) { om = (queried_module_t *) item; if (om->om_component == best_component) { /* diff --git a/ompi/mca/topo/base/topo_base_find_available.c b/ompi/mca/topo/base/topo_base_find_available.c index 3e533bd747..2d485ac15f 100644 --- a/ompi/mca/topo/base/topo_base_find_available.c +++ b/ompi/mca/topo/base/topo_base_find_available.c @@ -21,14 +21,14 @@ #include "mpi.h" #include "include/constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/output.h" #include "mca/mca.h" #include "mca/base/base.h" #include "mca/topo/topo.h" #include "mca/topo/base/base.h" -ompi_list_t mca_topo_base_modules_available; +opal_list_t mca_topo_base_modules_available; bool mca_topo_base_modules_available_valid = false; static int init_query(const mca_base_component_t *m, @@ -45,11 +45,11 @@ int mca_topo_base_find_available(bool enable_progress_threads, { bool found = false; mca_base_component_priority_list_item_t *entry; - ompi_list_item_t *p; + opal_list_item_t *p; /* Initialize the list */ - OBJ_CONSTRUCT(&mca_topo_base_components_available, ompi_list_t); + OBJ_CONSTRUCT(&mca_topo_base_components_available, opal_list_t); mca_topo_base_components_available_valid = true; /* The list of components which we should check is already present @@ -57,9 +57,9 @@ int mca_topo_base_find_available(bool enable_progress_threads, mca_topo_base_open */ for (found = false, - p = ompi_list_remove_first (&mca_topo_base_components_opened); + p = opal_list_remove_first (&mca_topo_base_components_opened); NULL != p; - p = ompi_list_remove_first (&mca_topo_base_components_opened)) { + p = opal_list_remove_first (&mca_topo_base_components_opened)) { entry = OBJ_NEW(mca_base_component_priority_list_item_t); entry->super.cli_component = ((mca_base_component_list_item_t *)p)->cli_component; @@ -75,8 +75,8 @@ int mca_topo_base_find_available(bool enable_progress_threads, the initial selection algorithm can negotiate overall thread level for this process */ entry->cpli_priority = 0; - ompi_list_append (&mca_topo_base_components_available, - (ompi_list_item_t *) entry); + opal_list_append (&mca_topo_base_components_available, + (opal_list_item_t *) entry); found = true; } else { /* The component does not want to run, so close it. Its close() diff --git a/ompi/mca/topo/base/topo_base_open.c b/ompi/mca/topo/base/topo_base_open.c index 8650945881..05dee903de 100644 --- a/ompi/mca/topo/base/topo_base_open.c +++ b/ompi/mca/topo/base/topo_base_open.c @@ -20,7 +20,7 @@ #include "include/constants.h" #include "util/output.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/base/base.h" #include "mca/topo/base/base.h" @@ -38,8 +38,8 @@ int mca_topo_base_output = -1; int mca_topo_base_param = -1; -ompi_list_t mca_topo_base_components_available; -ompi_list_t mca_topo_base_components_opened; +opal_list_t mca_topo_base_components_available; +opal_list_t mca_topo_base_components_opened; mca_topo_base_component_t mca_topo_base_selected_component; mca_topo_base_module_t mca_topo; diff --git a/ompi/mpi/c/info_c2f.c b/ompi/mpi/c/info_c2f.c index 6423894136..e37b3a1cf3 100644 --- a/ompi/mpi/c/info_c2f.c +++ b/ompi/mpi/c/info_c2f.c @@ -19,7 +19,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" #include "mpi/f77/fint_2_int.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include "errhandler/errhandler.h" #include "communicator/communicator.h" diff --git a/ompi/mpi/c/info_create.c b/ompi/mpi/c/info_create.c index 288fd08363..09ccd6ab84 100644 --- a/ompi/mpi/c/info_create.c +++ b/ompi/mpi/c/info_create.c @@ -18,7 +18,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include "errhandler/errhandler.h" #include "communicator/communicator.h" diff --git a/ompi/mpi/c/info_delete.c b/ompi/mpi/c/info_delete.c index 06f5eaedac..628698c22c 100644 --- a/ompi/mpi/c/info_delete.c +++ b/ompi/mpi/c/info_delete.c @@ -18,7 +18,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include #include diff --git a/ompi/mpi/c/info_dup.c b/ompi/mpi/c/info_dup.c index 3ea51be5a0..878e105451 100644 --- a/ompi/mpi/c/info_dup.c +++ b/ompi/mpi/c/info_dup.c @@ -18,7 +18,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include "errhandler/errhandler.h" #include "communicator/communicator.h" diff --git a/ompi/mpi/c/info_f2c.c b/ompi/mpi/c/info_f2c.c index 86b20e4b1e..09fcf84f79 100644 --- a/ompi/mpi/c/info_f2c.c +++ b/ompi/mpi/c/info_f2c.c @@ -19,7 +19,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" #include "mpi/f77/fint_2_int.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include "errhandler/errhandler.h" #include "communicator/communicator.h" diff --git a/ompi/mpi/c/info_free.c b/ompi/mpi/c/info_free.c index cac73913e3..c253f1af97 100644 --- a/ompi/mpi/c/info_free.c +++ b/ompi/mpi/c/info_free.c @@ -18,7 +18,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include "errhandler/errhandler.h" #include "communicator/communicator.h" diff --git a/ompi/mpi/c/info_get.c b/ompi/mpi/c/info_get.c index 9f398ad4b6..73721efbf7 100644 --- a/ompi/mpi/c/info_get.c +++ b/ompi/mpi/c/info_get.c @@ -18,7 +18,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include "util/strncpy.h" #include diff --git a/ompi/mpi/c/info_get_nkeys.c b/ompi/mpi/c/info_get_nkeys.c index 476ae1349d..a31a837ca4 100644 --- a/ompi/mpi/c/info_get_nkeys.c +++ b/ompi/mpi/c/info_get_nkeys.c @@ -18,7 +18,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include "errhandler/errhandler.h" #include "communicator/communicator.h" diff --git a/ompi/mpi/c/info_get_nthkey.c b/ompi/mpi/c/info_get_nthkey.c index abcf94ce68..27fcfd5dfe 100644 --- a/ompi/mpi/c/info_get_nthkey.c +++ b/ompi/mpi/c/info_get_nthkey.c @@ -18,7 +18,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include #include "errhandler/errhandler.h" diff --git a/ompi/mpi/c/info_get_valuelen.c b/ompi/mpi/c/info_get_valuelen.c index 2a574bf4f8..624c48d275 100644 --- a/ompi/mpi/c/info_get_valuelen.c +++ b/ompi/mpi/c/info_get_valuelen.c @@ -18,7 +18,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include #include diff --git a/ompi/mpi/c/info_set.c b/ompi/mpi/c/info_set.c index 467f77f9b6..23d8ab2a96 100644 --- a/ompi/mpi/c/info_set.c +++ b/ompi/mpi/c/info_set.c @@ -18,7 +18,7 @@ #include "mpi.h" #include "mpi/c/bindings.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "info/info.h" #include #include diff --git a/ompi/proc/proc.c b/ompi/proc/proc.c index d174504585..ae8539656b 100644 --- a/ompi/proc/proc.c +++ b/ompi/proc/proc.c @@ -28,7 +28,7 @@ #include "mca/pml/pml.h" #include "datatype/convertor.h" -static ompi_list_t ompi_proc_list; +static opal_list_t ompi_proc_list; static ompi_mutex_t ompi_proc_lock; ompi_proc_t* ompi_proc_local_proc = NULL; @@ -38,7 +38,7 @@ static void ompi_proc_destruct(ompi_proc_t* proc); OBJ_CLASS_INSTANCE( ompi_proc_t, - ompi_list_item_t, + opal_list_item_t, ompi_proc_construct, ompi_proc_destruct ); @@ -55,7 +55,7 @@ void ompi_proc_construct(ompi_proc_t* proc) proc->proc_arch = 0; OMPI_THREAD_LOCK(&ompi_proc_lock); - ompi_list_append(&ompi_proc_list, (ompi_list_item_t*)proc); + opal_list_append(&ompi_proc_list, (opal_list_item_t*)proc); OMPI_THREAD_UNLOCK(&ompi_proc_lock); } @@ -65,7 +65,7 @@ void ompi_proc_destruct(ompi_proc_t* proc) if(proc->proc_modex != NULL) OBJ_RELEASE(proc->proc_modex); OMPI_THREAD_LOCK(&ompi_proc_lock); - ompi_list_remove_item(&ompi_proc_list, (ompi_list_item_t*)proc); + opal_list_remove_item(&ompi_proc_list, (opal_list_item_t*)proc); OMPI_THREAD_UNLOCK(&ompi_proc_lock); OBJ_DESTRUCT(&proc->proc_lock); } @@ -77,7 +77,7 @@ int ompi_proc_init(void) size_t i, npeers, self; int rc; - OBJ_CONSTRUCT(&ompi_proc_list, ompi_list_t); + OBJ_CONSTRUCT(&ompi_proc_list, opal_list_t); OBJ_CONSTRUCT(&ompi_proc_lock, ompi_mutex_t); if(OMPI_SUCCESS != (rc = orte_ns.get_peers(&peers, &npeers, &self))) { @@ -100,14 +100,14 @@ int ompi_proc_finalize (void) { ompi_proc_t *proc, *nextproc, *endproc; - proc = (ompi_proc_t*)ompi_list_get_first(&ompi_proc_list); - nextproc = (ompi_proc_t*)ompi_list_get_next(proc); - endproc = (ompi_proc_t*)ompi_list_get_end(&ompi_proc_list); + proc = (ompi_proc_t*)opal_list_get_first(&ompi_proc_list); + nextproc = (ompi_proc_t*)opal_list_get_next(proc); + endproc = (ompi_proc_t*)opal_list_get_end(&ompi_proc_list); OBJ_RELEASE(proc); while ( nextproc != endproc ) { proc = nextproc; - nextproc = (ompi_proc_t *)ompi_list_get_next(proc); + nextproc = (ompi_proc_t *)opal_list_get_next(proc); OBJ_RELEASE(proc); } OBJ_DESTRUCT(&ompi_proc_list); @@ -118,7 +118,7 @@ int ompi_proc_finalize (void) ompi_proc_t** ompi_proc_world(size_t *size) { ompi_proc_t **procs = - (ompi_proc_t**) malloc(ompi_list_get_size(&ompi_proc_list) * sizeof(ompi_proc_t*)); + (ompi_proc_t**) malloc(opal_list_get_size(&ompi_proc_list) * sizeof(ompi_proc_t*)); ompi_proc_t *proc; size_t count = 0; @@ -127,9 +127,9 @@ ompi_proc_t** ompi_proc_world(size_t *size) /* return only the procs that match this jobid */ OMPI_THREAD_LOCK(&ompi_proc_lock); - for(proc = (ompi_proc_t*)ompi_list_get_first(&ompi_proc_list); - proc != (ompi_proc_t*)ompi_list_get_end(&ompi_proc_list); - proc = (ompi_proc_t*)ompi_list_get_next(proc)) { + for(proc = (ompi_proc_t*)opal_list_get_first(&ompi_proc_list); + proc != (ompi_proc_t*)opal_list_get_end(&ompi_proc_list); + proc = (ompi_proc_t*)opal_list_get_next(proc)) { /* TSW - FIX */ procs[count++] = proc; } @@ -142,7 +142,7 @@ ompi_proc_t** ompi_proc_world(size_t *size) ompi_proc_t** ompi_proc_all(size_t* size) { ompi_proc_t **procs = - (ompi_proc_t**) malloc(ompi_list_get_size(&ompi_proc_list) * sizeof(ompi_proc_t*)); + (ompi_proc_t**) malloc(opal_list_get_size(&ompi_proc_list) * sizeof(ompi_proc_t*)); ompi_proc_t *proc; size_t count = 0; @@ -150,9 +150,9 @@ ompi_proc_t** ompi_proc_all(size_t* size) return NULL; OMPI_THREAD_LOCK(&ompi_proc_lock); - for(proc = (ompi_proc_t*)ompi_list_get_first(&ompi_proc_list); - proc != (ompi_proc_t*)ompi_list_get_end(&ompi_proc_list); - proc = (ompi_proc_t*)ompi_list_get_next(proc)) { + for(proc = (ompi_proc_t*)opal_list_get_first(&ompi_proc_list); + proc != (ompi_proc_t*)opal_list_get_end(&ompi_proc_list); + proc = (ompi_proc_t*)opal_list_get_next(proc)) { OBJ_RETAIN(proc); procs[count++] = proc; } @@ -182,9 +182,9 @@ ompi_proc_t * ompi_proc_find ( const orte_process_name_t * name ) mask = ORTE_NS_CMP_CELLID | ORTE_NS_CMP_JOBID | ORTE_NS_CMP_VPID; OMPI_THREAD_LOCK(&ompi_proc_lock); - for(proc = (ompi_proc_t*)ompi_list_get_first(&ompi_proc_list); - proc != (ompi_proc_t*)ompi_list_get_end(&ompi_proc_list); - proc = (ompi_proc_t*)ompi_list_get_next(proc)) { + for(proc = (ompi_proc_t*)opal_list_get_first(&ompi_proc_list); + proc != (ompi_proc_t*)opal_list_get_end(&ompi_proc_list); + proc = (ompi_proc_t*)opal_list_get_next(proc)) { if (orte_ns.compare(mask, &proc->proc_name, name) == 0) { rproc = proc; break; @@ -203,9 +203,9 @@ ompi_proc_t * ompi_proc_find_and_add ( const orte_process_name_t * name, bool* i /* return the proc-struct which matches this jobid+process id */ mask = ORTE_NS_CMP_CELLID | ORTE_NS_CMP_JOBID | ORTE_NS_CMP_VPID; OMPI_THREAD_LOCK(&ompi_proc_lock); - for(proc = (ompi_proc_t*)ompi_list_get_first(&ompi_proc_list); - proc != (ompi_proc_t*)ompi_list_get_end(&ompi_proc_list); - proc = (ompi_proc_t*)ompi_list_get_next(proc)) { + for(proc = (ompi_proc_t*)opal_list_get_first(&ompi_proc_list); + proc != (ompi_proc_t*)opal_list_get_end(&ompi_proc_list); + proc = (ompi_proc_t*)opal_list_get_next(proc)) { if(orte_ns.compare(mask, &proc->proc_name, name) == 0) { *isnew = false; rproc = proc; diff --git a/ompi/proc/proc.h b/ompi/proc/proc.h index bd39b99252..405583af6f 100644 --- a/ompi/proc/proc.h +++ b/ompi/proc/proc.h @@ -18,7 +18,7 @@ #define OMPI_PROC #include "include/types.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "dps/dps_types.h" #include "threads/mutex.h" @@ -30,7 +30,7 @@ extern "C" { OMPI_DECLSPEC extern opal_class_t ompi_proc_t_class; struct ompi_proc_t { - ompi_list_item_t super; /* allow proc to be placed on a list */ + opal_list_item_t super; /* allow proc to be placed on a list */ orte_process_name_t proc_name; struct mca_pml_proc_t* proc_pml; /* PML specific proc data */ opal_object_t* proc_modex; /* MCA module exchange data */ diff --git a/ompi/request/request.c b/ompi/request/request.c index 0ffed5aa1b..7445f75e07 100644 --- a/ompi/request/request.c +++ b/ompi/request/request.c @@ -56,7 +56,7 @@ static int ompi_request_null_cancel(ompi_request_t* request, int flag) OBJ_CLASS_INSTANCE( ompi_request_t, - ompi_list_item_t, + opal_list_item_t, ompi_request_construct, ompi_request_destruct); diff --git a/ompi/request/request.h b/ompi/request/request.h index 436fda0656..2bbbbd0572 100644 --- a/ompi/request/request.h +++ b/ompi/request/request.h @@ -23,7 +23,7 @@ #define OMPI_REQUEST_H #include "mpi.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_pointer_array.h" #include "errhandler/errhandler.h" #include "runtime/ompi_progress.h" @@ -82,7 +82,7 @@ typedef int (*ompi_request_cancel_fn_t)(struct ompi_request_t* request, int flag * Main top-level request struct definition */ struct ompi_request_t { - ompi_list_item_t super; /**< Base type */ + opal_list_item_t super; /**< Base type */ ompi_request_type_t req_type; /**< Enum indicating the type of the request */ ompi_status_public_t req_status; /**< Completion status */ volatile bool req_complete; /**< Flag indicating wether request has completed */ diff --git a/ompi/tools/ompi_info/ompi_info.h b/ompi/tools/ompi_info/ompi_info.h index af901a31b5..76ef984a47 100644 --- a/ompi/tools/ompi_info/ompi_info.h +++ b/ompi/tools/ompi_info/ompi_info.h @@ -21,7 +21,7 @@ #include #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/cmd_line.h" #include "mca/mca.h" @@ -99,7 +99,7 @@ namespace ompi_info { // Component-related functions // - typedef std::map component_map_t; + typedef std::map component_map_t; extern component_map_t component_map; diff --git a/ompi/tools/ompi_info/param.cc b/ompi/tools/ompi_info/param.cc index 87b26fc95e..c77c791d79 100644 --- a/ompi/tools/ompi_info/param.cc +++ b/ompi/tools/ompi_info/param.cc @@ -119,16 +119,16 @@ void ompi_info::do_params(bool want_all, bool want_internal) void ompi_info::show_mca_params(const string& type, const string& component, const string& param, bool want_internal) { - ompi_list_t *info; - ompi_list_item_t *i; + opal_list_t *info; + opal_list_item_t *i; mca_base_param_info_t *p; char *value_string, empty[] = "\0"; string message, content; int value_int; mca_base_param_dump(&info, want_internal); - for (i = ompi_list_get_first(info); i != ompi_list_get_last(info); - i = ompi_list_get_next(i)) { + for (i = opal_list_get_first(info); i != opal_list_get_last(info); + i = opal_list_get_next(i)) { p = (mca_base_param_info_t*) i; if (type == p->mbpp_type_name) { diff --git a/ompi/tools/ompi_info/version.cc b/ompi/tools/ompi_info/version.cc index c9f0c0e676..14637e5966 100644 --- a/ompi/tools/ompi_info/version.cc +++ b/ompi/tools/ompi_info/version.cc @@ -142,10 +142,10 @@ void ompi_info::show_component_version(const string& type_name, ompi_info::type_vector_t::size_type i; bool want_all_components = (type_all == component_name); bool found; - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; const mca_base_component_t *component; - ompi_list_t *components; + opal_list_t *components; // Check to see if the type is valid @@ -167,9 +167,9 @@ void ompi_info::show_component_version(const string& type_name, components = component_map[type_name]; if (NULL != components) { - for (item = ompi_list_get_first(components); - ompi_list_get_end(components) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(components); + opal_list_get_end(components) != item; + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = cli->cli_component; if (want_all_components || diff --git a/opal/class/Makefile.am b/opal/class/Makefile.am index cbb394c2bf..9b67dbe5cc 100644 --- a/opal/class/Makefile.am +++ b/opal/class/Makefile.am @@ -24,7 +24,7 @@ noinst_LTLIBRARIES = libclass.la headers = \ opal_free_list.h \ ompi_hash_table.h \ - ompi_list.h \ + opal_list.h \ opal_object.h \ ompi_value_array.h @@ -32,7 +32,7 @@ libclass_la_SOURCES = \ $(headers) \ opal_free_list.c \ ompi_hash_table.c \ - ompi_list.c \ + opal_list.c \ opal_object.c \ ompi_value_array.c diff --git a/opal/class/ompi_hash_table.c b/opal/class/ompi_hash_table.c index a3a7ebd9b6..d90d037e06 100644 --- a/opal/class/ompi_hash_table.c +++ b/opal/class/ompi_hash_table.c @@ -21,7 +21,7 @@ #include "include/constants.h" #include "util/output.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_hash_table.h" /* @@ -44,7 +44,7 @@ OBJ_CLASS_INSTANCE( static void ompi_hash_table_construct(ompi_hash_table_t* ht) { - OBJ_CONSTRUCT(&ht->ht_nodes, ompi_list_t); + OBJ_CONSTRUCT(&ht->ht_nodes, opal_list_t); ht->ht_table = NULL; ht->ht_table_size = 0; ht->ht_size = 0; @@ -76,13 +76,13 @@ int ompi_hash_table_init(ompi_hash_table_t* ht, size_t table_size) } ht->ht_mask = power2-1; - ht->ht_table = (ompi_list_t *)malloc(power2 * sizeof(ompi_list_t)); + ht->ht_table = (opal_list_t *)malloc(power2 * sizeof(opal_list_t)); if(NULL == ht->ht_table) { return OMPI_ERR_OUT_OF_RESOURCE; } for(i=ht->ht_table_size; iht_table+i; - OBJ_CONSTRUCT(list, ompi_list_t); + opal_list_t* list = ht->ht_table+i; + OBJ_CONSTRUCT(list, opal_list_t); } ht->ht_table_size = power2; return OMPI_SUCCESS; @@ -92,15 +92,15 @@ int ompi_hash_table_remove_all(ompi_hash_table_t* ht) { size_t i; for(i=0; iht_table_size; i++) { - ompi_list_t* list = ht->ht_table+i; - while(ompi_list_get_size(list)) { - ompi_list_item_t *item = ompi_list_remove_first(list); + opal_list_t* list = ht->ht_table+i; + while(opal_list_get_size(list)) { + opal_list_item_t *item = opal_list_remove_first(list); OBJ_RELEASE(item); } } - while(ompi_list_get_size(&ht->ht_nodes)) { - ompi_list_item_t* item = ompi_list_remove_first(&ht->ht_nodes); + while(opal_list_get_size(&ht->ht_nodes)) { + opal_list_item_t* item = opal_list_remove_first(&ht->ht_nodes); OBJ_RELEASE(item); } ht->ht_size = 0; @@ -115,14 +115,14 @@ int ompi_hash_table_remove_all(ompi_hash_table_t* ht) struct ompi_uint32_hash_node_t { - ompi_list_item_t super; + opal_list_item_t super; uint32_t hn_key; void *hn_value; }; typedef struct ompi_uint32_hash_node_t ompi_uint32_hash_node_t; static OBJ_CLASS_INSTANCE(ompi_uint32_hash_node_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL); @@ -130,7 +130,7 @@ static OBJ_CLASS_INSTANCE(ompi_uint32_hash_node_t, int ompi_hash_table_get_value_uint32(ompi_hash_table_t* ht, uint32_t key, void **ptr) { - ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + opal_list_t* list = ht->ht_table + (key & ht->ht_mask); ompi_uint32_hash_node_t *node; #if OMPI_ENABLE_DEBUG @@ -140,9 +140,9 @@ int ompi_hash_table_get_value_uint32(ompi_hash_table_t* ht, uint32_t key, return OMPI_ERROR; } #endif - for(node = (ompi_uint32_hash_node_t*)ompi_list_get_first(list); - node != (ompi_uint32_hash_node_t*)ompi_list_get_end(list); - node = (ompi_uint32_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_uint32_hash_node_t*)opal_list_get_first(list); + node != (ompi_uint32_hash_node_t*)opal_list_get_end(list); + node = (ompi_uint32_hash_node_t*)opal_list_get_next(node)) { if (node->hn_key == key) { *ptr = node->hn_value; return OMPI_SUCCESS; @@ -155,7 +155,7 @@ int ompi_hash_table_get_value_uint32(ompi_hash_table_t* ht, uint32_t key, int ompi_hash_table_set_value_uint32(ompi_hash_table_t* ht, uint32_t key, void* value) { - ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + opal_list_t* list = ht->ht_table + (key & ht->ht_mask); ompi_uint32_hash_node_t *node; #if OMPI_ENABLE_DEBUG @@ -165,16 +165,16 @@ int ompi_hash_table_set_value_uint32(ompi_hash_table_t* ht, return OMPI_ERR_BAD_PARAM; } #endif - for(node = (ompi_uint32_hash_node_t*)ompi_list_get_first(list); - node != (ompi_uint32_hash_node_t*)ompi_list_get_end(list); - node = (ompi_uint32_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_uint32_hash_node_t*)opal_list_get_first(list); + node != (ompi_uint32_hash_node_t*)opal_list_get_end(list); + node = (ompi_uint32_hash_node_t*)opal_list_get_next(node)) { if (node->hn_key == key) { node->hn_value = value; return OMPI_SUCCESS; } } - node = (ompi_uint32_hash_node_t*)ompi_list_remove_first(&ht->ht_nodes); + node = (ompi_uint32_hash_node_t*)opal_list_remove_first(&ht->ht_nodes); if(NULL == node) { node = OBJ_NEW(ompi_uint32_hash_node_t); if(NULL == node) @@ -182,7 +182,7 @@ int ompi_hash_table_set_value_uint32(ompi_hash_table_t* ht, } node->hn_key = key; node->hn_value = value; - ompi_list_append(list, (ompi_list_item_t*)node); + opal_list_append(list, (opal_list_item_t*)node); ht->ht_size++; return OMPI_SUCCESS; } @@ -190,7 +190,7 @@ int ompi_hash_table_set_value_uint32(ompi_hash_table_t* ht, int ompi_hash_table_remove_value_uint32(ompi_hash_table_t* ht, uint32_t key) { - ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + opal_list_t* list = ht->ht_table + (key & ht->ht_mask); ompi_uint32_hash_node_t *node; #if OMPI_ENABLE_DEBUG @@ -200,12 +200,12 @@ int ompi_hash_table_remove_value_uint32(ompi_hash_table_t* ht, uint32_t key) return OMPI_ERR_BAD_PARAM; } #endif - for(node = (ompi_uint32_hash_node_t*)ompi_list_get_first(list); - node != (ompi_uint32_hash_node_t*)ompi_list_get_end(list); - node = (ompi_uint32_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_uint32_hash_node_t*)opal_list_get_first(list); + node != (ompi_uint32_hash_node_t*)opal_list_get_end(list); + node = (ompi_uint32_hash_node_t*)opal_list_get_next(node)) { if (node->hn_key == key) { - ompi_list_remove_item(list, (ompi_list_item_t*)node); - ompi_list_append(&ht->ht_nodes, (ompi_list_item_t*)node); + opal_list_remove_item(list, (opal_list_item_t*)node); + opal_list_append(&ht->ht_nodes, (opal_list_item_t*)node); ht->ht_size--; return OMPI_SUCCESS; } @@ -221,14 +221,14 @@ int ompi_hash_table_remove_value_uint32(ompi_hash_table_t* ht, uint32_t key) struct ompi_uint64_hash_node_t { - ompi_list_item_t super; + opal_list_item_t super; uint64_t hn_key; void* hn_value; }; typedef struct ompi_uint64_hash_node_t ompi_uint64_hash_node_t; static OBJ_CLASS_INSTANCE(ompi_uint64_hash_node_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL); @@ -236,7 +236,7 @@ static OBJ_CLASS_INSTANCE(ompi_uint64_hash_node_t, int ompi_hash_table_get_value_uint64(ompi_hash_table_t* ht, uint64_t key, void **ptr) { - ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + opal_list_t* list = ht->ht_table + (key & ht->ht_mask); ompi_uint64_hash_node_t *node; #if OMPI_ENABLE_DEBUG @@ -246,9 +246,9 @@ int ompi_hash_table_get_value_uint64(ompi_hash_table_t* ht, uint64_t key, return OMPI_ERROR; } #endif - for(node = (ompi_uint64_hash_node_t*)ompi_list_get_first(list); - node != (ompi_uint64_hash_node_t*)ompi_list_get_end(list); - node = (ompi_uint64_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_uint64_hash_node_t*)opal_list_get_first(list); + node != (ompi_uint64_hash_node_t*)opal_list_get_end(list); + node = (ompi_uint64_hash_node_t*)opal_list_get_next(node)) { if (node->hn_key == key) { *ptr = node->hn_value; return OMPI_SUCCESS; @@ -261,7 +261,7 @@ int ompi_hash_table_get_value_uint64(ompi_hash_table_t* ht, uint64_t key, int ompi_hash_table_set_value_uint64(ompi_hash_table_t* ht, uint64_t key, void* value) { - ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + opal_list_t* list = ht->ht_table + (key & ht->ht_mask); ompi_uint64_hash_node_t *node; #if OMPI_ENABLE_DEBUG @@ -271,16 +271,16 @@ int ompi_hash_table_set_value_uint64(ompi_hash_table_t* ht, return OMPI_ERR_BAD_PARAM; } #endif - for(node = (ompi_uint64_hash_node_t*)ompi_list_get_first(list); - node != (ompi_uint64_hash_node_t*)ompi_list_get_end(list); - node = (ompi_uint64_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_uint64_hash_node_t*)opal_list_get_first(list); + node != (ompi_uint64_hash_node_t*)opal_list_get_end(list); + node = (ompi_uint64_hash_node_t*)opal_list_get_next(node)) { if (node->hn_key == key) { node->hn_value = value; return OMPI_SUCCESS; } } - node = (ompi_uint64_hash_node_t*)ompi_list_remove_first(&ht->ht_nodes); + node = (ompi_uint64_hash_node_t*)opal_list_remove_first(&ht->ht_nodes); if(NULL == node) { node = OBJ_NEW(ompi_uint64_hash_node_t); if(NULL == node) { @@ -289,7 +289,7 @@ int ompi_hash_table_set_value_uint64(ompi_hash_table_t* ht, } node->hn_key = key; node->hn_value = value; - ompi_list_append(list, (ompi_list_item_t*)node); + opal_list_append(list, (opal_list_item_t*)node); ht->ht_size++; return OMPI_SUCCESS; } @@ -297,7 +297,7 @@ int ompi_hash_table_set_value_uint64(ompi_hash_table_t* ht, int ompi_hash_table_remove_value_uint64(ompi_hash_table_t* ht, uint64_t key) { - ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + opal_list_t* list = ht->ht_table + (key & ht->ht_mask); ompi_uint64_hash_node_t *node; #if OMPI_ENABLE_DEBUG @@ -307,12 +307,12 @@ int ompi_hash_table_remove_value_uint64(ompi_hash_table_t* ht, uint64_t key) return OMPI_ERR_BAD_PARAM; } #endif - for(node = (ompi_uint64_hash_node_t*)ompi_list_get_first(list); - node != (ompi_uint64_hash_node_t*)ompi_list_get_end(list); - node = (ompi_uint64_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_uint64_hash_node_t*)opal_list_get_first(list); + node != (ompi_uint64_hash_node_t*)opal_list_get_end(list); + node = (ompi_uint64_hash_node_t*)opal_list_get_next(node)) { if (node->hn_key == key) { - ompi_list_remove_item(list, (ompi_list_item_t*)node); - ompi_list_append(&ht->ht_nodes, (ompi_list_item_t*)node); + opal_list_remove_item(list, (opal_list_item_t*)node); + opal_list_append(&ht->ht_nodes, (opal_list_item_t*)node); ht->ht_size--; return OMPI_SUCCESS; } @@ -328,7 +328,7 @@ int ompi_hash_table_remove_value_uint64(ompi_hash_table_t* ht, uint64_t key) struct ompi_ptr_hash_node_t { - ompi_list_item_t super; + opal_list_item_t super; void* hn_key; size_t hn_key_size; void* hn_value; @@ -350,7 +350,7 @@ static void ompi_ptr_hash_node_destruct(ompi_ptr_hash_node_t* hn) } static OBJ_CLASS_INSTANCE(ompi_ptr_hash_node_t, - ompi_list_item_t, + opal_list_item_t, ompi_ptr_hash_node_construct, ompi_ptr_hash_node_destruct); @@ -371,7 +371,7 @@ static inline uint32_t ompi_hash_value(size_t mask, const void *key, int ompi_hash_table_get_value_ptr(ompi_hash_table_t* ht, const void* key, size_t key_size, void **ptr) { - ompi_list_t* list = ht->ht_table + ompi_hash_value(ht->ht_mask, key, + opal_list_t* list = ht->ht_table + ompi_hash_value(ht->ht_mask, key, key_size); ompi_ptr_hash_node_t *node; @@ -382,9 +382,9 @@ int ompi_hash_table_get_value_ptr(ompi_hash_table_t* ht, const void* key, return OMPI_ERROR; } #endif - for(node = (ompi_ptr_hash_node_t*)ompi_list_get_first(list); - node != (ompi_ptr_hash_node_t*)ompi_list_get_end(list); - node = (ompi_ptr_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_ptr_hash_node_t*)opal_list_get_first(list); + node != (ompi_ptr_hash_node_t*)opal_list_get_end(list); + node = (ompi_ptr_hash_node_t*)opal_list_get_next(node)) { if (node->hn_key_size == key_size && memcmp(node->hn_key, key, key_size) == 0) { *ptr = node->hn_value; @@ -398,7 +398,7 @@ int ompi_hash_table_get_value_ptr(ompi_hash_table_t* ht, const void* key, int ompi_hash_table_set_value_ptr(ompi_hash_table_t* ht, const void* key, size_t key_size, void* value) { - ompi_list_t* list = ht->ht_table + ompi_hash_value(ht->ht_mask, key, + opal_list_t* list = ht->ht_table + ompi_hash_value(ht->ht_mask, key, key_size); ompi_ptr_hash_node_t *node; @@ -409,9 +409,9 @@ int ompi_hash_table_set_value_ptr(ompi_hash_table_t* ht, const void* key, return OMPI_ERR_BAD_PARAM; } #endif - for(node = (ompi_ptr_hash_node_t*)ompi_list_get_first(list); - node != (ompi_ptr_hash_node_t*)ompi_list_get_end(list); - node = (ompi_ptr_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_ptr_hash_node_t*)opal_list_get_first(list); + node != (ompi_ptr_hash_node_t*)opal_list_get_end(list); + node = (ompi_ptr_hash_node_t*)opal_list_get_next(node)) { if (node->hn_key_size == key_size && memcmp(node->hn_key, key, key_size) == 0) { node->hn_value = value; @@ -419,7 +419,7 @@ int ompi_hash_table_set_value_ptr(ompi_hash_table_t* ht, const void* key, } } - node = (ompi_ptr_hash_node_t*)ompi_list_remove_first(&ht->ht_nodes); + node = (ompi_ptr_hash_node_t*)opal_list_remove_first(&ht->ht_nodes); if(NULL == node) { node = OBJ_NEW(ompi_ptr_hash_node_t); if(NULL == node) { @@ -430,7 +430,7 @@ int ompi_hash_table_set_value_ptr(ompi_hash_table_t* ht, const void* key, node->hn_key_size = key_size; node->hn_value = value; memcpy(node->hn_key, key, key_size); - ompi_list_append(list, (ompi_list_item_t*)node); + opal_list_append(list, (opal_list_item_t*)node); ht->ht_size++; return OMPI_SUCCESS; } @@ -439,7 +439,7 @@ int ompi_hash_table_set_value_ptr(ompi_hash_table_t* ht, const void* key, int ompi_hash_table_remove_value_ptr(ompi_hash_table_t* ht, const void* key, size_t key_size) { - ompi_list_t* list = ht->ht_table + ompi_hash_value(ht->ht_mask, + opal_list_t* list = ht->ht_table + ompi_hash_value(ht->ht_mask, key, key_size); ompi_ptr_hash_node_t *node; @@ -450,16 +450,16 @@ int ompi_hash_table_remove_value_ptr(ompi_hash_table_t* ht, return OMPI_ERR_BAD_PARAM; } #endif - for(node = (ompi_ptr_hash_node_t*)ompi_list_get_first(list); - node != (ompi_ptr_hash_node_t*)ompi_list_get_end(list); - node = (ompi_ptr_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_ptr_hash_node_t*)opal_list_get_first(list); + node != (ompi_ptr_hash_node_t*)opal_list_get_end(list); + node = (ompi_ptr_hash_node_t*)opal_list_get_next(node)) { if (node->hn_key_size == key_size && memcmp(node->hn_key, key, key_size) == 0) { free(node->hn_key); node->hn_key = NULL; node->hn_key_size = 0; - ompi_list_remove_item(list, (ompi_list_item_t*)node); - ompi_list_append(&ht->ht_nodes, (ompi_list_item_t*)node); + opal_list_remove_item(list, (opal_list_item_t*)node); + opal_list_append(&ht->ht_nodes, (opal_list_item_t*)node); ht->ht_size--; return OMPI_SUCCESS; } @@ -479,9 +479,9 @@ ompi_hash_table_get_first_key_uint32(ompi_hash_table_t *ht, uint32_t *key, first non-empty list */ for (i = 0; i < ht->ht_table_size; ++i) { - if (ompi_list_get_size(ht->ht_table + i) > 0) { + if (opal_list_get_size(ht->ht_table + i) > 0) { list_node = (ompi_uint32_hash_node_t*) - ompi_list_get_first(ht->ht_table + i); + opal_list_get_first(ht->ht_table + i); *node = list_node; *key = list_node->hn_key; *value = list_node->hn_value; @@ -501,8 +501,8 @@ ompi_hash_table_get_next_key_uint32(ompi_hash_table_t *ht, uint32_t *key, void **out_node) { size_t i; - ompi_list_t *list; - ompi_list_item_t *item; + opal_list_t *list; + opal_list_item_t *item; ompi_uint32_hash_node_t *next; /* Try to simply get the next value in the list. If there isn't @@ -510,12 +510,12 @@ ompi_hash_table_get_next_key_uint32(ompi_hash_table_t *ht, uint32_t *key, next = (ompi_uint32_hash_node_t*) in_node; list = ht->ht_table + (next->hn_key & ht->ht_mask); - item = ompi_list_get_next(next); - if (ompi_list_get_end(list) == item) { + item = opal_list_get_next(next); + if (opal_list_get_end(list) == item) { item = NULL; for (i = (list - ht->ht_table) + 1; i < ht->ht_table_size; ++i) { - if (ompi_list_get_size(ht->ht_table + i) > 0) { - item = ompi_list_get_first(ht->ht_table + i); + if (opal_list_get_size(ht->ht_table + i) > 0) { + item = opal_list_get_first(ht->ht_table + i); break; } } @@ -551,9 +551,9 @@ ompi_hash_table_get_first_key_uint64(ompi_hash_table_t *ht, uint64_t *key, first non-empty list */ for (i = 0; i < ht->ht_table_size; ++i) { - if (ompi_list_get_size(ht->ht_table + i) > 0) { + if (opal_list_get_size(ht->ht_table + i) > 0) { list_node = (ompi_uint64_hash_node_t*) - ompi_list_get_first(ht->ht_table + i); + opal_list_get_first(ht->ht_table + i); *node = list_node; *key = list_node->hn_key; *value = list_node->hn_value; @@ -573,8 +573,8 @@ ompi_hash_table_get_next_key_uint64(ompi_hash_table_t *ht, uint64_t *key, void **out_node) { size_t i; - ompi_list_t *list; - ompi_list_item_t *item; + opal_list_t *list; + opal_list_item_t *item; ompi_uint64_hash_node_t *next; /* Try to simply get the next value in the list. If there isn't @@ -582,12 +582,12 @@ ompi_hash_table_get_next_key_uint64(ompi_hash_table_t *ht, uint64_t *key, next = (ompi_uint64_hash_node_t*) in_node; list = ht->ht_table + (next->hn_key & ht->ht_mask); - item = ompi_list_get_next(next); - if (ompi_list_get_end(list) == item) { + item = opal_list_get_next(next); + if (opal_list_get_end(list) == item) { item = NULL; for (i = (list - ht->ht_table) + 1; i < ht->ht_table_size; ++i) { - if (ompi_list_get_size(ht->ht_table + i) > 0) { - item = ompi_list_get_first(ht->ht_table + i); + if (opal_list_get_size(ht->ht_table + i) > 0) { + item = opal_list_get_first(ht->ht_table + i); break; } } diff --git a/opal/class/ompi_hash_table.h b/opal/class/ompi_hash_table.h index 6f207e9875..4dc2669844 100644 --- a/opal/class/ompi_hash_table.h +++ b/opal/class/ompi_hash_table.h @@ -28,7 +28,7 @@ #include "ompi_config.h" #include "include/types.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #if defined(c_plusplus) || defined(__cplusplus) extern "C" { @@ -40,8 +40,8 @@ OMPI_DECLSPEC extern opal_class_t ompi_hash_table_t_class; struct ompi_hash_table_t { opal_object_t super; /**< subclass of opal_object_t */ - ompi_list_t ht_nodes; /**< free list of hash nodes */ - ompi_list_t *ht_table; /**< each item is an array of ompi_fhnode_t nodes */ + opal_list_t ht_nodes; /**< free list of hash nodes */ + opal_list_t *ht_table; /**< each item is an array of ompi_fhnode_t nodes */ size_t ht_table_size; /**< size of table */ size_t ht_size; /**< number of values on table */ size_t ht_mask; diff --git a/opal/class/ompi_list.c b/opal/class/ompi_list.c deleted file mode 100644 index 9a9daea1f5..0000000000 --- a/opal/class/ompi_list.c +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University. - * All rights reserved. - * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. - * All rights reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" - -#include "include/constants.h" -#include "class/ompi_list.h" - -/* - * List classes - */ - -static void ompi_list_item_construct(ompi_list_item_t*); -static void ompi_list_item_destruct(ompi_list_item_t*); - -opal_class_t ompi_list_item_t_class = { - "ompi_list_item_t", - OBJ_CLASS(opal_object_t), - (opal_construct_t) ompi_list_item_construct, - (opal_destruct_t) ompi_list_item_destruct -}; - -static void ompi_list_construct(ompi_list_t*); -static void ompi_list_destruct(ompi_list_t*); - -OBJ_CLASS_INSTANCE( - ompi_list_t, - opal_object_t, - ompi_list_construct, - ompi_list_destruct -); - - -/* - * - * ompi_list_link_item_t interface - * - */ - -static void ompi_list_item_construct(ompi_list_item_t *item) -{ - item->ompi_list_next = item->ompi_list_prev = NULL; -#if OMPI_ENABLE_DEBUG - item->ompi_list_item_refcount = 0; - item->ompi_list_item_belong_to = NULL; -#endif -} - -static void ompi_list_item_destruct(ompi_list_item_t *item) -{ -#if OMPI_ENABLE_DEBUG - assert( 0 == item->ompi_list_item_refcount ); - assert( NULL == item->ompi_list_item_belong_to ); -#endif /* OMPI_ENABLE_DEBUG */ -} - - -/* - * - * ompi_list_list_t interface - * - */ - -static void ompi_list_construct(ompi_list_t *list) -{ -#if OMPI_ENABLE_DEBUG - /* These refcounts should never be used in assertions because they - should never be removed from this list, added to another list, - etc. So set them to sentinel values. */ - - OBJ_CONSTRUCT( &(list->ompi_list_head), ompi_list_item_t ); - list->ompi_list_head.ompi_list_item_refcount = 1; - list->ompi_list_head.ompi_list_item_belong_to = list; - OBJ_CONSTRUCT( &(list->ompi_list_tail), ompi_list_item_t ); - list->ompi_list_tail.ompi_list_item_refcount = 1; - list->ompi_list_tail.ompi_list_item_belong_to = list; -#endif - - list->ompi_list_head.ompi_list_prev = NULL; - list->ompi_list_head.ompi_list_next = &list->ompi_list_tail; - list->ompi_list_tail.ompi_list_prev = &list->ompi_list_head; - list->ompi_list_tail.ompi_list_next = NULL; - list->ompi_list_length = 0; -} - - -/* - * Reset all the pointers to be NULL -- do not actually destroy - * anything. - */ -static void ompi_list_destruct(ompi_list_t *list) -{ - ompi_list_construct(list); -} - - -/* - * Insert an item at a specific place in a list - */ -bool ompi_list_insert(ompi_list_t *list, ompi_list_item_t *item, long long idx) -{ - /* Adds item to list at index and retains item. */ - int i; - volatile ompi_list_item_t *ptr, *next; - - if ( idx >= (long long)list->ompi_list_length ) { - return false; - } - - if ( 0 == idx ) - { - ompi_list_prepend(list, item); - } - else - { -#if OMPI_ENABLE_DEBUG - /* Spot check: ensure that this item is previously on no - lists */ - - assert(0 == item->ompi_list_item_refcount); -#endif - /* pointer to element 0 */ - ptr = list->ompi_list_head.ompi_list_next; - for ( i = 0; i < idx-1; i++ ) - ptr = ptr->ompi_list_next; - - next = ptr->ompi_list_next; - item->ompi_list_next = next; - item->ompi_list_prev = ptr; - next->ompi_list_prev = item; - ptr->ompi_list_next = item; - -#if OMPI_ENABLE_DEBUG - /* Spot check: ensure this item is only on the list that we - just insertted it into */ - - ompi_atomic_add( &(item->ompi_list_item_refcount), 1 ); - assert(1 == item->ompi_list_item_refcount); - item->ompi_list_item_belong_to = list; -#endif - } - - list->ompi_list_length++; - return true; -} - - -static -void -ompi_list_transfer(ompi_list_item_t *pos, ompi_list_item_t *begin, - ompi_list_item_t *end) -{ - volatile ompi_list_item_t *tmp; - - if (pos != end) { - /* remove [begin, end) */ - end->ompi_list_prev->ompi_list_next = pos; - begin->ompi_list_prev->ompi_list_next = end; - pos->ompi_list_prev->ompi_list_next = begin; - - /* splice into new position before pos */ - tmp = pos->ompi_list_prev; - pos->ompi_list_prev = end->ompi_list_prev; - end->ompi_list_prev = begin->ompi_list_prev; - begin->ompi_list_prev = tmp; -#if OMPI_ENABLE_DEBUG - { - volatile ompi_list_item_t* item = begin; - while( pos != item ) { - item->ompi_list_item_belong_to = pos->ompi_list_item_belong_to; - item = item->ompi_list_next; - assert(NULL != item); - } - } -#endif /* OMPI_ENABLE_DEBUG */ - } -} - - -void -ompi_list_join(ompi_list_t *thislist, ompi_list_item_t *pos, - ompi_list_t *xlist) -{ - if (0 != ompi_list_get_size(xlist)) { - ompi_list_transfer(pos, ompi_list_get_first(xlist), - ompi_list_get_end(xlist)); - - /* fix the sizes */ - thislist->ompi_list_length += xlist->ompi_list_length; - xlist->ompi_list_length = 0; - } -} - - -void -ompi_list_splice(ompi_list_t *thislist, ompi_list_item_t *pos, - ompi_list_t *xlist, ompi_list_item_t *first, - ompi_list_item_t *last) -{ - size_t change = 0; - ompi_list_item_t *tmp; - - if (first != last) { - /* figure out how many things we are going to move (have to do - * first, since last might be end and then we wouldn't be able - * to run the loop) - */ - for (tmp = first ; tmp != last ; tmp = ompi_list_get_next(tmp)) { - change++; - } - - ompi_list_transfer(pos, first, last); - - /* fix the sizes */ - thislist->ompi_list_length += change; - xlist->ompi_list_length -= change; - } -} - - -int ompi_list_sort(ompi_list_t* list, ompi_list_item_compare_fn_t compare) -{ - ompi_list_item_t* item; - ompi_list_item_t** items; - size_t i, index=0; - - if (0 == list->ompi_list_length) { - return OMPI_SUCCESS; - } - items = (ompi_list_item_t**)malloc(sizeof(ompi_list_item_t*) * - list->ompi_list_length); - - if (NULL == items) { - return OMPI_ERR_OUT_OF_RESOURCE; - } - - while(NULL != (item = ompi_list_remove_first(list))) { - items[index++] = item; - } - - qsort(items, index, sizeof(ompi_list_item_t*), - (int(*)(const void*,const void*))compare); - for (i=0; ifl_elem_class) { OBJ_CONSTRUCT_INTERNAL(item, flist->fl_elem_class); } - ompi_list_append(&(flist->super), &(item->super)); + opal_list_append(&(flist->super), &(item->super)); ptr += flist->fl_elem_size; } flist->fl_num_allocated += num_elements; diff --git a/opal/class/opal_free_list.h b/opal/class/opal_free_list.h index d80c0d33c5..f43a1e9bd0 100644 --- a/opal/class/opal_free_list.h +++ b/opal/class/opal_free_list.h @@ -19,7 +19,7 @@ #include "ompi_config.h" -#include "opal/class/ompi_list.h" +#include "opal/class/opal_list.h" #include "opal/threads/thread.h" #include "opal/threads/condition.h" #include "include/constants.h" @@ -32,7 +32,7 @@ OMPI_DECLSPEC extern opal_class_t opal_free_list_t_class; struct opal_free_list_t { - ompi_list_t super; + opal_list_t super; size_t fl_max_to_alloc; size_t fl_num_allocated; size_t fl_num_per_alloc; @@ -46,7 +46,7 @@ typedef struct opal_free_list_t opal_free_list_t; struct opal_free_list_item_t { - ompi_list_item_t super; + opal_list_item_t super; void* user_data; }; typedef struct opal_free_list_item_t opal_free_list_item_t; @@ -89,17 +89,17 @@ OMPI_DECLSPEC int opal_free_list_grow(opal_free_list_t* flist, size_t num_elemen { \ if(ompi_using_threads()) { \ ompi_mutex_lock(&((fl)->fl_lock)); \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ if(NULL == item) { \ opal_free_list_grow((fl), (fl)->fl_num_per_alloc); \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ } \ ompi_mutex_unlock(&((fl)->fl_lock)); \ } else { \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ if(NULL == item) { \ opal_free_list_grow((fl), (fl)->fl_num_per_alloc); \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ } \ } \ rc = (NULL == item) ? OMPI_ERR_TEMP_OUT_OF_RESOURCE : OMPI_SUCCESS; \ @@ -122,7 +122,7 @@ OMPI_DECLSPEC int opal_free_list_grow(opal_free_list_t* flist, size_t num_elemen #define OPAL_FREE_LIST_WAIT(fl, item, rc) \ { \ OMPI_THREAD_LOCK(&((fl)->fl_lock)); \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ while(NULL == item) { \ if((fl)->fl_max_to_alloc <= (fl)->fl_num_allocated) { \ (fl)->fl_num_waiting++; \ @@ -131,7 +131,7 @@ OMPI_DECLSPEC int opal_free_list_grow(opal_free_list_t* flist, size_t num_elemen } else { \ opal_free_list_grow((fl), (fl)->fl_num_per_alloc); \ } \ - item = ompi_list_remove_first(&((fl)->super)); \ + item = opal_list_remove_first(&((fl)->super)); \ } \ OMPI_THREAD_UNLOCK(&((fl)->fl_lock)); \ rc = (NULL == item) ? OMPI_ERR_OUT_OF_RESOURCE : OMPI_SUCCESS; \ @@ -149,7 +149,7 @@ OMPI_DECLSPEC int opal_free_list_grow(opal_free_list_t* flist, size_t num_elemen #define OPAL_FREE_LIST_RETURN(fl, item) \ { \ OMPI_THREAD_LOCK(&(fl)->fl_lock); \ - ompi_list_prepend(&((fl)->super), (item)); \ + opal_list_prepend(&((fl)->super), (item)); \ if((fl)->fl_num_waiting > 0) { \ ompi_condition_signal(&((fl)->fl_condition)); \ } \ diff --git a/opal/class/opal_list.c b/opal/class/opal_list.c new file mode 100644 index 0000000000..e2b8a0d1e4 --- /dev/null +++ b/opal/class/opal_list.c @@ -0,0 +1,261 @@ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University. + * All rights reserved. + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "include/constants.h" +#include "opal/class/opal_list.h" + +/* + * List classes + */ + +static void opal_list_item_construct(opal_list_item_t*); +static void opal_list_item_destruct(opal_list_item_t*); + +opal_class_t opal_list_item_t_class = { + "opal_list_item_t", + OBJ_CLASS(opal_object_t), + (opal_construct_t) opal_list_item_construct, + (opal_destruct_t) opal_list_item_destruct +}; + +static void opal_list_construct(opal_list_t*); +static void opal_list_destruct(opal_list_t*); + +OBJ_CLASS_INSTANCE( + opal_list_t, + opal_object_t, + opal_list_construct, + opal_list_destruct +); + + +/* + * + * opal_list_link_item_t interface + * + */ + +static void opal_list_item_construct(opal_list_item_t *item) +{ + item->opal_list_next = item->opal_list_prev = NULL; +#if OMPI_ENABLE_DEBUG + item->opal_list_item_refcount = 0; + item->opal_list_item_belong_to = NULL; +#endif +} + +static void opal_list_item_destruct(opal_list_item_t *item) +{ +#if OMPI_ENABLE_DEBUG + assert( 0 == item->opal_list_item_refcount ); + assert( NULL == item->opal_list_item_belong_to ); +#endif /* OMPI_ENABLE_DEBUG */ +} + + +/* + * + * opal_list_list_t interface + * + */ + +static void opal_list_construct(opal_list_t *list) +{ +#if OMPI_ENABLE_DEBUG + /* These refcounts should never be used in assertions because they + should never be removed from this list, added to another list, + etc. So set them to sentinel values. */ + + OBJ_CONSTRUCT( &(list->opal_list_head), opal_list_item_t ); + list->opal_list_head.opal_list_item_refcount = 1; + list->opal_list_head.opal_list_item_belong_to = list; + OBJ_CONSTRUCT( &(list->opal_list_tail), opal_list_item_t ); + list->opal_list_tail.opal_list_item_refcount = 1; + list->opal_list_tail.opal_list_item_belong_to = list; +#endif + + list->opal_list_head.opal_list_prev = NULL; + list->opal_list_head.opal_list_next = &list->opal_list_tail; + list->opal_list_tail.opal_list_prev = &list->opal_list_head; + list->opal_list_tail.opal_list_next = NULL; + list->opal_list_length = 0; +} + + +/* + * Reset all the pointers to be NULL -- do not actually destroy + * anything. + */ +static void opal_list_destruct(opal_list_t *list) +{ + opal_list_construct(list); +} + + +/* + * Insert an item at a specific place in a list + */ +bool opal_list_insert(opal_list_t *list, opal_list_item_t *item, long long idx) +{ + /* Adds item to list at index and retains item. */ + int i; + volatile opal_list_item_t *ptr, *next; + + if ( idx >= (long long)list->opal_list_length ) { + return false; + } + + if ( 0 == idx ) + { + opal_list_prepend(list, item); + } + else + { +#if OMPI_ENABLE_DEBUG + /* Spot check: ensure that this item is previously on no + lists */ + + assert(0 == item->opal_list_item_refcount); +#endif + /* pointer to element 0 */ + ptr = list->opal_list_head.opal_list_next; + for ( i = 0; i < idx-1; i++ ) + ptr = ptr->opal_list_next; + + next = ptr->opal_list_next; + item->opal_list_next = next; + item->opal_list_prev = ptr; + next->opal_list_prev = item; + ptr->opal_list_next = item; + +#if OMPI_ENABLE_DEBUG + /* Spot check: ensure this item is only on the list that we + just insertted it into */ + + ompi_atomic_add( &(item->opal_list_item_refcount), 1 ); + assert(1 == item->opal_list_item_refcount); + item->opal_list_item_belong_to = list; +#endif + } + + list->opal_list_length++; + return true; +} + + +static +void +opal_list_transfer(opal_list_item_t *pos, opal_list_item_t *begin, + opal_list_item_t *end) +{ + volatile opal_list_item_t *tmp; + + if (pos != end) { + /* remove [begin, end) */ + end->opal_list_prev->opal_list_next = pos; + begin->opal_list_prev->opal_list_next = end; + pos->opal_list_prev->opal_list_next = begin; + + /* splice into new position before pos */ + tmp = pos->opal_list_prev; + pos->opal_list_prev = end->opal_list_prev; + end->opal_list_prev = begin->opal_list_prev; + begin->opal_list_prev = tmp; +#if OMPI_ENABLE_DEBUG + { + volatile opal_list_item_t* item = begin; + while( pos != item ) { + item->opal_list_item_belong_to = pos->opal_list_item_belong_to; + item = item->opal_list_next; + assert(NULL != item); + } + } +#endif /* OMPI_ENABLE_DEBUG */ + } +} + + +void +opal_list_join(opal_list_t *thislist, opal_list_item_t *pos, + opal_list_t *xlist) +{ + if (0 != opal_list_get_size(xlist)) { + opal_list_transfer(pos, opal_list_get_first(xlist), + opal_list_get_end(xlist)); + + /* fix the sizes */ + thislist->opal_list_length += xlist->opal_list_length; + xlist->opal_list_length = 0; + } +} + + +void +opal_list_splice(opal_list_t *thislist, opal_list_item_t *pos, + opal_list_t *xlist, opal_list_item_t *first, + opal_list_item_t *last) +{ + size_t change = 0; + opal_list_item_t *tmp; + + if (first != last) { + /* figure out how many things we are going to move (have to do + * first, since last might be end and then we wouldn't be able + * to run the loop) + */ + for (tmp = first ; tmp != last ; tmp = opal_list_get_next(tmp)) { + change++; + } + + opal_list_transfer(pos, first, last); + + /* fix the sizes */ + thislist->opal_list_length += change; + xlist->opal_list_length -= change; + } +} + + +int opal_list_sort(opal_list_t* list, opal_list_item_compare_fn_t compare) +{ + opal_list_item_t* item; + opal_list_item_t** items; + size_t i, index=0; + + if (0 == list->opal_list_length) { + return OMPI_SUCCESS; + } + items = (opal_list_item_t**)malloc(sizeof(opal_list_item_t*) * + list->opal_list_length); + + if (NULL == items) { + return OMPI_ERR_OUT_OF_RESOURCE; + } + + while(NULL != (item = opal_list_remove_first(list))) { + items[index++] = item; + } + + qsort(items, index, sizeof(opal_list_item_t*), + (int(*)(const void*,const void*))compare); + for (i=0; i #include @@ -78,40 +78,40 @@ extern "C" { * * The class for the list container. */ -OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_list_t); +OMPI_DECLSPEC OBJ_CLASS_DECLARATION(opal_list_t); /** * \internal * - * Base class for items that are put in list (ompi_list_t) containers. + * Base class for items that are put in list (opal_list_t) containers. */ -OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_list_item_t); +OMPI_DECLSPEC OBJ_CLASS_DECLARATION(opal_list_item_t); /** * \internal * - * Struct of an ompi_list_item_t + * Struct of an opal_list_item_t */ -struct ompi_list_item_t +struct opal_list_item_t { opal_object_t super; /**< Generic parent class for all Open MPI objects */ - volatile struct ompi_list_item_t *ompi_list_next; + volatile struct opal_list_item_t *opal_list_next; /**< Pointer to next list item */ - volatile struct ompi_list_item_t *ompi_list_prev; + volatile struct opal_list_item_t *opal_list_prev; /**< Pointer to previous list item */ #if OMPI_ENABLE_DEBUG /** Atomic reference count for debugging */ - volatile int32_t ompi_list_item_refcount; + volatile int32_t opal_list_item_refcount; /** The list this item belong to */ - volatile struct ompi_list_t* ompi_list_item_belong_to; + volatile struct opal_list_t* opal_list_item_belong_to; #endif }; /** - * Base type for items that are put in a list (ompi_list_t) containers. + * Base type for items that are put in a list (opal_list_t) containers. */ -typedef struct ompi_list_item_t ompi_list_item_t; +typedef struct opal_list_item_t opal_list_item_t; /** @@ -121,8 +121,8 @@ typedef struct ompi_list_item_t ompi_list_item_t; * * @returns The next item in the list */ -#define ompi_list_get_next(item) \ - ((item) ? ((ompi_list_item_t*) ((ompi_list_item_t*)(item))->ompi_list_next) : NULL) +#define opal_list_get_next(item) \ + ((item) ? ((opal_list_item_t*) ((opal_list_item_t*)(item))->opal_list_next) : NULL) /** * Get the next item in a list. @@ -131,30 +131,30 @@ typedef struct ompi_list_item_t ompi_list_item_t; * * @returns The next item in the list */ -#define ompi_list_get_prev(item) \ - ((item) ? ((ompi_list_item_t*) ((ompi_list_item_t*)(item))->ompi_list_prev) : NULL) +#define opal_list_get_prev(item) \ + ((item) ? ((opal_list_item_t*) ((opal_list_item_t*)(item))->opal_list_prev) : NULL) /** * \internal * - * Struct of an ompi_list_t + * Struct of an opal_list_t */ -struct ompi_list_t +struct opal_list_t { opal_object_t super; /**< Generic parent class for all Open MPI objects */ - ompi_list_item_t ompi_list_head; + opal_list_item_t opal_list_head; /**< Head item of the list */ - ompi_list_item_t ompi_list_tail; + opal_list_item_t opal_list_tail; /**< Tail item of the list */ - volatile size_t ompi_list_length; + volatile size_t opal_list_length; /**< Quick reference to the number of items in the list */ }; /** * List container type. */ -typedef struct ompi_list_t ompi_list_t; +typedef struct opal_list_t opal_list_t; /** @@ -169,10 +169,10 @@ typedef struct ompi_list_t ompi_list_t; * This is an inlined function in compilers that support inlining, * so it's usually a cheap operation. */ -static inline bool ompi_list_is_empty(ompi_list_t* list) +static inline bool opal_list_is_empty(opal_list_t* list) { - return (list->ompi_list_head.ompi_list_next == - &(list->ompi_list_tail)); + return (list->opal_list_head.opal_list_next == + &(list->opal_list_tail)); } @@ -185,19 +185,19 @@ static inline bool ompi_list_is_empty(ompi_list_t* list) * * This is an O(1) operation to return the first item on the list. It * should be compared against the returned value from - * ompi_list_get_end() to ensure that the list is not empty. + * opal_list_get_end() to ensure that the list is not empty. * * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. */ -static inline ompi_list_item_t* ompi_list_get_first(ompi_list_t* list) +static inline opal_list_item_t* opal_list_get_first(opal_list_t* list) { - ompi_list_item_t* item = (ompi_list_item_t *)list->ompi_list_head.ompi_list_next; + opal_list_item_t* item = (opal_list_item_t *)list->opal_list_head.opal_list_next; #if OMPI_ENABLE_DEBUG /* Spot check: ensure that the first item is only on one list */ - assert(1 == item->ompi_list_item_refcount); - assert( list == item->ompi_list_item_belong_to ); + assert(1 == item->opal_list_item_refcount); + assert( list == item->opal_list_item_belong_to ); #endif return item; @@ -212,19 +212,19 @@ static inline ompi_list_item_t* ompi_list_get_first(ompi_list_t* list) * * This is an O(1) operation to return the last item on the list. It * should be compared against the returned value from - * ompi_list_get_begin() to ensure that the list is not empty. + * opal_list_get_begin() to ensure that the list is not empty. * * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. */ -static inline ompi_list_item_t* ompi_list_get_last(ompi_list_t* list) +static inline opal_list_item_t* opal_list_get_last(opal_list_t* list) { - ompi_list_item_t* item = (ompi_list_item_t *)list->ompi_list_tail.ompi_list_prev; + opal_list_item_t* item = (opal_list_item_t *)list->opal_list_tail.opal_list_prev; #if OMPI_ENABLE_DEBUG /* Spot check: ensure that the last item is only on one list */ - assert( 1 == item->ompi_list_item_refcount ); - assert( list == item->ompi_list_item_belong_to ); + assert( 1 == item->opal_list_item_refcount ); + assert( list == item->opal_list_item_belong_to ); #endif return item; @@ -247,9 +247,9 @@ static inline ompi_list_item_t* ompi_list_get_last(ompi_list_t* list) * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. */ -static inline ompi_list_item_t* ompi_list_get_begin(ompi_list_t* list) +static inline opal_list_item_t* opal_list_get_begin(opal_list_t* list) { - return &(list->ompi_list_head); + return &(list->opal_list_head); } /** @@ -269,9 +269,9 @@ static inline ompi_list_item_t* ompi_list_get_begin(ompi_list_t* list) * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. */ -static inline ompi_list_item_t* ompi_list_get_end(ompi_list_t* list) +static inline opal_list_item_t* opal_list_get_end(opal_list_t* list) { - return &(list->ompi_list_tail); + return &(list->opal_list_tail); } @@ -288,13 +288,13 @@ static inline ompi_list_item_t* ompi_list_get_end(ompi_list_t* list) * it's usually a cheap operation. * * \warning The size of the list is cached as part of the list. In - * the future, calling \c ompi_list_splice or \c ompi_list_join may + * the future, calling \c opal_list_splice or \c opal_list_join may * result in this function recomputing the list size, which would be - * an O(N) operation. If \c ompi_list_splice or \c ompi_list_join is + * an O(N) operation. If \c opal_list_splice or \c opal_list_join is * never called on the specified list, this function will always be * O(1). */ -static inline size_t ompi_list_get_size(ompi_list_t* list) +static inline size_t opal_list_get_size(opal_list_t* list) { #if OMPI_ENABLE_DEBUG && 0 /* not sure if we really want this running in devel, as it does @@ -302,22 +302,22 @@ static inline size_t ompi_list_get_size(ompi_list_t* list) * make sure length was reset properly */ size_t check_len = 0; - ompi_list_item_t *item; + opal_list_item_t *item; - for (item = ompi_list_get_first(list) ; - item != ompi_list_get_end(list) ; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(list) ; + item != opal_list_get_end(list) ; + item = opal_list_get_next(item)) { check_len++; } - if (check_len != list->ompi_list_length) { - fprintf(stderr," Error :: ompi_list_get_size - ompi_list_length does not match actual list length\n"); + if (check_len != list->opal_list_length) { + fprintf(stderr," Error :: opal_list_get_size - opal_list_length does not match actual list length\n"); fflush(stderr); abort(); } #endif - return list->ompi_list_length; + return list->opal_list_length; } @@ -342,48 +342,48 @@ static inline size_t ompi_list_get_size(ompi_list_t* list) * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. */ -static inline ompi_list_item_t *ompi_list_remove_item - (ompi_list_t *list, ompi_list_item_t *item) +static inline opal_list_item_t *opal_list_remove_item + (opal_list_t *list, opal_list_item_t *item) { #if OMPI_ENABLE_DEBUG - ompi_list_item_t *item_ptr; + opal_list_item_t *item_ptr; bool found = false; /* check to see that the item is in the list */ - for (item_ptr = ompi_list_get_first(list); - item_ptr != ompi_list_get_end(list); - item_ptr = (ompi_list_item_t *)(item_ptr->ompi_list_next)) { - if (item_ptr == (ompi_list_item_t *) item) { + for (item_ptr = opal_list_get_first(list); + item_ptr != opal_list_get_end(list); + item_ptr = (opal_list_item_t *)(item_ptr->opal_list_next)) { + if (item_ptr == (opal_list_item_t *) item) { found = true; break; } } if (!found) { - fprintf(stderr," Warning :: ompi_list_remove_item - the item %p is not on the list %p \n",(void*) item, (void*) list); + fprintf(stderr," Warning :: opal_list_remove_item - the item %p is not on the list %p \n",(void*) item, (void*) list); fflush(stderr); - return (ompi_list_item_t *)NULL; + return (opal_list_item_t *)NULL; } - assert( list == item->ompi_list_item_belong_to ); + assert( list == item->opal_list_item_belong_to ); #endif /* reset next pointer of previous element */ - item->ompi_list_prev->ompi_list_next=item->ompi_list_next; + item->opal_list_prev->opal_list_next=item->opal_list_next; /* reset previous pointer of next element */ - item->ompi_list_next->ompi_list_prev=item->ompi_list_prev; + item->opal_list_next->opal_list_prev=item->opal_list_prev; - list->ompi_list_length--; + list->opal_list_length--; #if OMPI_ENABLE_DEBUG /* Spot check: ensure that this item is still only on one list */ - OMPI_THREAD_ADD32( &(item->ompi_list_item_refcount), -1 ); - assert(0 == item->ompi_list_item_refcount); - item->ompi_list_item_belong_to = NULL; + OMPI_THREAD_ADD32( &(item->opal_list_item_refcount), -1 ); + assert(0 == item->opal_list_item_refcount); + item->opal_list_item_belong_to = NULL; #endif - return (ompi_list_item_t *)item->ompi_list_prev; + return (opal_list_item_t *)item->opal_list_prev; } @@ -394,7 +394,7 @@ static inline ompi_list_item_t *ompi_list_remove_item * @param item The item to append * * This is an O(1) operation to append an item to the end of a list. - * The ompi_list_item_t is not OBJ_RETAIN()'ed; it is assumed that + * The opal_list_item_t is not OBJ_RETAIN()'ed; it is assumed that * "ownership" of the item is passed from the caller to the list. * * This is an inlined function in compilers that support inlining, so @@ -402,14 +402,14 @@ static inline ompi_list_item_t *ompi_list_remove_item */ #if OMPI_ENABLE_DEBUG -#define ompi_list_append(l,i) \ -_ompi_list_append(l,i,__FILE__,__LINE__) +#define opal_list_append(l,i) \ +_opal_list_append(l,i,__FILE__,__LINE__) #else -#define ompi_list_append(l,i) \ -_ompi_list_append(l,i) +#define opal_list_append(l,i) \ +_opal_list_append(l,i) #endif /* OMPI_ENABLE_DEBUG */ -static inline void _ompi_list_append(ompi_list_t *list, ompi_list_item_t *item +static inline void _opal_list_append(opal_list_t *list, opal_list_item_t *item #if OMPI_ENABLE_DEBUG , char* FILE, int LINENO #endif /* OMPI_ENABLE_DEBUG */ @@ -418,34 +418,34 @@ static inline void _ompi_list_append(ompi_list_t *list, ompi_list_item_t *item #if OMPI_ENABLE_DEBUG /* Spot check: ensure that this item is previously on no lists */ - assert(0 == item->ompi_list_item_refcount); - assert( NULL == item->ompi_list_item_belong_to ); + assert(0 == item->opal_list_item_refcount); + assert( NULL == item->opal_list_item_belong_to ); item->super.cls_init_file_name = FILE; item->super.cls_init_lineno = LINENO; #endif /* set new element's previous pointer */ - item->ompi_list_prev=list->ompi_list_tail.ompi_list_prev; + item->opal_list_prev=list->opal_list_tail.opal_list_prev; /* reset previous pointer on current last element */ - list->ompi_list_tail.ompi_list_prev->ompi_list_next=item; + list->opal_list_tail.opal_list_prev->opal_list_next=item; /* reset new element's next pointer */ - item->ompi_list_next=&(list->ompi_list_tail); + item->opal_list_next=&(list->opal_list_tail); /* reset the list's tail element previous pointer */ - list->ompi_list_tail.ompi_list_prev = item; + list->opal_list_tail.opal_list_prev = item; /* increment list element counter */ - list->ompi_list_length++; + list->opal_list_length++; #if OMPI_ENABLE_DEBUG /* Spot check: ensure this item is only on the list that we just appended it to */ - OMPI_THREAD_ADD32( &(item->ompi_list_item_refcount), 1 ); - assert(1 == item->ompi_list_item_refcount); - item->ompi_list_item_belong_to = list; + OMPI_THREAD_ADD32( &(item->opal_list_item_refcount), 1 ); + assert(1 == item->opal_list_item_refcount); + item->opal_list_item_belong_to = list; #endif } @@ -457,44 +457,44 @@ static inline void _ompi_list_append(ompi_list_t *list, ompi_list_item_t *item * @param item The item to prepend * * This is an O(1) operation to prepend an item to the beginning of a - * list. The ompi_list_item_t is not OBJ_RETAIN()'ed; it is assumed + * list. The opal_list_item_t is not OBJ_RETAIN()'ed; it is assumed * that "ownership" of the item is passed from the caller to the list. * * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. */ -static inline void ompi_list_prepend(ompi_list_t *list, - ompi_list_item_t *item) +static inline void opal_list_prepend(opal_list_t *list, + opal_list_item_t *item) { #if OMPI_ENABLE_DEBUG /* Spot check: ensure that this item is previously on no lists */ - assert(0 == item->ompi_list_item_refcount); - assert( NULL == item->ompi_list_item_belong_to ); + assert(0 == item->opal_list_item_refcount); + assert( NULL == item->opal_list_item_belong_to ); #endif /* reset item's next pointer */ - item->ompi_list_next = list->ompi_list_head.ompi_list_next; + item->opal_list_next = list->opal_list_head.opal_list_next; /* reset item's previous pointer */ - item->ompi_list_prev = &(list->ompi_list_head); + item->opal_list_prev = &(list->opal_list_head); /* reset previous first element's previous poiner */ - list->ompi_list_head.ompi_list_next->ompi_list_prev = item; + list->opal_list_head.opal_list_next->opal_list_prev = item; /* reset head's next pointer */ - list->ompi_list_head.ompi_list_next = item; + list->opal_list_head.opal_list_next = item; /* increment list element counter */ - list->ompi_list_length++; + list->opal_list_length++; #if OMPI_ENABLE_DEBUG /* Spot check: ensure this item is only on the list that we just prepended it to */ - OMPI_THREAD_ADD32( &(item->ompi_list_item_refcount), 1 ); - assert(1 == item->ompi_list_item_refcount); - item->ompi_list_item_belong_to = list; + OMPI_THREAD_ADD32( &(item->opal_list_item_refcount), 1 ); + assert(1 == item->opal_list_item_refcount); + item->opal_list_item_belong_to = list; #endif } @@ -515,49 +515,49 @@ static inline void ompi_list_prepend(ompi_list_t *list, * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. */ -static inline ompi_list_item_t *ompi_list_remove_first(ompi_list_t *list) +static inline opal_list_item_t *opal_list_remove_first(opal_list_t *list) { /* Removes and returns first item on list. Caller now owns the item and should release the item when caller is done with it. */ - volatile ompi_list_item_t *item; - if ( 0 == list->ompi_list_length ) { - return (ompi_list_item_t *)NULL; + volatile opal_list_item_t *item; + if ( 0 == list->opal_list_length ) { + return (opal_list_item_t *)NULL; } #if OMPI_ENABLE_DEBUG /* Spot check: ensure that the first item is only on this list */ - assert(1 == list->ompi_list_head.ompi_list_next->ompi_list_item_refcount); + assert(1 == list->opal_list_head.opal_list_next->opal_list_item_refcount); #endif /* reset list length counter */ - list->ompi_list_length--; + list->opal_list_length--; /* get pointer to first element on the list */ - item = list->ompi_list_head.ompi_list_next; + item = list->opal_list_head.opal_list_next; /* reset previous pointer of next item on the list */ - item->ompi_list_next->ompi_list_prev=item->ompi_list_prev; + item->opal_list_next->opal_list_prev=item->opal_list_prev; /* reset the head next pointer */ - list->ompi_list_head.ompi_list_next=item->ompi_list_next; + list->opal_list_head.opal_list_next=item->opal_list_next; #if OMPI_ENABLE_DEBUG - assert( list == item->ompi_list_item_belong_to ); - item->ompi_list_item_belong_to = NULL; - item->ompi_list_prev=(ompi_list_item_t *)NULL; - item->ompi_list_next=(ompi_list_item_t *)NULL; + assert( list == item->opal_list_item_belong_to ); + item->opal_list_item_belong_to = NULL; + item->opal_list_prev=(opal_list_item_t *)NULL; + item->opal_list_next=(opal_list_item_t *)NULL; /* Spot check: ensure that the item we're returning is now on no lists */ - OMPI_THREAD_ADD32( &(item->ompi_list_item_refcount), -1 ); - assert(0 == item->ompi_list_item_refcount); + OMPI_THREAD_ADD32( &(item->opal_list_item_refcount), -1 ); + assert(0 == item->opal_list_item_refcount); #endif - return (ompi_list_item_t *) item; + return (opal_list_item_t *) item; } @@ -577,48 +577,48 @@ static inline ompi_list_item_t *ompi_list_remove_first(ompi_list_t *list) * This is an inlined function in compilers that support inlining, so * it's usually a cheap operation. */ -static inline ompi_list_item_t *ompi_list_remove_last(ompi_list_t *list) +static inline opal_list_item_t *opal_list_remove_last(opal_list_t *list) { /* Removes, releases and returns last item on list. Caller now owns the item and should release the item when caller is done with it. */ - volatile ompi_list_item_t *item; - if ( 0 == list->ompi_list_length ) { - return (ompi_list_item_t *)NULL; + volatile opal_list_item_t *item; + if ( 0 == list->opal_list_length ) { + return (opal_list_item_t *)NULL; } #if OMPI_ENABLE_DEBUG /* Spot check: ensure that the first item is only on this list */ - assert(1 == list->ompi_list_tail.ompi_list_prev->ompi_list_item_refcount); + assert(1 == list->opal_list_tail.opal_list_prev->opal_list_item_refcount); #endif /* reset list length counter */ - list->ompi_list_length--; + list->opal_list_length--; /* get item */ - item = list->ompi_list_tail.ompi_list_prev; + item = list->opal_list_tail.opal_list_prev; /* reset previous pointer on next to last pointer */ - item->ompi_list_prev->ompi_list_next=item->ompi_list_next; + item->opal_list_prev->opal_list_next=item->opal_list_next; /* reset tail's previous pointer */ - list->ompi_list_tail.ompi_list_prev=item->ompi_list_prev; + list->opal_list_tail.opal_list_prev=item->opal_list_prev; #if OMPI_ENABLE_DEBUG - assert( list == item->ompi_list_item_belong_to ); - item->ompi_list_next = item->ompi_list_prev = (ompi_list_item_t *)NULL; + assert( list == item->opal_list_item_belong_to ); + item->opal_list_next = item->opal_list_prev = (opal_list_item_t *)NULL; /* Spot check: ensure that the item we're returning is now on no lists */ - OMPI_THREAD_ADD32( &(item->ompi_list_item_refcount), -1 ); - assert(0 == item->ompi_list_item_refcount); - item->ompi_list_item_belong_to = NULL; + OMPI_THREAD_ADD32( &(item->opal_list_item_refcount), -1 ); + assert(0 == item->opal_list_item_refcount); + item->opal_list_item_belong_to = NULL; #endif - return (ompi_list_item_t *) item; + return (opal_list_item_t *) item; } /** @@ -630,35 +630,35 @@ static inline ompi_list_item_t *ompi_list_remove_last(ompi_list_t *list) * * Inserts \c item before \c pos. This is an O(1) operation. */ -static inline void ompi_list_insert_pos(ompi_list_t *list, ompi_list_item_t *pos, - ompi_list_item_t *item) +static inline void opal_list_insert_pos(opal_list_t *list, opal_list_item_t *pos, + opal_list_item_t *item) { #if OMPI_ENABLE_DEBUG /* Spot check: ensure that the item we're insertting is currently not on any list */ - assert(0 == item->ompi_list_item_refcount); - assert( NULL == item->ompi_list_item_belong_to ); + assert(0 == item->opal_list_item_refcount); + assert( NULL == item->opal_list_item_belong_to ); #endif /* point item at the existing elements */ - item->ompi_list_next = pos; - item->ompi_list_prev = pos->ompi_list_prev; + item->opal_list_next = pos; + item->opal_list_prev = pos->opal_list_prev; /* splice into the list */ - pos->ompi_list_prev->ompi_list_next = item; - pos->ompi_list_prev = item; + pos->opal_list_prev->opal_list_next = item; + pos->opal_list_prev = item; /* reset list length counter */ - list->ompi_list_length++; + list->opal_list_length++; #if OMPI_ENABLE_DEBUG /* Spot check: double check that this item is only on the list that we just added it to */ - OMPI_THREAD_ADD32( &(item->ompi_list_item_refcount), 1 ); - assert(1 == item->ompi_list_item_refcount); - item->ompi_list_item_belong_to = list; + OMPI_THREAD_ADD32( &(item->opal_list_item_refcount), 1 ); + assert(1 == item->opal_list_item_refcount); + item->opal_list_item_belong_to = list; #endif } @@ -680,7 +680,7 @@ static inline void ompi_list_insert_pos(ompi_list_t *list, ompi_list_item_t *pos * If index is greater than the length of the list, no action is * performed and false is returned. */ - bool ompi_list_insert(ompi_list_t *list, ompi_list_item_t *item, + bool opal_list_insert(opal_list_t *list, opal_list_item_t *item, long long idx); @@ -697,12 +697,12 @@ static inline void ompi_list_insert_pos(ompi_list_t *list, ompi_list_item_t *pos * * This operation is an O(1) operation. Both \c thislist and \c * xlist must be valid list containsers. \c xlist will be empty - * but valid after the call. All pointers to \c ompi_list_item_t + * but valid after the call. All pointers to \c opal_list_item_t * containers remain valid, including those that point to elements * in \c xlist. */ - void ompi_list_join(ompi_list_t *thislist, ompi_list_item_t *pos, - ompi_list_t *xlist); + void opal_list_join(opal_list_t *thislist, opal_list_item_t *pos, + opal_list_t *xlist); /** @@ -728,24 +728,24 @@ static inline void ompi_list_insert_pos(ompi_list_t *list, ompi_list_item_t *pos * This is an O(N) operation because the length of both lists must * be recomputed. */ - void ompi_list_splice(ompi_list_t *thislist, ompi_list_item_t *pos, - ompi_list_t *xlist, ompi_list_item_t *first, - ompi_list_item_t *last); + void opal_list_splice(opal_list_t *thislist, opal_list_item_t *pos, + opal_list_t *xlist, opal_list_item_t *first, + opal_list_item_t *last); /** - * Comparison function for ompi_list_sort(), below. + * Comparison function for opal_list_sort(), below. * - * @param a Pointer to a pointer to an ompi_list_item_t. + * @param a Pointer to a pointer to an opal_list_item_t. * Explanation below. - * @param b Pointer to a pointer to an ompi_list_item_t. + * @param b Pointer to a pointer to an opal_list_item_t. * Explanation below. * @retval 1 if \em a is greater than \em b * @retval 0 if \em a is equal to \em b * @retval 11 if \em a is less than \em b * * This function is invoked by qsort(3) from within - * ompi_list_sort(). It is important to understand what - * ompi_list_sort() does before invoking qsort, so go read that + * opal_list_sort(). It is important to understand what + * opal_list_sort() does before invoking qsort, so go read that * documentation first. * * The important thing to realize here is that a and b will be \em @@ -753,7 +753,7 @@ static inline void ompi_list_insert_pos(ompi_list_t *list, ompi_list_item_t *pos * a sample compare function to illustrate this point: * * \verb - * static int compare(ompi_list_item_t **a, ompi_list_item_t **b) + * static int compare(opal_list_item_t **a, opal_list_item_t **b) * { * orte_pls_base_cmp_t *aa = *((orte_pls_base_cmp_t **) a); * orte_pls_base_cmp_t *bb = *((orte_pls_base_cmp_t **) b); @@ -768,8 +768,8 @@ static inline void ompi_list_insert_pos(ompi_list_t *list, ompi_list_item_t *pos * } * \endverb */ - typedef int (*ompi_list_item_compare_fn_t)(ompi_list_item_t **a, - ompi_list_item_t **b); + typedef int (*opal_list_item_compare_fn_t)(opal_list_item_t **a, + opal_list_item_t **b); /** * Sort a list with a provided compare function. @@ -781,17 +781,17 @@ static inline void ompi_list_insert_pos(ompi_list_t *list, ompi_list_item_t *pos * Its algorithm is: * * - remove every item from the list and put the corresponding - * (ompi_list_item_t*)'s in an array + * (opal_list_item_t*)'s in an array * - call qsort(3) with that array and your compare function * - re-add every element of the now-sorted array to the list * * The resulting list is now ordered. Note, however, that since * an array of pointers is sorted, the comparison function must do - * a double de-reference to get to the actual ompi_list_item_t (or + * a double de-reference to get to the actual opal_list_item_t (or * whatever the underlying type is). See the documentation of - * ompi_list_item_compare_fn_t for an example). + * opal_list_item_compare_fn_t for an example). */ - int ompi_list_sort(ompi_list_t* list, ompi_list_item_compare_fn_t compare); + int opal_list_sort(opal_list_t* list, opal_list_item_compare_fn_t compare); #if defined(c_plusplus) || defined(__cplusplus) } @@ -799,4 +799,4 @@ static inline void ompi_list_insert_pos(ompi_list_t *list, ompi_list_item_t *pos -#endif /* OMPI_LIST_H */ +#endif /* OPAL_LIST_H */ diff --git a/opal/mca/base/base.h b/opal/mca/base/base.h index 50f67105a7..a83fd57f4f 100644 --- a/opal/mca/base/base.h +++ b/opal/mca/base/base.h @@ -38,7 +38,7 @@ extern "C" { * Structure for making plain lists of components */ struct mca_base_component_list_item_t { - ompi_list_item_t super; + opal_list_item_t super; const mca_base_component_t *cli_component; }; typedef struct mca_base_component_list_item_t mca_base_component_list_item_t; @@ -119,7 +119,7 @@ OMPI_DECLSPEC int mca_base_component_compare(const mca_base_component_t *a, OMPI_DECLSPEC int mca_base_component_find(const char *directory, const char *type, const mca_base_component_t *static_components[], - ompi_list_t *found_components, + opal_list_t *found_components, bool open_dso_components); /* mca_base_component_register.c */ @@ -141,12 +141,12 @@ OMPI_DECLSPEC void mca_base_component_repository_finalize(void); OMPI_DECLSPEC int mca_base_components_open(const char *type_name, int output_id, const mca_base_component_t **static_components, - ompi_list_t *components_available, + opal_list_t *components_available, bool open_dso_components); /* mca_base_components_close.c */ -OMPI_DECLSPEC int mca_base_components_close(int output_id, ompi_list_t *components_available, +OMPI_DECLSPEC int mca_base_components_close(int output_id, opal_list_t *components_available, const mca_base_component_t *skip); #if 0 diff --git a/opal/mca/base/mca_base_component_find.c b/opal/mca/base/mca_base_component_find.c index 72210fd7fc..3cfef2e29e 100644 --- a/opal/mca/base/mca_base_component_find.c +++ b/opal/mca/base/mca_base_component_find.c @@ -26,7 +26,7 @@ #include "include/constants.h" #include "util/output.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -44,7 +44,7 @@ typedef enum component_status { } component_status_t; struct component_file_item_t { - ompi_list_item_t super; + opal_list_item_t super; char type[MCA_BASE_MAX_TYPE_NAME_LEN]; char name[MCA_BASE_MAX_COMPONENT_NAME_LEN]; @@ -54,16 +54,16 @@ struct component_file_item_t { }; typedef struct component_file_item_t component_file_item_t; -static OBJ_CLASS_INSTANCE(component_file_item_t, ompi_list_item_t, NULL, NULL); +static OBJ_CLASS_INSTANCE(component_file_item_t, opal_list_item_t, NULL, NULL); struct dependency_item_t { - ompi_list_item_t super; + opal_list_item_t super; component_file_item_t *di_component_file_item; }; typedef struct dependency_item_t dependency_item_t; -static OBJ_CLASS_INSTANCE(dependency_item_t, ompi_list_item_t, NULL, NULL); +static OBJ_CLASS_INSTANCE(dependency_item_t, opal_list_item_t, NULL, NULL); struct ltfn_data_holder_t { char type[MCA_BASE_MAX_TYPE_NAME_LEN]; @@ -76,17 +76,17 @@ typedef struct ltfn_data_holder_t ltfn_data_holder_t; * Private functions */ static void find_dyn_components(const char *path, const char *type, - const char *name, ompi_list_t *found_components); + const char *name, opal_list_t *found_components); static int save_filename(const char *filename, lt_ptr data); static int open_component(component_file_item_t *target_file, - ompi_list_t *found_components); + opal_list_t *found_components); static int check_ompi_info(component_file_item_t *target_file, - ompi_list_t *dependencies, - ompi_list_t *found_components); + opal_list_t *dependencies, + opal_list_t *found_components); static int check_dependency(char *line, component_file_item_t *target_file, - ompi_list_t *dependencies, - ompi_list_t *found_components); -static void free_dependency_list(ompi_list_t *dependencies); + opal_list_t *dependencies, + opal_list_t *found_components); +static void free_dependency_list(opal_list_t *dependencies); /* @@ -95,7 +95,7 @@ static void free_dependency_list(ompi_list_t *dependencies); static const char *ompi_info_suffix = ".ompi_info"; static const char *key_dependency = "dependency="; static const char component_template[] = "mca_%s_"; -static ompi_list_t found_files; +static opal_list_t found_files; /* @@ -109,7 +109,7 @@ static ompi_list_t found_files; */ int mca_base_component_find(const char *directory, const char *type, const mca_base_component_t *static_components[], - ompi_list_t *found_components, + opal_list_t *found_components, bool open_dso_components) { int i; @@ -117,14 +117,14 @@ int mca_base_component_find(const char *directory, const char *type, /* Find all the components that were statically linked in */ - OBJ_CONSTRUCT(found_components, ompi_list_t); + OBJ_CONSTRUCT(found_components, opal_list_t); for (i = 0; NULL != static_components[i]; ++i) { cli = OBJ_NEW(mca_base_component_list_item_t); if (NULL == cli) { return OMPI_ERR_OUT_OF_RESOURCE; } cli->cli_component = static_components[i]; - ompi_list_append(found_components, (ompi_list_item_t *) cli); + opal_list_append(found_components, (opal_list_item_t *) cli); } /* Find any available dynamic components in the specified directory */ @@ -155,12 +155,12 @@ int mca_base_component_find(const char *directory, const char *type, */ static void find_dyn_components(const char *path, const char *type_name, const char *name, - ompi_list_t *found_components) + opal_list_t *found_components) { ltfn_data_holder_t params; char *path_to_use, *dir, *end, *param; component_file_item_t *file; - ompi_list_item_t *cur; + opal_list_item_t *cur; strcpy(params.type, type_name); @@ -197,7 +197,7 @@ static void find_dyn_components(const char *path, const char *type_name, make a master array of all the matching filenames that we find. */ - OBJ_CONSTRUCT(&found_files, ompi_list_t); + OBJ_CONSTRUCT(&found_files, opal_list_t); dir = path_to_use; if (NULL != dir) { do { @@ -222,9 +222,9 @@ static void find_dyn_components(const char *path, const char *type_name, give every file one chance to try to load. If they load, great. If not, great. */ - for (cur = ompi_list_get_first(&found_files); - ompi_list_get_end(&found_files) != cur; - cur = ompi_list_get_next(cur)) { + for (cur = opal_list_get_first(&found_files); + opal_list_get_end(&found_files) != cur; + cur = opal_list_get_next(cur)) { file = (component_file_item_t *) cur; if (UNVISITED == file->status) { open_component(file, found_components); @@ -234,9 +234,9 @@ static void find_dyn_components(const char *path, const char *type_name, /* So now we have a final list of loaded components. We can free all the file information. */ - for (cur = ompi_list_remove_first(&found_files); + for (cur = opal_list_remove_first(&found_files); NULL != cur; - cur = ompi_list_remove_first(&found_files)) { + cur = opal_list_remove_first(&found_files)) { OBJ_RELEASE(cur); } @@ -303,7 +303,7 @@ static int save_filename(const char *filename, lt_ptr data) strcpy(component_file->basename, basename); strcpy(component_file->filename, filename); component_file->status = UNVISITED; - ompi_list_append(&found_files, (ompi_list_item_t *) component_file); + opal_list_append(&found_files, (opal_list_item_t *) component_file); /* All done */ @@ -316,14 +316,14 @@ static int save_filename(const char *filename, lt_ptr data) * Open a component, chasing down its dependencies first, if possible. */ static int open_component(component_file_item_t *target_file, - ompi_list_t *found_components) + opal_list_t *found_components) { int len, show_errors, param; lt_dlhandle component_handle; mca_base_component_t *component_struct; char *struct_name, *err; - ompi_list_t dependencies; - ompi_list_item_t *cur; + opal_list_t dependencies; + opal_list_item_t *cur; mca_base_component_list_item_t *mitem; dependency_item_t *ditem; @@ -346,9 +346,9 @@ static int open_component(component_file_item_t *target_file, Hence, returning OMPI_ERR_PARAM indicates that the *file* failed to load, not the component. */ - for (cur = ompi_list_get_first(found_components); - ompi_list_get_end(found_components) != cur; - cur = ompi_list_get_next(cur)) { + for (cur = opal_list_get_first(found_components); + opal_list_get_end(found_components) != cur; + cur = opal_list_get_next(cur)) { mitem = (mca_base_component_list_item_t *) cur; if (0 == strcmp(mitem->cli_component->mca_type_name, target_file->type) && 0 == strcmp(mitem->cli_component->mca_component_name, target_file->name)) { @@ -362,7 +362,7 @@ static int open_component(component_file_item_t *target_file, them. If we can't load them, then this component must also fail to load. */ - OBJ_CONSTRUCT(&dependencies, ompi_list_t); + OBJ_CONSTRUCT(&dependencies, opal_list_t); if (0 != check_ompi_info(target_file, &dependencies, found_components)) { target_file->status = FAILED_TO_LOAD; free_dependency_list(&dependencies); @@ -430,16 +430,16 @@ static int open_component(component_file_item_t *target_file, be closed later. */ mitem->cli_component = component_struct; - ompi_list_append(found_components, (ompi_list_item_t *) mitem); + opal_list_append(found_components, (opal_list_item_t *) mitem); mca_base_component_repository_retain(target_file->type, component_handle, component_struct); /* Now that that's all done, link all the dependencies in to this component's repository entry */ - for (cur = ompi_list_remove_first(&dependencies); + for (cur = opal_list_remove_first(&dependencies); NULL != cur; - cur = ompi_list_remove_first(&dependencies)) { + cur = opal_list_remove_first(&dependencies)) { ditem = (dependency_item_t *) cur; mca_base_component_repository_link(target_file->type, target_file->name, @@ -468,8 +468,8 @@ static int open_component(component_file_item_t *target_file, * Detect dependency cycles and error out. */ static int check_ompi_info(component_file_item_t *target_file, - ompi_list_t *dependencies, - ompi_list_t *found_components) + opal_list_t *dependencies, + opal_list_t *found_components) { int len; FILE *fp; @@ -555,15 +555,15 @@ static int check_ompi_info(component_file_item_t *target_file, * it's not already loaded. */ static int check_dependency(char *line, component_file_item_t *target_file, - ompi_list_t *dependencies, - ompi_list_t *found_components) + opal_list_t *dependencies, + opal_list_t *found_components) { bool happiness; char buffer[BUFSIZ]; char *type, *name; component_file_item_t *mitem; dependency_item_t *ditem; - ompi_list_item_t *cur; + opal_list_item_t *cur; /* Ensure that this was a valid dependency statement */ @@ -589,9 +589,9 @@ static int check_dependency(char *line, component_file_item_t *target_file, mitem = NULL; target_file->status = CHECKING_CYCLE; - for (happiness = false, cur = ompi_list_get_first(&found_files); - ompi_list_get_end(&found_files) != cur; - cur = ompi_list_get_next(cur)) { + for (happiness = false, cur = opal_list_get_first(&found_files); + opal_list_get_end(&found_files) != cur; + cur = opal_list_get_next(cur)) { mitem = (component_file_item_t *) cur; /* Compare the name to the basename */ @@ -672,7 +672,7 @@ static int check_dependency(char *line, component_file_item_t *target_file, return OMPI_ERR_OUT_OF_RESOURCE; } ditem->di_component_file_item = mitem; - ompi_list_append(dependencies, (ompi_list_item_t*) ditem); + opal_list_append(dependencies, (opal_list_item_t*) ditem); } /* All done -- all depenencies satisfied */ @@ -684,13 +684,13 @@ static int check_dependency(char *line, component_file_item_t *target_file, /* * Free a dependency list */ -static void free_dependency_list(ompi_list_t *dependencies) +static void free_dependency_list(opal_list_t *dependencies) { - ompi_list_item_t *item; + opal_list_item_t *item; - for (item = ompi_list_remove_first(dependencies); + for (item = opal_list_remove_first(dependencies); NULL != item; - item = ompi_list_remove_first(dependencies)) { + item = opal_list_remove_first(dependencies)) { OBJ_RELEASE(item); } OBJ_DESTRUCT(dependencies); diff --git a/opal/mca/base/mca_base_component_repository.c b/opal/mca/base/mca_base_component_repository.c index bd2ebf58a0..cb724b7a13 100644 --- a/opal/mca/base/mca_base_component_repository.c +++ b/opal/mca/base/mca_base_component_repository.c @@ -27,7 +27,7 @@ #include "libltdl/ltdl.h" #include "include/constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -36,28 +36,28 @@ * Private types */ struct repository_item_t { - ompi_list_item_t super; + opal_list_item_t super; char ri_type[MCA_BASE_MAX_TYPE_NAME_LEN]; lt_dlhandle ri_dlhandle; const mca_base_component_t *ri_component_struct; - ompi_list_t ri_dependencies; + opal_list_t ri_dependencies; }; typedef struct repository_item_t repository_item_t; static void ri_constructor(opal_object_t *obj); static void ri_destructor(opal_object_t *obj); -static OBJ_CLASS_INSTANCE(repository_item_t, ompi_list_item_t, +static OBJ_CLASS_INSTANCE(repository_item_t, opal_list_item_t, ri_constructor, ri_destructor); struct dependency_item_t { - ompi_list_item_t super; + opal_list_item_t super; repository_item_t *di_repository_entry; }; typedef struct dependency_item_t dependency_item_t; static void di_constructor(opal_object_t *obj); static void di_destructor(opal_object_t *obj); -static OBJ_CLASS_INSTANCE(dependency_item_t, ompi_list_item_t, +static OBJ_CLASS_INSTANCE(dependency_item_t, opal_list_item_t, di_constructor, di_destructor); @@ -65,7 +65,7 @@ static OBJ_CLASS_INSTANCE(dependency_item_t, ompi_list_item_t, * Private variables */ static bool initialized = false; -static ompi_list_t repository; +static opal_list_t repository; /* @@ -90,7 +90,7 @@ int mca_base_component_repository_initialize(void) return OMPI_ERR_OUT_OF_RESOURCE; } - OBJ_CONSTRUCT(&repository, ompi_list_t); + OBJ_CONSTRUCT(&repository, opal_list_t); initialized = true; } @@ -126,7 +126,7 @@ int mca_base_component_repository_retain(char *type, /* Append the new item to the repository */ - ompi_list_append(&repository, (ompi_list_item_t *) ri); + opal_list_append(&repository, (opal_list_item_t *) ri); /* All done */ @@ -195,7 +195,7 @@ void mca_base_component_repository_release(const mca_base_component_t *component */ void mca_base_component_repository_finalize(void) { - ompi_list_item_t *item; + opal_list_item_t *item; repository_item_t *ri; if (initialized) { @@ -214,13 +214,13 @@ void mca_base_component_repository_finalize(void) technically an error). */ do { - for (item = ompi_list_get_first(&repository); - ompi_list_get_end(&repository) != item; ) { + for (item = opal_list_get_first(&repository); + opal_list_get_end(&repository) != item; ) { ri = (repository_item_t *) item; - item = ompi_list_get_next(item); + item = opal_list_get_next(item); OBJ_RELEASE(ri); } - } while (ompi_list_get_size(&repository) > 0); + } while (opal_list_get_size(&repository) > 0); /* Close down libltdl */ @@ -232,12 +232,12 @@ void mca_base_component_repository_finalize(void) static repository_item_t *find_component(const char *type, const char *name) { - ompi_list_item_t *item; + opal_list_item_t *item; repository_item_t *ri; - for (item = ompi_list_get_first(&repository); - ompi_list_get_end(&repository) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&repository); + opal_list_get_end(&repository) != item; + item = opal_list_get_next(item)) { ri = (repository_item_t *) item; if (0 == strcmp(ri->ri_type, type) && 0 == strcmp(ri->ri_component_struct->mca_component_name, name)) { @@ -274,7 +274,7 @@ static int link_items(repository_item_t *src, repository_item_t *depend) /* Add it to the dependency list on the source repository entry */ - ompi_list_append(&src->ri_dependencies, (ompi_list_item_t *) di); + opal_list_append(&src->ri_dependencies, (opal_list_item_t *) di); /* Increment the refcount in the dependency */ @@ -297,7 +297,7 @@ static void ri_constructor(opal_object_t *obj) ri->ri_dlhandle = NULL; ri->ri_component_struct = NULL; - OBJ_CONSTRUCT(&ri->ri_dependencies, ompi_list_t); + OBJ_CONSTRUCT(&ri->ri_dependencies, opal_list_t); } @@ -308,7 +308,7 @@ static void ri_destructor(opal_object_t *obj) { repository_item_t *ri = (repository_item_t *) obj; dependency_item_t *di; - ompi_list_item_t *item; + opal_list_item_t *item; /* Close the component (and potentially unload it from memory */ @@ -322,14 +322,14 @@ static void ri_destructor(opal_object_t *obj) /* Now go release/close (at a minimum: decrement the refcount) any dependencies of this component */ - for (item = ompi_list_remove_first(&ri->ri_dependencies); + for (item = opal_list_remove_first(&ri->ri_dependencies); NULL != item; - item = ompi_list_remove_first(&ri->ri_dependencies)) { + item = opal_list_remove_first(&ri->ri_dependencies)) { di = (dependency_item_t *) item; OBJ_RELEASE(di); } OBJ_DESTRUCT(&ri->ri_dependencies); - ompi_list_remove_item(&repository, (ompi_list_item_t *) ri); + opal_list_remove_item(&repository, (opal_list_item_t *) ri); } diff --git a/opal/mca/base/mca_base_components_close.c b/opal/mca/base/mca_base_components_close.c index 1c658da003..0c9042a764 100644 --- a/opal/mca/base/mca_base_components_close.c +++ b/opal/mca/base/mca_base_components_close.c @@ -16,17 +16,17 @@ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/output.h" #include "mca/mca.h" #include "mca/base/base.h" #include "include/constants.h" int mca_base_components_close(int output_id, - ompi_list_t *components_available, + opal_list_t *components_available, const mca_base_component_t *skip) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_priority_list_item_t *pcli, *skipped_pcli = NULL; const mca_base_component_t *component; @@ -35,9 +35,9 @@ int mca_base_components_close(int output_id, components. It's easier to simply remove the entire list and then simply re-add the skip entry when done. */ - for (item = ompi_list_remove_first(components_available); + for (item = opal_list_remove_first(components_available); NULL != item; - item = ompi_list_remove_first(components_available)) { + item = opal_list_remove_first(components_available)) { pcli = (mca_base_component_priority_list_item_t *) item; component = pcli->super.cli_component; @@ -69,7 +69,7 @@ int mca_base_components_close(int output_id, list (see above comment) */ if (NULL != skipped_pcli) { - ompi_list_append(components_available, (ompi_list_item_t *) skipped_pcli); + opal_list_append(components_available, (opal_list_item_t *) skipped_pcli); } /* All done */ diff --git a/opal/mca/base/mca_base_components_open.c b/opal/mca/base/mca_base_components_open.c index c32eb2f66d..bd0a5692c1 100644 --- a/opal/mca/base/mca_base_components_open.c +++ b/opal/mca/base/mca_base_components_open.c @@ -20,7 +20,7 @@ #include #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/strncpy.h" #include "util/argv.h" #include "util/output.h" @@ -29,7 +29,7 @@ #include "include/constants.h" struct component_name_t { - ompi_list_item_t super; + opal_list_item_t super; char mn_name[MCA_BASE_MAX_COMPONENT_NAME_LEN]; }; @@ -46,8 +46,8 @@ static bool show_errors = false; * Local functions */ static int open_components(const char *type_name, int output_id, - ompi_list_t *components_found, - ompi_list_t *components_available, + opal_list_t *components_found, + opal_list_t *components_available, char **requested_component_names); static int parse_requested(int mca_param, char ***requested_component_names); @@ -58,12 +58,12 @@ static int parse_requested(int mca_param, char ***requested_component_names); */ int mca_base_components_open(const char *type_name, int output_id, const mca_base_component_t **static_components, - ompi_list_t *components_available, + opal_list_t *components_available, bool open_dso_components) { int ret, param; - ompi_list_item_t *item; - ompi_list_t components_found; + opal_list_item_t *item; + opal_list_t components_found; char **requested_component_names; int param_verbose = -1; int param_type = -1; @@ -108,8 +108,8 @@ int mca_base_components_open(const char *type_name, int output_id, /* Free resources */ - for (item = ompi_list_remove_first(&components_found); NULL != item; - item = ompi_list_remove_first(&components_found)) { + for (item = opal_list_remove_first(&components_found); NULL != item; + item = opal_list_remove_first(&components_found)) { OBJ_RELEASE(item); } if (NULL != requested_component_names) { @@ -152,12 +152,12 @@ static int parse_requested(int mca_param, char ***requested_component_names) * If it opens, add it to the components_available list. */ static int open_components(const char *type_name, int output_id, - ompi_list_t *components_found, - ompi_list_t *components_available, + opal_list_t *components_found, + opal_list_t *components_available, char **requested_component_names) { int i; - ompi_list_item_t *item; + opal_list_item_t *item; const mca_base_component_t *component; mca_base_component_list_item_t *cli; bool acceptable; @@ -182,10 +182,10 @@ static int open_components(const char *type_name, int output_id, /* Traverse the list of found components */ - OBJ_CONSTRUCT(components_available, ompi_list_t); - for (item = ompi_list_get_first(components_found); - ompi_list_get_end(components_found) != item; - item = ompi_list_get_next(item)) { + OBJ_CONSTRUCT(components_available, opal_list_t); + for (item = opal_list_get_first(components_found); + opal_list_get_end(components_found) != item; + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = cli->cli_component; @@ -280,7 +280,7 @@ static int open_components(const char *type_name, int output_id, return OMPI_ERR_OUT_OF_RESOURCE; } cli->cli_component = component; - ompi_list_append(components_available, (ompi_list_item_t *) cli); + opal_list_append(components_available, (opal_list_item_t *) cli); } } } diff --git a/opal/mca/base/mca_base_list.c b/opal/mca/base/mca_base_list.c index f28cdc7c2d..268d118df4 100644 --- a/opal/mca/base/mca_base_list.c +++ b/opal/mca/base/mca_base_list.c @@ -16,7 +16,7 @@ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/base/base.h" @@ -31,7 +31,7 @@ static void cpl_constructor(opal_object_t *obj); * Class instance of the mca_base_component_list_item_t class */ OBJ_CLASS_INSTANCE(mca_base_component_list_item_t, - ompi_list_item_t, cl_constructor, NULL); + opal_list_item_t, cl_constructor, NULL); /* diff --git a/opal/mca/base/mca_base_msgbuf_internal.h b/opal/mca/base/mca_base_msgbuf_internal.h index ce46752b1b..7e94efe546 100644 --- a/opal/mca/base/mca_base_msgbuf_internal.h +++ b/opal/mca/base/mca_base_msgbuf_internal.h @@ -30,7 +30,7 @@ * data structures */ -/* this struct is changing to be a opal_object with a ompi_list inside! */ +/* this struct is changing to be a opal_object with a opal_list inside! */ /* and a few locks */ struct mca_base_msgbuffer_s { int msg_buff_id; /* internal ID of this buffer */ diff --git a/opal/mca/base/mca_base_param.c b/opal/mca/base/mca_base_param.c index a3ba821fed..992009ddc9 100644 --- a/opal/mca/base/mca_base_param.c +++ b/opal/mca/base/mca_base_param.c @@ -42,7 +42,7 @@ * This variable is public, but not advertised in mca_base_param.h. * It's only public so that the file parser can see it. */ -ompi_list_t mca_base_param_file_values; +opal_list_t mca_base_param_file_values; /* @@ -96,9 +96,9 @@ static void info_destructor(mca_base_param_info_t *p); */ OBJ_CLASS_INSTANCE(mca_base_param_t, opal_object_t, param_constructor, param_destructor); -OBJ_CLASS_INSTANCE(mca_base_param_file_value_t, ompi_list_item_t, +OBJ_CLASS_INSTANCE(mca_base_param_file_value_t, opal_list_item_t, fv_constructor, fv_destructor); -OBJ_CLASS_INSTANCE(mca_base_param_info_t, ompi_list_item_t, +OBJ_CLASS_INSTANCE(mca_base_param_info_t, opal_list_item_t, info_constructor, info_destructor); @@ -120,7 +120,7 @@ int mca_base_param_init(void) /* Init the file param value list */ - OBJ_CONSTRUCT(&mca_base_param_file_values, ompi_list_t); + OBJ_CONSTRUCT(&mca_base_param_file_values, opal_list_t); /* Set this before we register the parameter, below */ @@ -470,7 +470,7 @@ int mca_base_param_set_internal(int index, bool internal) /* * Return a list of info of all currently registered parameters */ -int mca_base_param_dump(ompi_list_t **info, bool internal) +int mca_base_param_dump(opal_list_t **info, bool internal) { size_t i, len; mca_base_param_info_t *p; @@ -485,7 +485,7 @@ int mca_base_param_dump(ompi_list_t **info, bool internal) if (NULL == info) { return OMPI_ERROR; } - *info = OBJ_NEW(ompi_list_t); + *info = OBJ_NEW(opal_list_t); /* Iterate through all the registered parameters */ @@ -504,7 +504,7 @@ int mca_base_param_dump(ompi_list_t **info, bool internal) p->mbpp_env_var_name = array[i].mbp_env_var_name; p->mbpp_full_name = array[i].mbp_full_name; - ompi_list_append(*info, (ompi_list_item_t*) p); + opal_list_append(*info, (opal_list_item_t*) p); } } @@ -579,12 +579,12 @@ int mca_base_param_build_env(char ***env, int *num_env, bool internal) * Free a list -- and all associated memory -- that was previously * returned from mca_base_param_dump() */ -int mca_base_param_dump_release(ompi_list_t *info) +int mca_base_param_dump_release(opal_list_t *info) { - ompi_list_item_t *item; + opal_list_item_t *item; - for (item = ompi_list_remove_first(info); NULL != item; - item = ompi_list_remove_first(info)) { + for (item = opal_list_remove_first(info); NULL != item; + item = opal_list_remove_first(info)) { OBJ_RELEASE(item); } OBJ_RELEASE(info); @@ -599,7 +599,7 @@ int mca_base_param_dump_release(ompi_list_t *info) */ int mca_base_param_finalize(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_param_t *array; if (initialized) { @@ -613,9 +613,9 @@ int mca_base_param_finalize(void) } OBJ_DESTRUCT(&mca_base_params); - for (item = ompi_list_remove_first(&mca_base_param_file_values); + for (item = opal_list_remove_first(&mca_base_param_file_values); NULL != item; - item = ompi_list_remove_first(&mca_base_param_file_values)) { + item = opal_list_remove_first(&mca_base_param_file_values)) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&mca_base_param_file_values); @@ -1154,7 +1154,7 @@ static bool lookup_env(mca_base_param_t *param, static bool lookup_file(mca_base_param_t *param, mca_base_param_storage_t *storage) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_param_file_value_t *fv; /* See if we previously found a match from a file. If so, just @@ -1168,9 +1168,9 @@ static bool lookup_file(mca_base_param_t *param, find a match. If we do, cache it on the param (for future lookups) and save it in the storage. */ - for (item = ompi_list_get_first(&mca_base_param_file_values); - ompi_list_get_end(&mca_base_param_file_values) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&mca_base_param_file_values); + opal_list_get_end(&mca_base_param_file_values) != item; + item = opal_list_get_next(item)) { fv = (mca_base_param_file_value_t *) item; if (0 == strcmp(fv->mbpfv_param, param->mbp_full_name)) { if (MCA_BASE_PARAM_TYPE_INT == param->mbp_type) { @@ -1189,8 +1189,8 @@ static bool lookup_file(mca_base_param_t *param, remove it from the list and make future file lookups faster */ - ompi_list_remove_item(&mca_base_param_file_values, - (ompi_list_item_t *) fv); + opal_list_remove_item(&mca_base_param_file_values, + (opal_list_item_t *) fv); OBJ_RELEASE(fv); return set(param->mbp_type, storage, ¶m->mbp_file_value); diff --git a/opal/mca/base/mca_base_param.h b/opal/mca/base/mca_base_param.h index 1bfc5a9b9e..6af9e55abc 100644 --- a/opal/mca/base/mca_base_param.h +++ b/opal/mca/base/mca_base_param.h @@ -59,7 +59,7 @@ #include "ompi_config.h" #include "class/ompi_value_array.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_hash_table.h" /** @@ -82,7 +82,7 @@ typedef enum { */ struct mca_base_param_info_t { /** So that we can be in a list */ - ompi_list_item_t super; + opal_list_item_t super; /** Index of this parameter */ int mbpp_index; @@ -448,7 +448,7 @@ extern "C" { * Obtain a list of all the MCA parameters currently defined as * well as their types. * - * @param info[out] An ompi_list_t of mca_base_param_info_t + * @param info[out] An opal_list_t of mca_base_param_info_t * instances. * @param internal[in] Whether to include the internal parameters * or not. @@ -468,7 +468,7 @@ extern "C" { * mca_base_param_dump_release() when finished with the returned * info list to release all associated memory. */ - OMPI_DECLSPEC int mca_base_param_dump(ompi_list_t **info, bool internal); + OMPI_DECLSPEC int mca_base_param_dump(opal_list_t **info, bool internal); /** * Obtain a list of all the MCA parameters currently defined as @@ -494,7 +494,7 @@ extern "C" { * Release the memory associated with the info list returned from * mca_base_param_dump(). * - * @param info[in/out] An ompi_list_t previously returned from + * @param info[in/out] An opal_list_t previously returned from * mca_base_param_dump(). * * @retval OMPI_SUCCESS Upon success. @@ -507,7 +507,7 @@ extern "C" { * the caller is finished with the info list, invoke this * function and all memory associated with the list will be freed. */ - OMPI_DECLSPEC int mca_base_param_dump_release(ompi_list_t *info); + OMPI_DECLSPEC int mca_base_param_dump_release(opal_list_t *info); /** * Shut down the MCA parameter system (normally only invoked by the diff --git a/opal/mca/base/mca_base_param_internal.h b/opal/mca/base/mca_base_param_internal.h index 802d1a11f8..50b03e88e2 100644 --- a/opal/mca/base/mca_base_param_internal.h +++ b/opal/mca/base/mca_base_param_internal.h @@ -33,7 +33,7 @@ #include "ompi_config.h" #include "opal/class/opal_object.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "class/ompi_hash_table.h" #include "mca/base/mca_base_param.h" @@ -116,7 +116,7 @@ OBJ_CLASS_DECLARATION(mca_base_param_t); */ struct mca_base_param_file_value_t { /** Allow this to be an OMPI OBJ */ - ompi_list_item_t super; + opal_list_item_t super; /** Parameter name */ char *mbpfv_param; @@ -141,7 +141,7 @@ OBJ_CLASS_DECLARATION(mca_base_param_file_value_t); * * Global list of params and values read in from MCA parameter files */ -OMPI_DECLSPEC extern ompi_list_t mca_base_param_file_values; +OMPI_DECLSPEC extern opal_list_t mca_base_param_file_values; #if defined(c_plusplus) || defined(__cplusplus) diff --git a/opal/mca/base/mca_base_parse_paramfile.c b/opal/mca/base/mca_base_parse_paramfile.c index 6a317ea6dd..6365624995 100644 --- a/opal/mca/base/mca_base_parse_paramfile.c +++ b/opal/mca/base/mca_base_parse_paramfile.c @@ -20,7 +20,7 @@ #include #include "include/constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/output.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -130,16 +130,16 @@ static int parse_line(void) static void save_value(char *name, char *value) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_param_file_value_t *fv; /* First traverse through the list and ensure that we don't already have a param of this name. If we do, just replace the value. */ - for (item = ompi_list_get_first(&mca_base_param_file_values); - ompi_list_get_end(&mca_base_param_file_values) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&mca_base_param_file_values); + opal_list_get_end(&mca_base_param_file_values) != item; + item = opal_list_get_next(item)) { fv = (mca_base_param_file_value_t *) item; if (0 == strcmp(name, fv->mbpfv_param)) { free(name); @@ -159,7 +159,7 @@ static void save_value(char *name, char *value) } else { fv->mbpfv_value = NULL; } - ompi_list_append(&mca_base_param_file_values, (ompi_list_item_t*) fv); + opal_list_append(&mca_base_param_file_values, (opal_list_item_t*) fv); } } diff --git a/opal/mca/mca.h b/opal/mca/mca.h index 86484d552a..5521c46bf7 100644 --- a/opal/mca/mca.h +++ b/opal/mca/mca.h @@ -24,7 +24,7 @@ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/cmd_line.h" /** diff --git a/opal/util/cmd_line.c b/opal/util/cmd_line.c index 5ae9bb76f0..9c6fa17dc3 100644 --- a/opal/util/cmd_line.c +++ b/opal/util/cmd_line.c @@ -22,7 +22,7 @@ #include "include/constants.h" #include "opal/class/opal_object.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/mutex.h" #include "util/argv.h" #include "util/cmd_line.h" @@ -47,7 +47,7 @@ * Description of a command line option */ struct cmd_line_option_t { - ompi_list_item_t super; + opal_list_item_t super; char clo_short_name; char *clo_single_dash_name; @@ -65,14 +65,14 @@ typedef struct cmd_line_option_t cmd_line_option_t; static void option_constructor(cmd_line_option_t *cmd); static void option_destructor(cmd_line_option_t *cmd); static OBJ_CLASS_INSTANCE(cmd_line_option_t, - ompi_list_item_t, + opal_list_item_t, option_constructor, option_destructor); /* * An option that was used in the argv that was parsed */ struct cmd_line_param_t { - ompi_list_item_t super; + opal_list_item_t super; /* Note that clp_arg points to storage "owned" by someone else; it has the original option string by referene, not by value. @@ -96,7 +96,7 @@ typedef struct cmd_line_param_t cmd_line_param_t; static void param_constructor(cmd_line_param_t *cmd); static void param_destructor(cmd_line_param_t *cmd); static OBJ_CLASS_INSTANCE(cmd_line_param_t, - ompi_list_item_t, + opal_list_item_t, param_constructor, param_destructor); /* @@ -430,7 +430,7 @@ int ompi_cmd_line_parse(ompi_cmd_line_t *cmd, bool ignore_unknown, list on the ompi_cmd_line_t handle */ if (NULL != param) { - ompi_list_append(&cmd->lcl_params, ¶m->super); + opal_list_append(&cmd->lcl_params, ¶m->super); } } } @@ -473,7 +473,7 @@ char *ompi_cmd_line_get_usage_msg(ompi_cmd_line_t *cmd) char **argv; char *ret, temp[MAX_WIDTH * 2], line[MAX_WIDTH * 2]; char *start, *desc, *ptr; - ompi_list_item_t *item; + opal_list_item_t *item; cmd_line_option_t *option; bool filled; @@ -487,9 +487,9 @@ char *ompi_cmd_line_get_usage_msg(ompi_cmd_line_t *cmd) argc = 0; argv = NULL; ret = NULL; - for (item = ompi_list_get_first(&cmd->lcl_options); - ompi_list_get_end(&cmd->lcl_options) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&cmd->lcl_options); + opal_list_get_end(&cmd->lcl_options) != item; + item = opal_list_get_next(item)) { option = (cmd_line_option_t *) item; if (NULL != option->clo_description) { @@ -671,7 +671,7 @@ bool ompi_cmd_line_is_taken(ompi_cmd_line_t *cmd, const char *opt) int ompi_cmd_line_get_ninsts(ompi_cmd_line_t *cmd, const char *opt) { int ret; - ompi_list_item_t *item; + opal_list_item_t *item; cmd_line_param_t *param; cmd_line_option_t *option; @@ -685,9 +685,9 @@ int ompi_cmd_line_get_ninsts(ompi_cmd_line_t *cmd, const char *opt) ret = 0; option = find_option(cmd, opt); if (NULL != option) { - for (item = ompi_list_get_first(&cmd->lcl_params); - ompi_list_get_end(&cmd->lcl_params) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&cmd->lcl_params); + opal_list_get_end(&cmd->lcl_params) != item; + item = opal_list_get_next(item)) { param = (cmd_line_param_t *) item; if (param->clp_option == option) { ++ret; @@ -713,7 +713,7 @@ char *ompi_cmd_line_get_param(ompi_cmd_line_t *cmd, const char *opt, int inst, int idx) { int num_found; - ompi_list_item_t *item; + opal_list_item_t *item; cmd_line_param_t *param; cmd_line_option_t *option; @@ -732,9 +732,9 @@ char *ompi_cmd_line_get_param(ompi_cmd_line_t *cmd, const char *opt, int inst, parameter index greater than we will have */ if (idx < option->clo_num_params) { - for (item = ompi_list_get_first(&cmd->lcl_params); - ompi_list_get_end(&cmd->lcl_params) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&cmd->lcl_params); + opal_list_get_end(&cmd->lcl_params) != item; + item = opal_list_get_next(item)) { param = (cmd_line_param_t *) item; if (param->clp_option == option) { if (num_found == inst) { @@ -857,8 +857,8 @@ static void cmd_line_constructor(ompi_cmd_line_t *cmd) /* Initialize the lists */ - OBJ_CONSTRUCT(&cmd->lcl_options, ompi_list_t); - OBJ_CONSTRUCT(&cmd->lcl_params, ompi_list_t); + OBJ_CONSTRUCT(&cmd->lcl_options, opal_list_t); + OBJ_CONSTRUCT(&cmd->lcl_params, opal_list_t); /* Initialize the argc/argv pairs */ @@ -871,14 +871,14 @@ static void cmd_line_constructor(ompi_cmd_line_t *cmd) static void cmd_line_destructor(ompi_cmd_line_t *cmd) { - ompi_list_item_t *item; + opal_list_item_t *item; /* Free the contents of the options list (do not free the list itself; it was not allocated from the heap) */ - for (item = ompi_list_remove_first(&cmd->lcl_options); + for (item = opal_list_remove_first(&cmd->lcl_options); NULL != item; - item = ompi_list_remove_first(&cmd->lcl_options)) { + item = opal_list_remove_first(&cmd->lcl_options)) { OBJ_RELEASE(item); } @@ -944,7 +944,7 @@ static int make_opt(ompi_cmd_line_t *cmd, ompi_cmd_line_init_t *e) /* Append the item, serializing thread access */ ompi_mutex_lock(&cmd->lcl_mutex); - ompi_list_append(&cmd->lcl_options, &option->super); + opal_list_append(&cmd->lcl_options, &option->super); ompi_mutex_unlock(&cmd->lcl_mutex); /* All done */ @@ -955,14 +955,14 @@ static int make_opt(ompi_cmd_line_t *cmd, ompi_cmd_line_init_t *e) static void free_parse_results(ompi_cmd_line_t *cmd) { - ompi_list_item_t *item; + opal_list_item_t *item; /* Free the contents of the params list (do not free the list itself; it was not allocated from the heap) */ - for (item = ompi_list_remove_first(&cmd->lcl_params); + for (item = opal_list_remove_first(&cmd->lcl_params); NULL != item; - item = ompi_list_remove_first(&cmd->lcl_params)) { + item = opal_list_remove_first(&cmd->lcl_params)) { OBJ_RELEASE(item); } @@ -1057,16 +1057,16 @@ static int split_shorts(ompi_cmd_line_t *cmd, char *token, char **args, static cmd_line_option_t *find_option(ompi_cmd_line_t *cmd, const char *option_name) { - ompi_list_item_t *item; + opal_list_item_t *item; cmd_line_option_t *option; /* Iterate through the list of options hanging off the ompi_cmd_line_t and see if we find a match in either the short or long names */ - for (item = ompi_list_get_first(&cmd->lcl_options); - ompi_list_get_end(&cmd->lcl_options) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&cmd->lcl_options); + opal_list_get_end(&cmd->lcl_options) != item; + item = opal_list_get_next(item)) { option = (cmd_line_option_t *) item; if ((NULL != option->clo_long_name && 0 == strcmp(option_name, option->clo_long_name)) || diff --git a/opal/util/cmd_line.h b/opal/util/cmd_line.h index 7f49ed6ca9..5a5a601169 100644 --- a/opal/util/cmd_line.h +++ b/opal/util/cmd_line.h @@ -111,7 +111,7 @@ #include "ompi_config.h" #include "opal/class/opal_object.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/mutex.h" #if defined(c_plusplus) || defined(__cplusplus) @@ -130,7 +130,7 @@ extern "C" { ompi_mutex_t lcl_mutex; /** List of cmd_line_option_t's (defined internally) */ - ompi_list_t lcl_options; + opal_list_t lcl_options; /** Duplicate of argc from ompi_cmd_line_parse() */ int lcl_argc; @@ -138,7 +138,7 @@ extern "C" { char **lcl_argv; /** Parsed output; list of cmd_line_param_t's (defined internally) */ - ompi_list_t lcl_params; + opal_list_t lcl_params; /** List of tail (unprocessed) arguments */ int lcl_tail_argc; diff --git a/opal/util/if.c b/opal/util/if.c index 897b5a5c92..662ae1df79 100644 --- a/opal/util/if.c +++ b/opal/util/if.c @@ -46,7 +46,7 @@ #endif #include "include/constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/if.h" #include "util/output.h" #include "util/strncpy.h" @@ -68,7 +68,7 @@ #endif struct ompi_if_t { - ompi_list_item_t super; + opal_list_item_t super; char if_name[IF_NAMESIZE]; int if_index; #ifndef WIN32 @@ -86,7 +86,7 @@ struct ompi_if_t { }; typedef struct ompi_if_t ompi_if_t; -static ompi_list_t ompi_if_list; +static opal_list_t ompi_if_list; static bool already_done = false; #define DEFAULT_NUMBER_INTERFACES 10 @@ -180,7 +180,7 @@ static int ompi_ifinit(void) /* * Setup indexes */ - OBJ_CONSTRUCT(&ompi_if_list, ompi_list_t); + OBJ_CONSTRUCT(&ompi_if_list, opal_list_t); ptr = (char*) ifconf.ifc_req; rem = ifconf.ifc_len; num = 0; @@ -192,7 +192,7 @@ static int ompi_ifinit(void) ompi_if_t *intf_ptr; int length; - OBJ_CONSTRUCT(&intf, ompi_list_item_t); + OBJ_CONSTRUCT(&intf, opal_list_item_t); /* compute offset for entries */ #if OMPI_HAVE_SA_LEN @@ -230,7 +230,7 @@ static int ompi_ifinit(void) intf.if_flags = ifr->ifr_flags; #ifndef SIOCGIFINDEX - intf.if_index = ompi_list_get_size(&ompi_if_list)+1; + intf.if_index = opal_list_get_size(&ompi_if_list)+1; #else if(ioctl(sd, SIOCGIFINDEX, ifr) < 0) { ompi_output(0,"ompi_ifinit: ioctl(SIOCGIFINDEX) failed with errno=%d", errno); @@ -266,7 +266,7 @@ static int ompi_ifinit(void) return OMPI_ERR_OUT_OF_RESOURCE; } memcpy(intf_ptr, &intf, sizeof(intf)); - ompi_list_append(&ompi_if_list, (ompi_list_item_t*)intf_ptr); + opal_list_append(&ompi_if_list, (opal_list_item_t*)intf_ptr); } free(ifconf.ifc_req); close(sd); @@ -322,7 +322,7 @@ static int ompi_ifinit(void) } /* create and populate ompi_if_list */ - OBJ_CONSTRUCT (&ompi_if_list, ompi_list_t); + OBJ_CONSTRUCT (&ompi_if_list, opal_list_t); /* loop through all the interfaces and create the list */ @@ -331,7 +331,7 @@ static int ompi_ifinit(void) /* do all this only if the interface is up */ if (if_list[i].iiFlags & IFF_UP) { - OBJ_CONSTRUCT (&intf, ompi_list_item_t); + OBJ_CONSTRUCT (&intf, opal_list_item_t); /* fill in the interface address */ memcpy (&intf.if_addr, &(if_list[i].iiAddress), sizeof(intf.if_addr)); @@ -346,7 +346,7 @@ static int ompi_ifinit(void) intf.if_flags = if_list[i].iiFlags; /* fill in the index in the table */ - intf.if_index = ompi_list_get_size(&ompi_if_list)+1; + intf.if_index = opal_list_get_size(&ompi_if_list)+1; /* generate the interface name on your own .... loopback: lo @@ -361,12 +361,12 @@ static int ompi_ifinit(void) /* copy all this into a persistent form and store it in the list */ intf_ptr = malloc(sizeof(ompi_if_t)); if (NULL == intf_ptr) { - ompi_output (0,"ompi_ifinit: Unable to malloc %d bytes",sizeof(ompi_list_t)); + ompi_output (0,"ompi_ifinit: Unable to malloc %d bytes",sizeof(opal_list_t)); return OMPI_ERR_OUT_OF_RESOURCE; } memcpy (intf_ptr, &intf, sizeof(intf)); - ompi_list_append(&ompi_if_list, (ompi_list_item_t *)intf_ptr); + opal_list_append(&ompi_if_list, (opal_list_item_t *)intf_ptr); } } @@ -384,7 +384,7 @@ int ompi_iffinalize(void) #ifndef WIN32 ompi_if_t *intf_ptr; - while (NULL != (intf_ptr = (ompi_if_t*)ompi_list_remove_first(&ompi_if_list))) { + while (NULL != (intf_ptr = (ompi_if_t*)opal_list_remove_first(&ompi_if_list))) { OBJ_RELEASE(intf_ptr); } OBJ_DESTRUCT(&ompi_if_list); @@ -406,9 +406,9 @@ int ompi_ifnametoaddr(const char* if_name, struct sockaddr* addr, int length) if(rc != OMPI_SUCCESS) return rc; - for(intf = (ompi_if_t*)ompi_list_get_first(&ompi_if_list); - intf != (ompi_if_t*)ompi_list_get_end(&ompi_if_list); - intf = (ompi_if_t*)ompi_list_get_next(intf)) { + for(intf = (ompi_if_t*)opal_list_get_first(&ompi_if_list); + intf != (ompi_if_t*)opal_list_get_end(&ompi_if_list); + intf = (ompi_if_t*)opal_list_get_next(intf)) { if(strcmp(intf->if_name, if_name) == 0) { memcpy(addr, &intf->if_addr, length); return OMPI_SUCCESS; @@ -430,9 +430,9 @@ int ompi_ifnametoindex(const char* if_name) if(rc != OMPI_SUCCESS) return rc; - for(intf = (ompi_if_t*)ompi_list_get_first(&ompi_if_list); - intf != (ompi_if_t*)ompi_list_get_end(&ompi_if_list); - intf = (ompi_if_t*)ompi_list_get_next(intf)) { + for(intf = (ompi_if_t*)opal_list_get_first(&ompi_if_list); + intf != (ompi_if_t*)opal_list_get_end(&ompi_if_list); + intf = (ompi_if_t*)opal_list_get_next(intf)) { if(strcmp(intf->if_name, if_name) == 0) { return intf->if_index; } @@ -473,9 +473,9 @@ int ompi_ifaddrtoname(const char* if_addr, char* if_name, int length) memcpy(&inaddr, h->h_addr, sizeof(inaddr)); } - for(intf = (ompi_if_t*)ompi_list_get_first(&ompi_if_list); - intf != (ompi_if_t*)ompi_list_get_end(&ompi_if_list); - intf = (ompi_if_t*)ompi_list_get_next(intf)) { + for(intf = (ompi_if_t*)opal_list_get_first(&ompi_if_list); + intf != (ompi_if_t*)opal_list_get_end(&ompi_if_list); + intf = (ompi_if_t*)opal_list_get_next(intf)) { if(intf->if_addr.sin_addr.s_addr == inaddr) { strncpy(if_name, intf->if_name, length); return OMPI_SUCCESS; @@ -492,7 +492,7 @@ int ompi_ifcount(void) { if(ompi_ifinit() != OMPI_SUCCESS) return (-1); - return ompi_list_get_size(&ompi_if_list); + return opal_list_get_size(&ompi_if_list); } @@ -506,7 +506,7 @@ int ompi_ifbegin(void) ompi_if_t *intf; if(ompi_ifinit() != OMPI_SUCCESS) return (-1); - intf = (ompi_if_t*)ompi_list_get_first(&ompi_if_list); + intf = (ompi_if_t*)opal_list_get_first(&ompi_if_list); if(NULL != intf) return intf->if_index; return (-1); @@ -525,13 +525,13 @@ int ompi_ifnext(int if_index) if(ompi_ifinit() != OMPI_SUCCESS) return (-1); - for(intf = (ompi_if_t*)ompi_list_get_first(&ompi_if_list); - intf != (ompi_if_t*)ompi_list_get_end(&ompi_if_list); - intf = (ompi_if_t*)ompi_list_get_next(intf)) { + for(intf = (ompi_if_t*)opal_list_get_first(&ompi_if_list); + intf != (ompi_if_t*)opal_list_get_end(&ompi_if_list); + intf = (ompi_if_t*)opal_list_get_next(intf)) { if(intf->if_index == if_index) { do { - ompi_if_t* if_next = (ompi_if_t*)ompi_list_get_next(intf); - ompi_if_t* if_end = (ompi_if_t*)ompi_list_get_end(&ompi_if_list); + ompi_if_t* if_next = (ompi_if_t*)opal_list_get_next(intf); + ompi_if_t* if_end = (ompi_if_t*)opal_list_get_end(&ompi_if_list); if (if_next == if_end) { return -1; } @@ -556,9 +556,9 @@ int ompi_ifindextoaddr(int if_index, struct sockaddr* if_addr, int length) if(rc != OMPI_SUCCESS) return rc; - for(intf = (ompi_if_t*)ompi_list_get_first(&ompi_if_list); - intf != (ompi_if_t*)ompi_list_get_end(&ompi_if_list); - intf = (ompi_if_t*)ompi_list_get_next(intf)) { + for(intf = (ompi_if_t*)opal_list_get_first(&ompi_if_list); + intf != (ompi_if_t*)opal_list_get_end(&ompi_if_list); + intf = (ompi_if_t*)opal_list_get_next(intf)) { if(intf->if_index == if_index) { memcpy(if_addr, &intf->if_addr, length); return OMPI_SUCCESS; @@ -580,9 +580,9 @@ int ompi_ifindextomask(int if_index, struct sockaddr* if_mask, int length) if(rc != OMPI_SUCCESS) return rc; - for(intf = (ompi_if_t*)ompi_list_get_first(&ompi_if_list); - intf != (ompi_if_t*)ompi_list_get_end(&ompi_if_list); - intf = (ompi_if_t*)ompi_list_get_next(intf)) { + for(intf = (ompi_if_t*)opal_list_get_first(&ompi_if_list); + intf != (ompi_if_t*)opal_list_get_end(&ompi_if_list); + intf = (ompi_if_t*)opal_list_get_next(intf)) { if(intf->if_index == if_index) { memcpy(if_mask, &intf->if_mask, length); return OMPI_SUCCESS; @@ -605,9 +605,9 @@ int ompi_ifindextoname(int if_index, char* if_name, int length) if(rc != OMPI_SUCCESS) return rc; - for(intf = (ompi_if_t*)ompi_list_get_first(&ompi_if_list); - intf != (ompi_if_t*)ompi_list_get_end(&ompi_if_list); - intf = (ompi_if_t*)ompi_list_get_next(intf)) { + for(intf = (ompi_if_t*)opal_list_get_first(&ompi_if_list); + intf != (ompi_if_t*)opal_list_get_end(&ompi_if_list); + intf = (ompi_if_t*)opal_list_get_next(intf)) { if(intf->if_index == if_index) { strncpy(if_name, intf->if_name, length); return OMPI_SUCCESS; diff --git a/orte/class/ompi_proc_table.c b/orte/class/ompi_proc_table.c index c191952f50..059ff620a1 100644 --- a/orte/class/ompi_proc_table.c +++ b/orte/class/ompi_proc_table.c @@ -30,7 +30,7 @@ struct ompi_proc_hash_node_t { - ompi_list_item_t super; + opal_list_item_t super; orte_process_name_t hn_key; void *hn_value; }; @@ -38,7 +38,7 @@ typedef struct ompi_proc_hash_node_t ompi_proc_hash_node_t; static OBJ_CLASS_INSTANCE( ompi_proc_hash_node_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL); @@ -47,7 +47,7 @@ void* ompi_hash_table_get_proc(ompi_hash_table_t* ht, const orte_process_name_t* proc) { uint32_t key = (proc->cellid << 24) + (proc->jobid << 16) + proc->vpid; - ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + opal_list_t* list = ht->ht_table + (key & ht->ht_mask); ompi_proc_hash_node_t *node; #if OMPI_ENABLE_DEBUG @@ -57,9 +57,9 @@ void* ompi_hash_table_get_proc(ompi_hash_table_t* ht, return NULL; } #endif - for(node = (ompi_proc_hash_node_t*)ompi_list_get_first(list); - node != (ompi_proc_hash_node_t*)ompi_list_get_end(list); - node = (ompi_proc_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_proc_hash_node_t*)opal_list_get_first(list); + node != (ompi_proc_hash_node_t*)opal_list_get_end(list); + node = (ompi_proc_hash_node_t*)opal_list_get_next(node)) { if (memcmp(&node->hn_key,proc,sizeof(orte_process_name_t)) == 0) { return node->hn_value; } @@ -74,7 +74,7 @@ int ompi_hash_table_set_proc( void* value) { uint32_t key = (proc->cellid << 24) + (proc->jobid << 16) + proc->vpid; - ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + opal_list_t* list = ht->ht_table + (key & ht->ht_mask); ompi_proc_hash_node_t *node; #if OMPI_ENABLE_DEBUG @@ -84,16 +84,16 @@ int ompi_hash_table_set_proc( return OMPI_ERR_BAD_PARAM; } #endif - for(node = (ompi_proc_hash_node_t*)ompi_list_get_first(list); - node != (ompi_proc_hash_node_t*)ompi_list_get_end(list); - node = (ompi_proc_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_proc_hash_node_t*)opal_list_get_first(list); + node != (ompi_proc_hash_node_t*)opal_list_get_end(list); + node = (ompi_proc_hash_node_t*)opal_list_get_next(node)) { if (memcmp(&node->hn_key,proc,sizeof(orte_process_name_t)) == 0) { node->hn_value = value; return OMPI_SUCCESS; } } - node = (ompi_proc_hash_node_t*)ompi_list_remove_first(&ht->ht_nodes); + node = (ompi_proc_hash_node_t*)opal_list_remove_first(&ht->ht_nodes); if(NULL == node) { node = OBJ_NEW(ompi_proc_hash_node_t); if(NULL == node) @@ -101,7 +101,7 @@ int ompi_hash_table_set_proc( } node->hn_key = *proc; node->hn_value = value; - ompi_list_append(list, (ompi_list_item_t*)node); + opal_list_append(list, (opal_list_item_t*)node); ht->ht_size++; return OMPI_SUCCESS; } @@ -112,7 +112,7 @@ int ompi_hash_table_remove_proc( const orte_process_name_t* proc) { uint32_t key = (proc->cellid << 24) + (proc->jobid << 16) + proc->vpid; - ompi_list_t* list = ht->ht_table + (key & ht->ht_mask); + opal_list_t* list = ht->ht_table + (key & ht->ht_mask); ompi_proc_hash_node_t *node; #if OMPI_ENABLE_DEBUG @@ -122,12 +122,12 @@ int ompi_hash_table_remove_proc( return OMPI_ERR_BAD_PARAM; } #endif - for(node = (ompi_proc_hash_node_t*)ompi_list_get_first(list); - node != (ompi_proc_hash_node_t*)ompi_list_get_end(list); - node = (ompi_proc_hash_node_t*)ompi_list_get_next(node)) { + for(node = (ompi_proc_hash_node_t*)opal_list_get_first(list); + node != (ompi_proc_hash_node_t*)opal_list_get_end(list); + node = (ompi_proc_hash_node_t*)opal_list_get_next(node)) { if (memcmp(&node->hn_key,proc,sizeof(orte_process_name_t)) == 0) { - ompi_list_remove_item(list, (ompi_list_item_t*)node); - ompi_list_append(&ht->ht_nodes, (ompi_list_item_t*)node); + opal_list_remove_item(list, (opal_list_item_t*)node); + opal_list_append(&ht->ht_nodes, (opal_list_item_t*)node); ht->ht_size--; return OMPI_SUCCESS; } diff --git a/orte/mca/errmgr/base/base.h b/orte/mca/errmgr/base/base.h index 8db9988aa2..04e672e000 100644 --- a/orte/mca/errmgr/base/base.h +++ b/orte/mca/errmgr/base/base.h @@ -25,7 +25,7 @@ #include "orte_config.h" #include "include/orte_constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/ns/ns_types.h" @@ -73,7 +73,7 @@ OMPI_DECLSPEC void orte_errmgr_base_abort(void); OMPI_DECLSPEC extern int orte_errmgr_base_output; OMPI_DECLSPEC extern bool orte_errmgr_base_selected; OMPI_DECLSPEC extern bool orte_errmgr_initialized; -OMPI_DECLSPEC extern ompi_list_t orte_errmgr_base_components_available; +OMPI_DECLSPEC extern opal_list_t orte_errmgr_base_components_available; OMPI_DECLSPEC extern mca_errmgr_base_component_t orte_errmgr_base_selected_component; /* diff --git a/orte/mca/errmgr/base/errmgr_base_open.c b/orte/mca/errmgr/base/errmgr_base_open.c index 74537fdd1b..e7561d134f 100644 --- a/orte/mca/errmgr/base/errmgr_base_open.c +++ b/orte/mca/errmgr/base/errmgr_base_open.c @@ -51,7 +51,7 @@ orte_errmgr_base_module_t orte_errmgr = { orte_errmgr_base_abort }; bool orte_errmgr_base_selected = false; -ompi_list_t orte_errmgr_base_components_available; +opal_list_t orte_errmgr_base_components_available; mca_errmgr_base_component_t orte_errmgr_base_selected_component; bool orte_errmgr_initialized = false; diff --git a/orte/mca/errmgr/base/errmgr_base_select.c b/orte/mca/errmgr/base/errmgr_base_select.c index 47c84ef122..6f03e45e3d 100644 --- a/orte/mca/errmgr/base/errmgr_base_select.c +++ b/orte/mca/errmgr/base/errmgr_base_select.c @@ -30,7 +30,7 @@ int orte_errmgr_base_select(bool *allow_multi_user_threads, bool *have_hidden_threads) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; mca_errmgr_base_component_t *component, *best_component = NULL; orte_errmgr_base_module_t *module, *best_module = NULL; @@ -39,9 +39,9 @@ int orte_errmgr_base_select(bool *allow_multi_user_threads, /* Iterate through all the available components */ - for (item = ompi_list_get_first(&orte_errmgr_base_components_available); - item != ompi_list_get_end(&orte_errmgr_base_components_available); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_errmgr_base_components_available); + item != opal_list_get_end(&orte_errmgr_base_components_available); + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (mca_errmgr_base_component_t *) cli->cli_component; diff --git a/orte/mca/gpr/base/base.h b/orte/mca/gpr/base/base.h index 003448680d..36ecc67c40 100644 --- a/orte/mca/gpr/base/base.h +++ b/orte/mca/gpr/base/base.h @@ -65,7 +65,7 @@ #include "threads/mutex.h" #include "threads/condition.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "dps/dps_types.h" #include "mca/mca.h" @@ -260,7 +260,7 @@ OMPI_DECLSPEC int orte_gpr_base_xfer_payload(orte_gpr_value_union_t *dest, */ OMPI_DECLSPEC extern int orte_gpr_base_output; OMPI_DECLSPEC extern bool orte_gpr_base_selected; -OMPI_DECLSPEC extern ompi_list_t orte_gpr_base_components_available; +OMPI_DECLSPEC extern opal_list_t orte_gpr_base_components_available; OMPI_DECLSPEC extern mca_gpr_base_component_t orte_gpr_base_selected_component; #if defined(c_plusplus) || defined(__cplusplus) diff --git a/orte/mca/gpr/base/gpr_base_open.c b/orte/mca/gpr/base/gpr_base_open.c index 4dc5ab6c9a..882297cefc 100644 --- a/orte/mca/gpr/base/gpr_base_open.c +++ b/orte/mca/gpr/base/gpr_base_open.c @@ -261,7 +261,7 @@ OBJ_CLASS_INSTANCE( int orte_gpr_base_output = -1; orte_gpr_base_module_t orte_gpr; bool orte_gpr_base_selected = false; -ompi_list_t orte_gpr_base_components_available; +opal_list_t orte_gpr_base_components_available; mca_gpr_base_component_t orte_gpr_base_selected_component; ompi_mutex_t orte_gpr_mutex; diff --git a/orte/mca/gpr/base/gpr_base_select.c b/orte/mca/gpr/base/gpr_base_select.c index 093f9ede0e..b274da7db9 100644 --- a/orte/mca/gpr/base/gpr_base_select.c +++ b/orte/mca/gpr/base/gpr_base_select.c @@ -27,7 +27,7 @@ */ int orte_gpr_base_select(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; mca_gpr_base_component_t *component, *best_component = NULL; orte_gpr_base_module_t *module, *best_module = NULL; @@ -36,9 +36,9 @@ int orte_gpr_base_select(void) /* Iterate through all the available components */ - for (item = ompi_list_get_first(&orte_gpr_base_components_available); - item != ompi_list_get_end(&orte_gpr_base_components_available); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_gpr_base_components_available); + item != opal_list_get_end(&orte_gpr_base_components_available); + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (mca_gpr_base_component_t *) cli->cli_component; diff --git a/orte/mca/gpr/gpr.h b/orte/mca/gpr/gpr.h index 5dccd27769..92d6f9bbec 100644 --- a/orte/mca/gpr/gpr.h +++ b/orte/mca/gpr/gpr.h @@ -36,7 +36,7 @@ #include #include "include/orte_constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/ns/ns_types.h" @@ -288,7 +288,7 @@ typedef int (*orte_gpr_base_module_put_nb_fn_t)(size_t cnt, orte_gpr_value_t **v * @retval ORTE_ERROR(s) Operation failed, returning the provided error code. * * @code - * ompi_list_t *keyval_list; + * opal_list_t *keyval_list; * * status_code = orte_gpr.get(addr_mode, segment, tokens, keyval_list); * @endcode diff --git a/orte/mca/gpr/replica/functional_layer/gpr_replica_del_index_fn.c b/orte/mca/gpr/replica/functional_layer/gpr_replica_del_index_fn.c index be9771df80..f52a37a989 100644 --- a/orte/mca/gpr/replica/functional_layer/gpr_replica_del_index_fn.c +++ b/orte/mca/gpr/replica/functional_layer/gpr_replica_del_index_fn.c @@ -117,26 +117,26 @@ int orte_gpr_replica_delete_entries_fn(orte_gpr_addr_mode_t addr_mode, } } count = 0; - for (reg = (orte_gpr_replica_core_t*)ompi_list_get_first(&seg->registry_entries); - reg != (orte_gpr_replica_core_t*)ompi_list_get_end(&seg->registry_entries); + for (reg = (orte_gpr_replica_core_t*)opal_list_get_first(&seg->registry_entries); + reg != (orte_gpr_replica_core_t*)opal_list_get_end(&seg->registry_entries); ) { - next = (orte_gpr_replica_core_t*)ompi_list_get_next(reg); + next = (orte_gpr_replica_core_t*)opal_list_get_next(reg); /* for each registry entry, check the key list */ if (orte_gpr_replica_check_key_list(addr_mode, num_keys, keys, reg->num_keys, reg->keys)) { /* found the key(s) on the list */ count++; - ompi_list_remove_item(&seg->registry_entries, ®->item); + opal_list_remove_item(&seg->registry_entries, ®->item); } reg = next; } /* update trigger counters */ - for (trig = (orte_gpr_replica_trigger_list_t*)ompi_list_get_first(&seg->triggers); - trig != (orte_gpr_replica_trigger_list_t*)ompi_list_get_end(&seg->triggers); - trig = (orte_gpr_replica_trigger_list_t*)ompi_list_get_next(trig)) { + for (trig = (orte_gpr_replica_trigger_list_t*)opal_list_get_first(&seg->triggers); + trig != (orte_gpr_replica_trigger_list_t*)opal_list_get_end(&seg->triggers); + trig = (orte_gpr_replica_trigger_list_t*)opal_list_get_next(trig)) { if (orte_gpr_replica_check_key_list(trig->addr_mode, trig->num_keys, trig->keys, num_keys, keys)) { trig->count = trig->count - count; @@ -161,7 +161,7 @@ int orte_gpr_replica_index_fn(orte_gpr_replica_segment_t *seg, size_t *cnt, char **index) { #if 0 - ompi_list_t *answer; + opal_list_t *answer; orte_gpr_replica_keytable_t *ptr; ompi_registry_index_value_t *ans; @@ -170,23 +170,23 @@ int orte_gpr_replica_index_fn(orte_gpr_replica_segment_t *seg, ORTE_NAME_ARGS(*ompi_rte_get_self()), seg->name); } - answer = OBJ_NEW(ompi_list_t); + answer = OBJ_NEW(opal_list_t); if (NULL == seg) { /* looking for index of global registry */ - for (ptr = (orte_gpr_replica_keytable_t*)ompi_list_get_first(&orte_gpr_replica_head.segment_dict); - ptr != (orte_gpr_replica_keytable_t*)ompi_list_get_end(&orte_gpr_replica_head.segment_dict); - ptr = (orte_gpr_replica_keytable_t*)ompi_list_get_next(ptr)) { + for (ptr = (orte_gpr_replica_keytable_t*)opal_list_get_first(&orte_gpr_replica_head.segment_dict); + ptr != (orte_gpr_replica_keytable_t*)opal_list_get_end(&orte_gpr_replica_head.segment_dict); + ptr = (orte_gpr_replica_keytable_t*)opal_list_get_next(ptr)) { ans = OBJ_NEW(ompi_registry_index_value_t); ans->token = strdup(ptr->token); - ompi_list_append(answer, &ans->item); + opal_list_append(answer, &ans->item); } } else { /* want index of specific segment */ - for (ptr = (orte_gpr_replica_keytable_t*)ompi_list_get_first(&seg->keytable); - ptr != (orte_gpr_replica_keytable_t*)ompi_list_get_end(&seg->keytable); - ptr = (orte_gpr_replica_keytable_t*)ompi_list_get_next(ptr)) { + for (ptr = (orte_gpr_replica_keytable_t*)opal_list_get_first(&seg->keytable); + ptr != (orte_gpr_replica_keytable_t*)opal_list_get_end(&seg->keytable); + ptr = (orte_gpr_replica_keytable_t*)opal_list_get_next(ptr)) { ans = OBJ_NEW(ompi_registry_index_value_t); ans->token = strdup(ptr->token); - ompi_list_append(answer, &ans->item); + opal_list_append(answer, &ans->item); } } diff --git a/orte/mca/gpr/replica/functional_layer/gpr_replica_dump_fn.c b/orte/mca/gpr/replica/functional_layer/gpr_replica_dump_fn.c index dec9d9155d..e0f256105e 100644 --- a/orte/mca/gpr/replica/functional_layer/gpr_replica_dump_fn.c +++ b/orte/mca/gpr/replica/functional_layer/gpr_replica_dump_fn.c @@ -190,7 +190,7 @@ int orte_gpr_replica_dump_callbacks_fn(orte_buffer_t *buffer) sprintf(tmp_out, "\nDUMP OF GPR REGISTERED CALLBACKS\n"); orte_gpr_replica_dump_load_string(buffer, &tmp_out); - if (0 >= (k= ompi_list_get_size(&(orte_gpr_replica.callbacks)))) { + if (0 >= (k= opal_list_get_size(&(orte_gpr_replica.callbacks)))) { sprintf(tmp_out, "--- None registered at this time ---"); orte_gpr_replica_dump_load_string(buffer, &tmp_out); } else { @@ -199,9 +199,9 @@ int orte_gpr_replica_dump_callbacks_fn(orte_buffer_t *buffer) orte_gpr_replica_dump_load_string(buffer, &tmp_out); i=0; - for (cb = (orte_gpr_replica_callbacks_t*)ompi_list_get_first(&(orte_gpr_replica.callbacks)); - cb != (orte_gpr_replica_callbacks_t*)ompi_list_get_end(&(orte_gpr_replica.callbacks)); - cb = (orte_gpr_replica_callbacks_t*)ompi_list_get_next(cb)) { + for (cb = (orte_gpr_replica_callbacks_t*)opal_list_get_first(&(orte_gpr_replica.callbacks)); + cb != (orte_gpr_replica_callbacks_t*)opal_list_get_end(&(orte_gpr_replica.callbacks)); + cb = (orte_gpr_replica_callbacks_t*)opal_list_get_next(cb)) { if (NULL == cb) { sprintf(tmp_out, "\n\t--- BAD CALLBACK POINTER %lu ---", (unsigned long) i); diff --git a/orte/mca/gpr/replica/functional_layer/gpr_replica_messaging_fn.c b/orte/mca/gpr/replica/functional_layer/gpr_replica_messaging_fn.c index bf9d0e5681..49e9523fbb 100644 --- a/orte/mca/gpr/replica/functional_layer/gpr_replica_messaging_fn.c +++ b/orte/mca/gpr/replica/functional_layer/gpr_replica_messaging_fn.c @@ -63,7 +63,7 @@ int orte_gpr_replica_process_callbacks(void) } orte_gpr_replica.processing_callbacks = true; - while (NULL != (cb = (orte_gpr_replica_callbacks_t*)ompi_list_remove_last(&orte_gpr_replica.callbacks))) { + while (NULL != (cb = (orte_gpr_replica_callbacks_t*)opal_list_remove_last(&orte_gpr_replica.callbacks))) { if (NULL == cb->requestor) { /* local callback */ if (orte_gpr_replica_globals.debug) { ompi_output(0, "process_callbacks: local"); @@ -267,9 +267,9 @@ int orte_gpr_replica_register_callback(orte_gpr_replica_subscription_t *sub, j++; /* see if a callback has already been registered for this process */ - for (cb = (orte_gpr_replica_callbacks_t*)ompi_list_get_first(&(orte_gpr_replica.callbacks)); - cb != (orte_gpr_replica_callbacks_t*)ompi_list_get_end(&(orte_gpr_replica.callbacks)); - cb = (orte_gpr_replica_callbacks_t*)ompi_list_get_next(cb)) { + for (cb = (orte_gpr_replica_callbacks_t*)opal_list_get_first(&(orte_gpr_replica.callbacks)); + cb != (orte_gpr_replica_callbacks_t*)opal_list_get_end(&(orte_gpr_replica.callbacks)); + cb = (orte_gpr_replica_callbacks_t*)opal_list_get_next(cb)) { if ((NULL == reqs[i]->requestor && NULL == cb->requestor) || ((NULL != reqs[i]->requestor && NULL != cb->requestor) && @@ -301,7 +301,7 @@ int orte_gpr_replica_register_callback(orte_gpr_replica_subscription_t *sub, goto CLEANUP; } } - ompi_list_append(&orte_gpr_replica.callbacks, &cb->item); + opal_list_append(&orte_gpr_replica.callbacks, &cb->item); /* construct the message */ cb->message = OBJ_NEW(orte_gpr_notify_message_t); diff --git a/orte/mca/gpr/replica/functional_layer/gpr_replica_put_get_fn.c b/orte/mca/gpr/replica/functional_layer/gpr_replica_put_get_fn.c index 9320f71a64..53f149574e 100644 --- a/orte/mca/gpr/replica/functional_layer/gpr_replica_put_get_fn.c +++ b/orte/mca/gpr/replica/functional_layer/gpr_replica_put_get_fn.c @@ -40,7 +40,7 @@ * - used exclusively by "get" routines */ typedef struct { - ompi_list_item_t item; /* required for this to be on list */ + opal_list_item_t item; /* required for this to be on list */ orte_gpr_replica_itag_t itag; /* itag for this value's key */ orte_data_type_t type; /* the type of value stored */ orte_gpr_value_union_t value; @@ -73,7 +73,7 @@ static void orte_gpr_replica_ival_list_destructor(orte_gpr_replica_ival_list_t* /* define instance of ival_list_t */ OBJ_CLASS_INSTANCE( orte_gpr_replica_ival_list_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_gpr_replica_ival_list_constructor, /* constructor */ orte_gpr_replica_ival_list_destructor); /* destructor */ @@ -82,9 +82,9 @@ OBJ_CLASS_INSTANCE( * - used exclusively by "get" routines */ typedef struct { - ompi_list_item_t item; /* required for this to be on list */ + opal_list_item_t item; /* required for this to be on list */ orte_gpr_replica_container_t *cptr; /* pointer to the container */ - ompi_list_t *ival_list; /* list of ival_list_t of values found by get */ + opal_list_t *ival_list; /* list of ival_list_t of values found by get */ } orte_gpr_replica_get_list_t; OBJ_CLASS_DECLARATION(orte_gpr_replica_get_list_t); @@ -93,7 +93,7 @@ OBJ_CLASS_DECLARATION(orte_gpr_replica_get_list_t); static void orte_gpr_replica_get_list_constructor(orte_gpr_replica_get_list_t* ptr) { ptr->cptr = NULL; - ptr->ival_list = OBJ_NEW(ompi_list_t); + ptr->ival_list = OBJ_NEW(opal_list_t); } /* destructor - used to free any resources held by instance */ @@ -101,7 +101,7 @@ static void orte_gpr_replica_get_list_destructor(orte_gpr_replica_get_list_t* pt { orte_gpr_replica_ival_list_t *iptr; - while (NULL != (iptr = (orte_gpr_replica_ival_list_t*)ompi_list_remove_first(ptr->ival_list))) { + while (NULL != (iptr = (orte_gpr_replica_ival_list_t*)opal_list_remove_first(ptr->ival_list))) { OBJ_RELEASE(iptr); } OBJ_RELEASE(ptr->ival_list); @@ -111,7 +111,7 @@ static void orte_gpr_replica_get_list_destructor(orte_gpr_replica_get_list_t* pt /* define instance of get_list_t */ OBJ_CLASS_INSTANCE( orte_gpr_replica_get_list_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_gpr_replica_get_list_constructor, /* constructor */ orte_gpr_replica_get_list_destructor); /* destructor */ @@ -271,7 +271,7 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode, orte_gpr_replica_itag_t *keytags, size_t num_keys, size_t *cnt, orte_gpr_value_t ***values) { - ompi_list_t get_list; + opal_list_t get_list; orte_gpr_replica_get_list_t *gptr; orte_gpr_replica_ival_list_t *ival_list; orte_gpr_replica_container_t **cptr, *cptr2; @@ -312,7 +312,7 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode, } /* initialize the list of findings */ - OBJ_CONSTRUCT(&get_list, ompi_list_t); + OBJ_CONSTRUCT(&get_list, opal_list_t); *cnt = 0; *values = NULL; @@ -366,10 +366,10 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode, OBJ_RELEASE(ival_list); return rc; } - ompi_list_append(gptr->ival_list, &ival_list->item); + opal_list_append(gptr->ival_list, &ival_list->item); } } - ompi_list_append(&get_list, &gptr->item); + opal_list_append(&get_list, &gptr->item); (*cnt)++; /* update number of containers that had something found */ } } @@ -388,7 +388,7 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode, goto CLEANUP; } for (i=0; i < *cnt; i++) { - gptr = (orte_gpr_replica_get_list_t*)ompi_list_remove_first(&get_list); + gptr = (orte_gpr_replica_get_list_t*)opal_list_remove_first(&get_list); if (NULL == gptr) { rc = ORTE_ERROR; goto CLEANUP; @@ -401,7 +401,7 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode, } (*values)[i]->addr_mode = addr_mode; (*values)[i]->segment = strdup(seg->name); - (*values)[i]->cnt = ompi_list_get_size(gptr->ival_list); + (*values)[i]->cnt = opal_list_get_size(gptr->ival_list); cptr2 = gptr->cptr; (*values)[i]->num_tokens = cptr2->num_itags; (*values)[i]->tokens = (char **)malloc(cptr2->num_itags * sizeof(char*)); @@ -423,7 +423,7 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode, kptr = (*values)[i]->keyvals; for (j=0; j < (*values)[i]->cnt; j++) { - ival_list = (orte_gpr_replica_ival_list_t*)ompi_list_remove_first(gptr->ival_list); + ival_list = (orte_gpr_replica_ival_list_t*)opal_list_remove_first(gptr->ival_list); if (NULL == ival_list) { rc = ORTE_ERROR; goto CLEANUP; @@ -449,7 +449,7 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode, CLEANUP: - while (NULL != (gptr = (orte_gpr_replica_get_list_t*)ompi_list_remove_first(&get_list))) { + while (NULL != (gptr = (orte_gpr_replica_get_list_t*)opal_list_remove_first(&get_list))) { OBJ_RELEASE(gptr); } OBJ_DESTRUCT(&get_list); diff --git a/orte/mca/gpr/replica/gpr_replica.h b/orte/mca/gpr/replica/gpr_replica.h index 6241ea6c04..39b0cc218c 100644 --- a/orte/mca/gpr/replica/gpr_replica.h +++ b/orte/mca/gpr/replica/gpr_replica.h @@ -142,7 +142,7 @@ struct orte_gpr_replica_t { orte_pointer_array_t *subscriptions; /**< Managed array of pointers to subscriptions */ size_t num_subs; bool processing_callbacks; - ompi_list_t callbacks; /**< List of callbacks to be processed */ + opal_list_t callbacks; /**< List of callbacks to be processed */ }; typedef struct orte_gpr_replica_t orte_gpr_replica_t; @@ -360,7 +360,7 @@ OBJ_CLASS_DECLARATION(orte_gpr_replica_action_taken_t); * Callback list objects */ struct orte_gpr_replica_callbacks_t { - ompi_list_item_t item; + opal_list_item_t item; orte_process_name_t *requestor; orte_gpr_notify_message_t *message; }; @@ -377,7 +377,7 @@ OBJ_CLASS_DECLARATION(orte_gpr_replica_callbacks_t); * THIS IS NOT IMPLEMENTED YET */ struct orte_gpr_replica_list_t { - ompi_list_item_t item; /**< Allows this item to be placed on a list */ + opal_list_item_t item; /**< Allows this item to be placed on a list */ orte_process_name_t *replica; /**< Name of the replica */ }; typedef struct orte_gpr_replica_list_t orte_gpr_replica_list_t; diff --git a/orte/mca/gpr/replica/gpr_replica_class_instances.h b/orte/mca/gpr/replica/gpr_replica_class_instances.h index d0e9e7f5bd..93120907af 100644 --- a/orte/mca/gpr/replica/gpr_replica_class_instances.h +++ b/orte/mca/gpr/replica/gpr_replica_class_instances.h @@ -494,7 +494,7 @@ static void orte_gpr_replica_callbacks_destructor(orte_gpr_replica_callbacks_t* /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_gpr_replica_callbacks_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_gpr_replica_callbacks_construct, /* constructor */ orte_gpr_replica_callbacks_destructor); /* destructor */ @@ -518,7 +518,7 @@ static void orte_gpr_replica_list_destructor(orte_gpr_replica_list_t* replica) /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_gpr_replica_list_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_gpr_replica_list_construct, /* constructor */ orte_gpr_replica_list_destructor); /* destructor */ @@ -527,7 +527,7 @@ OBJ_CLASS_INSTANCE( /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_gpr_replica_write_invalidate_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ NULL, /* constructor */ NULL); /* destructor */ diff --git a/orte/mca/gpr/replica/gpr_replica_component.c b/orte/mca/gpr/replica/gpr_replica_component.c index 80eea25818..7a4cbf57a4 100644 --- a/orte/mca/gpr/replica/gpr_replica_component.c +++ b/orte/mca/gpr/replica/gpr_replica_component.c @@ -215,7 +215,7 @@ orte_gpr_base_module_t *orte_gpr_replica_init(bool *allow_multi_user_threads, bo orte_gpr_replica.num_subs = 0; /* initialize the callback list head */ - OBJ_CONSTRUCT(&orte_gpr_replica.callbacks, ompi_list_t); + OBJ_CONSTRUCT(&orte_gpr_replica.callbacks, opal_list_t); orte_gpr_replica.processing_callbacks = false; /* initialize the local subscription and trigger trackers */ @@ -325,7 +325,7 @@ int orte_gpr_replica_finalize(void) } OBJ_RELEASE(orte_gpr_replica.triggers); - while (NULL != (cb = (orte_gpr_replica_callbacks_t*)ompi_list_remove_first(&orte_gpr_replica.callbacks))) { + while (NULL != (cb = (orte_gpr_replica_callbacks_t*)opal_list_remove_first(&orte_gpr_replica.callbacks))) { OBJ_RELEASE(cb); } OBJ_DESTRUCT(&orte_gpr_replica.callbacks); diff --git a/orte/mca/iof/base/base.h b/orte/mca/iof/base/base.h index 79e8ff278a..f185fc378e 100644 --- a/orte/mca/iof/base/base.h +++ b/orte/mca/iof/base/base.h @@ -45,9 +45,9 @@ extern "C" { struct orte_iof_base_t { int iof_output; - ompi_list_t iof_components_opened; + opal_list_t iof_components_opened; bool iof_flush; - ompi_list_t iof_endpoints; + opal_list_t iof_endpoints; ompi_mutex_t iof_lock; ompi_condition_t iof_condition; size_t iof_waiting; diff --git a/orte/mca/iof/base/iof_base_close.c b/orte/mca/iof/base/iof_base_close.c index 8a6c1c24c3..0b69db6814 100644 --- a/orte/mca/iof/base/iof_base_close.c +++ b/orte/mca/iof/base/iof_base_close.c @@ -29,7 +29,7 @@ int orte_iof_base_close(void) { - ompi_list_item_t* item; + opal_list_item_t* item; /* We only need to flush if an iof component was successfully selected */ @@ -40,14 +40,14 @@ int orte_iof_base_close(void) } /* shutdown any remaining opened components */ - if (0 != ompi_list_get_size(&orte_iof_base.iof_components_opened)) { + if (0 != opal_list_get_size(&orte_iof_base.iof_components_opened)) { mca_base_components_close(orte_iof_base.iof_output, &orte_iof_base.iof_components_opened, NULL); } /* final cleanup of resources */ OMPI_THREAD_LOCK(&orte_iof_base.iof_lock); - while((item = ompi_list_remove_first(&orte_iof_base.iof_endpoints)) != NULL) { + while((item = opal_list_remove_first(&orte_iof_base.iof_endpoints)) != NULL) { OBJ_RELEASE(item); } OMPI_THREAD_UNLOCK(&orte_iof_base.iof_lock); diff --git a/orte/mca/iof/base/iof_base_endpoint.c b/orte/mca/iof/base/iof_base_endpoint.c index 7bbe4d3a79..9ff69bc45c 100644 --- a/orte/mca/iof/base/iof_base_endpoint.c +++ b/orte/mca/iof/base/iof_base_endpoint.c @@ -38,7 +38,7 @@ static void orte_iof_base_endpoint_construct(orte_iof_base_endpoint_t* endpoint) endpoint->ep_ack = 0; endpoint->ep_fd = -1; memset(&endpoint->ep_event,0,sizeof(endpoint->ep_event)); - OBJ_CONSTRUCT(&endpoint->ep_frags, ompi_list_t); + OBJ_CONSTRUCT(&endpoint->ep_frags, opal_list_t); } static void orte_iof_base_endpoint_destruct(orte_iof_base_endpoint_t* endpoint) @@ -51,7 +51,7 @@ static void orte_iof_base_endpoint_destruct(orte_iof_base_endpoint_t* endpoint) OBJ_CLASS_INSTANCE( orte_iof_base_endpoint_t, - ompi_list_item_t, + opal_list_item_t, orte_iof_base_endpoint_construct, orte_iof_base_endpoint_destruct); @@ -70,7 +70,7 @@ static void orte_iof_base_endpoint_send_cb( { orte_iof_base_frag_t* frag = (orte_iof_base_frag_t*)cbdata; orte_iof_base_endpoint_t* endpoint = frag->frag_owner; - ompi_list_remove_item(&endpoint->ep_frags, &frag->super); + opal_list_remove_item(&endpoint->ep_frags, &frag->super); ORTE_IOF_BASE_FRAG_RETURN(frag); } @@ -110,7 +110,7 @@ static void orte_iof_base_endpoint_read_handler(int fd, short flags, void *cbdat } /* Do not append the fragment before we know that we have some data (even 0 bytes it's OK) */ frag->frag_owner = endpoint; - ompi_list_append(&endpoint->ep_frags, &frag->super); + opal_list_append(&endpoint->ep_frags, &frag->super); frag->frag_iov[1].iov_len = frag->frag_len = rc; @@ -156,8 +156,8 @@ static void orte_iof_base_endpoint_write_handler(int sd, short flags, void *user * until the output descriptor would block */ OMPI_THREAD_LOCK(&orte_iof_base.iof_lock); - while(ompi_list_get_size(&endpoint->ep_frags)) { - orte_iof_base_frag_t* frag = (orte_iof_base_frag_t*)ompi_list_get_first(&endpoint->ep_frags); + while(opal_list_get_size(&endpoint->ep_frags)) { + orte_iof_base_frag_t* frag = (orte_iof_base_frag_t*)opal_list_get_first(&endpoint->ep_frags); int rc = write(endpoint->ep_fd, frag->frag_ptr, frag->frag_len); if(rc < 0) { if(errno == EAGAIN) @@ -171,12 +171,12 @@ static void orte_iof_base_endpoint_write_handler(int sd, short flags, void *user if(frag->frag_len > 0) { break; } - ompi_list_remove_item(&endpoint->ep_frags, &frag->super); + opal_list_remove_item(&endpoint->ep_frags, &frag->super); orte_iof_base_frag_ack(frag); } /* is there anything left to write? */ - if(ompi_list_get_size(&endpoint->ep_frags) == 0) { + if(opal_list_get_size(&endpoint->ep_frags) == 0) { ompi_event_del(&endpoint->ep_event); if(orte_iof_base.iof_waiting) { ompi_condition_signal(&orte_iof_base.iof_condition); @@ -195,10 +195,10 @@ static orte_iof_base_endpoint_t* orte_iof_base_endpoint_lookup( orte_iof_base_mode_t mode, int tag) { - ompi_list_item_t* item; - for(item = ompi_list_get_first(&orte_iof_base.iof_endpoints); - item != ompi_list_get_end(&orte_iof_base.iof_endpoints); - item = ompi_list_get_next(item)) { + opal_list_item_t* item; + for(item = opal_list_get_first(&orte_iof_base.iof_endpoints); + item != opal_list_get_end(&orte_iof_base.iof_endpoints); + item = opal_list_get_next(item)) { orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item; if(orte_ns.compare(ORTE_NS_CMP_ALL,proc,&endpoint->ep_name) == 0 && endpoint->ep_tag == tag && endpoint->ep_mode == mode) { @@ -271,7 +271,7 @@ int orte_iof_base_endpoint_create( return OMPI_ERR_BAD_PARAM; } - ompi_list_append(&orte_iof_base.iof_endpoints, &endpoint->super); + opal_list_append(&orte_iof_base.iof_endpoints, &endpoint->super); OMPI_THREAD_UNLOCK(&orte_iof_base.iof_lock); return ORTE_SUCCESS; } @@ -286,16 +286,16 @@ int orte_iof_base_endpoint_delete( orte_ns_cmp_bitmask_t mask, int tag) { - ompi_list_item_t* item; + opal_list_item_t* item; OMPI_THREAD_LOCK(&orte_iof_base.iof_lock); - item = ompi_list_get_first(&orte_iof_base.iof_endpoints); - while(item != ompi_list_get_end(&orte_iof_base.iof_endpoints)) { - ompi_list_item_t* next = ompi_list_get_next(item); + item = opal_list_get_first(&orte_iof_base.iof_endpoints); + while(item != opal_list_get_end(&orte_iof_base.iof_endpoints)) { + opal_list_item_t* next = opal_list_get_next(item); orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item; if(orte_ns.compare(mask,proc,&endpoint->ep_name) == 0 && endpoint->ep_tag == tag) { OBJ_RELEASE(endpoint); - ompi_list_remove_item(&orte_iof_base.iof_endpoints,&endpoint->super); + opal_list_remove_item(&orte_iof_base.iof_endpoints,&endpoint->super); } item = next; } @@ -318,7 +318,7 @@ int orte_iof_base_endpoint_close(orte_iof_base_endpoint_t* endpoint) } break; case ORTE_IOF_SINK: - if(ompi_list_get_size(&endpoint->ep_frags) == 0) { + if(opal_list_get_size(&endpoint->ep_frags) == 0) { endpoint->ep_state = ORTE_IOF_EP_CLOSED; } break; @@ -344,11 +344,11 @@ orte_iof_base_endpoint_t* orte_iof_base_endpoint_match( orte_ns_cmp_bitmask_t dst_mask, int dst_tag) { - ompi_list_item_t* item; + opal_list_item_t* item; OMPI_THREAD_LOCK(&orte_iof_base.iof_lock); - for(item = ompi_list_get_first(&orte_iof_base.iof_endpoints); - item != ompi_list_get_end(&orte_iof_base.iof_endpoints); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&orte_iof_base.iof_endpoints); + item != opal_list_get_end(&orte_iof_base.iof_endpoints); + item = opal_list_get_next(item)) { orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item; if(orte_ns.compare(dst_mask,dst_name,&endpoint->ep_name) == 0) { if(endpoint->ep_tag == dst_tag || endpoint->ep_tag == ORTE_IOF_ANY || dst_tag == ORTE_IOF_ANY) { @@ -395,7 +395,7 @@ int orte_iof_base_endpoint_forward( frag->frag_hdr.hdr_msg = *hdr; /* try to write w/out copying data */ - if(ompi_list_get_size(&endpoint->ep_frags) == 0) { + if(opal_list_get_size(&endpoint->ep_frags) == 0) { rc = write(endpoint->ep_fd,data,len); if(rc < 0) { orte_iof_base_endpoint_closed(endpoint); @@ -409,8 +409,8 @@ int orte_iof_base_endpoint_forward( /* handle incomplete write */ frag->frag_ptr = frag->frag_data; memcpy(frag->frag_ptr, data+rc, frag->frag_len); - ompi_list_append(&endpoint->ep_frags, &frag->super); - if(ompi_list_get_size(&endpoint->ep_frags) == 1) { + opal_list_append(&endpoint->ep_frags, &frag->super); + if(opal_list_get_size(&endpoint->ep_frags) == 1) { ompi_event_add(&endpoint->ep_event,0); } OMPI_THREAD_UNLOCK(&orte_iof_base.iof_lock); diff --git a/orte/mca/iof/base/iof_base_endpoint.h b/orte/mca/iof/base/iof_base_endpoint.h index da8f3844e1..77a72d3772 100644 --- a/orte/mca/iof/base/iof_base_endpoint.h +++ b/orte/mca/iof/base/iof_base_endpoint.h @@ -2,7 +2,7 @@ #define _IOF_BASE_ENDPOINT_ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "event/event.h" #include "mca/iof/iof.h" #include "mca/iof/base/iof_base_header.h" @@ -18,7 +18,7 @@ enum { */ struct orte_iof_base_endpoint_t { - ompi_list_item_t super; + opal_list_item_t super; orte_iof_base_mode_t ep_mode; orte_process_name_t ep_name; int ep_tag; @@ -27,7 +27,7 @@ struct orte_iof_base_endpoint_t { uint32_t ep_seq; uint32_t ep_ack; ompi_event_t ep_event; - ompi_list_t ep_frags; + opal_list_t ep_frags; }; typedef struct orte_iof_base_endpoint_t orte_iof_base_endpoint_t; @@ -120,7 +120,7 @@ int orte_iof_base_endpoint_ack( static inline bool orte_iof_base_endpoint_pending( orte_iof_base_endpoint_t* endpoint) { - return ompi_list_get_size(&endpoint->ep_frags) || (endpoint->ep_seq != endpoint->ep_ack); + return opal_list_get_size(&endpoint->ep_frags) || (endpoint->ep_seq != endpoint->ep_ack); } #endif diff --git a/orte/mca/iof/base/iof_base_flush.c b/orte/mca/iof/base/iof_base_flush.c index ac1d14e66d..a9886b5cc0 100644 --- a/orte/mca/iof/base/iof_base_flush.c +++ b/orte/mca/iof/base/iof_base_flush.c @@ -41,7 +41,7 @@ static void orte_iof_base_timer_cb(int fd, short flags, void *cbdata) int orte_iof_base_flush(void) { - ompi_list_item_t* item; + opal_list_item_t* item; ompi_event_t ev; struct timeval tv = { 0, 0 }; int flushed = 0; @@ -67,12 +67,12 @@ int orte_iof_base_flush(void) orte_iof_base.iof_waiting++; /* wait for all of the endpoints to reach an idle state */ - pending = ompi_list_get_size(&orte_iof_base.iof_endpoints); + pending = opal_list_get_size(&orte_iof_base.iof_endpoints); while(pending > 0) { pending = 0; - for(item = ompi_list_get_first(&orte_iof_base.iof_endpoints); - item != ompi_list_get_end(&orte_iof_base.iof_endpoints); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&orte_iof_base.iof_endpoints); + item != opal_list_get_end(&orte_iof_base.iof_endpoints); + item = opal_list_get_next(item)) { orte_iof_base_endpoint_t* endpoint = (orte_iof_base_endpoint_t*)item; if(orte_iof_base_endpoint_pending(endpoint)) { pending++; diff --git a/orte/mca/iof/base/iof_base_fragment.c b/orte/mca/iof/base/iof_base_fragment.c index 4013ec062a..6bc91c9604 100644 --- a/orte/mca/iof/base/iof_base_fragment.c +++ b/orte/mca/iof/base/iof_base_fragment.c @@ -48,7 +48,7 @@ static void orte_iof_base_frag_destruct(orte_iof_base_frag_t* frag) OBJ_CLASS_INSTANCE( orte_iof_base_frag_t, - ompi_list_item_t, + opal_list_item_t, orte_iof_base_frag_construct, orte_iof_base_frag_destruct); diff --git a/orte/mca/iof/base/iof_base_fragment.h b/orte/mca/iof/base/iof_base_fragment.h index 980c47462a..ffaa67b089 100644 --- a/orte/mca/iof/base/iof_base_fragment.h +++ b/orte/mca/iof/base/iof_base_fragment.h @@ -2,7 +2,7 @@ #define _IOF_BASE_FRAGMENT_ #include "ompi_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "opal/class/opal_free_list.h" #include "event/event.h" #include "mca/iof/iof.h" @@ -15,7 +15,7 @@ */ struct orte_iof_base_frag_t { - ompi_list_item_t super; + opal_list_item_t super; orte_iof_base_header_t frag_hdr; orte_process_name_t frag_src; unsigned char frag_data[ORTE_IOF_BASE_MSG_MAX]; @@ -34,7 +34,7 @@ OBJ_CLASS_DECLARATION(orte_iof_base_frag_t); */ #define ORTE_IOF_BASE_FRAG_ALLOC(frag,rc) { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OPAL_FREE_LIST_GET(&orte_iof_base.iof_fragments, item,rc); \ if((frag = (orte_iof_base_frag_t*)item) == NULL) { \ ompi_output(0, "ORTE_IOF_BASE_FRAG_ALLOC failed with status=%d\n", rc); \ @@ -42,7 +42,7 @@ OBJ_CLASS_DECLARATION(orte_iof_base_frag_t); } #define ORTE_IOF_BASE_FRAG_RETURN(frag) \ - OPAL_FREE_LIST_RETURN(&orte_iof_base.iof_fragments, (ompi_list_item_t*)frag) + OPAL_FREE_LIST_RETURN(&orte_iof_base.iof_fragments, (opal_list_item_t*)frag) /** diff --git a/orte/mca/iof/base/iof_base_open.c b/orte/mca/iof/base/iof_base_open.c index b85cc5b653..59c98d441d 100644 --- a/orte/mca/iof/base/iof_base_open.c +++ b/orte/mca/iof/base/iof_base_open.c @@ -54,8 +54,8 @@ int orte_iof_base_open(void) char* str_value; /* Initialize globals */ - OBJ_CONSTRUCT(&orte_iof_base.iof_components_opened, ompi_list_t); - OBJ_CONSTRUCT(&orte_iof_base.iof_endpoints, ompi_list_t); + OBJ_CONSTRUCT(&orte_iof_base.iof_components_opened, opal_list_t); + OBJ_CONSTRUCT(&orte_iof_base.iof_endpoints, opal_list_t); OBJ_CONSTRUCT(&orte_iof_base.iof_lock, ompi_mutex_t); OBJ_CONSTRUCT(&orte_iof_base.iof_condition, ompi_condition_t); OBJ_CONSTRUCT(&orte_iof_base.iof_fragments, opal_free_list_t); diff --git a/orte/mca/iof/base/iof_base_select.c b/orte/mca/iof/base/iof_base_select.c index cc89a95a56..1473b32918 100644 --- a/orte/mca/iof/base/iof_base_select.c +++ b/orte/mca/iof/base/iof_base_select.c @@ -32,7 +32,7 @@ orte_iof_base_module_t orte_iof; */ int orte_iof_base_select(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; int selected_priority = -1; orte_iof_base_component_t *selected_component = NULL; @@ -41,9 +41,9 @@ int orte_iof_base_select(void) bool selected_have_hidden; /* Traverse the list of opened modules; call their init functions. */ - for(item = ompi_list_get_first(&orte_iof_base.iof_components_opened); - item != ompi_list_get_end(&orte_iof_base.iof_components_opened); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&orte_iof_base.iof_components_opened); + item != opal_list_get_end(&orte_iof_base.iof_components_opened); + item = opal_list_get_next(item)) { orte_iof_base_component_t* component; cli = (mca_base_component_list_item_t *) item; @@ -82,9 +82,9 @@ int orte_iof_base_select(void) } /* unload all components that were not selected */ - item = ompi_list_get_first(&orte_iof_base.iof_components_opened); - while(item != ompi_list_get_end(&orte_iof_base.iof_components_opened)) { - ompi_list_item_t* next = ompi_list_get_next(item); + item = opal_list_get_first(&orte_iof_base.iof_components_opened); + while(item != opal_list_get_end(&orte_iof_base.iof_components_opened)) { + opal_list_item_t* next = opal_list_get_next(item); orte_iof_base_component_t* component; cli = (mca_base_component_list_item_t *) item; component = (orte_iof_base_component_t *) cli->cli_component; @@ -93,7 +93,7 @@ int orte_iof_base_select(void) "orte_iof_base_select: module %s unloaded", component->iof_version.mca_component_name); mca_base_component_repository_release((mca_base_component_t *) component); - ompi_list_remove_item(&orte_iof_base.iof_components_opened, item); + opal_list_remove_item(&orte_iof_base.iof_components_opened, item); OBJ_RELEASE(item); } item = next; diff --git a/orte/mca/iof/iof.h b/orte/mca/iof/iof.h index ade03f536f..7f28d10b9d 100644 --- a/orte/mca/iof/iof.h +++ b/orte/mca/iof/iof.h @@ -23,7 +23,7 @@ #define ORTE_IOF_H #include "orte_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/ns/ns.h" diff --git a/orte/mca/iof/svc/iof_svc.h b/orte/mca/iof/svc/iof_svc.h index cf9b6fa0f1..3b34fe8153 100644 --- a/orte/mca/iof/svc/iof_svc.h +++ b/orte/mca/iof/svc/iof_svc.h @@ -137,8 +137,8 @@ int orte_iof_svc_unsubscribe( struct orte_iof_svc_component_t { orte_iof_base_component_t super; int svc_debug; - ompi_list_t svc_published; - ompi_list_t svc_subscribed; + opal_list_t svc_published; + opal_list_t svc_subscribed; ompi_mutex_t svc_lock; struct iovec svc_iov[1]; }; diff --git a/orte/mca/iof/svc/iof_svc_component.c b/orte/mca/iof/svc/iof_svc_component.c index 0857669b21..a4e5233837 100644 --- a/orte/mca/iof/svc/iof_svc_component.c +++ b/orte/mca/iof/svc/iof_svc_component.c @@ -105,14 +105,14 @@ static int orte_iof_svc_open(void) static int orte_iof_svc_close(void) { - ompi_list_item_t* item; + opal_list_item_t* item; if (initialized) { OMPI_THREAD_LOCK(&mca_iof_svc_component.svc_lock); - while((item = ompi_list_remove_first(&mca_iof_svc_component.svc_subscribed)) != NULL) { + while((item = opal_list_remove_first(&mca_iof_svc_component.svc_subscribed)) != NULL) { OBJ_RELEASE(item); } - while((item = ompi_list_remove_first(&mca_iof_svc_component.svc_published)) != NULL) { + while((item = opal_list_remove_first(&mca_iof_svc_component.svc_published)) != NULL) { OBJ_RELEASE(item); } OMPI_THREAD_UNLOCK(&mca_iof_svc_component.svc_lock); @@ -137,8 +137,8 @@ orte_iof_svc_init(int* priority, bool *allow_multi_user_threads, bool *have_hidd *allow_multi_user_threads = true; *have_hidden_threads = false; - OBJ_CONSTRUCT(&mca_iof_svc_component.svc_subscribed, ompi_list_t); - OBJ_CONSTRUCT(&mca_iof_svc_component.svc_published, ompi_list_t); + OBJ_CONSTRUCT(&mca_iof_svc_component.svc_subscribed, opal_list_t); + OBJ_CONSTRUCT(&mca_iof_svc_component.svc_published, opal_list_t); OBJ_CONSTRUCT(&mca_iof_svc_component.svc_lock, ompi_mutex_t); /* post non-blocking recv */ diff --git a/orte/mca/iof/svc/iof_svc_proxy.c b/orte/mca/iof/svc/iof_svc_proxy.c index 8b1ef794a2..c6156c5e4a 100644 --- a/orte/mca/iof/svc/iof_svc_proxy.c +++ b/orte/mca/iof/svc/iof_svc_proxy.c @@ -111,16 +111,16 @@ static void orte_iof_svc_proxy_msg( orte_iof_base_msg_header_t* hdr, unsigned char* data) { - ompi_list_item_t* item; + opal_list_item_t* item; if(mca_iof_svc_component.svc_debug > 1) { ompi_output(0, "orte_iof_svc_proxy_msg: tag %d seq %d\n",hdr->msg_tag,hdr->msg_seq); } /* dispatch based on subscription list */ OMPI_THREAD_LOCK(&mca_iof_svc_component.svc_lock); - for(item = ompi_list_get_first(&mca_iof_svc_component.svc_subscribed); - item != ompi_list_get_end(&mca_iof_svc_component.svc_subscribed); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&mca_iof_svc_component.svc_subscribed); + item != opal_list_get_end(&mca_iof_svc_component.svc_subscribed); + item = opal_list_get_next(item)) { orte_iof_svc_sub_t* sub = (orte_iof_svc_sub_t*)item; /* tags match */ @@ -168,7 +168,7 @@ static void orte_iof_svc_proxy_ack( const orte_process_name_t* src, orte_iof_base_msg_header_t* hdr) { - ompi_list_item_t *s_item; + opal_list_item_t *s_item; uint32_t seq_min = hdr->msg_seq + hdr->msg_len; union { uint32_t uval; @@ -186,12 +186,12 @@ static void orte_iof_svc_proxy_ack( */ OMPI_THREAD_LOCK(&mca_iof_svc_component.svc_lock); - for(s_item = ompi_list_get_first(&mca_iof_svc_component.svc_subscribed); - s_item != ompi_list_get_end(&mca_iof_svc_component.svc_subscribed); - s_item = ompi_list_get_next(s_item)) { + for(s_item = opal_list_get_first(&mca_iof_svc_component.svc_subscribed); + s_item != opal_list_get_end(&mca_iof_svc_component.svc_subscribed); + s_item = opal_list_get_next(s_item)) { orte_iof_svc_sub_t* sub = (orte_iof_svc_sub_t*)s_item; - ompi_list_item_t *f_item; + opal_list_item_t *f_item; if (orte_ns.compare(sub->src_mask,&sub->src_name,&hdr->msg_src) != 0 || sub->src_tag != hdr->msg_tag) { @@ -199,9 +199,9 @@ static void orte_iof_svc_proxy_ack( } /* look for this endpoint in the forwarding table */ - for(f_item = ompi_list_get_first(&sub->sub_forward); - f_item != ompi_list_get_end(&sub->sub_forward); - f_item = ompi_list_get_next(f_item)) { + for(f_item = opal_list_get_first(&sub->sub_forward); + f_item != opal_list_get_end(&sub->sub_forward); + f_item = opal_list_get_next(f_item)) { orte_iof_svc_fwd_t* fwd = (orte_iof_svc_fwd_t*)f_item; orte_iof_svc_pub_t* pub = fwd->fwd_pub; if (orte_ns.compare(pub->pub_mask,&pub->pub_name,src) == 0 || diff --git a/orte/mca/iof/svc/iof_svc_pub.c b/orte/mca/iof/svc/iof_svc_pub.c index 9caf151e3b..e4ca5d922a 100644 --- a/orte/mca/iof/svc/iof_svc_pub.c +++ b/orte/mca/iof/svc/iof_svc_pub.c @@ -21,7 +21,7 @@ static void orte_iof_svc_pub_destruct(orte_iof_svc_pub_t* publish) OBJ_CLASS_INSTANCE( orte_iof_svc_pub_t, - ompi_list_item_t, + opal_list_item_t, orte_iof_svc_pub_construct, orte_iof_svc_pub_destruct); @@ -39,14 +39,14 @@ int orte_iof_svc_pub_create( orte_iof_base_tag_t pub_tag) { orte_iof_svc_pub_t* pub; - ompi_list_item_t* item; + opal_list_item_t* item; OMPI_THREAD_LOCK(&mca_iof_svc_component.svc_lock); /* has this endpoint already been published */ - for(item = ompi_list_get_first(&mca_iof_svc_component.svc_published); - item != ompi_list_get_end(&mca_iof_svc_component.svc_published); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&mca_iof_svc_component.svc_published); + item != opal_list_get_end(&mca_iof_svc_component.svc_published); + item = opal_list_get_next(item)) { pub = (orte_iof_svc_pub_t*)item; if(orte_ns.compare(pub_mask,pub_name,&pub->pub_name) == 0 && orte_ns.compare(ORTE_NS_CMP_ALL,pub_proxy,&pub->pub_proxy) == 0 && @@ -65,9 +65,9 @@ int orte_iof_svc_pub_create( pub->pub_endpoint = orte_iof_base_endpoint_match(pub_name,pub_mask,pub_tag); /* append this published endpoint to any matching subscription */ - for(item = ompi_list_get_first(&mca_iof_svc_component.svc_subscribed); - item != ompi_list_get_end(&mca_iof_svc_component.svc_subscribed); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&mca_iof_svc_component.svc_subscribed); + item != opal_list_get_end(&mca_iof_svc_component.svc_subscribed); + item = opal_list_get_next(item)) { orte_iof_svc_sub_t* sub = (orte_iof_svc_sub_t*)item; if(orte_iof_svc_fwd_match(sub,pub)) { orte_iof_svc_fwd_create(sub,pub); @@ -75,7 +75,7 @@ int orte_iof_svc_pub_create( } /* append this published endpoint to the global list */ - ompi_list_append(&mca_iof_svc_component.svc_published, &pub->super); + opal_list_append(&mca_iof_svc_component.svc_published, &pub->super); OMPI_THREAD_UNLOCK(&mca_iof_svc_component.svc_lock); return ORTE_SUCCESS; } @@ -91,10 +91,10 @@ orte_iof_svc_pub_t* orte_iof_svc_pub_lookup( orte_ns_cmp_bitmask_t pub_mask, orte_iof_base_tag_t pub_tag) { - ompi_list_item_t* item; - for(item = ompi_list_get_first(&mca_iof_svc_component.svc_published); - item != ompi_list_get_end(&mca_iof_svc_component.svc_published); - item = ompi_list_get_next(item)) { + opal_list_item_t* item; + for(item = opal_list_get_first(&mca_iof_svc_component.svc_published); + item != opal_list_get_end(&mca_iof_svc_component.svc_published); + item = opal_list_get_next(item)) { orte_iof_svc_pub_t* pub = (orte_iof_svc_pub_t*)item; if (orte_ns.compare(ORTE_NS_CMP_ALL, &pub->pub_name,pub_name) == 0 && orte_ns.compare(ORTE_NS_CMP_ALL, &pub->pub_proxy,pub_proxy) == 0 && @@ -117,7 +117,7 @@ int orte_iof_svc_pub_delete( orte_ns_cmp_bitmask_t pub_mask, orte_iof_base_tag_t pub_tag) { - ompi_list_item_t* item; + opal_list_item_t* item; orte_iof_svc_pub_t* pub; OMPI_THREAD_LOCK(&mca_iof_svc_component.svc_lock); @@ -127,15 +127,15 @@ int orte_iof_svc_pub_delete( return ORTE_ERR_NOT_FOUND; } - for(item = ompi_list_get_first(&mca_iof_svc_component.svc_subscribed); - item != ompi_list_get_end(&mca_iof_svc_component.svc_subscribed); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&mca_iof_svc_component.svc_subscribed); + item != opal_list_get_end(&mca_iof_svc_component.svc_subscribed); + item = opal_list_get_next(item)) { orte_iof_svc_sub_t* sub = (orte_iof_svc_sub_t*)item; if(orte_iof_svc_fwd_match(sub,pub)) { orte_iof_svc_fwd_delete(sub,pub); } } - ompi_list_remove_item(&mca_iof_svc_component.svc_published, &pub->super); + opal_list_remove_item(&mca_iof_svc_component.svc_published, &pub->super); OBJ_RELEASE(pub); OMPI_THREAD_UNLOCK(&mca_iof_svc_component.svc_lock); return ORTE_SUCCESS; diff --git a/orte/mca/iof/svc/iof_svc_pub.h b/orte/mca/iof/svc/iof_svc_pub.h index b32e4b9739..99b3b85dc2 100644 --- a/orte/mca/iof/svc/iof_svc_pub.h +++ b/orte/mca/iof/svc/iof_svc_pub.h @@ -18,7 +18,7 @@ */ struct orte_iof_svc_pub_t { - ompi_list_item_t super; + opal_list_item_t super; orte_process_name_t pub_name; orte_process_name_t pub_proxy; orte_ns_cmp_bitmask_t pub_mask; diff --git a/orte/mca/iof/svc/iof_svc_sub.c b/orte/mca/iof/svc/iof_svc_sub.c index d3e71b262f..c56d5d24f8 100644 --- a/orte/mca/iof/svc/iof_svc_sub.c +++ b/orte/mca/iof/svc/iof_svc_sub.c @@ -37,16 +37,16 @@ static void orte_iof_svc_sub_construct(orte_iof_svc_sub_t* sub) { sub->sub_endpoint = NULL; - OBJ_CONSTRUCT(&sub->sub_forward, ompi_list_t); + OBJ_CONSTRUCT(&sub->sub_forward, opal_list_t); } static void orte_iof_svc_sub_destruct(orte_iof_svc_sub_t* sub) { - ompi_list_item_t* item; + opal_list_item_t* item; if(sub->sub_endpoint != NULL) OBJ_RELEASE(sub->sub_endpoint); - while(NULL != (item = ompi_list_remove_first(&sub->sub_forward))) { + while(NULL != (item = opal_list_remove_first(&sub->sub_forward))) { OBJ_RELEASE(item); } } @@ -54,7 +54,7 @@ static void orte_iof_svc_sub_destruct(orte_iof_svc_sub_t* sub) OBJ_CLASS_INSTANCE( orte_iof_svc_sub_t, - ompi_list_item_t, + opal_list_item_t, orte_iof_svc_sub_construct, orte_iof_svc_sub_destruct); @@ -70,7 +70,7 @@ int orte_iof_svc_sub_create( orte_ns_cmp_bitmask_t dst_mask, orte_iof_base_tag_t dst_tag) { - ompi_list_item_t* item; + opal_list_item_t* item; orte_iof_svc_sub_t* sub = OBJ_NEW(orte_iof_svc_sub_t); sub->src_name = *src_name; @@ -83,16 +83,16 @@ int orte_iof_svc_sub_create( OMPI_THREAD_LOCK(&mca_iof_svc_component.svc_lock); /* search through published endpoints for a match */ - for(item = ompi_list_get_first(&mca_iof_svc_component.svc_published); - item != ompi_list_get_end(&mca_iof_svc_component.svc_published); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&mca_iof_svc_component.svc_published); + item != opal_list_get_end(&mca_iof_svc_component.svc_published); + item = opal_list_get_next(item)) { orte_iof_svc_pub_t* pub = (orte_iof_svc_pub_t*)item; if(orte_iof_svc_fwd_match(sub,pub)) { orte_iof_svc_fwd_create(sub,pub); } } - ompi_list_append(&mca_iof_svc_component.svc_subscribed, &sub->super); + opal_list_append(&mca_iof_svc_component.svc_subscribed, &sub->super); OMPI_THREAD_UNLOCK(&mca_iof_svc_component.svc_lock); return ORTE_SUCCESS; } @@ -109,11 +109,11 @@ int orte_iof_svc_sub_delete( orte_ns_cmp_bitmask_t dst_mask, orte_iof_base_tag_t dst_tag) { - ompi_list_item_t *item; + opal_list_item_t *item; OMPI_THREAD_LOCK(&mca_iof_svc_component.svc_lock); - item = ompi_list_get_first(&mca_iof_svc_component.svc_subscribed); - while(item != ompi_list_get_end(&mca_iof_svc_component.svc_subscribed)) { - ompi_list_item_t* next = ompi_list_get_next(item); + item = opal_list_get_first(&mca_iof_svc_component.svc_subscribed); + while(item != opal_list_get_end(&mca_iof_svc_component.svc_subscribed)) { + opal_list_item_t* next = opal_list_get_next(item); orte_iof_svc_sub_t* sub = (orte_iof_svc_sub_t*)item; if (sub->src_mask == src_mask && orte_ns.compare(sub->src_mask,&sub->src_name,src_name) == 0 && @@ -121,7 +121,7 @@ int orte_iof_svc_sub_delete( sub->dst_mask == dst_mask && orte_ns.compare(sub->dst_mask,&sub->dst_name,dst_name) == 0 && sub->dst_tag == dst_tag) { - ompi_list_remove_item(&mca_iof_svc_component.svc_subscribed, item); + opal_list_remove_item(&mca_iof_svc_component.svc_subscribed, item); OBJ_RELEASE(item); } item = next; @@ -161,10 +161,10 @@ int orte_iof_svc_sub_forward( orte_iof_base_msg_header_t* hdr, const unsigned char* data) { - ompi_list_item_t* item; - for(item = ompi_list_get_first(&sub->sub_forward); - item != ompi_list_get_end(&sub->sub_forward); - item = ompi_list_get_next(item)) { + opal_list_item_t* item; + for(item = opal_list_get_first(&sub->sub_forward); + item != opal_list_get_end(&sub->sub_forward); + item = opal_list_get_next(item)) { orte_iof_svc_fwd_t* fwd = (orte_iof_svc_fwd_t*)item; orte_iof_svc_pub_t* pub = fwd->fwd_pub; int rc; @@ -225,7 +225,7 @@ static void orte_iof_svc_fwd_destruct(orte_iof_svc_fwd_t* fwd) OBJ_CLASS_INSTANCE( orte_iof_svc_fwd_t, - ompi_list_item_t, + opal_list_item_t, orte_iof_svc_fwd_construct, orte_iof_svc_fwd_destruct); @@ -261,7 +261,7 @@ int orte_iof_svc_fwd_create( } OBJ_RETAIN(pub); fwd->fwd_pub = pub; - ompi_list_append(&sub->sub_forward, &fwd->super); + opal_list_append(&sub->sub_forward, &fwd->super); return ORTE_SUCCESS; } @@ -275,13 +275,13 @@ int orte_iof_svc_fwd_delete( orte_iof_svc_sub_t* sub, orte_iof_svc_pub_t* pub) { - ompi_list_item_t* item; - for(item = ompi_list_get_first(&sub->sub_forward); - item != ompi_list_get_end(&sub->sub_forward); - item = ompi_list_get_next(item)) { + opal_list_item_t* item; + for(item = opal_list_get_first(&sub->sub_forward); + item != opal_list_get_end(&sub->sub_forward); + item = opal_list_get_next(item)) { orte_iof_svc_fwd_t* fwd = (orte_iof_svc_fwd_t*)item; if(fwd->fwd_pub == pub) { - ompi_list_remove_item(&sub->sub_forward,item); + opal_list_remove_item(&sub->sub_forward,item); OBJ_RELEASE(fwd); return ORTE_SUCCESS; } diff --git a/orte/mca/iof/svc/iof_svc_sub.h b/orte/mca/iof/svc/iof_svc_sub.h index b7f3cde0e9..7846bcb6d5 100644 --- a/orte/mca/iof/svc/iof_svc_sub.h +++ b/orte/mca/iof/svc/iof_svc_sub.h @@ -12,7 +12,7 @@ struct orte_iof_svc_fwd_t { - ompi_list_item_t super; + opal_list_item_t super; orte_iof_svc_pub_t* fwd_pub; ompi_hash_table_t fwd_seq; }; @@ -22,7 +22,7 @@ typedef struct orte_iof_svc_fwd_t orte_iof_svc_fwd_t; OBJ_CLASS_DECLARATION(orte_iof_svc_fwd_t); struct orte_iof_svc_sub_t { - ompi_list_item_t super; + opal_list_item_t super; orte_process_name_t src_name; orte_ns_cmp_bitmask_t src_mask; orte_iof_base_tag_t src_tag; @@ -30,7 +30,7 @@ struct orte_iof_svc_sub_t { orte_ns_cmp_bitmask_t dst_mask; orte_iof_base_tag_t dst_tag; orte_iof_base_endpoint_t* sub_endpoint; - ompi_list_t sub_forward; + opal_list_t sub_forward; }; typedef struct orte_iof_svc_sub_t orte_iof_svc_sub_t; diff --git a/orte/mca/ns/base/base.h b/orte/mca/ns/base/base.h index a04796d469..0f6510fc1d 100644 --- a/orte/mca/ns/base/base.h +++ b/orte/mca/ns/base/base.h @@ -25,7 +25,7 @@ #include "orte_config.h" #include "include/orte_constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "dps/dps_types.h" @@ -181,7 +181,7 @@ OMPI_DECLSPEC int orte_ns_base_unpack_vpid(orte_buffer_t *buffer, void *dest, OMPI_DECLSPEC extern int mca_ns_base_output; OMPI_DECLSPEC extern bool mca_ns_base_selected; -OMPI_DECLSPEC extern ompi_list_t mca_ns_base_components_available; +OMPI_DECLSPEC extern opal_list_t mca_ns_base_components_available; OMPI_DECLSPEC extern mca_ns_base_component_t mca_ns_base_selected_component; /* diff --git a/orte/mca/ns/base/ns_base_open.c b/orte/mca/ns/base/ns_base_open.c index 46c8eb9127..e8893f67e1 100644 --- a/orte/mca/ns/base/ns_base_open.c +++ b/orte/mca/ns/base/ns_base_open.c @@ -80,7 +80,7 @@ OMPI_DECLSPEC mca_ns_base_module_t orte_ns = { orte_ns_base_get_peers }; bool mca_ns_base_selected = false; -ompi_list_t mca_ns_base_components_available; +opal_list_t mca_ns_base_components_available; mca_ns_base_component_t mca_ns_base_selected_component; @@ -101,7 +101,7 @@ static void orte_name_services_namelist_destructor(orte_name_services_namelist_t /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_name_services_namelist_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_name_services_namelist_construct, /* constructor */ orte_name_services_namelist_destructor); /* destructor */ diff --git a/orte/mca/ns/base/ns_base_select.c b/orte/mca/ns/base/ns_base_select.c index 59166fcf15..01bbf2d69b 100644 --- a/orte/mca/ns/base/ns_base_select.c +++ b/orte/mca/ns/base/ns_base_select.c @@ -29,7 +29,7 @@ */ int orte_ns_base_select(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; mca_ns_base_component_t *component, *best_component = NULL; mca_ns_base_module_t *module, *best_module = NULL; @@ -37,9 +37,9 @@ int orte_ns_base_select(void) /* Iterate through all the available components */ - for (item = ompi_list_get_first(&mca_ns_base_components_available); - item != ompi_list_get_end(&mca_ns_base_components_available); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&mca_ns_base_components_available); + item != opal_list_get_end(&mca_ns_base_components_available); + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (mca_ns_base_component_t *) cli->cli_component; diff --git a/orte/mca/ns/ns_types.h b/orte/mca/ns/ns_types.h index 70c4e764e2..208462222d 100644 --- a/orte/mca/ns/ns_types.h +++ b/orte/mca/ns/ns_types.h @@ -38,7 +38,7 @@ #include #include "include/types.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #define ORTE_NAME_ARGS(n) \ (unsigned long) ((NULL == n) ? -1 : (ssize_t)(n)->cellid), \ @@ -91,7 +91,7 @@ extern orte_process_name_t orte_name_all; /** List of names for general use */ struct orte_name_services_namelist_t { - ompi_list_item_t item; /**< Allows this item to be placed on a list */ + opal_list_item_t item; /**< Allows this item to be placed on a list */ orte_process_name_t *name; /**< Name of a process */ }; typedef struct orte_name_services_namelist_t orte_name_services_namelist_t; diff --git a/orte/mca/ns/proxy/src/ns_proxy.c b/orte/mca/ns/proxy/src/ns_proxy.c index c56118dead..d27795c7c0 100644 --- a/orte/mca/ns/proxy/src/ns_proxy.c +++ b/orte/mca/ns/proxy/src/ns_proxy.c @@ -132,7 +132,7 @@ int orte_ns_proxy_create_cellid(orte_cellid_t *cellid, char *site, char *resourc cptr->cellid = *cellid; cptr->site = strdup(site); cptr->resource = strdup(resource); - ompi_list_append(&orte_ns_proxy_cell_info_list, &cptr->item); + opal_list_append(&orte_ns_proxy_cell_info_list, &cptr->item); return ORTE_SUCCESS; } @@ -141,15 +141,15 @@ int orte_ns_proxy_create_cellid(orte_cellid_t *cellid, char *site, char *resourc int orte_ns_proxy_get_cell_info(orte_cellid_t cellid, char **site, char **resource) { - ompi_list_item_t *item; + opal_list_item_t *item; orte_ns_proxy_cell_info_t *cell; *site = NULL; *resource = NULL; - for (item = ompi_list_get_first(&orte_ns_proxy_cell_info_list); - item != ompi_list_get_end(&orte_ns_proxy_cell_info_list); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_ns_proxy_cell_info_list); + item != opal_list_get_end(&orte_ns_proxy_cell_info_list); + item = opal_list_get_next(item)) { cell = (orte_ns_proxy_cell_info_t*)item; if (cellid == cell->cellid) { *site = strdup(cell->site); @@ -315,9 +315,9 @@ int orte_ns_proxy_assign_rml_tag(orte_rml_tag_t *tag, /* first, check to see if name is already on local list * if so, return tag */ - for (tagitem = (orte_ns_proxy_tagitem_t*)ompi_list_get_first(&orte_ns_proxy_taglist); - tagitem != (orte_ns_proxy_tagitem_t*)ompi_list_get_end(&orte_ns_proxy_taglist); - tagitem = (orte_ns_proxy_tagitem_t*)ompi_list_get_next(tagitem)) { + for (tagitem = (orte_ns_proxy_tagitem_t*)opal_list_get_first(&orte_ns_proxy_taglist); + tagitem != (orte_ns_proxy_tagitem_t*)opal_list_get_end(&orte_ns_proxy_taglist); + tagitem = (orte_ns_proxy_tagitem_t*)opal_list_get_next(tagitem)) { if (0 == strcmp(name, tagitem->name)) { /* found name on list */ *tag = tagitem->tag; OMPI_THREAD_UNLOCK(&orte_ns_proxy_mutex); @@ -414,7 +414,7 @@ int orte_ns_proxy_assign_rml_tag(orte_rml_tag_t *tag, } else { tagitem->name = NULL; } - ompi_list_append(&orte_ns_proxy_taglist, &tagitem->item); + opal_list_append(&orte_ns_proxy_taglist, &tagitem->item); OMPI_THREAD_UNLOCK(&orte_ns_proxy_mutex); /* all done */ @@ -442,9 +442,9 @@ int orte_ns_proxy_define_data_type(const char *name, /* first, check to see if name is already on local list * if so, return id, ensure registered with dps */ - for (dti = (orte_ns_proxy_dti_t*)ompi_list_get_first(&orte_ns_proxy_dtlist); - dti != (orte_ns_proxy_dti_t*)ompi_list_get_end(&orte_ns_proxy_dtlist); - dti = (orte_ns_proxy_dti_t*)ompi_list_get_next(dti)) { + for (dti = (orte_ns_proxy_dti_t*)opal_list_get_first(&orte_ns_proxy_dtlist); + dti != (orte_ns_proxy_dti_t*)opal_list_get_end(&orte_ns_proxy_dtlist); + dti = (orte_ns_proxy_dti_t*)opal_list_get_next(dti)) { if (0 == strcmp(name, dti->name)) { /* found name on list */ *type = dti->id; OMPI_THREAD_UNLOCK(&orte_ns_proxy_mutex); @@ -531,7 +531,7 @@ int orte_ns_proxy_define_data_type(const char *name, } dti->id = *type; dti->name = strdup(name); - ompi_list_append(&orte_ns_proxy_taglist, &dti->item); + opal_list_append(&orte_ns_proxy_taglist, &dti->item); OMPI_THREAD_UNLOCK(&orte_ns_proxy_mutex); /* all done */ diff --git a/orte/mca/ns/proxy/src/ns_proxy.h b/orte/mca/ns/proxy/src/ns_proxy.h index 7a89083ba6..7f7ce0f088 100644 --- a/orte/mca/ns/proxy/src/ns_proxy.h +++ b/orte/mca/ns/proxy/src/ns_proxy.h @@ -22,7 +22,7 @@ #include "orte_config.h" #include "include/types.h" #include "include/orte_constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "dps/dps.h" #include "mca/ns/base/base.h" @@ -32,7 +32,7 @@ extern "C" { #endif struct orte_ns_proxy_cell_info_t { - ompi_list_item_t item; /**< Allows this item to be placed on a list */ + opal_list_item_t item; /**< Allows this item to be placed on a list */ orte_cellid_t cellid; char *site; char *resource; @@ -42,7 +42,7 @@ typedef struct orte_ns_proxy_cell_info_t orte_ns_proxy_cell_info_t; OBJ_CLASS_DECLARATION(orte_ns_proxy_cell_info_t); struct orte_ns_proxy_tagitem_t { - ompi_list_item_t item; /**< Allows this item to be placed on a list */ + opal_list_item_t item; /**< Allows this item to be placed on a list */ orte_rml_tag_t tag; /**< OOB tag */ char *name; /**< Name associated with tag */ }; @@ -51,7 +51,7 @@ typedef struct orte_ns_proxy_tagitem_t orte_ns_proxy_tagitem_t; OBJ_CLASS_DECLARATION(orte_ns_proxy_tagitem_t); struct orte_ns_proxy_dti_t { - ompi_list_item_t item; /**< Allows this item to be placed on a list */ + opal_list_item_t item; /**< Allows this item to be placed on a list */ orte_data_type_t id; /**< data type id */ char *name; /**< Name associated with data type */ }; @@ -80,9 +80,9 @@ int orte_ns_proxy_finalize(void); extern orte_process_name_t *orte_ns_my_replica; extern int orte_ns_proxy_debug; -extern ompi_list_t orte_ns_proxy_cell_info_list; -extern ompi_list_t orte_ns_proxy_taglist; -extern ompi_list_t orte_ns_proxy_dtlist; +extern opal_list_t orte_ns_proxy_cell_info_list; +extern opal_list_t orte_ns_proxy_taglist; +extern opal_list_t orte_ns_proxy_dtlist; extern ompi_mutex_t orte_ns_proxy_mutex; /* diff --git a/orte/mca/ns/proxy/src/ns_proxy_component.c b/orte/mca/ns/proxy/src/ns_proxy_component.c index c4c34b024c..232d3c02fb 100644 --- a/orte/mca/ns/proxy/src/ns_proxy_component.c +++ b/orte/mca/ns/proxy/src/ns_proxy_component.c @@ -123,7 +123,7 @@ static void orte_ns_proxy_cell_info_destructor(orte_ns_proxy_cell_info_t* ptr) /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_ns_proxy_cell_info_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_ns_proxy_cell_info_construct, /* constructor */ orte_ns_proxy_cell_info_destructor); /* destructor */ @@ -145,7 +145,7 @@ static void orte_ns_proxy_tagitem_destructor(orte_ns_proxy_tagitem_t* tagitem) /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_ns_proxy_tagitem_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_ns_proxy_tagitem_construct, /* constructor */ orte_ns_proxy_tagitem_destructor); /* destructor */ @@ -167,7 +167,7 @@ static void orte_ns_proxy_dti_destructor(orte_ns_proxy_dti_t* dti) /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_ns_proxy_dti_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_ns_proxy_dti_construct, /* constructor */ orte_ns_proxy_dti_destructor); /* destructor */ @@ -177,9 +177,9 @@ OBJ_CLASS_INSTANCE( orte_process_name_t* orte_ns_my_replica=NULL; int orte_ns_proxy_debug=0; -ompi_list_t orte_ns_proxy_cell_info_list; -ompi_list_t orte_ns_proxy_taglist; -ompi_list_t orte_ns_proxy_dtlist; +opal_list_t orte_ns_proxy_cell_info_list; +opal_list_t orte_ns_proxy_taglist; +opal_list_t orte_ns_proxy_dtlist; ompi_mutex_t orte_ns_proxy_mutex; /* @@ -235,13 +235,13 @@ mca_ns_base_module_t* orte_ns_proxy_init(int *priority) } /* initialize the cell info list */ - OBJ_CONSTRUCT(&orte_ns_proxy_cell_info_list, ompi_list_t); + OBJ_CONSTRUCT(&orte_ns_proxy_cell_info_list, opal_list_t); /* initialize the taglist */ - OBJ_CONSTRUCT(&orte_ns_proxy_taglist, ompi_list_t); + OBJ_CONSTRUCT(&orte_ns_proxy_taglist, opal_list_t); /* initialize the dtlist */ - OBJ_CONSTRUCT(&orte_ns_proxy_dtlist, ompi_list_t); + OBJ_CONSTRUCT(&orte_ns_proxy_dtlist, opal_list_t); /* Return the module */ @@ -278,11 +278,11 @@ int orte_ns_proxy_finalize(void) /* free the storage, but only if this component was initialized */ if (initialized) { - while (NULL != (cptr = (orte_ns_proxy_cell_info_t*)ompi_list_remove_first(&orte_ns_proxy_cell_info_list))) { + while (NULL != (cptr = (orte_ns_proxy_cell_info_t*)opal_list_remove_first(&orte_ns_proxy_cell_info_list))) { OBJ_RELEASE(cptr); } OBJ_DESTRUCT(&orte_ns_proxy_cell_info_list); - while (NULL != (tagitem = (orte_ns_proxy_tagitem_t*)ompi_list_remove_first(&orte_ns_proxy_taglist))) { + while (NULL != (tagitem = (orte_ns_proxy_tagitem_t*)opal_list_remove_first(&orte_ns_proxy_taglist))) { OBJ_RELEASE(tagitem); } OBJ_DESTRUCT(&orte_ns_proxy_taglist); diff --git a/orte/mca/ns/replica/src/ns_replica.c b/orte/mca/ns/replica/src/ns_replica.c index 1aa8967dcc..8be8636c96 100644 --- a/orte/mca/ns/replica/src/ns_replica.c +++ b/orte/mca/ns/replica/src/ns_replica.c @@ -56,7 +56,7 @@ int orte_ns_replica_create_cellid(orte_cellid_t *cellid, char *site, char *resou new_cell->cell = *cellid; new_cell->site = strdup(site); new_cell->resource = strdup(resource); - ompi_list_append(&orte_ns_replica_cell_tracker, &new_cell->item); + opal_list_append(&orte_ns_replica_cell_tracker, &new_cell->item); OMPI_THREAD_UNLOCK(&orte_ns_replica_mutex); return ORTE_SUCCESS; } @@ -70,12 +70,12 @@ int orte_ns_replica_create_cellid(orte_cellid_t *cellid, char *site, char *resou int orte_ns_replica_get_cell_info(orte_cellid_t cellid, char **site, char **resource) { - ompi_list_item_t *item; + opal_list_item_t *item; orte_ns_replica_cell_tracker_t *cell; - for (item = ompi_list_get_first(&orte_ns_replica_cell_tracker); - item != ompi_list_get_end(&orte_ns_replica_cell_tracker); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_ns_replica_cell_tracker); + item != opal_list_get_end(&orte_ns_replica_cell_tracker); + item = opal_list_get_next(item)) { cell = (orte_ns_replica_cell_tracker_t*)item; if (cellid == cell->cell) { *site = strdup(cell->site); @@ -105,7 +105,7 @@ int orte_ns_replica_create_jobid(orte_jobid_t *jobid) } new_nt->job = *jobid; new_nt->last_used_vpid = 0; - ompi_list_append(&orte_ns_replica_name_tracker, &new_nt->item); + opal_list_append(&orte_ns_replica_name_tracker, &new_nt->item); OMPI_THREAD_UNLOCK(&orte_ns_replica_mutex); return ORTE_SUCCESS; } @@ -123,9 +123,9 @@ int orte_ns_replica_reserve_range(orte_jobid_t job, orte_vpid_t range, orte_vpid OMPI_THREAD_LOCK(&orte_ns_replica_mutex); - for (ptr = (orte_ns_replica_name_tracker_t*)ompi_list_get_first(&orte_ns_replica_name_tracker); - ptr != (orte_ns_replica_name_tracker_t*)ompi_list_get_end(&orte_ns_replica_name_tracker); - ptr = (orte_ns_replica_name_tracker_t*)ompi_list_get_next(ptr)) { + for (ptr = (orte_ns_replica_name_tracker_t*)opal_list_get_first(&orte_ns_replica_name_tracker); + ptr != (orte_ns_replica_name_tracker_t*)opal_list_get_end(&orte_ns_replica_name_tracker); + ptr = (orte_ns_replica_name_tracker_t*)opal_list_get_next(ptr)) { if (job == ptr->job) { /* found the specified job */ if ((ORTE_VPID_MAX-range) >= ptr->last_used_vpid) { /* requested range available */ *start = ptr->last_used_vpid; @@ -159,9 +159,9 @@ int orte_ns_replica_assign_rml_tag(orte_rml_tag_t *tag, if (NULL != name) { /* see if this name is already in list - if so, return tag */ - for (tagitem = (orte_ns_replica_tagitem_t*)ompi_list_get_first(&orte_ns_replica_taglist); - tagitem != (orte_ns_replica_tagitem_t*)ompi_list_get_end(&orte_ns_replica_taglist); - tagitem = (orte_ns_replica_tagitem_t*)ompi_list_get_next(tagitem)) { + for (tagitem = (orte_ns_replica_tagitem_t*)opal_list_get_first(&orte_ns_replica_taglist); + tagitem != (orte_ns_replica_tagitem_t*)opal_list_get_end(&orte_ns_replica_taglist); + tagitem = (orte_ns_replica_tagitem_t*)opal_list_get_next(tagitem)) { if (tagitem->name != NULL && 0 == strcmp(name, tagitem->name)) { /* found name on list */ *tag = tagitem->tag; OMPI_THREAD_UNLOCK(&orte_ns_replica_mutex); @@ -189,7 +189,7 @@ int orte_ns_replica_assign_rml_tag(orte_rml_tag_t *tag, tagitem->name = NULL; } orte_ns_replica_next_rml_tag++; - ompi_list_append(&orte_ns_replica_taglist, &tagitem->item); + opal_list_append(&orte_ns_replica_taglist, &tagitem->item); *tag = tagitem->tag; OMPI_THREAD_UNLOCK(&orte_ns_replica_mutex); @@ -218,9 +218,9 @@ int orte_ns_replica_define_data_type(const char *name, OMPI_THREAD_LOCK(&orte_ns_replica_mutex); /* see if this name is already in list - if so, return id */ - for (dti = (orte_ns_replica_dti_t*)ompi_list_get_first(&orte_ns_replica_dtlist); - dti != (orte_ns_replica_dti_t*)ompi_list_get_end(&orte_ns_replica_dtlist); - dti = (orte_ns_replica_dti_t*)ompi_list_get_next(dti)) { + for (dti = (orte_ns_replica_dti_t*)opal_list_get_first(&orte_ns_replica_dtlist); + dti != (orte_ns_replica_dti_t*)opal_list_get_end(&orte_ns_replica_dtlist); + dti = (orte_ns_replica_dti_t*)opal_list_get_next(dti)) { if (dti->name != NULL && 0 == strcmp(name, dti->name)) { /* found name on list */ *type = dti->id; OMPI_THREAD_UNLOCK(&orte_ns_replica_mutex); @@ -243,7 +243,7 @@ int orte_ns_replica_define_data_type(const char *name, dti->id = orte_ns_replica_next_dti; dti->name = strdup(name); orte_ns_replica_next_dti++; - ompi_list_append(&orte_ns_replica_dtlist, &dti->item); + opal_list_append(&orte_ns_replica_dtlist, &dti->item); *type = dti->id; OMPI_THREAD_UNLOCK(&orte_ns_replica_mutex); diff --git a/orte/mca/ns/replica/src/ns_replica.h b/orte/mca/ns/replica/src/ns_replica.h index 529b647de7..265edc53cd 100644 --- a/orte/mca/ns/replica/src/ns_replica.h +++ b/orte/mca/ns/replica/src/ns_replica.h @@ -22,7 +22,7 @@ #include "include/types.h" #include "include/orte_constants.h" #include "threads/mutex.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "dps/dps.h" #include "mca/oob/oob_types.h" #include "mca/ns/base/base.h" @@ -34,7 +34,7 @@ extern "C" { /* list class for tracking cellid's */ struct orte_ns_replica_cell_tracker_t { - ompi_list_item_t item; + opal_list_item_t item; orte_cellid_t cell; char *site; char *resource; @@ -50,7 +50,7 @@ OBJ_CLASS_DECLARATION(orte_ns_replica_cell_tracker_t); * are tracking the max used vpid for each jobid that has been created. */ struct orte_ns_replica_name_tracker_t { - ompi_list_item_t item; /**< Allows this item to be placed on a list */ + opal_list_item_t item; /**< Allows this item to be placed on a list */ orte_jobid_t job; /**< Job id */ orte_vpid_t last_used_vpid; /**< Tracks the vpid last given out */ }; @@ -59,7 +59,7 @@ typedef struct orte_ns_replica_name_tracker_t orte_ns_replica_name_tracker_t; OBJ_CLASS_DECLARATION(orte_ns_replica_name_tracker_t); struct orte_ns_replica_tagitem_t { - ompi_list_item_t item; /**< Allows this item to be placed on a list */ + opal_list_item_t item; /**< Allows this item to be placed on a list */ orte_rml_tag_t tag; /**< OOB tag */ char *name; /**< Name associated with tag */ }; @@ -68,7 +68,7 @@ typedef struct orte_ns_replica_tagitem_t orte_ns_replica_tagitem_t; OBJ_CLASS_DECLARATION(orte_ns_replica_tagitem_t); struct orte_ns_replica_dti_t { - ompi_list_item_t item; /**< Allows this item to be placed on a list */ + opal_list_item_t item; /**< Allows this item to be placed on a list */ orte_data_type_t id; /**< data type id */ char *name; /**< Name associated with data type */ }; @@ -81,12 +81,12 @@ OBJ_CLASS_DECLARATION(orte_ns_replica_dti_t); */ extern orte_cellid_t orte_ns_replica_next_cellid; extern orte_jobid_t orte_ns_replica_next_jobid; -extern ompi_list_t orte_ns_replica_cell_tracker; -extern ompi_list_t orte_ns_replica_name_tracker; +extern opal_list_t orte_ns_replica_cell_tracker; +extern opal_list_t orte_ns_replica_name_tracker; extern orte_rml_tag_t orte_ns_replica_next_rml_tag; extern orte_data_type_t orte_ns_replica_next_dti; -extern ompi_list_t orte_ns_replica_taglist; -extern ompi_list_t orte_ns_replica_dtlist; +extern opal_list_t orte_ns_replica_taglist; +extern opal_list_t orte_ns_replica_dtlist; extern int orte_ns_replica_debug; extern ompi_mutex_t orte_ns_replica_mutex; diff --git a/orte/mca/ns/replica/src/ns_replica_component.c b/orte/mca/ns/replica/src/ns_replica_component.c index ac2445a48b..695d95d4b5 100644 --- a/orte/mca/ns/replica/src/ns_replica_component.c +++ b/orte/mca/ns/replica/src/ns_replica_component.c @@ -124,7 +124,7 @@ static void orte_ns_replica_cell_tracker_destructor(orte_ns_replica_cell_tracker /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_ns_replica_cell_tracker_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_ns_replica_cell_tracker_construct, /* constructor */ orte_ns_replica_cell_tracker_destructor); /* destructor */ @@ -144,7 +144,7 @@ static void orte_ns_replica_tracker_destructor(orte_ns_replica_name_tracker_t* n /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_ns_replica_name_tracker_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_ns_replica_tracker_construct, /* constructor */ orte_ns_replica_tracker_destructor); /* destructor */ @@ -167,7 +167,7 @@ static void orte_ns_replica_tagitem_destructor(orte_ns_replica_tagitem_t* tagite /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_ns_replica_tagitem_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_ns_replica_tagitem_construct, /* constructor */ orte_ns_replica_tagitem_destructor); /* destructor */ @@ -190,7 +190,7 @@ static void orte_ns_replica_dti_destructor(orte_ns_replica_dti_t* dti) /* define instance of opal_class_t */ OBJ_CLASS_INSTANCE( orte_ns_replica_dti_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_ns_replica_dti_construct, /* constructor */ orte_ns_replica_dti_destructor); /* destructor */ @@ -199,12 +199,12 @@ OBJ_CLASS_INSTANCE( */ orte_cellid_t orte_ns_replica_next_cellid; orte_jobid_t orte_ns_replica_next_jobid; -ompi_list_t orte_ns_replica_cell_tracker; -ompi_list_t orte_ns_replica_name_tracker; +opal_list_t orte_ns_replica_cell_tracker; +opal_list_t orte_ns_replica_name_tracker; orte_rml_tag_t orte_ns_replica_next_rml_tag; orte_data_type_t orte_ns_replica_next_dti; -ompi_list_t orte_ns_replica_taglist; -ompi_list_t orte_ns_replica_dtlist; +opal_list_t orte_ns_replica_taglist; +opal_list_t orte_ns_replica_dtlist; int orte_ns_replica_debug; ompi_mutex_t orte_ns_replica_mutex; int orte_ns_replica_isolate; @@ -255,21 +255,21 @@ mca_ns_base_module_t* orte_ns_replica_init(int *priority) /* initialize the cell tracker */ - OBJ_CONSTRUCT(&orte_ns_replica_cell_tracker, ompi_list_t); + OBJ_CONSTRUCT(&orte_ns_replica_cell_tracker, opal_list_t); orte_ns_replica_next_cellid = 0; /* initialize the name tracker */ - OBJ_CONSTRUCT(&orte_ns_replica_name_tracker, ompi_list_t); + OBJ_CONSTRUCT(&orte_ns_replica_name_tracker, opal_list_t); /* initialize the taglist */ - OBJ_CONSTRUCT(&orte_ns_replica_taglist, ompi_list_t); + OBJ_CONSTRUCT(&orte_ns_replica_taglist, opal_list_t); orte_ns_replica_next_rml_tag = ORTE_RML_TAG_DYNAMIC; /* initialize the dtlist */ - OBJ_CONSTRUCT(&orte_ns_replica_dtlist, ompi_list_t); + OBJ_CONSTRUCT(&orte_ns_replica_dtlist, opal_list_t); orte_ns_replica_next_dti = ORTE_DPS_ID_DYNAMIC; /* setup the thread lock */ @@ -284,7 +284,7 @@ mca_ns_base_module_t* orte_ns_replica_init(int *priority) } new_nt->job = 0; new_nt->last_used_vpid = 0; - ompi_list_append(&orte_ns_replica_name_tracker, &new_nt->item); + opal_list_append(&orte_ns_replica_name_tracker, &new_nt->item); /* Return the module */ @@ -328,11 +328,11 @@ int orte_ns_replica_finalize(void) if (initialized) { /* OBJ_DESTRUCT(&orte_ns_replica_name_tracker); */ - while (NULL != (tagitem = (orte_ns_replica_tagitem_t*)ompi_list_remove_first(&orte_ns_replica_taglist))) { + while (NULL != (tagitem = (orte_ns_replica_tagitem_t*)opal_list_remove_first(&orte_ns_replica_taglist))) { OBJ_RELEASE(tagitem); } OBJ_DESTRUCT(&orte_ns_replica_taglist); - while (NULL != (dti = (orte_ns_replica_dti_t*)ompi_list_remove_first(&orte_ns_replica_dtlist))) { + while (NULL != (dti = (orte_ns_replica_dti_t*)opal_list_remove_first(&orte_ns_replica_dtlist))) { OBJ_RELEASE(dti); } OBJ_DESTRUCT(&orte_ns_replica_dtlist); diff --git a/orte/mca/oob/base/oob_base_close.c b/orte/mca/oob/base/oob_base_close.c index 17fea73ecb..3488c89622 100644 --- a/orte/mca/oob/base/oob_base_close.c +++ b/orte/mca/oob/base/oob_base_close.c @@ -27,12 +27,12 @@ int mca_oob_base_close(void) { - ompi_list_item_t* item; + opal_list_item_t* item; /* Finalize all the oob modules and free their list items */ - for (item = ompi_list_remove_first(&mca_oob_base_modules); + for (item = opal_list_remove_first(&mca_oob_base_modules); item != NULL; - item = ompi_list_remove_first(&mca_oob_base_modules)) { + item = opal_list_remove_first(&mca_oob_base_modules)) { mca_oob_base_info_t* base = (mca_oob_base_info_t *) item; base->oob_module->oob_fini(); } diff --git a/orte/mca/oob/base/oob_base_init.c b/orte/mca/oob/base/oob_base_init.c index 64ae58bfc2..6633b05bb2 100644 --- a/orte/mca/oob/base/oob_base_init.c +++ b/orte/mca/oob/base/oob_base_init.c @@ -34,14 +34,14 @@ OBJ_CLASS_INSTANCE( mca_oob_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL ); OBJ_CLASS_INSTANCE( mca_oob_base_info_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL ); @@ -96,11 +96,11 @@ int mca_oob_parse_contact_info( */ int mca_oob_base_init(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; mca_oob_base_component_t *component; mca_oob_t *module; - extern ompi_list_t mca_oob_base_components; + extern opal_list_t mca_oob_base_components; mca_oob_t *s_module = NULL; int s_priority = -1; @@ -108,9 +108,9 @@ int mca_oob_base_init(void) char** exclude = ompi_argv_split(mca_oob_base_exclude, ','); /* Traverse the list of available modules; call their init functions. */ - for (item = ompi_list_get_first(&mca_oob_base_components); - item != ompi_list_get_end(&mca_oob_base_components); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&mca_oob_base_components); + item != opal_list_get_end(&mca_oob_base_components); + item = opal_list_get_next(item)) { mca_oob_base_info_t *inited; cli = (mca_base_component_list_item_t *) item; @@ -157,7 +157,7 @@ int mca_oob_base_init(void) inited = OBJ_NEW(mca_oob_base_info_t); inited->oob_component = component; inited->oob_module = module; - ompi_list_append(&mca_oob_base_modules, &inited->super); + opal_list_append(&mca_oob_base_modules, &inited->super); /* setup highest priority oob channel */ if(priority > s_priority) { @@ -226,10 +226,10 @@ int mca_oob_set_contact_info(const char* contact_info) return rc; for(ptr = uri; ptr != NULL && *ptr != NULL; ptr++) { - ompi_list_item_t* item; - for (item = ompi_list_get_first(&mca_oob_base_modules); - item != ompi_list_get_end(&mca_oob_base_modules); - item = ompi_list_get_next(item)) { + opal_list_item_t* item; + for (item = opal_list_get_first(&mca_oob_base_modules); + item != opal_list_get_end(&mca_oob_base_modules); + item = opal_list_get_next(item)) { mca_oob_base_info_t* base = (mca_oob_base_info_t *) item; if (strncmp(base->oob_component->oob_base.mca_component_name, *ptr, strlen(base->oob_component->oob_base.mca_component_name)) == 0) @@ -250,12 +250,12 @@ int mca_oob_set_contact_info(const char* contact_info) int mca_oob_base_module_init(void) { - ompi_list_item_t* item; + opal_list_item_t* item; /* Initialize all modules after oob/gpr/ns have initialized */ - for (item = ompi_list_get_first(&mca_oob_base_modules); - item != ompi_list_get_end(&mca_oob_base_modules); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&mca_oob_base_modules); + item != opal_list_get_end(&mca_oob_base_modules); + item = opal_list_get_next(item)) { mca_oob_base_info_t* base = (mca_oob_base_info_t *) item; if (NULL != base->oob_module->oob_init) base->oob_module->oob_init(); diff --git a/orte/mca/oob/base/oob_base_open.c b/orte/mca/oob/base/oob_base_open.c index 639ef33ea1..880f972836 100644 --- a/orte/mca/oob/base/oob_base_open.c +++ b/orte/mca/oob/base/oob_base_open.c @@ -39,8 +39,8 @@ mca_oob_t mca_oob; int mca_oob_base_output = -1; char* mca_oob_base_include = NULL; char* mca_oob_base_exclude = NULL; -ompi_list_t mca_oob_base_components; -ompi_list_t mca_oob_base_modules; +opal_list_t mca_oob_base_components; +opal_list_t mca_oob_base_modules; /** * Function for finding and opening either all MCA components, or the one @@ -50,8 +50,8 @@ int mca_oob_base_open(void) { /* Open up all available components */ - OBJ_CONSTRUCT(&mca_oob_base_components, ompi_list_t); - OBJ_CONSTRUCT(&mca_oob_base_modules, ompi_list_t); + OBJ_CONSTRUCT(&mca_oob_base_components, opal_list_t); + OBJ_CONSTRUCT(&mca_oob_base_modules, opal_list_t); if (OMPI_SUCCESS != mca_base_components_open("oob", 0, mca_oob_base_static_components, diff --git a/orte/mca/oob/oob.h b/orte/mca/oob/oob.h index a4d12ca411..2d9cb3ac31 100644 --- a/orte/mca/oob/oob.h +++ b/orte/mca/oob/oob.h @@ -257,7 +257,7 @@ OMPI_DECLSPEC extern mca_oob_t mca_oob; * associate a component and a module that belongs to it */ struct mca_oob_base_info_t { - ompi_list_item_t super; + opal_list_item_t super; mca_oob_base_component_t *oob_component; mca_oob_t *oob_module; }; @@ -287,8 +287,8 @@ OMPI_DECLSPEC int mca_oob_base_close(void); OMPI_DECLSPEC extern int mca_oob_base_output; OMPI_DECLSPEC extern char* mca_oob_base_include; OMPI_DECLSPEC extern char* mca_oob_base_exclude; -OMPI_DECLSPEC extern ompi_list_t mca_oob_base_components; -OMPI_DECLSPEC extern ompi_list_t mca_oob_base_modules; +OMPI_DECLSPEC extern opal_list_t mca_oob_base_components; +OMPI_DECLSPEC extern opal_list_t mca_oob_base_modules; #if defined(c_plusplus) || defined(__cplusplus) } diff --git a/orte/mca/oob/tcp/oob_tcp.c b/orte/mca/oob/tcp/oob_tcp.c index b9c6bd24e4..57222c159c 100644 --- a/orte/mca/oob/tcp/oob_tcp.c +++ b/orte/mca/oob/tcp/oob_tcp.c @@ -51,7 +51,7 @@ */ struct mca_oob_tcp_event_t { - ompi_list_item_t item; + opal_list_item_t item; ompi_event_t event; }; typedef struct mca_oob_tcp_event_t mca_oob_tcp_event_t; @@ -59,20 +59,20 @@ typedef struct mca_oob_tcp_event_t mca_oob_tcp_event_t; static void mca_oob_tcp_event_construct(mca_oob_tcp_event_t* event) { OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_lock); - ompi_list_append(&mca_oob_tcp_component.tcp_events, &event->item); + opal_list_append(&mca_oob_tcp_component.tcp_events, &event->item); OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_lock); } static void mca_oob_tcp_event_destruct(mca_oob_tcp_event_t* event) { OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_lock); - ompi_list_remove_item(&mca_oob_tcp_component.tcp_events, &event->item); + opal_list_remove_item(&mca_oob_tcp_component.tcp_events, &event->item); OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_lock); } OBJ_CLASS_INSTANCE( mca_oob_tcp_event_t, - ompi_list_item_t, + opal_list_item_t, mca_oob_tcp_event_construct, mca_oob_tcp_event_destruct); @@ -86,7 +86,7 @@ static void mca_oob_tcp_accept(void); struct mca_oob_tcp_subscription_t { - ompi_list_item_t item; + opal_list_item_t item; orte_jobid_t jobid; orte_gpr_subscription_id_t subid; }; @@ -94,7 +94,7 @@ typedef struct mca_oob_tcp_subscription_t mca_oob_tcp_subscription_t; OBJ_CLASS_INSTANCE( mca_oob_tcp_subscription_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL); @@ -175,16 +175,16 @@ int mca_oob_tcp_component_open(void) } #endif - OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_subscriptions, ompi_list_t); - OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peer_list, ompi_list_t); + OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_subscriptions, opal_list_t); + OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peer_list, opal_list_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peers, ompi_hash_table_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peer_names, ompi_hash_table_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_peer_free, opal_free_list_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_msgs, opal_free_list_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_lock, ompi_mutex_t); - OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_events, ompi_list_t); - OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_msg_post, ompi_list_t); - OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_msg_recv, ompi_list_t); + OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_events, opal_list_t); + OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_msg_post, opal_list_t); + OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_msg_recv, opal_list_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_match_lock, ompi_mutex_t); OBJ_CONSTRUCT(&mca_oob_tcp_component.tcp_match_cond, ompi_condition_t); @@ -611,7 +611,7 @@ int mca_oob_tcp_resolve(mca_oob_tcp_peer_t* peer) mca_oob_tcp_subscription_t* subscription; orte_gpr_trigger_t trig, *trigs; orte_gpr_subscription_t sub, *subs; - ompi_list_item_t* item; + opal_list_item_t* item; int rc; /* if the address is already cached - simply return it */ @@ -625,9 +625,9 @@ int mca_oob_tcp_resolve(mca_oob_tcp_peer_t* peer) } /* check to see if we have subscribed to this registry segment */ - for( item = ompi_list_get_first(&mca_oob_tcp_component.tcp_subscriptions); - item != ompi_list_get_end(&mca_oob_tcp_component.tcp_subscriptions); - item = ompi_list_get_next(item)) { + for( item = opal_list_get_first(&mca_oob_tcp_component.tcp_subscriptions); + item != opal_list_get_end(&mca_oob_tcp_component.tcp_subscriptions); + item = opal_list_get_next(item)) { subscription = (mca_oob_tcp_subscription_t*)item; if(subscription->jobid == peer->peer_name.jobid) { OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_lock); @@ -741,7 +741,7 @@ int mca_oob_tcp_resolve(mca_oob_tcp_peer_t* peer) OBJ_DESTRUCT(&sub); OBJ_DESTRUCT(&trig); - ompi_list_append(&mca_oob_tcp_component.tcp_subscriptions, &subscription->item); + opal_list_append(&mca_oob_tcp_component.tcp_subscriptions, &subscription->item); OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_lock); return rc; } @@ -759,7 +759,7 @@ int mca_oob_tcp_init(void) mca_oob_tcp_subscription_t *subscription; orte_gpr_subscription_t sub, *subs; int rc; - ompi_list_item_t* item; + opal_list_item_t* item; /* random delay to stagger connections back to seed */ #if defined(WIN32) @@ -781,9 +781,9 @@ int mca_oob_tcp_init(void) * to the peer. */ OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_lock); - for(item = ompi_list_get_first(&mca_oob_tcp_component.tcp_peer_list); - item != ompi_list_get_end(&mca_oob_tcp_component.tcp_peer_list); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&mca_oob_tcp_component.tcp_peer_list); + item != opal_list_get_end(&mca_oob_tcp_component.tcp_peer_list); + item = opal_list_get_next(item)) { mca_oob_tcp_peer_t* peer = (mca_oob_tcp_peer_t*)item; mca_oob_tcp_peer_send_ident(peer); } @@ -791,7 +791,7 @@ int mca_oob_tcp_init(void) /* register subscribe callback to receive notification when all processes have registered */ subscription = OBJ_NEW(mca_oob_tcp_subscription_t); subscription->jobid = jobid; - ompi_list_append(&mca_oob_tcp_component.tcp_subscriptions, &subscription->item); + opal_list_append(&mca_oob_tcp_component.tcp_subscriptions, &subscription->item); OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_lock); if(mca_oob_tcp_component.tcp_debug > 2) { @@ -987,7 +987,7 @@ int mca_oob_tcp_init(void) */ int mca_oob_tcp_fini(void) { - ompi_list_item_t *item; + opal_list_item_t *item; OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_lock); ompi_event_disable(); /* disable event processing */ @@ -999,17 +999,17 @@ int mca_oob_tcp_fini(void) } /* cleanup all peers */ - for(item = ompi_list_remove_first(&mca_oob_tcp_component.tcp_peer_list); + for(item = opal_list_remove_first(&mca_oob_tcp_component.tcp_peer_list); item != NULL; - item = ompi_list_remove_first(&mca_oob_tcp_component.tcp_peer_list)) { + item = opal_list_remove_first(&mca_oob_tcp_component.tcp_peer_list)) { mca_oob_tcp_peer_t* peer = (mca_oob_tcp_peer_t*)item; MCA_OOB_TCP_PEER_RETURN(peer); } /* delete any pending events */ - for(item = ompi_list_remove_first(&mca_oob_tcp_component.tcp_events); + for(item = opal_list_remove_first(&mca_oob_tcp_component.tcp_events); item != NULL; - item = ompi_list_remove_first(&mca_oob_tcp_component.tcp_events)) { + item = opal_list_remove_first(&mca_oob_tcp_component.tcp_events)) { mca_oob_tcp_event_t* event = (mca_oob_tcp_event_t*)item; ompi_event_del(&event->event); OBJ_RELEASE(event); diff --git a/orte/mca/oob/tcp/oob_tcp.h b/orte/mca/oob/tcp/oob_tcp.h index 05e29442b2..c9fd1b0568 100644 --- a/orte/mca/oob/tcp/oob_tcp.h +++ b/orte/mca/oob/tcp/oob_tcp.h @@ -247,8 +247,8 @@ struct mca_oob_tcp_component_t { char* tcp_exclude; /**< list of ip interfaces to exclude */ int tcp_listen_sd; /**< listen socket for incoming connection requests */ unsigned short tcp_listen_port; /**< listen port */ - ompi_list_t tcp_subscriptions; /**< list of registry subscriptions */ - ompi_list_t tcp_peer_list; /**< list of peers sorted in mru order */ + opal_list_t tcp_subscriptions; /**< list of registry subscriptions */ + opal_list_t tcp_peer_list; /**< list of peers sorted in mru order */ ompi_hash_table_t tcp_peers; /**< peers sorted by name */ ompi_hash_table_t tcp_peer_names; /**< cache of peer contact info sorted by name */ opal_free_list_t tcp_peer_free; /**< free list of peers */ @@ -258,9 +258,9 @@ struct mca_oob_tcp_component_t { ompi_event_t tcp_send_event; /**< event structure for sends */ ompi_event_t tcp_recv_event; /**< event structure for recvs */ ompi_mutex_t tcp_lock; /**< lock for accessing module state */ - ompi_list_t tcp_events; /**< list of pending events (accepts) */ - ompi_list_t tcp_msg_post; /**< list of recieves user has posted */ - ompi_list_t tcp_msg_recv; /**< list of recieved messages */ + opal_list_t tcp_events; /**< list of pending events (accepts) */ + opal_list_t tcp_msg_post; /**< list of recieves user has posted */ + opal_list_t tcp_msg_recv; /**< list of recieved messages */ ompi_mutex_t tcp_match_lock; /**< lock held while searching/posting messages */ ompi_condition_t tcp_match_cond; /**< condition variable used in finalize */ int tcp_match_count; /**< number of matched recvs in progress */ diff --git a/orte/mca/oob/tcp/oob_tcp_msg.c b/orte/mca/oob/tcp/oob_tcp_msg.c index a12ac5e8a5..b6364435cf 100644 --- a/orte/mca/oob/tcp/oob_tcp_msg.c +++ b/orte/mca/oob/tcp/oob_tcp_msg.c @@ -33,7 +33,7 @@ static void mca_oob_tcp_msg_ping(mca_oob_tcp_msg_t* msg, mca_oob_tcp_peer_t* pee OBJ_CLASS_INSTANCE( mca_oob_tcp_msg_t, - ompi_list_item_t, + opal_list_item_t, mca_oob_tcp_msg_construct, mca_oob_tcp_msg_destruct); @@ -417,7 +417,7 @@ static void mca_oob_tcp_msg_data(mca_oob_tcp_msg_t* msg, mca_oob_tcp_peer_t* pee if(post->msg_flags & MCA_OOB_PEEK) { /* will need message for actual receive */ - ompi_list_append(&mca_oob_tcp_component.tcp_msg_recv, &msg->super); + opal_list_append(&mca_oob_tcp_component.tcp_msg_recv, &msg->super); } else { MCA_OOB_TCP_MSG_RETURN(msg); } @@ -432,7 +432,7 @@ static void mca_oob_tcp_msg_data(mca_oob_tcp_msg_t* msg, mca_oob_tcp_peer_t* pee OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_match_lock); } else { - ompi_list_append(&mca_oob_tcp_component.tcp_msg_recv, (ompi_list_item_t*)msg); + opal_list_append(&mca_oob_tcp_component.tcp_msg_recv, (opal_list_item_t*)msg); OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_match_lock); } } @@ -491,9 +491,9 @@ int mca_oob_tcp_msg_copy(mca_oob_tcp_msg_t* msg, struct iovec* iov, int count) mca_oob_tcp_msg_t* mca_oob_tcp_msg_match_recv(orte_process_name_t* name, int tag) { mca_oob_tcp_msg_t* msg; - for(msg = (mca_oob_tcp_msg_t*) ompi_list_get_first(&mca_oob_tcp_component.tcp_msg_recv); - msg != (mca_oob_tcp_msg_t*) ompi_list_get_end(&mca_oob_tcp_component.tcp_msg_recv); - msg = (mca_oob_tcp_msg_t*) ompi_list_get_next(msg)) { + for(msg = (mca_oob_tcp_msg_t*) opal_list_get_first(&mca_oob_tcp_component.tcp_msg_recv); + msg != (mca_oob_tcp_msg_t*) opal_list_get_end(&mca_oob_tcp_component.tcp_msg_recv); + msg = (mca_oob_tcp_msg_t*) opal_list_get_next(msg)) { int cmpval1 = orte_ns.compare(ORTE_NS_CMP_ALL, name, MCA_OOB_NAME_ANY); int cmpval2 = orte_ns.compare(ORTE_NS_CMP_ALL, name, &msg->msg_peer); @@ -518,9 +518,9 @@ mca_oob_tcp_msg_t* mca_oob_tcp_msg_match_recv(orte_process_name_t* name, int tag mca_oob_tcp_msg_t* mca_oob_tcp_msg_match_post(orte_process_name_t* name, int tag) { mca_oob_tcp_msg_t* msg; - for(msg = (mca_oob_tcp_msg_t*) ompi_list_get_first(&mca_oob_tcp_component.tcp_msg_post); - msg != (mca_oob_tcp_msg_t*) ompi_list_get_end(&mca_oob_tcp_component.tcp_msg_post); - msg = (mca_oob_tcp_msg_t*) ompi_list_get_next(msg)) { + for(msg = (mca_oob_tcp_msg_t*) opal_list_get_first(&mca_oob_tcp_component.tcp_msg_post); + msg != (mca_oob_tcp_msg_t*) opal_list_get_end(&mca_oob_tcp_component.tcp_msg_post); + msg = (mca_oob_tcp_msg_t*) opal_list_get_next(msg)) { int cmpval1 = orte_ns.compare(ORTE_NS_CMP_ALL, &msg->msg_peer, MCA_OOB_NAME_ANY); int cmpval2 = orte_ns.compare(ORTE_NS_CMP_ALL, name, &msg->msg_peer); @@ -528,7 +528,7 @@ mca_oob_tcp_msg_t* mca_oob_tcp_msg_match_post(orte_process_name_t* name, int tag if((0 == cmpval1) || (0 == cmpval2)) { if (msg->msg_hdr.msg_tag == tag) { if((msg->msg_flags & MCA_OOB_PEEK) == 0) { - ompi_list_remove_item(&mca_oob_tcp_component.tcp_msg_post, &msg->super); + opal_list_remove_item(&mca_oob_tcp_component.tcp_msg_post, &msg->super); return msg; } else { return NULL; diff --git a/orte/mca/oob/tcp/oob_tcp_msg.h b/orte/mca/oob/tcp/oob_tcp_msg.h index b552255d84..bfaad4a882 100644 --- a/orte/mca/oob/tcp/oob_tcp_msg.h +++ b/orte/mca/oob/tcp/oob_tcp_msg.h @@ -21,7 +21,7 @@ #ifndef _MCA_OOB_TCP_MESSAGE_H_ #define _MCA_OOB_TCP_MESSAGE_H_ -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/oob/oob.h" #include "oob_tcp_peer.h" #include "oob_tcp_hdr.h" @@ -43,7 +43,7 @@ typedef enum { MCA_OOB_TCP_POSTED, MCA_OOB_TCP_UNEXPECTED } mca_oob_tcp_type_t; * describes each message being progressed. */ struct mca_oob_tcp_msg_t { - ompi_list_item_t super; /**< allow this item to be put on a list */ + opal_list_item_t super; /**< allow this item to be put on a list */ mca_oob_tcp_type_t msg_type; /**< posted receive or unexpected */ int msg_flags; /**< flags to send/recv */ int msg_rc; /**< the return code for the send/recv (amount sent/recvd or errno) */ @@ -76,7 +76,7 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_msg_t); */ #define MCA_OOB_TCP_MSG_ALLOC(msg, rc) \ { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OPAL_FREE_LIST_GET(&mca_oob_tcp_component.tcp_msgs, item, rc); \ msg = (mca_oob_tcp_msg_t*)item; \ } @@ -91,7 +91,7 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_msg_t); mca_oob_tcp_msg_iov_return(msg,msg->msg_rwiov); \ if(NULL != msg->msg_rwbuf) \ free(msg->msg_rwbuf); \ - OPAL_FREE_LIST_RETURN(&mca_oob_tcp_component.tcp_msgs, (ompi_list_item_t*)msg); \ + OPAL_FREE_LIST_RETURN(&mca_oob_tcp_component.tcp_msgs, (opal_list_item_t*)msg); \ } /** diff --git a/orte/mca/oob/tcp/oob_tcp_peer.c b/orte/mca/oob/tcp/oob_tcp_peer.c index ce0ddba578..2a624dc780 100644 --- a/orte/mca/oob/tcp/oob_tcp_peer.c +++ b/orte/mca/oob/tcp/oob_tcp_peer.c @@ -68,7 +68,7 @@ static void mca_oob_tcp_peer_dump(mca_oob_tcp_peer_t* peer, const char* msg); OBJ_CLASS_INSTANCE( mca_oob_tcp_peer_t, - ompi_list_item_t, + opal_list_item_t, mca_oob_tcp_peer_construct, mca_oob_tcp_peer_destruct); @@ -83,7 +83,7 @@ OBJ_CLASS_INSTANCE( */ static void mca_oob_tcp_peer_construct(mca_oob_tcp_peer_t* peer) { - OBJ_CONSTRUCT(&(peer->peer_send_queue), ompi_list_t); + OBJ_CONSTRUCT(&(peer->peer_send_queue), opal_list_t); OBJ_CONSTRUCT(&(peer->peer_lock), ompi_mutex_t); memset(&peer->peer_send_event, 0, sizeof(peer->peer_send_event)); memset(&peer->peer_recv_event, 0, sizeof(peer->peer_recv_event)); @@ -145,7 +145,7 @@ int mca_oob_tcp_peer_send(mca_oob_tcp_peer_t* peer, mca_oob_tcp_msg_t* msg) /* * queue the message and attempt to resolve the peer address */ - ompi_list_append(&peer->peer_send_queue, (ompi_list_item_t*)msg); + opal_list_append(&peer->peer_send_queue, (opal_list_item_t*)msg); if(peer->peer_state == MCA_OOB_TCP_CLOSED) { peer->peer_state = MCA_OOB_TCP_RESOLVE; OMPI_THREAD_UNLOCK(&peer->peer_lock); @@ -160,7 +160,7 @@ int mca_oob_tcp_peer_send(mca_oob_tcp_peer_t* peer, mca_oob_tcp_msg_t* msg) * start the message and queue if not completed */ if (NULL != peer->peer_send_msg) { - ompi_list_append(&peer->peer_send_queue, (ompi_list_item_t*)msg); + opal_list_append(&peer->peer_send_queue, (opal_list_item_t*)msg); } else { /*if the send does not complete */ if(!mca_oob_tcp_msg_send_handler(msg, peer)) { @@ -185,7 +185,7 @@ mca_oob_tcp_peer_t * mca_oob_tcp_peer_lookup(const orte_process_name_t* name) { int rc; mca_oob_tcp_peer_t * peer, *old; - ompi_list_item_t* item; + opal_list_item_t* item; if (NULL == name) { /* can't look this one up */ return NULL; @@ -200,9 +200,9 @@ mca_oob_tcp_peer_t * mca_oob_tcp_peer_lookup(const orte_process_name_t* name) } /* search the peer list - if we find it here this is a bug in the tree */ - for(item = ompi_list_get_first(&mca_oob_tcp_component.tcp_peer_list); - item != ompi_list_get_end(&mca_oob_tcp_component.tcp_peer_list); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&mca_oob_tcp_component.tcp_peer_list); + item != opal_list_get_end(&mca_oob_tcp_component.tcp_peer_list); + item = opal_list_get_next(item)) { peer = (mca_oob_tcp_peer_t*)item; if (memcmp(&peer->peer_name, name, sizeof(peer->peer_name)) == 0) { OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_lock); @@ -235,22 +235,22 @@ mca_oob_tcp_peer_t * mca_oob_tcp_peer_lookup(const orte_process_name_t* name) } /* if the peer list is over the maximum size, remove one unsed peer */ - ompi_list_prepend(&mca_oob_tcp_component.tcp_peer_list, (ompi_list_item_t *) peer); + opal_list_prepend(&mca_oob_tcp_component.tcp_peer_list, (opal_list_item_t *) peer); if(mca_oob_tcp_component.tcp_peer_limit > 0 && - (int)ompi_list_get_size(&mca_oob_tcp_component.tcp_peer_list) > + (int)opal_list_get_size(&mca_oob_tcp_component.tcp_peer_list) > mca_oob_tcp_component.tcp_peer_limit) { old = (mca_oob_tcp_peer_t *) - ompi_list_get_last(&mca_oob_tcp_component.tcp_peer_list); + opal_list_get_last(&mca_oob_tcp_component.tcp_peer_list); while(1) { - if(0 == ompi_list_get_size(&(old->peer_send_queue)) && + if(0 == opal_list_get_size(&(old->peer_send_queue)) && NULL == peer->peer_recv_msg) { - ompi_list_remove_item(&mca_oob_tcp_component.tcp_peer_list, - (ompi_list_item_t *) old); + opal_list_remove_item(&mca_oob_tcp_component.tcp_peer_list, + (opal_list_item_t *) old); MCA_OOB_TCP_PEER_RETURN(old); break; } else { - old = (mca_oob_tcp_peer_t *) ompi_list_get_prev(old); - if(ompi_list_get_begin(&mca_oob_tcp_component.tcp_peer_list) == (ompi_list_item_t*)old) { + old = (mca_oob_tcp_peer_t *) opal_list_get_prev(old); + if(opal_list_get_begin(&mca_oob_tcp_component.tcp_peer_list) == (opal_list_item_t*)old) { /* we tried, but we couldn't find one that was valid to get rid * of. Oh well. */ break; @@ -428,10 +428,10 @@ static void mca_oob_tcp_peer_connected(mca_oob_tcp_peer_t* peer) ompi_event_del(&peer->peer_timer_event); peer->peer_state = MCA_OOB_TCP_CONNECTED; peer->peer_retries = 0; - if(ompi_list_get_size(&peer->peer_send_queue) > 0) { + if(opal_list_get_size(&peer->peer_send_queue) > 0) { if(NULL == peer->peer_send_msg) peer->peer_send_msg = (mca_oob_tcp_msg_t*) - ompi_list_remove_first(&peer->peer_send_queue); + opal_list_remove_first(&peer->peer_send_queue); ompi_event_add(&peer->peer_send_event, 0); } } @@ -468,7 +468,7 @@ void mca_oob_tcp_peer_shutdown(mca_oob_tcp_peer_t* peer) while(msg != NULL) { msg->msg_rc = OMPI_ERR_UNREACH; mca_oob_tcp_msg_complete(msg, &peer->peer_name); - msg = (mca_oob_tcp_msg_t*)ompi_list_remove_first(&peer->peer_send_queue); + msg = (mca_oob_tcp_msg_t*)opal_list_remove_first(&peer->peer_send_queue); } peer->peer_send_msg = NULL; } @@ -746,7 +746,7 @@ static void mca_oob_tcp_peer_send_handler(int sd, short flags, void* user) /* if current completed - progress any pending sends */ peer->peer_send_msg = (mca_oob_tcp_msg_t*) - ompi_list_remove_first(&peer->peer_send_queue); + opal_list_remove_first(&peer->peer_send_queue); } /* if nothing else to do unregister for send event notifications */ @@ -874,7 +874,7 @@ void mca_oob_tcp_peer_resolved(mca_oob_tcp_peer_t* peer, mca_oob_tcp_addr_t* add OMPI_THREAD_LOCK(&peer->peer_lock); peer->peer_addr = addr; if((peer->peer_state == MCA_OOB_TCP_RESOLVE) || - (peer->peer_state == MCA_OOB_TCP_CLOSED && ompi_list_get_size(&peer->peer_send_queue))) { + (peer->peer_state == MCA_OOB_TCP_CLOSED && opal_list_get_size(&peer->peer_send_queue))) { mca_oob_tcp_peer_start_connect(peer); } OMPI_THREAD_UNLOCK(&peer->peer_lock); @@ -901,18 +901,18 @@ static void mca_oob_tcp_peer_timer_handler(int sd, short flags, void* user) void mca_oob_tcp_peer_dequeue_msg(mca_oob_tcp_peer_t* peer, mca_oob_tcp_msg_t* msg) { - ompi_list_item_t* item; + opal_list_item_t* item; OMPI_THREAD_LOCK(&peer->peer_lock); if (peer->peer_send_msg == msg) peer->peer_send_msg = NULL; if (peer->peer_recv_msg == msg) peer->peer_recv_msg = NULL; - for( item = ompi_list_get_first(&peer->peer_send_queue); - item != ompi_list_get_end(&peer->peer_send_queue); - item = ompi_list_get_next(item)) { - if(item == (ompi_list_item_t*)msg) { - ompi_list_remove_item(&peer->peer_send_queue, item); + for( item = opal_list_get_first(&peer->peer_send_queue); + item != opal_list_get_end(&peer->peer_send_queue); + item = opal_list_get_next(item)) { + if(item == (opal_list_item_t*)msg) { + opal_list_remove_item(&peer->peer_send_queue, item); break; } } diff --git a/orte/mca/oob/tcp/oob_tcp_peer.h b/orte/mca/oob/tcp/oob_tcp_peer.h index 79b654617c..3fdc8efd9c 100644 --- a/orte/mca/oob/tcp/oob_tcp_peer.h +++ b/orte/mca/oob/tcp/oob_tcp_peer.h @@ -27,7 +27,7 @@ #endif #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/mutex.h" #include "mca/ns/ns_types.h" #include "oob_tcp_msg.h" @@ -50,7 +50,7 @@ typedef enum { * This structure describes a peer */ struct mca_oob_tcp_peer_t { - ompi_list_item_t super; /**< allow this to be on a list */ + opal_list_item_t super; /**< allow this to be on a list */ orte_process_name_t peer_name; /**< the name of the peer */ mca_oob_tcp_state_t peer_state; /**< the state of the connection */ int peer_retries; /**< number of times connection attempt has failed */ @@ -60,7 +60,7 @@ struct mca_oob_tcp_peer_t { ompi_event_t peer_recv_event; /**< registration with event thread for recv events */ ompi_event_t peer_timer_event; /**< timer for retrying connection failures */ ompi_mutex_t peer_lock; /**< protect critical data structures */ - ompi_list_t peer_send_queue; /**< list of messages to send */ + opal_list_t peer_send_queue; /**< list of messages to send */ mca_oob_tcp_msg_t *peer_send_msg; /**< current send in progress */ mca_oob_tcp_msg_t *peer_recv_msg; /**< current recv in progress */ }; @@ -80,7 +80,7 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_peer_t); */ #define MCA_OOB_TCP_PEER_ALLOC(peer, rc) \ { \ - ompi_list_item_t* item; \ + opal_list_item_t* item; \ OPAL_FREE_LIST_GET(&mca_oob_tcp_component.tcp_peer_free, item, rc); \ peer = (mca_oob_tcp_peer_t*)item; \ } @@ -92,7 +92,7 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_peer_t); { \ mca_oob_tcp_peer_shutdown(peer); \ ompi_hash_table_remove_proc(&mca_oob_tcp_component.tcp_peers, &peer->peer_name); \ - OPAL_FREE_LIST_RETURN(&mca_oob_tcp_component.tcp_peer_free, (ompi_list_item_t*)peer); \ + OPAL_FREE_LIST_RETURN(&mca_oob_tcp_component.tcp_peer_free, (opal_list_item_t*)peer); \ } #if defined(c_plusplus) || defined(__cplusplus) diff --git a/orte/mca/oob/tcp/oob_tcp_recv.c b/orte/mca/oob/tcp/oob_tcp_recv.c index b14c506f4d..9b097adaec 100644 --- a/orte/mca/oob/tcp/oob_tcp_recv.c +++ b/orte/mca/oob/tcp/oob_tcp_recv.c @@ -88,7 +88,7 @@ int mca_oob_tcp_recv( } /* otherwise dequeue the message and return to free list */ - ompi_list_remove_item(&mca_oob_tcp_component.tcp_msg_recv, (ompi_list_item_t *) msg); + opal_list_remove_item(&mca_oob_tcp_component.tcp_msg_recv, (opal_list_item_t *) msg); MCA_OOB_TCP_MSG_RETURN(msg); OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_match_lock); return rc; @@ -127,7 +127,7 @@ int mca_oob_tcp_recv( msg->msg_peer = *peer; msg->msg_rwbuf = NULL; msg->msg_rwiov = NULL; - ompi_list_append(&mca_oob_tcp_component.tcp_msg_post, (ompi_list_item_t *) msg); + opal_list_append(&mca_oob_tcp_component.tcp_msg_post, (opal_list_item_t *) msg); OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_match_lock); /* wait for the receive to complete */ @@ -201,7 +201,7 @@ int mca_oob_tcp_recv_nb( } /* otherwise dequeue the message and return to free list */ - ompi_list_remove_item(&mca_oob_tcp_component.tcp_msg_recv, (ompi_list_item_t *) msg); + opal_list_remove_item(&mca_oob_tcp_component.tcp_msg_recv, (opal_list_item_t *) msg); OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_match_lock); cbfunc(rc, &msg->msg_peer, iov, count, msg->msg_hdr.msg_tag, cbdata); MCA_OOB_TCP_MSG_RETURN(msg); @@ -236,7 +236,7 @@ int mca_oob_tcp_recv_nb( msg->msg_peer = *peer; msg->msg_rwbuf = NULL; msg->msg_rwiov = NULL; - ompi_list_append(&mca_oob_tcp_component.tcp_msg_post, (ompi_list_item_t *) msg); + opal_list_append(&mca_oob_tcp_component.tcp_msg_post, (opal_list_item_t *) msg); OMPI_THREAD_UNLOCK(&mca_oob_tcp_component.tcp_match_lock); return 0; } @@ -255,7 +255,7 @@ int mca_oob_tcp_recv_cancel( int tag) { int matched = 0, cmpval1, cmpval2; - ompi_list_item_t *item, *next; + opal_list_item_t *item, *next; /* wait for any previously matched messages to be processed */ OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_match_lock); @@ -270,17 +270,17 @@ int mca_oob_tcp_recv_cancel( #endif /* remove any matching posted receives */ - for(item = ompi_list_get_first(&mca_oob_tcp_component.tcp_msg_post); - item != ompi_list_get_end(&mca_oob_tcp_component.tcp_msg_post); + for(item = opal_list_get_first(&mca_oob_tcp_component.tcp_msg_post); + item != opal_list_get_end(&mca_oob_tcp_component.tcp_msg_post); item = next) { mca_oob_tcp_msg_t* msg = (mca_oob_tcp_msg_t*)item; - next = ompi_list_get_next(item); + next = opal_list_get_next(item); cmpval1 = orte_ns.compare(ORTE_NS_CMP_ALL, name, MCA_OOB_NAME_ANY); cmpval2 = orte_ns.compare(ORTE_NS_CMP_ALL, &msg->msg_peer, name); if ((0 == cmpval1) || (0 == cmpval2)) { if (msg->msg_hdr.msg_tag == tag) { - ompi_list_remove_item(&mca_oob_tcp_component.tcp_msg_post, &msg->super); + opal_list_remove_item(&mca_oob_tcp_component.tcp_msg_post, &msg->super); MCA_OOB_TCP_MSG_RETURN(msg); matched++; } diff --git a/orte/mca/pls/base/base.h b/orte/mca/pls/base/base.h index ddd7d7c8a7..9680e427da 100644 --- a/orte/mca/pls/base/base.h +++ b/orte/mca/pls/base/base.h @@ -38,11 +38,11 @@ extern "C" { /** Verbose/debug output stream */ int pls_output; /** List of opened components */ - ompi_list_t pls_opened; + opal_list_t pls_opened; /** Whether the list of opened components is valid */ bool pls_opened_valid; /** Sorted list of available components (highest priority first) */ - ompi_list_t pls_available; + opal_list_t pls_available; /** Whether the list of available components is valid */ bool pls_available_valid; } orte_pls_base_t; @@ -57,7 +57,7 @@ extern "C" { */ struct orte_pls_base_cmp_t { /** Base object */ - ompi_list_item_t super; + opal_list_item_t super; /** pls component */ orte_pls_base_component_t *component; /** pls module */ diff --git a/orte/mca/pls/base/pls_base_close.c b/orte/mca/pls/base/pls_base_close.c index 5b22562e7f..1b9a75022b 100644 --- a/orte/mca/pls/base/pls_base_close.c +++ b/orte/mca/pls/base/pls_base_close.c @@ -29,9 +29,9 @@ int orte_pls_base_finalize(void) { /* Finalize all available modules */ if (orte_pls_base.pls_available_valid) { - ompi_list_item_t* item; + opal_list_item_t* item; while (NULL != - (item = ompi_list_remove_first(&orte_pls_base.pls_available))) { + (item = opal_list_remove_first(&orte_pls_base.pls_available))) { orte_pls_base_cmp_t* cmp = (orte_pls_base_cmp_t*) item; ompi_output(orte_pls_base.pls_output, "orte:base:close: finalizing module %s", diff --git a/orte/mca/pls/base/pls_base_select.c b/orte/mca/pls/base/pls_base_select.c index 9f85af42f9..d5094a501a 100644 --- a/orte/mca/pls/base/pls_base_select.c +++ b/orte/mca/pls/base/pls_base_select.c @@ -17,7 +17,7 @@ #include "orte_config.h" #include "include/orte_constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/output.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -31,7 +31,7 @@ static orte_pls_base_module_t *select_preferred(char *name); static orte_pls_base_module_t *select_any(void); -static int compare(ompi_list_item_t **a, ompi_list_item_t **b); +static int compare(opal_list_item_t **a, opal_list_item_t **b); static void cmp_constructor(orte_pls_base_cmp_t *cmp); static void cmp_destructor(orte_pls_base_cmp_t *cmp); @@ -39,7 +39,7 @@ static void cmp_destructor(orte_pls_base_cmp_t *cmp); /* * Global variables */ -OBJ_CLASS_INSTANCE(orte_pls_base_cmp_t, ompi_list_item_t, +OBJ_CLASS_INSTANCE(orte_pls_base_cmp_t, opal_list_item_t, cmp_constructor, cmp_destructor); @@ -52,7 +52,7 @@ orte_pls_base_module_t* orte_pls_base_select(char *preferred) { /* Construct the empty list */ - OBJ_CONSTRUCT(&orte_pls_base.pls_available, ompi_list_t); + OBJ_CONSTRUCT(&orte_pls_base.pls_available, opal_list_t); orte_pls_base.pls_available_valid = true; /* Now - did we want a specific one? */ @@ -67,7 +67,7 @@ orte_pls_base_module_t* orte_pls_base_select(char *preferred) static orte_pls_base_module_t *select_preferred(char *name) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; orte_pls_base_component_t *component; orte_pls_base_module_t *module; @@ -78,9 +78,9 @@ static orte_pls_base_module_t *select_preferred(char *name) ompi_output(orte_pls_base.pls_output, "orte:base:select: looking for component %s", name); - for (item = ompi_list_get_first(&orte_pls_base.pls_opened); - item != ompi_list_get_end(&orte_pls_base.pls_opened); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_pls_base.pls_opened); + item != opal_list_get_end(&orte_pls_base.pls_opened); + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (orte_pls_base_component_t *) cli->cli_component; @@ -107,7 +107,7 @@ static orte_pls_base_module_t *select_preferred(char *name) cmp->module = module; cmp->priority = priority; - ompi_list_append(&orte_pls_base.pls_available, &cmp->super); + opal_list_append(&orte_pls_base.pls_available, &cmp->super); return module; } } @@ -123,7 +123,7 @@ static orte_pls_base_module_t *select_preferred(char *name) static orte_pls_base_module_t *select_any(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; orte_pls_base_component_t *component; orte_pls_base_module_t *module; @@ -132,9 +132,9 @@ static orte_pls_base_module_t *select_any(void) /* Query all the opened components and see if they want to run */ - for (item = ompi_list_get_first(&orte_pls_base.pls_opened); - ompi_list_get_end(&orte_pls_base.pls_opened) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_pls_base.pls_opened); + opal_list_get_end(&orte_pls_base.pls_opened) != item; + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (orte_pls_base_component_t *) cli->cli_component; ompi_output(orte_pls_base.pls_output, @@ -160,7 +160,7 @@ static orte_pls_base_module_t *select_any(void) cmp->module = module; cmp->priority = priority; - ompi_list_append(&orte_pls_base.pls_available, &cmp->super); + opal_list_append(&orte_pls_base.pls_available, &cmp->super); } else { ompi_output(orte_pls_base.pls_output, "orte:base:open: component %s does NOT want to be considered for selection", @@ -170,7 +170,7 @@ static orte_pls_base_module_t *select_any(void) /* If the list is empty, return NULL */ - if (ompi_list_is_empty(&orte_pls_base.pls_available)) { + if (opal_list_is_empty(&orte_pls_base.pls_available)) { ompi_output(orte_pls_base.pls_output, "orte:base:select: no components available!"); return NULL; @@ -178,12 +178,12 @@ static orte_pls_base_module_t *select_any(void) /* Sort the resulting available list in priority order */ - ompi_list_sort(&orte_pls_base.pls_available, compare); + opal_list_sort(&orte_pls_base.pls_available, compare); /* Otherwise, return the first item (it's already sorted in priority order) */ - item = ompi_list_get_first(&orte_pls_base.pls_available); + item = opal_list_get_first(&orte_pls_base.pls_available); cmp = (orte_pls_base_cmp_t *) item; ompi_output(orte_pls_base.pls_output, "orte:base:select: highest priority component: %s", @@ -197,7 +197,7 @@ static orte_pls_base_module_t *select_any(void) * so that we get the highest priority first (i.e., so the sort is * highest->lowest, not lowest->highest) */ -static int compare(ompi_list_item_t **a, ompi_list_item_t **b) +static int compare(opal_list_item_t **a, opal_list_item_t **b) { orte_pls_base_cmp_t *aa = *((orte_pls_base_cmp_t **) a); orte_pls_base_cmp_t *bb = *((orte_pls_base_cmp_t **) b); diff --git a/orte/mca/pls/bproc/pls_bproc.c b/orte/mca/pls/bproc/pls_bproc.c index 5e3546a2fc..8ecf332e70 100644 --- a/orte/mca/pls/bproc/pls_bproc.c +++ b/orte/mca/pls/bproc/pls_bproc.c @@ -79,14 +79,14 @@ static int orte_pls_bproc_launch_app(orte_jobid_t jobid, */ static int orte_pls_bproc_node_array(orte_rmaps_base_map_t* map, int ** node_array, int * node_array_len) { - ompi_list_item_t* item; + opal_list_item_t* item; int num_procs = 0; int num_on_node; *node_array_len = 0; - for(item = ompi_list_get_first(&map->nodes); - item != ompi_list_get_end(&map->nodes); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&map->nodes); + item != opal_list_get_end(&map->nodes); + item = opal_list_get_next(item)) { if(*node_array_len < atol(((orte_rmaps_base_node_t*)item)->node_name)) { *node_array_len = atol(((orte_rmaps_base_node_t*)item)->node_name); } @@ -100,11 +100,11 @@ static int orte_pls_bproc_node_array(orte_rmaps_base_map_t* map, } memset(*node_array, 0, sizeof(int) * *node_array_len); - for(item = ompi_list_get_first(&map->nodes); - item != ompi_list_get_end(&map->nodes); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&map->nodes); + item != opal_list_get_end(&map->nodes); + item = opal_list_get_next(item)) { orte_rmaps_base_node_t* node = (orte_rmaps_base_node_t*)item; - num_on_node = ompi_list_get_size(&node->node_procs); + num_on_node = opal_list_get_size(&node->node_procs); (*node_array)[atol(node->node_name)] += num_on_node; num_procs += num_on_node; } @@ -504,14 +504,14 @@ cleanup: */ int orte_pls_bproc_launch(orte_jobid_t jobid) { - ompi_list_item_t* item; - ompi_list_t mapping; + opal_list_item_t* item; + opal_list_t mapping; orte_vpid_t vpid_start; orte_vpid_t vpid_range; int rc; /* query for the application context and allocated nodes */ - OBJ_CONSTRUCT(&mapping, ompi_list_t); + OBJ_CONSTRUCT(&mapping, opal_list_t); if(ORTE_SUCCESS != (rc = orte_rmaps_base_get_map(jobid, &mapping))) { ORTE_ERROR_LOG(rc); return rc; @@ -523,9 +523,9 @@ int orte_pls_bproc_launch(orte_jobid_t jobid) } /* for each application context - launch across the first n nodes required */ - for(item = ompi_list_get_first(&mapping); - item != ompi_list_get_end(&mapping); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&mapping); + item != opal_list_get_end(&mapping); + item = opal_list_get_next(item)) { orte_rmaps_base_map_t* map = (orte_rmaps_base_map_t*)item; rc = orte_pls_bproc_launch_app(jobid, map, vpid_start, vpid_range, map->app->idx); @@ -536,7 +536,7 @@ int orte_pls_bproc_launch(orte_jobid_t jobid) } cleanup: - while(NULL != (item = ompi_list_remove_first(&mapping))) + while(NULL != (item = opal_list_remove_first(&mapping))) OBJ_RELEASE(item); OBJ_DESTRUCT(&mapping); return rc; diff --git a/orte/mca/pls/bproc/pls_bproc_component.c b/orte/mca/pls/bproc/pls_bproc_component.c index cb3b10f1da..a3fbfbc202 100644 --- a/orte/mca/pls/bproc/pls_bproc_component.c +++ b/orte/mca/pls/bproc/pls_bproc_component.c @@ -20,7 +20,7 @@ #include "include/orte_constants.h" #include "include/types.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/proc_info.h" #include "mca/mca.h" #include "mca/base/mca_base_param.h" diff --git a/orte/mca/pls/bproc_orted/pls_bproc_orted.c b/orte/mca/pls/bproc_orted/pls_bproc_orted.c index 0cd58d292f..1c1864bbfa 100644 --- a/orte/mca/pls/bproc_orted/pls_bproc_orted.c +++ b/orte/mca/pls/bproc_orted/pls_bproc_orted.c @@ -336,9 +336,9 @@ static int pls_bproc_orted_remove_dir() { */ int orte_pls_bproc_orted_launch(orte_jobid_t jobid) { - ompi_list_t map; + opal_list_t map; orte_rmaps_base_map_t * mapping; - ompi_list_item_t* item; + opal_list_item_t* item; int rc, id; int master[3]; int slave; @@ -367,7 +367,7 @@ int orte_pls_bproc_orted_launch(orte_jobid_t jobid) goto cleanup; } /* query the allocation for this node */ - OBJ_CONSTRUCT(&map, ompi_list_t); + OBJ_CONSTRUCT(&map, opal_list_t); rc = orte_rmaps_base_get_node_map(orte_process_info.my_name->cellid, jobid, param, &map); free(param); @@ -383,9 +383,9 @@ int orte_pls_bproc_orted_launch(orte_jobid_t jobid) mca_base_param_lookup_int(id, (int *) &app_context); /* figure out what processes will be on this node and set up the io files */ - for(item = ompi_list_get_first(&map); - item != ompi_list_get_end(&map); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&map); + item != opal_list_get_end(&map); + item = opal_list_get_next(item)) { mapping = (orte_rmaps_base_map_t *) item; if(mapping->app->idx != app_context) { continue; @@ -451,7 +451,7 @@ int orte_pls_bproc_orted_launch(orte_jobid_t jobid) rc = OMPI_SUCCESS; cleanup: - while(NULL != (item = ompi_list_remove_first(&map))) { + while(NULL != (item = opal_list_remove_first(&map))) { OBJ_RELEASE(item); } if(NULL != pty_name) { diff --git a/orte/mca/pls/bproc_seed/pls_bproc_seed.c b/orte/mca/pls/bproc_seed/pls_bproc_seed.c index fdd3b5fc7b..7c218e37d4 100644 --- a/orte/mca/pls/bproc_seed/pls_bproc_seed.c +++ b/orte/mca/pls/bproc_seed/pls_bproc_seed.c @@ -67,8 +67,8 @@ orte_pls_base_module_t orte_pls_bproc_seed_module = { static int orte_pls_bproc_nodelist(orte_rmaps_base_map_t* map, int** nodelist, size_t* num_nodes) { - ompi_list_item_t* item; - size_t count = ompi_list_get_size(&map->nodes); + opal_list_item_t* item; + size_t count = opal_list_get_size(&map->nodes); size_t index = 0; /* build the node list */ @@ -76,9 +76,9 @@ static int orte_pls_bproc_nodelist(orte_rmaps_base_map_t* map, int** nodelist, s if(NULL == *nodelist) return OMPI_ERR_OUT_OF_RESOURCE; - for(item = ompi_list_get_first(&map->nodes); - item != ompi_list_get_end(&map->nodes); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&map->nodes); + item != opal_list_get_end(&map->nodes); + item = opal_list_get_next(item)) { orte_rmaps_base_node_t* node = (orte_rmaps_base_node_t*)item; (*nodelist)[index++] = atol(node->node_name); } @@ -315,12 +315,12 @@ static void orte_pls_bproc_wait_proc(pid_t pid, int status, void* cbdata) static void orte_pls_bproc_wait_node(pid_t pid, int status, void* cbdata) { orte_rmaps_base_node_t* node = (orte_rmaps_base_node_t*)cbdata; - ompi_list_item_t* item; + opal_list_item_t* item; /* set state of all processes associated with the daemon as terminated */ - for(item = ompi_list_get_first(&node->node_procs); - item != ompi_list_get_end(&node->node_procs); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&node->node_procs); + item != opal_list_get_end(&node->node_procs); + item = opal_list_get_next(item)) { orte_rmaps_base_proc_t* proc = (orte_rmaps_base_proc_t*)item; int rc = orte_soh.set_proc_soh(&proc->proc_name, ORTE_PROC_STATE_TERMINATED, 0); @@ -446,7 +446,7 @@ static int orte_pls_bproc_launch_app( /* return is the rank of the child or number of nodes in the parent */ if(rc < (int)num_nodes) { - ompi_list_item_t* item; + opal_list_item_t* item; orte_rmaps_base_node_t* node = NULL; orte_process_name_t* daemon_name; int fd; @@ -483,9 +483,9 @@ static int orte_pls_bproc_launch_app( /* find this node */ index = 0; - for(item = ompi_list_get_first(&map->nodes); - item != ompi_list_get_end(&map->nodes); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&map->nodes); + item != opal_list_get_end(&map->nodes); + item = opal_list_get_next(item)) { if(index++ == rank) { node = (orte_rmaps_base_node_t*)item; break; @@ -509,7 +509,7 @@ static int orte_pls_bproc_launch_app( node->node_name, orte_process_info.my_name->cellid, 0, daemon_vpid_start+rank, - ompi_list_get_size(&node->node_procs)); + opal_list_get_size(&node->node_procs)); } /* restart the daemon w/ the new process name */ @@ -528,9 +528,9 @@ static int orte_pls_bproc_launch_app( /* start the required number of copies of the application */ index = 0; - for(item = ompi_list_get_first(&node->node_procs); - item != ompi_list_get_end(&node->node_procs); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&node->node_procs); + item != opal_list_get_end(&node->node_procs); + item = opal_list_get_next(item)) { orte_rmaps_base_proc_t* proc = (orte_rmaps_base_proc_t*)item; pid_t pid; @@ -574,11 +574,11 @@ static int orte_pls_bproc_launch_app( _exit(0); } else { - ompi_list_item_t* item; + opal_list_item_t* item; /* post wait callback the daemons to complete */ index = 0; - while(NULL != (item = ompi_list_remove_first(&map->nodes))) { + while(NULL != (item = opal_list_remove_first(&map->nodes))) { orte_rmaps_base_node_t* node = (orte_rmaps_base_node_t*)item; OMPI_THREAD_LOCK(&mca_pls_bproc_seed_component.lock); @@ -609,14 +609,14 @@ cleanup: int orte_pls_bproc_seed_launch(orte_jobid_t jobid) { - ompi_list_item_t* item; - ompi_list_t mapping; + opal_list_item_t* item; + opal_list_t mapping; orte_vpid_t vpid_start; orte_vpid_t vpid_range; int rc; /* query for the application context and allocated nodes */ - OBJ_CONSTRUCT(&mapping, ompi_list_t); + OBJ_CONSTRUCT(&mapping, opal_list_t); if(ORTE_SUCCESS != (rc = orte_rmaps_base_get_map(jobid, &mapping))) { ORTE_ERROR_LOG(rc); return rc; @@ -627,9 +627,9 @@ int orte_pls_bproc_seed_launch(orte_jobid_t jobid) } /* for each application context - launch across the first n nodes required */ - for(item = ompi_list_get_first(&mapping); - item != ompi_list_get_end(&mapping); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&mapping); + item != opal_list_get_end(&mapping); + item = opal_list_get_next(item)) { orte_rmaps_base_map_t* map = (orte_rmaps_base_map_t*)item; rc = orte_pls_bproc_launch_app(jobid, map, vpid_start, vpid_range); if(rc != ORTE_SUCCESS) { @@ -639,7 +639,7 @@ int orte_pls_bproc_seed_launch(orte_jobid_t jobid) } cleanup: - while(NULL != (item = ompi_list_remove_first(&mapping))) + while(NULL != (item = opal_list_remove_first(&mapping))) OBJ_RELEASE(item); OBJ_DESTRUCT(&mapping); return rc; diff --git a/orte/mca/pls/bproc_seed/pls_bproc_seed_component.c b/orte/mca/pls/bproc_seed/pls_bproc_seed_component.c index 042544093d..2833453637 100644 --- a/orte/mca/pls/bproc_seed/pls_bproc_seed_component.c +++ b/orte/mca/pls/bproc_seed/pls_bproc_seed_component.c @@ -20,7 +20,7 @@ #include "include/orte_constants.h" #include "include/types.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/proc_info.h" #include "mca/mca.h" #include "mca/base/mca_base_param.h" diff --git a/orte/mca/pls/fork/pls_fork_module.c b/orte/mca/pls/fork/pls_fork_module.c index a6091c56fe..eda18777d6 100644 --- a/orte/mca/pls/fork/pls_fork_module.c +++ b/orte/mca/pls/fork/pls_fork_module.c @@ -352,14 +352,14 @@ static int orte_pls_fork_proc( int orte_pls_fork_launch(orte_jobid_t jobid) { - ompi_list_t map; - ompi_list_item_t* item; + opal_list_t map; + opal_list_item_t* item; orte_vpid_t vpid_start; orte_vpid_t vpid_range; int rc; /* query the allocation for this node */ - OBJ_CONSTRUCT(&map, ompi_list_t); + OBJ_CONSTRUCT(&map, opal_list_t); rc = orte_rmaps_base_get_node_map( orte_process_info.my_name->cellid,jobid,orte_system_info.nodename,&map); if (ORTE_SUCCESS != rc) { @@ -374,9 +374,9 @@ int orte_pls_fork_launch(orte_jobid_t jobid) } /* attempt to launch each of the apps */ - for(item = ompi_list_get_first(&map); - item != ompi_list_get_end(&map); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&map); + item != opal_list_get_end(&map); + item = opal_list_get_next(item)) { orte_rmaps_base_map_t* map = (orte_rmaps_base_map_t*)item; size_t i; for(i=0; inum_procs; i++) { @@ -389,7 +389,7 @@ int orte_pls_fork_launch(orte_jobid_t jobid) } cleanup: - while(NULL != (item = ompi_list_remove_first(&map))) { + while(NULL != (item = opal_list_remove_first(&map))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&map); diff --git a/orte/mca/pls/pls.h b/orte/mca/pls/pls.h index db47a94326..f6182e6dfa 100644 --- a/orte/mca/pls/pls.h +++ b/orte/mca/pls/pls.h @@ -185,7 +185,7 @@ #include "mca/mca.h" #include "mca/ns/ns_types.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" /* * pls module functions diff --git a/orte/mca/pls/poe/pls_poe_module.c b/orte/mca/pls/poe/pls_poe_module.c index ed6f38d54c..db78c72184 100644 --- a/orte/mca/pls/poe/pls_poe_module.c +++ b/orte/mca/pls/poe/pls_poe_module.c @@ -97,8 +97,8 @@ static inline int __poe_argv_append_int(int *argc, char ***argv, int varname, in */ int pls_poe_launch_interactive_orted(orte_jobid_t jobid) { - ompi_list_t nodes; - ompi_list_item_t* item; + opal_list_t nodes; + opal_list_item_t* item; size_t num_nodes; orte_vpid_t vpid; int node_name_index1; @@ -126,7 +126,7 @@ int pls_poe_launch_interactive_orted(orte_jobid_t jobid) if((hfp=fopen(mca_pls_poe_component.hostfile,"w"))==NULL) return ORTE_ERR_OUT_OF_RESOURCE; if((cfp=fopen(mca_pls_poe_component.cmdfile,"w"))==NULL) return ORTE_ERR_OUT_OF_RESOURCE; - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); rc = orte_ras_base_node_query_alloc(&nodes, jobid); if(ORTE_SUCCESS != rc) { goto cleanup; @@ -136,7 +136,7 @@ int pls_poe_launch_interactive_orted(orte_jobid_t jobid) * Allocate a range of vpids for the daemons. */ - num_nodes = ompi_list_get_size(&nodes); + num_nodes = opal_list_get_size(&nodes); if(num_nodes == 0) { return ORTE_ERR_BAD_PARAM; } @@ -201,9 +201,9 @@ int pls_poe_launch_interactive_orted(orte_jobid_t jobid) * up a daemon. */ - for(item = ompi_list_get_first(&nodes); - item != ompi_list_get_end(&nodes); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&nodes); + item != opal_list_get_end(&nodes); + item = opal_list_get_next(item)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; orte_process_name_t* name; pid_t pid; @@ -286,7 +286,7 @@ int pls_poe_launch_interactive_orted(orte_jobid_t jobid) } cleanup: - while(NULL != (item = ompi_list_remove_first(&nodes))) { + while(NULL != (item = opal_list_remove_first(&nodes))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&nodes); @@ -303,8 +303,8 @@ __poe_wait_job - call back when POE finish */ int __poe_wait_job(pid_t pid, int status, void* cbdata) { - ompi_list_t map; - ompi_list_item_t* item; + opal_list_t map; + opal_list_item_t* item; int rc; if(mca_pls_poe_component.verbose > 10) { @@ -312,16 +312,16 @@ int __poe_wait_job(pid_t pid, int status, void* cbdata) } /* query allocation for the job */ - OBJ_CONSTRUCT(&map, ompi_list_t); + OBJ_CONSTRUCT(&map, opal_list_t); rc = orte_rmaps_base_get_map(mca_pls_poe_component.jobid,&map); if(ORTE_SUCCESS != rc) { ORTE_ERROR_LOG(rc); goto cleanup; } - for(item = ompi_list_get_first(&map); - item != ompi_list_get_end(&map); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&map); + item != opal_list_get_end(&map); + item = opal_list_get_next(item)) { orte_rmaps_base_map_t* map = (orte_rmaps_base_map_t*) item; size_t i; @@ -446,8 +446,8 @@ __poe_launch_interactive - launch an interactive job */ static inline int __poe_launch_interactive(orte_jobid_t jobid) { - ompi_list_t map, nodes; - ompi_list_item_t* item; + opal_list_t map, nodes; + opal_list_item_t* item; orte_vpid_t vpid_start, vpid_range; size_t num_nodes, num_procs; FILE *hfp, *cfp; @@ -467,11 +467,11 @@ static inline int __poe_launch_interactive(orte_jobid_t jobid) mca_pls_poe_component.jobid = jobid; - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); rc = orte_ras_base_node_query_alloc(&nodes, jobid); if(ORTE_SUCCESS != rc) { goto cleanup; } - num_nodes = ompi_list_get_size(&nodes); + num_nodes = opal_list_get_size(&nodes); if(num_nodes > 0) { @@ -481,9 +481,9 @@ static inline int __poe_launch_interactive(orte_jobid_t jobid) (NULL==(hfp=fopen(mca_pls_poe_component.hostfile,"w"))) ) { return ORTE_ERR_OUT_OF_RESOURCE; } - for(item = ompi_list_get_first(&nodes); - item != ompi_list_get_end(&nodes); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&nodes); + item != opal_list_get_end(&nodes); + item = opal_list_get_next(item)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; fprintf(hfp,"%s\n",node->node_name); } @@ -493,7 +493,7 @@ static inline int __poe_launch_interactive(orte_jobid_t jobid) rc = orte_rmgr_base_get_job_slots(jobid, &num_procs); if(ORTE_SUCCESS != rc) { return rc; } - OBJ_CONSTRUCT(&map, ompi_list_t); + OBJ_CONSTRUCT(&map, opal_list_t); rc = orte_rmaps_base_get_map(jobid,&map); if (ORTE_SUCCESS != rc) { ORTE_ERROR_LOG(rc); goto cleanup; } @@ -502,9 +502,9 @@ static inline int __poe_launch_interactive(orte_jobid_t jobid) /* Create a tempolary POE command file */ - for(item = ompi_list_get_first(&map); - item != ompi_list_get_end(&map); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&map); + item != opal_list_get_end(&map); + item = opal_list_get_next(item)) { orte_rmaps_base_map_t* map2 = (orte_rmaps_base_map_t*)item; size_t i; for(i=0; inum_procs; i++) { @@ -573,11 +573,11 @@ static inline int __poe_launch_interactive(orte_jobid_t jobid) } cleanup: - while(NULL != (item = ompi_list_remove_first(&map))) { + while(NULL != (item = opal_list_remove_first(&map))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&map); - while(NULL != (item = ompi_list_remove_first(&nodes))) { + while(NULL != (item = opal_list_remove_first(&nodes))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&nodes); diff --git a/orte/mca/pls/rsh/pls_rsh_module.c b/orte/mca/pls/rsh/pls_rsh_module.c index d3bf01bf23..3d6f95f422 100644 --- a/orte/mca/pls/rsh/pls_rsh_module.c +++ b/orte/mca/pls/rsh/pls_rsh_module.c @@ -103,8 +103,8 @@ static void set_handler_default(int sig); static void orte_pls_rsh_wait_daemon(pid_t pid, int status, void* cbdata) { rsh_daemon_info_t *info = (rsh_daemon_info_t*) cbdata; - ompi_list_t map; - ompi_list_item_t* item; + opal_list_t map; + opal_list_item_t* item; int rc; /* if ssh exited abnormally, set the child processes to aborted @@ -122,7 +122,7 @@ static void orte_pls_rsh_wait_daemon(pid_t pid, int status, void* cbdata) #else if (! WIFEXITED(status) || ! WEXITSTATUS(status) == 0) { /* get the mapping for our node so we can cancel the right things */ - OBJ_CONSTRUCT(&map, ompi_list_t); + OBJ_CONSTRUCT(&map, opal_list_t); rc = orte_rmaps_base_get_node_map(orte_process_info.my_name->cellid, info->jobid, info->node->node_name, @@ -134,9 +134,9 @@ static void orte_pls_rsh_wait_daemon(pid_t pid, int status, void* cbdata) /* set state of all processes associated with the daemon as terminated */ - for(item = ompi_list_get_first(&map); - item != ompi_list_get_end(&map); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&map); + item != opal_list_get_end(&map); + item = opal_list_get_next(item)) { orte_rmaps_base_map_t* map = (orte_rmaps_base_map_t*) item; size_t i; @@ -253,8 +253,8 @@ static int orte_pls_rsh_set_node_name(orte_ras_base_node_t* node, orte_jobid_t j int orte_pls_rsh_launch(orte_jobid_t jobid) { - ompi_list_t nodes; - ompi_list_item_t* item; + opal_list_t nodes; + opal_list_item_t* item; size_t num_nodes; orte_vpid_t vpid; int node_name_index1; @@ -273,7 +273,7 @@ int orte_pls_rsh_launch(orte_jobid_t jobid) * mapping - as the daemon/proxy is responsibe for determining the apps * to launch on each node. */ - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); rc = orte_ras_base_node_query_alloc(&nodes, jobid); if(ORTE_SUCCESS != rc) { @@ -284,7 +284,7 @@ int orte_pls_rsh_launch(orte_jobid_t jobid) * Allocate a range of vpids for the daemons. */ - num_nodes = ompi_list_get_size(&nodes); + num_nodes = opal_list_get_size(&nodes); if(num_nodes == 0) { return ORTE_ERR_BAD_PARAM; } @@ -380,9 +380,9 @@ int orte_pls_rsh_launch(orte_jobid_t jobid) * up a daemon. */ - for(item = ompi_list_get_first(&nodes); - item != ompi_list_get_end(&nodes); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&nodes); + item != opal_list_get_end(&nodes); + item = opal_list_get_next(item)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; orte_process_name_t* name; pid_t pid; @@ -574,7 +574,7 @@ int orte_pls_rsh_launch(orte_jobid_t jobid) cleanup: - while(NULL != (item = ompi_list_remove_first(&nodes))) { + while(NULL != (item = opal_list_remove_first(&nodes))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&nodes); diff --git a/orte/mca/pls/tm/src/pls_tm_child.c b/orte/mca/pls/tm/src/pls_tm_child.c index e99daa1589..4928ed54dd 100644 --- a/orte/mca/pls/tm/src/pls_tm_child.c +++ b/orte/mca/pls/tm/src/pls_tm_child.c @@ -130,9 +130,9 @@ int orte_pls_tm_child_launch(orte_jobid_t jobid) tm_event_t event; char *flat; char old_cwd[OMPI_PATH_MAX]; - ompi_list_t mapping; + opal_list_t mapping; bool mapping_valid = false; - ompi_list_item_t *item; + opal_list_item_t *item; char **mca_env = NULL, **tmp_env, **local_env; char *path, *new_path; int num_mca_env; @@ -154,7 +154,7 @@ int orte_pls_tm_child_launch(orte_jobid_t jobid) have to cross reference against TM, it's much more efficient to do all the nodes in the entire map all at once. */ - OBJ_CONSTRUCT(&mapping, ompi_list_t); + OBJ_CONSTRUCT(&mapping, opal_list_t); if (ORTE_SUCCESS != (ret = orte_rmaps_base_get_map(jobid, &mapping))) { goto cleanup; } @@ -163,9 +163,9 @@ int orte_pls_tm_child_launch(orte_jobid_t jobid) /* Count how many processes we're starting so that we can allocate space for all the tid's */ - for (failure = false, i = 0, item = ompi_list_get_first(&mapping); - !failure && item != ompi_list_get_end(&mapping); - item = ompi_list_get_next(item)) { + for (failure = false, i = 0, item = opal_list_get_first(&mapping); + !failure && item != opal_list_get_end(&mapping); + item = opal_list_get_next(item)) { orte_rmaps_base_map_t* map = (orte_rmaps_base_map_t*) item; i += map->num_procs; } @@ -192,9 +192,9 @@ int orte_pls_tm_child_launch(orte_jobid_t jobid) getcwd(old_cwd, OMPI_PATH_MAX); failure = false; - for (num_spawned = i = 0, item = ompi_list_get_first(&mapping); - !failure && item != ompi_list_get_end(&mapping); - item = ompi_list_get_next(item), ++i) { + for (num_spawned = i = 0, item = opal_list_get_first(&mapping); + !failure && item != opal_list_get_end(&mapping); + item = opal_list_get_next(item), ++i) { orte_rmaps_base_map_t* map = (orte_rmaps_base_map_t*) item; app = map->app; @@ -348,7 +348,7 @@ int orte_pls_tm_child_launch(orte_jobid_t jobid) ompi_argv_free(mca_env); } if (mapping_valid) { - while (NULL != (item = ompi_list_remove_first(&mapping))) { + while (NULL != (item = opal_list_remove_first(&mapping))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&mapping); diff --git a/orte/mca/pls/xgrid/src/pls_xgrid_client.m b/orte/mca/pls/xgrid/src/pls_xgrid_client.m index 1f0cef30b2..27fe472a2c 100644 --- a/orte/mca/pls/xgrid/src/pls_xgrid_client.m +++ b/orte/mca/pls/xgrid/src/pls_xgrid_client.m @@ -238,8 +238,8 @@ mca_pls_xgrid_set_node_name(orte_ras_base_node_t* node, -(int) launchJob:(orte_jobid_t) jobid { - ompi_list_t nodes; - ompi_list_item_t *item; + opal_list_t nodes; + opal_list_item_t *item; int ret; size_t num_nodes; orte_vpid_t vpid; @@ -250,12 +250,12 @@ mca_pls_xgrid_set_node_name(orte_ras_base_node_t* node, orted_path = ompi_path_findv((char*) [orted cString], 0, environ, NULL); /* query the list of nodes allocated to the job */ - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); ret = orte_ras_base_node_query_alloc(&nodes, jobid); if (ORTE_SUCCESS != ret) goto cleanup; /* allocate vpids for the daemons */ - num_nodes = ompi_list_get_size(&nodes); + num_nodes = opal_list_get_size(&nodes); if (num_nodes == 0) return OMPI_ERR_BAD_PARAM; ret = orte_ns.reserve_range(0, num_nodes, &vpid); if (ORTE_SUCCESS != ret) goto cleanup; @@ -263,9 +263,9 @@ mca_pls_xgrid_set_node_name(orte_ras_base_node_t* node, /* build up the array of task specifications */ NSMutableDictionary *taskSpecifications = [NSMutableDictionary dictionary]; - for (item = ompi_list_get_first(&nodes); - item != ompi_list_get_end(&nodes); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&nodes); + item != opal_list_get_end(&nodes); + item = opal_list_get_next(item)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; orte_process_name_t* name; char *name_str, *nsuri, *gpruri; @@ -353,7 +353,7 @@ mca_pls_xgrid_set_node_name(orte_ras_base_node_t* node, forKey: [NSString stringWithFormat: @"%d", jobid]]; cleanup: - while(NULL != (item = ompi_list_remove_first(&nodes))) { + while(NULL != (item = opal_list_remove_first(&nodes))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&nodes); diff --git a/orte/mca/ras/base/base.h b/orte/mca/ras/base/base.h index 820fcfd918..e225261f14 100644 --- a/orte/mca/ras/base/base.h +++ b/orte/mca/ras/base/base.h @@ -24,7 +24,7 @@ */ #include "orte_config.h" #include "include/orte_constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/ras/ras.h" @@ -41,7 +41,7 @@ extern "C" { struct orte_ras_base_cmp_t { /** Base object */ - ompi_list_item_t super; + opal_list_item_t super; /** ras component */ orte_ras_base_component_t *component; /** ras module */ @@ -62,9 +62,9 @@ ORTE_DECLSPEC orte_ras_base_module_t* orte_ras_base_select(const char*); ORTE_DECLSPEC int orte_ras_base_allocate(orte_jobid_t job); ORTE_DECLSPEC int orte_ras_base_deallocate(orte_jobid_t job); ORTE_DECLSPEC int orte_ras_base_allocate_nodes_by_node(orte_jobid_t jobid, - ompi_list_t* nodes); + opal_list_t* nodes); ORTE_DECLSPEC int orte_ras_base_allocate_nodes_by_slot(orte_jobid_t jobid, - ompi_list_t* nodes); + opal_list_t* nodes); /* * globals that might be needed @@ -73,8 +73,8 @@ ORTE_DECLSPEC int orte_ras_base_allocate_nodes_by_slot(orte_jobid_t jobid, typedef struct orte_ras_base_t { int ras_output; - ompi_list_t ras_opened; - ompi_list_t ras_available; + opal_list_t ras_opened; + opal_list_t ras_available; size_t ras_num_nodes; } orte_ras_base_t; diff --git a/orte/mca/ras/base/ras_base_alloc.c b/orte/mca/ras/base/ras_base_alloc.c index 6e869eb72c..eb8a951a92 100644 --- a/orte/mca/ras/base/ras_base_alloc.c +++ b/orte/mca/ras/base/ras_base_alloc.c @@ -31,10 +31,10 @@ * around to the beginning as necessary */ int orte_ras_base_allocate_nodes_by_node(orte_jobid_t jobid, - ompi_list_t* nodes) + opal_list_t* nodes) { - ompi_list_t allocated; - ompi_list_item_t* item; + opal_list_t allocated; + opal_list_item_t* item; size_t num_requested = 0; size_t num_allocated = 0; size_t num_constrained = 0; @@ -48,7 +48,7 @@ int orte_ras_base_allocate_nodes_by_node(orte_jobid_t jobid, return rc; } - OBJ_CONSTRUCT(&allocated, ompi_list_t); + OBJ_CONSTRUCT(&allocated, opal_list_t); num_allocated = 0; /* This loop continues until all procs have been allocated or we run @@ -68,9 +68,9 @@ int orte_ras_base_allocate_nodes_by_node(orte_jobid_t jobid, /* loop over all nodes until either all processes are allocated or they all become constrained */ - for (item = ompi_list_get_first(nodes); - item != ompi_list_get_end(nodes) && num_allocated < num_requested; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(nodes); + item != opal_list_get_end(nodes) && num_allocated < num_requested; + item = opal_list_get_next(item)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; /* are any slots available? */ @@ -92,7 +92,7 @@ int orte_ras_base_allocate_nodes_by_node(orte_jobid_t jobid, - if this is the second time through the loop, then all nodes are full to the max, and therefore we can't do anything more -- we're out of resources */ - if (ompi_list_get_size(nodes) == num_constrained) { + if (opal_list_get_size(nodes) == num_constrained) { if (oversubscribe) { rc = ORTE_ERR_OUT_OF_RESOURCE; goto cleanup; @@ -103,13 +103,13 @@ int orte_ras_base_allocate_nodes_by_node(orte_jobid_t jobid, } /* move all nodes w/ allocations to the allocated list */ - item = ompi_list_get_first(nodes); - while(item != ompi_list_get_end(nodes)) { + item = opal_list_get_first(nodes); + while(item != opal_list_get_end(nodes)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; - ompi_list_item_t* next = ompi_list_get_next(item); + opal_list_item_t* next = opal_list_get_next(item); if(node->node_slots_alloc) { - ompi_list_remove_item(nodes, item); - ompi_list_append(&allocated, item); + opal_list_remove_item(nodes, item); + opal_list_append(&allocated, item); } item = next; } @@ -120,8 +120,8 @@ int orte_ras_base_allocate_nodes_by_node(orte_jobid_t jobid, } cleanup: - while(NULL != (item = ompi_list_remove_first(&allocated))) - ompi_list_append(nodes, item); + while(NULL != (item = opal_list_remove_first(&allocated))) + opal_list_append(nodes, item); OBJ_DESTRUCT(&allocated); return rc; } @@ -131,10 +131,10 @@ cleanup: * Allocate processes to nodes, using all available slots on a node. */ int orte_ras_base_allocate_nodes_by_slot(orte_jobid_t jobid, - ompi_list_t* nodes) + opal_list_t* nodes) { - ompi_list_t allocated; - ompi_list_item_t* item; + opal_list_t allocated; + opal_list_item_t* item; size_t num_requested = 0; size_t num_allocated = 0; size_t num_constrained = 0; @@ -147,14 +147,14 @@ int orte_ras_base_allocate_nodes_by_slot(orte_jobid_t jobid, return rc; } - OBJ_CONSTRUCT(&allocated, ompi_list_t); + OBJ_CONSTRUCT(&allocated, opal_list_t); num_allocated = 0; /* In the first pass, just grab all available slots (i.e., stay <= node_slots) greedily off each node */ - for (item = ompi_list_get_first(nodes); - item != ompi_list_get_end(nodes) && num_allocated < num_requested; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(nodes); + item != opal_list_get_end(nodes) && num_allocated < num_requested; + item = opal_list_get_next(item)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; /* are any slots available? */ @@ -183,9 +183,9 @@ int orte_ras_base_allocate_nodes_by_slot(orte_jobid_t jobid, /* loop over all nodes until either all processes are allocated or they all become constrained */ - for (item = ompi_list_get_first(nodes); - item != ompi_list_get_end(nodes) && num_allocated < num_requested; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(nodes); + item != opal_list_get_end(nodes) && num_allocated < num_requested; + item = opal_list_get_next(item)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; /* are any slots available? */ @@ -201,20 +201,20 @@ int orte_ras_base_allocate_nodes_by_slot(orte_jobid_t jobid, /* if all nodes are constrained, then we're out of resources -- thanks for playing */ - if (ompi_list_get_size(nodes) == num_constrained) { + if (opal_list_get_size(nodes) == num_constrained) { rc = ORTE_ERR_OUT_OF_RESOURCE; goto cleanup; } } /* move all nodes w/ allocations to the allocated list */ - item = ompi_list_get_first(nodes); - while(item != ompi_list_get_end(nodes)) { + item = opal_list_get_first(nodes); + while(item != opal_list_get_end(nodes)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; - ompi_list_item_t* next = ompi_list_get_next(item); + opal_list_item_t* next = opal_list_get_next(item); if(node->node_slots_alloc) { - ompi_list_remove_item(nodes, item); - ompi_list_append(&allocated, item); + opal_list_remove_item(nodes, item); + opal_list_append(&allocated, item); } item = next; } @@ -226,8 +226,8 @@ int orte_ras_base_allocate_nodes_by_slot(orte_jobid_t jobid, cleanup: - while(NULL != (item = ompi_list_remove_first(&allocated))) - ompi_list_append(nodes, item); + while(NULL != (item = opal_list_remove_first(&allocated))) + opal_list_append(nodes, item); OBJ_DESTRUCT(&allocated); return rc; } diff --git a/orte/mca/ras/base/ras_base_close.c b/orte/mca/ras/base/ras_base_close.c index bed07847ab..3acb8e7c62 100644 --- a/orte/mca/ras/base/ras_base_close.c +++ b/orte/mca/ras/base/ras_base_close.c @@ -28,10 +28,10 @@ int orte_ras_base_finalize(void) { - ompi_list_item_t* item; + opal_list_item_t* item; /* Finalize all available modules */ - while((item = ompi_list_remove_first(&orte_ras_base.ras_available)) != NULL) { + while((item = opal_list_remove_first(&orte_ras_base.ras_available)) != NULL) { orte_ras_base_cmp_t* cmp = (orte_ras_base_cmp_t*)item; cmp->module->finalize(); OBJ_RELEASE(cmp); diff --git a/orte/mca/ras/base/ras_base_node.c b/orte/mca/ras/base/ras_base_node.c index bf8d0d8d4d..8e1a4b1fba 100644 --- a/orte/mca/ras/base/ras_base_node.c +++ b/orte/mca/ras/base/ras_base_node.c @@ -52,7 +52,7 @@ static void orte_ras_base_node_destruct(orte_ras_base_node_t* node) OBJ_CLASS_INSTANCE( orte_ras_base_node_t, - ompi_list_item_t, + opal_list_item_t, orte_ras_base_node_construct, orte_ras_base_node_destruct); @@ -61,7 +61,7 @@ OBJ_CLASS_INSTANCE( * Query the registry for all available nodes */ -int orte_ras_base_node_query(ompi_list_t* nodes) +int orte_ras_base_node_query(opal_list_t* nodes) { size_t i, cnt; orte_gpr_value_t** values; @@ -117,7 +117,7 @@ int orte_ras_base_node_query(ompi_list_t* nodes) continue; } } - ompi_list_append(nodes, &node->super); + opal_list_append(nodes, &node->super); } return ORTE_SUCCESS; } @@ -125,7 +125,7 @@ int orte_ras_base_node_query(ompi_list_t* nodes) /* * Query the registry for all nodes allocated to a specified job */ -int orte_ras_base_node_query_alloc(ompi_list_t* nodes, orte_jobid_t jobid) +int orte_ras_base_node_query_alloc(opal_list_t* nodes, orte_jobid_t jobid) { char* keys[] = { ORTE_NODE_NAME_KEY, @@ -205,7 +205,7 @@ int orte_ras_base_node_query_alloc(ompi_list_t* nodes, orte_jobid_t jobid) OBJ_RELEASE(node); continue; } - ompi_list_append(nodes, &node->super); + opal_list_append(nodes, &node->super); } return ORTE_SUCCESS; } @@ -213,15 +213,15 @@ int orte_ras_base_node_query_alloc(ompi_list_t* nodes, orte_jobid_t jobid) /* * Add the specified node definitions to the registry */ -int orte_ras_base_node_insert(ompi_list_t* nodes) +int orte_ras_base_node_insert(opal_list_t* nodes) { - ompi_list_item_t* item; + opal_list_item_t* item; orte_gpr_value_t **values; int rc; size_t num_values, i, j; orte_ras_base_node_t* node; - num_values = ompi_list_get_size(nodes); + num_values = opal_list_get_size(nodes); if (0 >= num_values) { ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM); return ORTE_ERR_BAD_PARAM; @@ -270,9 +270,9 @@ int orte_ras_base_node_insert(ompi_list_t* nodes) } } - for(i=0, item = ompi_list_get_first(nodes); - i < num_values && item != ompi_list_get_end(nodes); - i++, item = ompi_list_get_next(item)) { + for(i=0, item = opal_list_get_first(nodes); + i < num_values && item != opal_list_get_end(nodes); + i++, item = opal_list_get_next(item)) { orte_gpr_value_t* value = values[i]; node = (orte_ras_base_node_t*)item; @@ -337,14 +337,14 @@ int orte_ras_base_node_insert(ompi_list_t* nodes) /* * Delete the specified nodes from the registry */ -int orte_ras_base_node_delete(ompi_list_t* nodes) +int orte_ras_base_node_delete(opal_list_t* nodes) { - ompi_list_item_t* item; + opal_list_item_t* item; int rc; - for(item = ompi_list_get_first(nodes); - item != ompi_list_get_end(nodes); - item = ompi_list_get_next(nodes)) { + for(item = opal_list_get_first(nodes); + item != opal_list_get_end(nodes); + item = opal_list_get_next(nodes)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; char* cellid; char* tokens[3]; @@ -376,16 +376,16 @@ int orte_ras_base_node_delete(ompi_list_t* nodes) * Assign the allocated slots on the specified nodes to the * indicated jobid. */ -int orte_ras_base_node_assign(ompi_list_t* nodes, orte_jobid_t jobid) +int orte_ras_base_node_assign(opal_list_t* nodes, orte_jobid_t jobid) { - ompi_list_item_t* item; + opal_list_item_t* item; orte_gpr_value_t **values; int rc; size_t num_values, i, j; orte_ras_base_node_t* node; char* jobid_str; - num_values = ompi_list_get_size(nodes); + num_values = opal_list_get_size(nodes); if (0 >= num_values) { ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM); return ORTE_ERR_BAD_PARAM; @@ -432,9 +432,9 @@ int orte_ras_base_node_assign(ompi_list_t* nodes, orte_jobid_t jobid) } } - for(i=0, item = ompi_list_get_first(nodes); - i < num_values && item != ompi_list_get_end(nodes); - i++, item = ompi_list_get_next(item)) { + for(i=0, item = opal_list_get_first(nodes); + i < num_values && item != opal_list_get_end(nodes); + i++, item = opal_list_get_next(item)) { int rc; node = (orte_ras_base_node_t*)item; diff --git a/orte/mca/ras/base/ras_base_node.h b/orte/mca/ras/base/ras_base_node.h index 19d7e2175b..7cf83d05ed 100644 --- a/orte/mca/ras/base/ras_base_node.h +++ b/orte/mca/ras/base/ras_base_node.h @@ -38,7 +38,7 @@ extern "C" { */ struct orte_ras_base_node_t { /** Base object */ - ompi_list_item_t super; + opal_list_item_t super; /** String node name */ char *node_name; /** String of the architecture for the node. This is permitted to @@ -88,28 +88,28 @@ ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_ras_base_node_t); /* * Query the registry for all available nodes */ -int orte_ras_base_node_query(ompi_list_t*); +int orte_ras_base_node_query(opal_list_t*); /* * Query the registry for all nodes allocated to a specific job */ -int orte_ras_base_node_query_alloc(ompi_list_t*, orte_jobid_t); +int orte_ras_base_node_query_alloc(opal_list_t*, orte_jobid_t); /* * Add the specified node definitions to the registry */ -int orte_ras_base_node_insert(ompi_list_t*); +int orte_ras_base_node_insert(opal_list_t*); /* * Delete the specified nodes from the registry */ -int orte_ras_base_node_delete(ompi_list_t*); +int orte_ras_base_node_delete(opal_list_t*); /* * Assign the allocated slots on the specified nodes to the * indicated jobid. */ -int orte_ras_base_node_assign(ompi_list_t*, orte_jobid_t); +int orte_ras_base_node_assign(opal_list_t*, orte_jobid_t); #if defined(c_plusplus) || defined(__cplusplus) diff --git a/orte/mca/ras/base/ras_base_open.c b/orte/mca/ras/base/ras_base_open.c index a6bb2e0143..ff42cc0ae8 100644 --- a/orte/mca/ras/base/ras_base_open.c +++ b/orte/mca/ras/base/ras_base_open.c @@ -53,7 +53,7 @@ static void orte_ras_base_cmp_destructor(orte_ras_base_cmp_t *cmp) * so that we get the highest priority first (i.e., so the sort is * highest->lowest, not lowest->highest) */ -static int compare(ompi_list_item_t **a, ompi_list_item_t **b) +static int compare(opal_list_item_t **a, opal_list_item_t **b) { orte_ras_base_cmp_t *aa = *((orte_ras_base_cmp_t **) a); orte_ras_base_cmp_t *bb = *((orte_ras_base_cmp_t **) b); @@ -74,7 +74,7 @@ static int compare(ompi_list_item_t **a, ompi_list_item_t **b) orte_ras_base_t orte_ras_base; OBJ_CLASS_INSTANCE( orte_ras_base_cmp_t, - ompi_list_item_t, + opal_list_item_t, orte_ras_base_cmp_constructor, orte_ras_base_cmp_destructor); @@ -85,7 +85,7 @@ OBJ_CLASS_INSTANCE( */ int orte_ras_base_open(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; orte_ras_base_component_t *component; orte_ras_base_module_t *module; @@ -110,11 +110,11 @@ int orte_ras_base_open(void) &orte_ras_base.ras_opened, true)) { return ORTE_ERROR; } - OBJ_CONSTRUCT(&orte_ras_base.ras_available, ompi_list_t); + OBJ_CONSTRUCT(&orte_ras_base.ras_available, opal_list_t); - for (item = ompi_list_get_first(&orte_ras_base.ras_opened); - ompi_list_get_end(&orte_ras_base.ras_opened) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_ras_base.ras_opened); + opal_list_get_end(&orte_ras_base.ras_opened) != item; + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (orte_ras_base_component_t *) cli->cli_component; ompi_output(orte_ras_base.ras_output, @@ -140,7 +140,7 @@ int orte_ras_base_open(void) cmp->module = module; cmp->priority = priority; - ompi_list_append(&orte_ras_base.ras_available, &cmp->super); + opal_list_append(&orte_ras_base.ras_available, &cmp->super); } else { ompi_output(orte_ras_base.ras_output, "orte:base:open: component %s does NOT want to be considered for selection", @@ -149,7 +149,7 @@ int orte_ras_base_open(void) } /* Sort the resulting available list in priority order */ - ompi_list_sort(&orte_ras_base.ras_available, compare); + opal_list_sort(&orte_ras_base.ras_available, compare); /* All done */ return ORTE_SUCCESS; diff --git a/orte/mca/ras/base/ras_base_select.c b/orte/mca/ras/base/ras_base_select.c index 6a9fc3b0b2..234abee988 100644 --- a/orte/mca/ras/base/ras_base_select.c +++ b/orte/mca/ras/base/ras_base_select.c @@ -45,16 +45,16 @@ orte_ras_base_module_t* orte_ras_base_select(const char *preferred) static orte_ras_base_module_t *select_preferred(const char *name) { - ompi_list_item_t *item; + opal_list_item_t *item; orte_ras_base_cmp_t *cmp; /* Look for a matching selected name */ ompi_output(orte_ras_base.ras_output, "orte:base:select: looking for component %s", name); - for (item = ompi_list_get_first(&orte_ras_base.ras_available); - item != ompi_list_get_end(&orte_ras_base.ras_available); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_ras_base.ras_available); + item != opal_list_get_end(&orte_ras_base.ras_available); + item = opal_list_get_next(item)) { cmp = (orte_ras_base_cmp_t *) item; if (0 == strcmp(name, @@ -75,12 +75,12 @@ static orte_ras_base_module_t *select_preferred(const char *name) static orte_ras_base_module_t *select_any(void) { - ompi_list_item_t *item; + opal_list_item_t *item; orte_ras_base_cmp_t *cmp; /* If the list is empty, return NULL */ - if (ompi_list_is_empty(&orte_ras_base.ras_available)) { + if (opal_list_is_empty(&orte_ras_base.ras_available)) { ompi_output(orte_ras_base.ras_output, "orte:base:select: no components available!"); return NULL; @@ -89,7 +89,7 @@ static orte_ras_base_module_t *select_any(void) /* Otherwise, return the first item (it's already sorted in priority order) */ - item = ompi_list_get_first(&orte_ras_base.ras_available); + item = opal_list_get_first(&orte_ras_base.ras_available); cmp = (orte_ras_base_cmp_t *) item; ompi_output(orte_ras_base.ras_output, "orte:base:select: highest priority component: %s", diff --git a/orte/mca/ras/bjs/ras_bjs.c b/orte/mca/ras/bjs/ras_bjs.c index 039564102d..65210a3f15 100644 --- a/orte/mca/ras/bjs/ras_bjs.c +++ b/orte/mca/ras/bjs/ras_bjs.c @@ -102,25 +102,25 @@ static int orte_ras_bjs_node_resolve(char* node_name, int* node_num) * - check for additional nodes that have already been allocated */ -static int orte_ras_bjs_discover(ompi_list_t* nodelist) +static int orte_ras_bjs_discover(opal_list_t* nodelist) { char* nodes; char* ptr; - ompi_list_item_t* item; - ompi_list_t new_nodes; + opal_list_item_t* item; + opal_list_t new_nodes; int rc; /* query the nodelist from the registry */ - OBJ_CONSTRUCT(&new_nodes, ompi_list_t); + OBJ_CONSTRUCT(&new_nodes, opal_list_t); if(ORTE_SUCCESS != (rc = orte_ras_base_node_query(nodelist))) { ORTE_ERROR_LOG(rc); return rc; } /* validate that any user supplied nodes actually exist, etc. */ - for(item = ompi_list_get_first(nodelist); - item != ompi_list_get_end(nodelist); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(nodelist); + item != opal_list_get_end(nodelist); + item = opal_list_get_next(item)) { int node_num; orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; @@ -152,24 +152,24 @@ static int orte_ras_bjs_discover(ompi_list_t* nodelist) /* parse the node list and check node status/access */ nodes = getenv("NODES"); if(NULL == nodes) { - return ompi_list_get_size(nodelist) ? ORTE_SUCCESS : ORTE_ERR_NOT_AVAILABLE; + return opal_list_get_size(nodelist) ? ORTE_SUCCESS : ORTE_ERR_NOT_AVAILABLE; } - OBJ_CONSTRUCT(&new_nodes, ompi_list_t); + OBJ_CONSTRUCT(&new_nodes, opal_list_t); while(NULL != (ptr = strsep(&nodes,","))) { orte_ras_base_node_t *node; orte_node_state_t node_state; int node_num; /* is this node already in the list */ - for(item = ompi_list_get_first(nodelist); - item != ompi_list_get_end(nodelist); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(nodelist); + item != opal_list_get_end(nodelist); + item = opal_list_get_next(item)) { node = (orte_ras_base_node_t*)item; if(strcmp(node->node_name, ptr) == 0) break; } - if(item != ompi_list_get_end(nodelist)) + if(item != opal_list_get_end(nodelist)) continue; if(sscanf(ptr, "%d", &node_num) != 1) { continue; @@ -194,11 +194,11 @@ static int orte_ras_bjs_discover(ompi_list_t* nodelist) node->node_slots_inuse = 0; node->node_slots_max = 0; node->node_slots = orte_ras_bjs_node_slots(node->node_name); - ompi_list_append(&new_nodes, &node->super); + opal_list_append(&new_nodes, &node->super); } /* add any newly discovered nodes to the registry */ - if(ompi_list_get_size(&new_nodes)) { + if(opal_list_get_size(&new_nodes)) { rc = orte_ras_base_node_insert(&new_nodes); if(ORTE_SUCCESS != rc) { ORTE_ERROR_LOG(rc); @@ -206,8 +206,8 @@ static int orte_ras_bjs_discover(ompi_list_t* nodelist) } /* append them to the nodelist */ - while(NULL != (item = ompi_list_remove_first(&new_nodes))) - ompi_list_append(nodelist, item); + while(NULL != (item = opal_list_remove_first(&new_nodes))) + opal_list_append(nodelist, item); cleanup: OBJ_DESTRUCT(&new_nodes); @@ -223,11 +223,11 @@ cleanup: static int orte_ras_bjs_allocate(orte_jobid_t jobid) { - ompi_list_t nodes; - ompi_list_item_t* item; + opal_list_t nodes; + opal_list_item_t* item; int rc; - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); if(ORTE_SUCCESS != (rc = orte_ras_bjs_discover(&nodes))) { ORTE_ERROR_LOG(rc); return rc; @@ -241,7 +241,7 @@ static int orte_ras_bjs_allocate(orte_jobid_t jobid) ORTE_ERROR_LOG(rc); } - while(NULL != (item = ompi_list_remove_first(&nodes))) + while(NULL != (item = opal_list_remove_first(&nodes))) OBJ_RELEASE(item); OBJ_DESTRUCT(&nodes); return rc; diff --git a/orte/mca/ras/host/ras_host.c b/orte/mca/ras/host/ras_host.c index c8dc66128b..36024b5f1d 100644 --- a/orte/mca/ras/host/ras_host.c +++ b/orte/mca/ras/host/ras_host.c @@ -33,11 +33,11 @@ static int orte_ras_host_allocate(orte_jobid_t jobid) { - ompi_list_t nodes; - ompi_list_item_t* item; + opal_list_t nodes; + opal_list_item_t* item; int rc; - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); if(ORTE_SUCCESS != (rc = orte_ras_base_node_query(&nodes))) { goto cleanup; } @@ -55,7 +55,7 @@ static int orte_ras_host_allocate(orte_jobid_t jobid) } cleanup: - while(NULL != (item = ompi_list_remove_first(&nodes))) { + while(NULL != (item = opal_list_remove_first(&nodes))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&nodes); diff --git a/orte/mca/ras/tm/src/ras_tm_module.c b/orte/mca/ras/tm/src/ras_tm_module.c index c7f675b711..a4e6f090b1 100644 --- a/orte/mca/ras/tm/src/ras_tm_module.c +++ b/orte/mca/ras/tm/src/ras_tm_module.c @@ -37,7 +37,7 @@ static int allocate(orte_jobid_t jobid); static int deallocate(orte_jobid_t jobid); static int finalize(void); -static int discover(ompi_list_t* nodelist); +static int discover(opal_list_t* nodelist); static int get_tm_hostname(tm_node_id node, char **hostname, char **arch); @@ -60,8 +60,8 @@ orte_ras_base_module_t orte_ras_tm_module = { static int allocate(orte_jobid_t jobid) { int ret; - ompi_list_t nodes; - ompi_list_item_t* item; + opal_list_t nodes; + opal_list_item_t* item; struct tm_roots root; /* Open up our connection to tm */ @@ -74,7 +74,7 @@ static int allocate(orte_jobid_t jobid) return ORTE_ERR_RESOURCE_BUSY; } - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); if (ORTE_SUCCESS != (ret = discover(&nodes))) { /* JMS May change...? */ ompi_output(orte_ras_base.ras_output, @@ -84,7 +84,7 @@ static int allocate(orte_jobid_t jobid) } ret = orte_ras_base_allocate_nodes(jobid, &nodes); - while (NULL != (item = ompi_list_remove_first(&nodes))) { + while (NULL != (item = opal_list_remove_first(&nodes))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&nodes); @@ -134,12 +134,12 @@ static int finalize(void) * - check for additional nodes that have already been allocated */ -static int discover(ompi_list_t* nodelist) +static int discover(opal_list_t* nodelist) { int i, ret, num_node_ids; orte_ras_base_node_t *node; - ompi_list_item_t* item; - ompi_list_t new_nodes; + opal_list_item_t* item; + opal_list_t new_nodes; tm_node_id *tm_node_ids; char *hostname, *arch; @@ -162,7 +162,7 @@ static int discover(ompi_list_t* nodelist) /* Iterate through all the nodes and make an entry for each */ - OBJ_CONSTRUCT(&new_nodes, ompi_list_t); + OBJ_CONSTRUCT(&new_nodes, opal_list_t); for (i = 0; i < num_node_ids; ++i) { get_tm_hostname(tm_node_ids[i], &hostname, &arch); ompi_output(orte_ras_base.ras_output, @@ -171,9 +171,9 @@ static int discover(ompi_list_t* nodelist) /* Remember that TM may list the same node more than once. So we have to check for duplicates. */ - for (item = ompi_list_get_first(&new_nodes); - ompi_list_get_end(&new_nodes) != item; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&new_nodes); + opal_list_get_end(&new_nodes) != item; + item = opal_list_get_next(item)) { node = (orte_ras_base_node_t*) item; if (0 == strcmp(node->node_name, hostname)) { ++node->node_slots_max; @@ -187,7 +187,7 @@ static int discover(ompi_list_t* nodelist) /* Did we find it? */ - if (ompi_list_get_end(&new_nodes) == item) { + if (opal_list_get_end(&new_nodes) == item) { /* Nope -- didn't find it, so add a new item to the list */ @@ -201,7 +201,7 @@ static int discover(ompi_list_t* nodelist) node->node_slots_inuse = 0; node->node_slots_max = 1; node->node_slots = 1; - ompi_list_append(&new_nodes, &node->super); + opal_list_append(&new_nodes, &node->super); } else { /* Yes, so we need to free the hostname that came back @@ -216,10 +216,10 @@ static int discover(ompi_list_t* nodelist) ompi_output(orte_ras_base.ras_output, "ras:tm:allocate:discover: done -- adding to registry"); ret = orte_ras_base_node_insert(&new_nodes); - for (item = ompi_list_remove_first(&new_nodes); - NULL != item; item = ompi_list_remove_first(&new_nodes)) { + for (item = opal_list_remove_first(&new_nodes); + NULL != item; item = opal_list_remove_first(&new_nodes)) { if (ORTE_SUCCESS == ret) { - ompi_list_append(nodelist, item); + opal_list_append(nodelist, item); } else { OBJ_RELEASE(item); } diff --git a/orte/mca/ras/xgrid/src/ras_xgrid_module.c b/orte/mca/ras/xgrid/src/ras_xgrid_module.c index c58920c969..7588e1b19d 100644 --- a/orte/mca/ras/xgrid/src/ras_xgrid_module.c +++ b/orte/mca/ras/xgrid/src/ras_xgrid_module.c @@ -36,7 +36,7 @@ static int allocate(orte_jobid_t jobid); static int deallocate(orte_jobid_t jobid); static int finalize(void); -static int discover(orte_jobid_t jobid, ompi_list_t* nodelist); +static int discover(orte_jobid_t jobid, opal_list_t* nodelist); /* @@ -58,10 +58,10 @@ orte_ras_base_module_t orte_ras_xgrid_module = { static int allocate(orte_jobid_t jobid) { int ret; - ompi_list_t nodes; - ompi_list_item_t* item; + opal_list_t nodes; + opal_list_item_t* item; - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); if (ORTE_SUCCESS != (ret = discover(jobid, &nodes))) { ompi_output(orte_ras_base.ras_output, "ras:xgrid:allocate: discover failed!"); @@ -69,7 +69,7 @@ static int allocate(orte_jobid_t jobid) } ret = orte_ras_base_allocate_nodes_by_node(jobid, &nodes); - while (NULL != (item = ompi_list_remove_first(&nodes))) { + while (NULL != (item = opal_list_remove_first(&nodes))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&nodes); @@ -111,12 +111,12 @@ static int finalize(void) /* discover number of available resouces. Always exactly what asked for (surprise...) */ -static int discover(orte_jobid_t jobid, ompi_list_t* nodelist) +static int discover(orte_jobid_t jobid, opal_list_t* nodelist) { int ret; orte_ras_base_node_t *node; - ompi_list_item_t* item; - ompi_list_t new_nodes; + opal_list_item_t* item; + opal_list_t new_nodes; size_t num_requested = 0; size_t i; char *hostname; @@ -127,7 +127,7 @@ static int discover(orte_jobid_t jobid, ompi_list_t* nodelist) } /* create a "node" for each slot */ - OBJ_CONSTRUCT(&new_nodes, ompi_list_t); + OBJ_CONSTRUCT(&new_nodes, opal_list_t); for (i = 0 ; i < num_requested ; ++i) { asprintf(&hostname, "xgrid-node-%d", (int) i); node = OBJ_NEW(orte_ras_base_node_t); @@ -138,17 +138,17 @@ static int discover(orte_jobid_t jobid, ompi_list_t* nodelist) node->node_slots_inuse = 0; node->node_slots_max = 1; node->node_slots = 1; - ompi_list_append(&new_nodes, &node->super); + opal_list_append(&new_nodes, &node->super); } /* Add these nodes to the registry, and return all the values */ ompi_output(orte_ras_base.ras_output, "ras:xgrid:allocate:discover: done -- adding to registry"); ret = orte_ras_base_node_insert(&new_nodes); - for (item = ompi_list_remove_first(&new_nodes); - NULL != item; item = ompi_list_remove_first(&new_nodes)) { + for (item = opal_list_remove_first(&new_nodes); + NULL != item; item = opal_list_remove_first(&new_nodes)) { if (ORTE_SUCCESS == ret) { - ompi_list_append(nodelist, item); + opal_list_append(nodelist, item); } else { OBJ_RELEASE(item); } diff --git a/orte/mca/rds/base/base.h b/orte/mca/rds/base/base.h index ad0ff8c8c7..c9ce69704d 100644 --- a/orte/mca/rds/base/base.h +++ b/orte/mca/rds/base/base.h @@ -25,7 +25,7 @@ #include "orte_config.h" #include "include/orte_constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/rds/rds.h" @@ -41,7 +41,7 @@ extern "C" { * Internal definitions */ struct orte_rds_base_selected_t { - ompi_list_item_t super; + opal_list_item_t super; orte_rds_base_component_t *component; orte_rds_base_module_t* module; }; @@ -64,8 +64,8 @@ OMPI_DECLSPEC int orte_rds_base_query(void); typedef struct orte_rds_base_t { int rds_output; - ompi_list_t rds_components; - ompi_list_t rds_selected; + opal_list_t rds_components; + opal_list_t rds_selected; } orte_rds_base_t; OMPI_DECLSPEC extern orte_rds_base_t orte_rds_base; @@ -77,7 +77,7 @@ OMPI_DECLSPEC extern orte_rds_base_t orte_rds_base; /* * utility functions for use within the RDS */ -int orte_rds_base_store_resource(ompi_list_t *resource_list); +int orte_rds_base_store_resource(opal_list_t *resource_list); #if defined(c_plusplus) || defined(__cplusplus) } diff --git a/orte/mca/rds/base/rds_base_close.c b/orte/mca/rds/base/rds_base_close.c index 85fc739a21..165ebf09b8 100644 --- a/orte/mca/rds/base/rds_base_close.c +++ b/orte/mca/rds/base/rds_base_close.c @@ -27,10 +27,10 @@ int orte_rds_base_finalize(void) { - ompi_list_item_t* item; + opal_list_item_t* item; /* Finalize all selected modules */ - while((item = ompi_list_remove_first(&orte_rds_base.rds_selected)) != NULL) { + while((item = opal_list_remove_first(&orte_rds_base.rds_selected)) != NULL) { orte_rds_base_selected_t* selected = (orte_rds_base_selected_t*)item; selected->module->finalize(); OBJ_RELEASE(selected); diff --git a/orte/mca/rds/base/rds_base_open.c b/orte/mca/rds/base/rds_base_open.c index 246244d51d..7b775b6a61 100644 --- a/orte/mca/rds/base/rds_base_open.c +++ b/orte/mca/rds/base/rds_base_open.c @@ -45,7 +45,7 @@ static void orte_rds_base_cell_desc_constructor(orte_rds_cell_desc_t *cell) cell->name = NULL; cell->type = NULL; - OBJ_CONSTRUCT(&cell->attributes, ompi_list_t); + OBJ_CONSTRUCT(&cell->attributes, opal_list_t); } static void orte_rds_base_cell_desc_destructor(orte_rds_cell_desc_t *cell) @@ -59,7 +59,7 @@ static void orte_rds_base_cell_desc_destructor(orte_rds_cell_desc_t *cell) OBJ_CLASS_INSTANCE( orte_rds_cell_desc_t, - ompi_list_item_t, + opal_list_item_t, orte_rds_base_cell_desc_constructor, orte_rds_base_cell_desc_destructor); @@ -76,7 +76,7 @@ static void orte_rds_base_cell_attr_destructor(orte_rds_cell_attr_t *cell) OBJ_CLASS_INSTANCE( orte_rds_cell_attr_t, - ompi_list_item_t, + opal_list_item_t, orte_rds_base_cell_attr_constructor, orte_rds_base_cell_attr_destructor); @@ -113,7 +113,7 @@ int orte_rds_base_open(void) &orte_rds_base.rds_components, true)) { return ORTE_ERROR; } - OBJ_CONSTRUCT(&orte_rds_base.rds_selected, ompi_list_t); + OBJ_CONSTRUCT(&orte_rds_base.rds_selected, opal_list_t); /* All done */ diff --git a/orte/mca/rds/base/rds_base_query.c b/orte/mca/rds/base/rds_base_query.c index 60aa021e12..8ce0e7be0d 100644 --- a/orte/mca/rds/base/rds_base_query.c +++ b/orte/mca/rds/base/rds_base_query.c @@ -28,12 +28,12 @@ */ int orte_rds_base_query(void) { - ompi_list_item_t* item; + opal_list_item_t* item; /* Query all selected modules */ - for(item = ompi_list_get_first(&orte_rds_base.rds_selected); - item != ompi_list_get_end(&orte_rds_base.rds_selected); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&orte_rds_base.rds_selected); + item != opal_list_get_end(&orte_rds_base.rds_selected); + item = opal_list_get_next(item)) { orte_rds_base_selected_t* selected = (orte_rds_base_selected_t*)item; int rc = selected->module->query(); if(rc != ORTE_SUCCESS) diff --git a/orte/mca/rds/base/rds_base_registry_fns.c b/orte/mca/rds/base/rds_base_registry_fns.c index 7bbc60cb4b..6223af2e3a 100644 --- a/orte/mca/rds/base/rds_base_registry_fns.c +++ b/orte/mca/rds/base/rds_base_registry_fns.c @@ -24,7 +24,7 @@ #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/output.h" #include "mca/errmgr/errmgr.h" #include "mca/gpr/gpr.h" @@ -32,10 +32,10 @@ #include "mca/rds/base/base.h" -int orte_rds_base_store_resource(ompi_list_t *resources) +int orte_rds_base_store_resource(opal_list_t *resources) { orte_rds_cell_desc_t *cell; - ompi_list_item_t *item; + opal_list_item_t *item; orte_gpr_value_t **values; orte_rds_cell_attr_t *attr; size_t i, j, num_vals; @@ -46,7 +46,7 @@ int orte_rds_base_store_resource(ompi_list_t *resources) return ORTE_ERR_BAD_PARAM; } - num_vals = ompi_list_get_size(resources); + num_vals = opal_list_get_size(resources); if (0 == num_vals) { /* nothing to do */ return ORTE_SUCCESS; } @@ -57,7 +57,7 @@ int orte_rds_base_store_resource(ompi_list_t *resources) return ORTE_ERR_OUT_OF_RESOURCE; } - for (i=0; i < num_vals && NULL != (cell = (orte_rds_cell_desc_t*)ompi_list_remove_first(resources)); i++) { + for (i=0; i < num_vals && NULL != (cell = (orte_rds_cell_desc_t*)opal_list_remove_first(resources)); i++) { values[i] = OBJ_NEW(orte_gpr_value_t); if (NULL == values[i]) { ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); @@ -74,7 +74,7 @@ int orte_rds_base_store_resource(ompi_list_t *resources) goto CLEANUP; } - values[i]->cnt = ompi_list_get_size(&cell->attributes); + values[i]->cnt = opal_list_get_size(&cell->attributes); values[i]->keyvals = (orte_gpr_keyval_t**)malloc(values[i]->cnt * sizeof(orte_gpr_keyval_t*)); if (NULL == values[i]->keyvals) { ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); @@ -82,9 +82,9 @@ int orte_rds_base_store_resource(ompi_list_t *resources) goto CLEANUP; } - for (j=0, item = ompi_list_get_first(&cell->attributes); - j < values[i]->cnt && item != ompi_list_get_end(&cell->attributes); - j++, item = ompi_list_get_next(item)) { + for (j=0, item = opal_list_get_first(&cell->attributes); + j < values[i]->cnt && item != opal_list_get_end(&cell->attributes); + j++, item = opal_list_get_next(item)) { attr = (orte_rds_cell_attr_t*)item; values[i]->keyvals[j] = OBJ_NEW(orte_gpr_keyval_t); diff --git a/orte/mca/rds/base/rds_base_select.c b/orte/mca/rds/base/rds_base_select.c index 512f74dcef..15ab5e7325 100644 --- a/orte/mca/rds/base/rds_base_select.c +++ b/orte/mca/rds/base/rds_base_select.c @@ -26,7 +26,7 @@ OBJ_CLASS_INSTANCE(orte_rds_base_selected_t, - ompi_list_item_t, NULL, NULL); + opal_list_item_t, NULL, NULL); /** @@ -34,16 +34,16 @@ OBJ_CLASS_INSTANCE(orte_rds_base_selected_t, */ int orte_rds_base_select(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; orte_rds_base_component_t *component; orte_rds_base_module_t *module; /* Iterate through all the available components */ - for (item = ompi_list_get_first(&orte_rds_base.rds_components); - item != ompi_list_get_end(&orte_rds_base.rds_components); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_rds_base.rds_components); + item != opal_list_get_end(&orte_rds_base.rds_components); + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (orte_rds_base_component_t *) cli->cli_component; @@ -59,11 +59,11 @@ int orte_rds_base_select(void) orte_rds_base_selected_t* selected = OBJ_NEW(orte_rds_base_selected_t); selected->module = module; selected->component = component; - ompi_list_append(&orte_rds_base.rds_selected, &selected->super); + opal_list_append(&orte_rds_base.rds_selected, &selected->super); } } - if (ompi_list_is_empty(&orte_rds_base.rds_selected)) { + if (opal_list_is_empty(&orte_rds_base.rds_selected)) { ompi_output(orte_rds_base.rds_output, "rda:select: no components available!"); return ORTE_ERROR; diff --git a/orte/mca/rds/hostfile/rds_hostfile.c b/orte/mca/rds/hostfile/rds_hostfile.c index b1276c8f1f..cc0589d908 100644 --- a/orte/mca/rds/hostfile/rds_hostfile.c +++ b/orte/mca/rds/hostfile/rds_hostfile.c @@ -21,7 +21,7 @@ #include #include "include/orte_constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "util/output.h" #include "util/sys_info.h" #include "mca/mca.h" @@ -52,22 +52,22 @@ static int orte_rds_hostfile_parse_int(void) } -static orte_ras_base_node_t* orte_rds_hostfile_lookup(ompi_list_t* nodes, const char* name) +static orte_ras_base_node_t* orte_rds_hostfile_lookup(opal_list_t* nodes, const char* name) { - ompi_list_item_t* item; - for(item = ompi_list_get_first(nodes); - item != ompi_list_get_end(nodes); - item = ompi_list_get_next(item)) { + opal_list_item_t* item; + for(item = opal_list_get_first(nodes); + item != opal_list_get_end(nodes); + item = opal_list_get_next(item)) { orte_ras_base_node_t* node = (orte_ras_base_node_t*)item; if(strcmp(node->node_name, name) == 0) { - ompi_list_remove_item(nodes, item); + opal_list_remove_item(nodes, item); return node; } } return NULL; } -static int orte_rds_hostfile_parse_line(int token, ompi_list_t* existing, ompi_list_t* updates) +static int orte_rds_hostfile_parse_line(int token, opal_list_t* existing, opal_list_t* updates) { int rc; orte_ras_base_node_t* node; @@ -183,7 +183,7 @@ done: if (!got_count) { ++node->node_slots; } - ompi_list_append(updates, &node->super); + opal_list_append(updates, &node->super); } else { OBJ_RELEASE(node); } @@ -195,7 +195,7 @@ done: * Parse the specified file into a node list. */ -static int orte_rds_hostfile_parse(const char *hostfile, ompi_list_t* existing, ompi_list_t* updates) +static int orte_rds_hostfile_parse(const char *hostfile, opal_list_t* existing, opal_list_t* updates) { int token; int rc = ORTE_SUCCESS; @@ -247,13 +247,13 @@ unlock: static int orte_rds_hostfile_query(void) { - ompi_list_t existing; - ompi_list_t updates; - ompi_list_item_t *item; + opal_list_t existing; + opal_list_t updates; + opal_list_item_t *item; int rc; - OBJ_CONSTRUCT(&existing, ompi_list_t); - OBJ_CONSTRUCT(&updates, ompi_list_t); + OBJ_CONSTRUCT(&existing, opal_list_t); + OBJ_CONSTRUCT(&updates, opal_list_t); rc = orte_ras_base_node_query(&existing); if(ORTE_SUCCESS != rc) { goto cleanup; @@ -272,7 +272,7 @@ static int orte_rds_hostfile_query(void) } else if (ORTE_SUCCESS != rc) { goto cleanup; } - if(ompi_list_get_size(&updates)) { + if(opal_list_get_size(&updates)) { rc = orte_ras_base_node_insert(&updates); } @@ -282,11 +282,11 @@ cleanup: mca_rds_hostfile_component.path = NULL; } - while(NULL != (item = ompi_list_remove_first(&existing))) { + while(NULL != (item = opal_list_remove_first(&existing))) { OBJ_RELEASE(item); } - while(NULL != (item = ompi_list_remove_first(&updates))) { + while(NULL != (item = opal_list_remove_first(&updates))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&existing); diff --git a/orte/mca/rds/rds_types.h b/orte/mca/rds/rds_types.h index 9407984023..ea06e599dc 100644 --- a/orte/mca/rds/rds_types.h +++ b/orte/mca/rds/rds_types.h @@ -16,7 +16,7 @@ #include "orte_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/gpr/gpr_types.h" #include "mca/ns/ns_types.h" @@ -26,7 +26,7 @@ /* resource descriptor object */ typedef struct { /** Base object */ - ompi_list_item_t super; + opal_list_item_t super; /** id of cell in which this resource resides */ orte_cellid_t cellid; /** string name of the site */ @@ -36,7 +36,7 @@ typedef struct { /** string type of the resource */ char *type; /** list of attributes */ - ompi_list_t attributes; + opal_list_t attributes; } orte_rds_cell_desc_t; OBJ_CLASS_DECLARATION(orte_rds_cell_desc_t); @@ -44,7 +44,7 @@ OBJ_CLASS_DECLARATION(orte_rds_cell_desc_t); /* resource attribute object */ typedef struct { /** Base object */ - ompi_list_item_t super; + opal_list_item_t super; /** key-value pair describing attribute */ orte_gpr_keyval_t keyval; } orte_rds_cell_attr_t; diff --git a/orte/mca/rds/resfile/rds_resfile.c b/orte/mca/rds/resfile/rds_resfile.c index ae1a84134c..b4d7cc54c7 100644 --- a/orte/mca/rds/resfile/rds_resfile.c +++ b/orte/mca/rds/resfile/rds_resfile.c @@ -26,7 +26,7 @@ #define ORTE_RDS_RESFILE_MAX_LINE_LENGTH 512 -static ompi_list_t orte_rds_resfile_resource_list; +static opal_list_t orte_rds_resfile_resource_list; static int orte_rds_resfile_parse_site(char *site, FILE *fp); @@ -69,7 +69,7 @@ static int orte_rds_resfile_parse_resource(orte_rds_cell_desc_t *cell, FILE *fp) na->keyval.key = strdup(ORTE_RDS_NAME); na->keyval.type = ORTE_STRING; na->keyval.value.strptr = strdup(cell->name); - ompi_list_append(&(cell->attributes), &na->super); + opal_list_append(&(cell->attributes), &na->super); na = OBJ_NEW(orte_rds_cell_attr_t); if (NULL == na) { ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); @@ -78,7 +78,7 @@ static int orte_rds_resfile_parse_resource(orte_rds_cell_desc_t *cell, FILE *fp) na->keyval.key = strdup(ORTE_CELLID_KEY); na->keyval.type = ORTE_CELLID; na->keyval.value.cellid = cell->cellid; - ompi_list_append(&(cell->attributes), &na->super); + opal_list_append(&(cell->attributes), &na->super); } else if (0 == strncmp(line, "type = orte_rds_resfile_parse_field(line))) { ORTE_ERROR_LOG(ORTE_ERR_FILE_READ_FAILURE); @@ -92,7 +92,7 @@ static int orte_rds_resfile_parse_resource(orte_rds_cell_desc_t *cell, FILE *fp) na->keyval.key = strdup(ORTE_RDS_TYPE); na->keyval.type = ORTE_STRING; na->keyval.value.strptr = strdup(cell->type); - ompi_list_append(&(cell->attributes), &na->super); + opal_list_append(&(cell->attributes), &na->super); } else if (0 == strncmp(line, "attributes), &na->super); + opal_list_append(&(cell->attributes), &na->super); } else if (0 == strncmp(line, "attributes), &na->super); + opal_list_append(&(cell->attributes), &na->super); } else if (0 == strncmp(line, "super); + opal_list_append(&orte_rds_resfile_resource_list, &cell->super); } } return ORTE_SUCCESS; @@ -214,7 +214,7 @@ int orte_rds_resfile_query(void) } /* setup the resource list */ - OBJ_CONSTRUCT(&orte_rds_resfile_resource_list, ompi_list_t); + OBJ_CONSTRUCT(&orte_rds_resfile_resource_list, opal_list_t); /* dump the initial line containing the DOM */ input_line = orte_rds_resfile_getline(fp); diff --git a/orte/mca/rds/resfile/rds_resfile.h b/orte/mca/rds/resfile/rds_resfile.h index e20092a46d..359b8f24f4 100644 --- a/orte/mca/rds/resfile/rds_resfile.h +++ b/orte/mca/rds/resfile/rds_resfile.h @@ -32,7 +32,7 @@ extern "C" { #endif /* resfile internal globals */ -extern ompi_list_t resource_list; +extern opal_list_t resource_list; /* * RDS Resource file functions diff --git a/orte/mca/rds/resfile/rds_resfile_parse_attributes.c b/orte/mca/rds/resfile/rds_resfile_parse_attributes.c index e22d0a1023..e35e78d05f 100644 --- a/orte/mca/rds/resfile/rds_resfile_parse_attributes.c +++ b/orte/mca/rds/resfile/rds_resfile_parse_attributes.c @@ -69,7 +69,7 @@ int orte_rds_resfile_parse_fe(orte_rds_cell_desc_t *cell, FILE *fp) ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM); return ORTE_ERR_BAD_PARAM; } - ompi_list_append(&(cell->attributes), &na->super); + opal_list_append(&(cell->attributes), &na->super); } return ORTE_SUCCESS; @@ -114,7 +114,7 @@ int orte_rds_resfile_parse_cd(orte_rds_cell_desc_t *cell, FILE *fp) free(line); return ORTE_ERR_BAD_PARAM; } - ompi_list_append(&(cell->attributes), &na->super); + opal_list_append(&(cell->attributes), &na->super); free(line); } @@ -166,7 +166,7 @@ int orte_rds_resfile_parse_os(orte_rds_cell_desc_t *cell, FILE *fp) free(line); return ORTE_ERR_BAD_PARAM; } - ompi_list_append(&(cell->attributes), &na->super); + opal_list_append(&(cell->attributes), &na->super); free(line); } @@ -236,7 +236,7 @@ int orte_rds_resfile_parse_fs(orte_rds_cell_desc_t *cell, FILE *fp) free(line); return ORTE_ERR_BAD_PARAM; } - ompi_list_append(&(cell->attributes), &na->super); + opal_list_append(&(cell->attributes), &na->super); #endif free(line); } diff --git a/orte/mca/rmaps/base/base.h b/orte/mca/rmaps/base/base.h index 98ceeb3423..3ae8bf6f3e 100644 --- a/orte/mca/rmaps/base/base.h +++ b/orte/mca/rmaps/base/base.h @@ -26,7 +26,7 @@ #include "orte_config.h" #include "include/orte_constants.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/ns/ns_types.h" @@ -48,9 +48,9 @@ extern "C" { /** Verbose/debug output stream */ int rmaps_output; /** List of opened components */ - ompi_list_t rmaps_opened; + opal_list_t rmaps_opened; /** Sorted list of available components (highest priority first) */ - ompi_list_t rmaps_available; + opal_list_t rmaps_available; } orte_rmaps_base_t; /** @@ -63,7 +63,7 @@ extern "C" { */ struct orte_rmaps_base_cmp_t { /** Base object */ - ompi_list_item_t super; + opal_list_item_t super; /** rmaps component */ orte_rmaps_base_component_t *component; /** rmaps module */ diff --git a/orte/mca/rmaps/base/rmaps_base_close.c b/orte/mca/rmaps/base/rmaps_base_close.c index eb0c104769..5f640908c4 100644 --- a/orte/mca/rmaps/base/rmaps_base_close.c +++ b/orte/mca/rmaps/base/rmaps_base_close.c @@ -28,12 +28,12 @@ int orte_rmaps_base_finalize(void) { - ompi_list_item_t* item; + opal_list_item_t* item; /* Finalize all available modules */ while (NULL != - (item = ompi_list_remove_first(&orte_rmaps_base.rmaps_available))) { + (item = opal_list_remove_first(&orte_rmaps_base.rmaps_available))) { orte_rmaps_base_cmp_t* cmp = (orte_rmaps_base_cmp_t*) item; ompi_output(orte_rmaps_base.rmaps_output, "orte:base:close: finalizing module %s", diff --git a/orte/mca/rmaps/base/rmaps_base_map.c b/orte/mca/rmaps/base/rmaps_base_map.c index a45e7ec848..942e475857 100644 --- a/orte/mca/rmaps/base/rmaps_base_map.c +++ b/orte/mca/rmaps/base/rmaps_base_map.c @@ -38,15 +38,15 @@ static void orte_rmaps_base_node_construct(orte_rmaps_base_node_t* node) { node->node_name = NULL; - OBJ_CONSTRUCT(&node->node_procs, ompi_list_t); + OBJ_CONSTRUCT(&node->node_procs, opal_list_t); } static void orte_rmaps_base_node_destruct(orte_rmaps_base_node_t* node) { - ompi_list_item_t* item; + opal_list_item_t* item; if(NULL != node->node_name) free(node->node_name); - while(NULL != (item = ompi_list_remove_first(&node->node_procs))) { + while(NULL != (item = opal_list_remove_first(&node->node_procs))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&node->node_procs); @@ -54,7 +54,7 @@ static void orte_rmaps_base_node_destruct(orte_rmaps_base_node_t* node) OBJ_CLASS_INSTANCE( orte_rmaps_base_node_t, - ompi_list_item_t, + opal_list_item_t, orte_rmaps_base_node_construct, orte_rmaps_base_node_destruct); @@ -77,7 +77,7 @@ static void orte_rmaps_base_proc_destruct(orte_rmaps_base_proc_t* proc) OBJ_CLASS_INSTANCE( orte_rmaps_base_proc_t, - ompi_list_item_t, + opal_list_item_t, orte_rmaps_base_proc_construct, orte_rmaps_base_proc_destruct); @@ -91,17 +91,17 @@ static void orte_rmaps_base_map_construct(orte_rmaps_base_map_t* map) map->app = NULL; map->procs = NULL; map->num_procs = 0; - OBJ_CONSTRUCT(&map->nodes, ompi_list_t); + OBJ_CONSTRUCT(&map->nodes, opal_list_t); } static void orte_rmaps_base_map_destruct(orte_rmaps_base_map_t* map) { size_t i=0; - ompi_list_item_t* item; + opal_list_item_t* item; for(i=0; inum_procs; i++) { OBJ_RELEASE(map->procs[i]); } - while(NULL != (item = ompi_list_remove_first(&map->nodes))) + while(NULL != (item = opal_list_remove_first(&map->nodes))) OBJ_RELEASE(item); if(NULL != map->procs) { free(map->procs); @@ -114,7 +114,7 @@ static void orte_rmaps_base_map_destruct(orte_rmaps_base_map_t* map) OBJ_CLASS_INSTANCE( orte_rmaps_base_map_t, - ompi_list_item_t, + opal_list_item_t, orte_rmaps_base_map_construct, orte_rmaps_base_map_destruct); @@ -172,17 +172,17 @@ static int orte_rmaps_value_compare(orte_gpr_value_t** val1, orte_gpr_value_t** */ static orte_rmaps_base_node_t* -orte_rmaps_lookup_node(ompi_list_t* nodes, char* node_name, orte_rmaps_base_proc_t* proc) +orte_rmaps_lookup_node(opal_list_t* nodes, char* node_name, orte_rmaps_base_proc_t* proc) { - ompi_list_item_t* item; + opal_list_item_t* item; orte_rmaps_base_node_t *node; - for(item = ompi_list_get_first(nodes); - item != ompi_list_get_end(nodes); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(nodes); + item != opal_list_get_end(nodes); + item = opal_list_get_next(item)) { node = (orte_rmaps_base_node_t*)item; if(strcmp(node->node_name, node_name) == 0) { OBJ_RETAIN(proc); - ompi_list_append(&node->node_procs, &proc->super); + opal_list_append(&node->node_procs, &proc->super); return node; } } @@ -190,8 +190,8 @@ orte_rmaps_lookup_node(ompi_list_t* nodes, char* node_name, orte_rmaps_base_proc node->node_cellid = proc->proc_name.cellid; node->node_name = strdup(node_name); OBJ_RETAIN(proc); - ompi_list_append(&node->node_procs, &proc->super); - ompi_list_prepend(nodes, &node->super); + opal_list_append(&node->node_procs, &proc->super); + opal_list_prepend(nodes, &node->super); return node; } @@ -200,7 +200,7 @@ orte_rmaps_lookup_node(ompi_list_t* nodes, char* node_name, orte_rmaps_base_proc * Query the process mapping from the registry. */ -int orte_rmaps_base_get_map(orte_jobid_t jobid, ompi_list_t* mapping_list) +int orte_rmaps_base_get_map(orte_jobid_t jobid, opal_list_t* mapping_list) { orte_app_context_t** app_context = NULL; orte_rmaps_base_map_t** mapping = NULL; @@ -329,7 +329,7 @@ int orte_rmaps_base_get_map(orte_jobid_t jobid, ompi_list_t* mapping_list) /* release temporary variables */ for(i=0; isuper); + opal_list_append(mapping_list, &mapping[i]->super); } free(segment); free(jobid_str); @@ -366,7 +366,7 @@ int orte_rmaps_base_get_node_map( orte_cellid_t cellid, orte_jobid_t jobid, const char* hostname, - ompi_list_t* mapping_list) + opal_list_t* mapping_list) { orte_app_context_t** app_context = NULL; orte_rmaps_base_map_t** mapping = NULL; @@ -501,7 +501,7 @@ int orte_rmaps_base_get_node_map( for(i=0; inum_procs) { - ompi_list_append(mapping_list, &map->super); + opal_list_append(mapping_list, &map->super); } else { OBJ_RELEASE(map); } @@ -544,19 +544,19 @@ cleanup: * Set the process mapping in the registry. */ -int orte_rmaps_base_set_map(orte_jobid_t jobid, ompi_list_t* mapping_list) +int orte_rmaps_base_set_map(orte_jobid_t jobid, opal_list_t* mapping_list) { size_t i; size_t index=0; size_t num_procs = 0; size_t size; int rc = ORTE_SUCCESS; - ompi_list_item_t* item; + opal_list_item_t* item; orte_gpr_value_t** values; - for(item = ompi_list_get_first(mapping_list); - item != ompi_list_get_end(mapping_list); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(mapping_list); + item != opal_list_get_end(mapping_list); + item = opal_list_get_next(item)) { orte_rmaps_base_map_t* map = (orte_rmaps_base_map_t*)item; num_procs += map->num_procs; } @@ -587,9 +587,9 @@ int orte_rmaps_base_set_map(orte_jobid_t jobid, ompi_list_t* mapping_list) /* iterate through all processes and initialize value array */ - for(item = ompi_list_get_first(mapping_list); - item != ompi_list_get_end(mapping_list); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(mapping_list); + item != opal_list_get_end(mapping_list); + item = opal_list_get_next(item)) { orte_rmaps_base_map_t* map = (orte_rmaps_base_map_t*)item; size_t p; for(p=0; pnum_procs; p++) { diff --git a/orte/mca/rmaps/base/rmaps_base_map.h b/orte/mca/rmaps/base/rmaps_base_map.h index 7eb148d458..d0855de809 100644 --- a/orte/mca/rmaps/base/rmaps_base_map.h +++ b/orte/mca/rmaps/base/rmaps_base_map.h @@ -30,7 +30,7 @@ #include #endif -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/ns/ns_types.h" #include "mca/ras/base/ras_base_node.h" @@ -53,10 +53,10 @@ extern "C" { */ struct orte_rmaps_base_node_t { - ompi_list_item_t super; + opal_list_item_t super; orte_cellid_t node_cellid; char* node_name; - ompi_list_t node_procs; + opal_list_t node_procs; }; typedef struct orte_rmaps_base_node_t orte_rmaps_base_node_t; @@ -68,7 +68,7 @@ OBJ_CLASS_DECLARATION(orte_rmaps_base_node_t); */ struct orte_rmaps_base_proc_t { - ompi_list_item_t super; + opal_list_item_t super; char *app; /* name of executable */ orte_rmaps_base_node_t* proc_node; orte_process_name_t proc_name; @@ -87,20 +87,20 @@ OBJ_CLASS_DECLARATION(orte_rmaps_base_proc_t); */ struct orte_rmaps_base_map_t { - ompi_list_item_t super; + opal_list_item_t super; orte_app_context_t *app; orte_rmaps_base_proc_t** procs; size_t num_procs; - ompi_list_t nodes; + opal_list_t nodes; }; typedef struct orte_rmaps_base_map_t orte_rmaps_base_map_t; OBJ_CLASS_DECLARATION(orte_rmaps_base_map_t); -int orte_rmaps_base_get_map(orte_jobid_t, ompi_list_t* mapping); -int orte_rmaps_base_set_map(orte_jobid_t, ompi_list_t* mapping); -int orte_rmaps_base_get_node_map(orte_cellid_t, orte_jobid_t, const char*, ompi_list_t* mapping); +int orte_rmaps_base_get_map(orte_jobid_t, opal_list_t* mapping); +int orte_rmaps_base_set_map(orte_jobid_t, opal_list_t* mapping); +int orte_rmaps_base_get_node_map(orte_cellid_t, orte_jobid_t, const char*, opal_list_t* mapping); #if defined(c_plusplus) || defined(__cplusplus) diff --git a/orte/mca/rmaps/base/rmaps_base_open.c b/orte/mca/rmaps/base/rmaps_base_open.c index 7410d06dc2..d0cff381b6 100644 --- a/orte/mca/rmaps/base/rmaps_base_open.c +++ b/orte/mca/rmaps/base/rmaps_base_open.c @@ -39,13 +39,13 @@ */ static void cmp_constructor(orte_rmaps_base_cmp_t *cmp); static void cmp_destructor(orte_rmaps_base_cmp_t *cmp); -static int compare(ompi_list_item_t **a, ompi_list_item_t **b); +static int compare(opal_list_item_t **a, opal_list_item_t **b); /* * Global variables */ orte_rmaps_base_t orte_rmaps_base; -OBJ_CLASS_INSTANCE(orte_rmaps_base_cmp_t, ompi_list_item_t, +OBJ_CLASS_INSTANCE(orte_rmaps_base_cmp_t, opal_list_item_t, cmp_constructor, cmp_destructor); @@ -55,7 +55,7 @@ OBJ_CLASS_INSTANCE(orte_rmaps_base_cmp_t, ompi_list_item_t, */ int orte_rmaps_base_open(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; orte_rmaps_base_component_t *component; orte_rmaps_base_module_t *module; @@ -82,10 +82,10 @@ int orte_rmaps_base_open(void) /* Query all the opened components and see if they want to run */ - OBJ_CONSTRUCT(&orte_rmaps_base.rmaps_available, ompi_list_t); - for (item = ompi_list_get_first(&orte_rmaps_base.rmaps_opened); - ompi_list_get_end(&orte_rmaps_base.rmaps_opened) != item; - item = ompi_list_get_next(item)) { + OBJ_CONSTRUCT(&orte_rmaps_base.rmaps_available, opal_list_t); + for (item = opal_list_get_first(&orte_rmaps_base.rmaps_opened); + opal_list_get_end(&orte_rmaps_base.rmaps_opened) != item; + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (orte_rmaps_base_component_t *) cli->cli_component; ompi_output(orte_rmaps_base.rmaps_output, @@ -111,7 +111,7 @@ int orte_rmaps_base_open(void) cmp->module = module; cmp->priority = priority; - ompi_list_append(&orte_rmaps_base.rmaps_available, &cmp->super); + opal_list_append(&orte_rmaps_base.rmaps_available, &cmp->super); } else { ompi_output(orte_rmaps_base.rmaps_output, "orte:base:open: component %s does NOT want to be considered for selection", @@ -121,7 +121,7 @@ int orte_rmaps_base_open(void) /* Sort the resulting available list in priority order */ - ompi_list_sort(&orte_rmaps_base.rmaps_available, compare); + opal_list_sort(&orte_rmaps_base.rmaps_available, compare); /* All done */ @@ -143,7 +143,7 @@ static void cmp_destructor(orte_rmaps_base_cmp_t *cmp) } -static int compare(ompi_list_item_t **a, ompi_list_item_t **b) +static int compare(opal_list_item_t **a, opal_list_item_t **b) { orte_rmaps_base_cmp_t *aa = *((orte_rmaps_base_cmp_t **) a); orte_rmaps_base_cmp_t *bb = *((orte_rmaps_base_cmp_t **) b); diff --git a/orte/mca/rmaps/base/rmaps_base_select.c b/orte/mca/rmaps/base/rmaps_base_select.c index 6a0eac3428..65c896da86 100644 --- a/orte/mca/rmaps/base/rmaps_base_select.c +++ b/orte/mca/rmaps/base/rmaps_base_select.c @@ -48,16 +48,16 @@ orte_rmaps_base_module_t* orte_rmaps_base_select(char *preferred) static orte_rmaps_base_module_t *select_preferred(char *name) { - ompi_list_item_t *item; + opal_list_item_t *item; orte_rmaps_base_cmp_t *cmp; /* Look for a matching selected name */ ompi_output(orte_rmaps_base.rmaps_output, "orte:base:select: looking for component %s", name); - for (item = ompi_list_get_first(&orte_rmaps_base.rmaps_available); - item != ompi_list_get_end(&orte_rmaps_base.rmaps_available); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_rmaps_base.rmaps_available); + item != opal_list_get_end(&orte_rmaps_base.rmaps_available); + item = opal_list_get_next(item)) { cmp = (orte_rmaps_base_cmp_t *) item; if (0 == strcmp(name, @@ -78,12 +78,12 @@ static orte_rmaps_base_module_t *select_preferred(char *name) static orte_rmaps_base_module_t *select_any(void) { - ompi_list_item_t *item; + opal_list_item_t *item; orte_rmaps_base_cmp_t *cmp; /* If the list is empty, return NULL */ - if (ompi_list_is_empty(&orte_rmaps_base.rmaps_available) > 0) { + if (opal_list_is_empty(&orte_rmaps_base.rmaps_available) > 0) { ompi_output(orte_rmaps_base.rmaps_output, "orte:base:select: no components available!"); return NULL; @@ -92,7 +92,7 @@ static orte_rmaps_base_module_t *select_any(void) /* Otherwise, return the first item (it's already sorted in priority order) */ - item = ompi_list_get_first(&orte_rmaps_base.rmaps_available); + item = opal_list_get_first(&orte_rmaps_base.rmaps_available); cmp = (orte_rmaps_base_cmp_t *) item; ompi_output(orte_rmaps_base.rmaps_output, "orte:base:select: highest priority component: %s", diff --git a/orte/mca/rmaps/round_robin/rmaps_rr.c b/orte/mca/rmaps/round_robin/rmaps_rr.c index 660c5e0a40..dadda6e1a4 100644 --- a/orte/mca/rmaps/round_robin/rmaps_rr.c +++ b/orte/mca/rmaps/round_robin/rmaps_rr.c @@ -33,7 +33,7 @@ /* * Local variable */ -static ompi_list_item_t *cur_node_item = NULL; +static opal_list_item_t *cur_node_item = NULL; static int claim_slot(orte_rmaps_base_map_t *map, @@ -71,11 +71,11 @@ static int claim_slot(orte_rmaps_base_map_t *map, proc->proc_rank = vpid; orte_ns.free_name(&proc_name); OBJ_RETAIN(proc); /* bump reference count for the node */ - ompi_list_append(&rmaps_node->node_procs, &proc->super); + opal_list_append(&rmaps_node->node_procs, &proc->super); map->procs[proc_index] = proc; /* Save this node on the map */ - ompi_list_append(&map->nodes, &rmaps_node->super); + opal_list_append(&map->nodes, &rmaps_node->super); /* Decrease the number of slots available for allocation on this node */ @@ -99,12 +99,12 @@ static int map_app_by_node( orte_jobid_t jobid, orte_vpid_t vpid_start, int rank, - ompi_list_t* nodes) + opal_list_t* nodes) { int rc; size_t num_alloc = 0; size_t proc_index = 0; - ompi_list_item_t *start, *next; + opal_list_item_t *start, *next; orte_ras_base_node_t *node; bool did_alloc; @@ -118,10 +118,10 @@ static int map_app_by_node( But do a bozo check to ensure that we don't have a empty node list. */ - if (0 == ompi_list_get_size(nodes)) { + if (0 == opal_list_get_size(nodes)) { return ORTE_ERR_TEMP_OUT_OF_RESOURCE; - } else if (ompi_list_get_end(nodes) == cur_node_item) { - cur_node_item = ompi_list_get_first(nodes); + } else if (opal_list_get_end(nodes) == cur_node_item) { + cur_node_item = opal_list_get_first(nodes); } start = cur_node_item; @@ -139,7 +139,7 @@ static int map_app_by_node( did_alloc = false; while (num_alloc < app->num_procs) { node = (orte_ras_base_node_t*) cur_node_item; - next = ompi_list_get_next(cur_node_item); + next = opal_list_get_next(cur_node_item); /* If we have an available slot on this node, claim it */ if (node->node_slots_alloc > 0) { @@ -149,7 +149,7 @@ static int map_app_by_node( return rc; } if (node->node_slots_alloc == 0) { - ompi_list_remove_item(nodes, (ompi_list_item_t*)node); + opal_list_remove_item(nodes, (opal_list_item_t*)node); OBJ_RELEASE(node); } @@ -168,8 +168,8 @@ static int map_app_by_node( /* Move on to the next node */ cur_node_item = next; - if (ompi_list_get_end(nodes) == cur_node_item) { - cur_node_item = ompi_list_get_first(nodes); + if (opal_list_get_end(nodes) == cur_node_item) { + cur_node_item = opal_list_get_first(nodes); } /* Are we done? */ @@ -178,7 +178,7 @@ static int map_app_by_node( } /* Double check that the list is not empty */ - if (ompi_list_get_end(nodes) == cur_node_item) { + if (opal_list_get_end(nodes) == cur_node_item) { return ORTE_ERR_TEMP_OUT_OF_RESOURCE; } @@ -211,12 +211,12 @@ static int map_app_by_slot( orte_jobid_t jobid, orte_vpid_t vpid_start, int rank, - ompi_list_t* nodes) + opal_list_t* nodes) { int rc; size_t num_alloc = 0; size_t proc_index = 0; - ompi_list_item_t *next; + opal_list_item_t *next; orte_ras_base_node_t *node; /* Note that cur_node_item already points to the Right place in @@ -229,19 +229,19 @@ static int map_app_by_slot( But do a bozo check to ensure that we don't have a empty node list. */ - if (0 == ompi_list_get_size(nodes)) { + if (0 == opal_list_get_size(nodes)) { return ORTE_ERR_TEMP_OUT_OF_RESOURCE; - } else if (ompi_list_get_end(nodes) == cur_node_item) { - cur_node_item = ompi_list_get_first(nodes); + } else if (opal_list_get_end(nodes) == cur_node_item) { + cur_node_item = opal_list_get_first(nodes); } /* Go through all nodes and take up to node_slots_alloc slots and map it to this job */ - while (ompi_list_get_end(nodes) != cur_node_item && + while (opal_list_get_end(nodes) != cur_node_item && num_alloc < app->num_procs) { node = (orte_ras_base_node_t*) cur_node_item; - next = ompi_list_get_next(cur_node_item); + next = opal_list_get_next(cur_node_item); /* If we have available slots on this node, claim it */ while (node->node_slots_alloc > 0 && @@ -259,7 +259,7 @@ static int map_app_by_slot( ++num_alloc; } if (node->node_slots_alloc == 0) { - ompi_list_remove_item(nodes, (ompi_list_item_t*)node); + opal_list_remove_item(nodes, (opal_list_item_t*)node); OBJ_RELEASE(node); } @@ -287,9 +287,9 @@ static int orte_rmaps_rr_map(orte_jobid_t jobid) { orte_app_context_t** context; size_t i, num_context; - ompi_list_t nodes; - ompi_list_t mapping; - ompi_list_item_t* item; + opal_list_t nodes; + opal_list_t mapping; + opal_list_item_t* item; orte_vpid_t vpid_start; size_t num_procs = 0; int rank = 0; @@ -320,15 +320,15 @@ static int orte_rmaps_rr_map(orte_jobid_t jobid) } /* query for all nodes allocated to this job */ - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); if(ORTE_SUCCESS != (rc = orte_ras_base_node_query_alloc(&nodes,jobid))) { OBJ_DESTRUCT(&nodes); return rc; } /* construct a default mapping */ - OBJ_CONSTRUCT(&mapping, ompi_list_t); - cur_node_item = ompi_list_get_first(&nodes); + OBJ_CONSTRUCT(&mapping, opal_list_t); + cur_node_item = opal_list_get_first(&nodes); for(i=0; isuper); + opal_list_append(&mapping, &map->super); map->app = app; map->procs = malloc(sizeof(orte_rmaps_base_proc_t*) * app->num_procs); @@ -364,11 +364,11 @@ static int orte_rmaps_rr_map(orte_jobid_t jobid) rc = orte_rmaps_base_set_vpid_range(jobid,vpid_start,num_procs); cleanup: - while(NULL != (item = ompi_list_remove_first(&nodes))) { + while(NULL != (item = opal_list_remove_first(&nodes))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&nodes); - while(NULL != (item = ompi_list_remove_first(&mapping))) { + while(NULL != (item = opal_list_remove_first(&mapping))) { OBJ_RELEASE(item); } OBJ_DESTRUCT(&mapping); diff --git a/orte/mca/rmgr/base/base.h b/orte/mca/rmgr/base/base.h index f73ca953be..97cfe79884 100644 --- a/orte/mca/rmgr/base/base.h +++ b/orte/mca/rmgr/base/base.h @@ -26,7 +26,7 @@ #include "include/orte_constants.h" #include "include/orte_types.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "dps/dps.h" #include "mca/mca.h" #include "mca/gpr/gpr_types.h" @@ -153,7 +153,7 @@ int orte_rmgr_base_unpack_app_context_map(orte_buffer_t *buffer, void *dest, typedef struct orte_rmgr_base_t { int rmgr_output; - ompi_list_t rmgr_components; + opal_list_t rmgr_components; } orte_rmgr_base_t; OMPI_DECLSPEC extern orte_rmgr_base_t orte_rmgr_base; diff --git a/orte/mca/rmgr/base/rmgr_base_select.c b/orte/mca/rmgr/base/rmgr_base_select.c index a11da524d8..58b1850d1e 100644 --- a/orte/mca/rmgr/base/rmgr_base_select.c +++ b/orte/mca/rmgr/base/rmgr_base_select.c @@ -30,16 +30,16 @@ */ int orte_rmgr_base_select(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; orte_rmgr_base_component_t *component, *best_component = NULL; orte_rmgr_base_module_t *module, *best_module = NULL; int priority, best_priority = -1; /* Iterate through all the available components */ - for (item = ompi_list_get_first(&orte_rmgr_base.rmgr_components); - item != ompi_list_get_end(&orte_rmgr_base.rmgr_components); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_rmgr_base.rmgr_components); + item != opal_list_get_end(&orte_rmgr_base.rmgr_components); + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (orte_rmgr_base_component_t *) cli->cli_component; diff --git a/orte/mca/rml/base/base.h b/orte/mca/rml/base/base.h index 0ab2410a21..5173efa6c5 100644 --- a/orte/mca/rml/base/base.h +++ b/orte/mca/rml/base/base.h @@ -39,7 +39,7 @@ OMPI_DECLSPEC int orte_rml_base_close(void); struct orte_rml_base_t { int rml_output; int rml_debug; - ompi_list_t rml_components; + opal_list_t rml_components; }; typedef struct orte_rml_base_t orte_rml_base_t; diff --git a/orte/mca/rml/base/rml_base_close.c b/orte/mca/rml/base/rml_base_close.c index 9e24ff2944..d1cedbcb62 100644 --- a/orte/mca/rml/base/rml_base_close.c +++ b/orte/mca/rml/base/rml_base_close.c @@ -27,7 +27,7 @@ int orte_rml_base_close(void) { /* shutdown any remaining opened components */ - if (! ompi_list_is_empty(&orte_rml_base.rml_components)) { + if (! opal_list_is_empty(&orte_rml_base.rml_components)) { mca_base_components_close(orte_rml_base.rml_output, &orte_rml_base.rml_components, NULL); } diff --git a/orte/mca/rml/base/rml_base_open.c b/orte/mca/rml/base/rml_base_open.c index 51391664da..87e3682a9e 100644 --- a/orte/mca/rml/base/rml_base_open.c +++ b/orte/mca/rml/base/rml_base_open.c @@ -55,7 +55,7 @@ int orte_rml_base_open(void) int rc; /* Initialize globals */ - OBJ_CONSTRUCT(&orte_rml_base.rml_components, ompi_list_t); + OBJ_CONSTRUCT(&orte_rml_base.rml_components, opal_list_t); /* lookup common parameters */ id = mca_base_param_register_int("rml","base","debug",NULL,1); diff --git a/orte/mca/rml/base/rml_base_select.c b/orte/mca/rml/base/rml_base_select.c index 98e433dcce..410f93efaf 100644 --- a/orte/mca/rml/base/rml_base_select.c +++ b/orte/mca/rml/base/rml_base_select.c @@ -31,16 +31,16 @@ */ int orte_rml_base_select(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; int selected_priority = -1; orte_rml_component_t *selected_component = NULL; orte_rml_module_t *selected_module = NULL; /* Traverse the list of opened modules; call their init functions. */ - for(item = ompi_list_get_first(&orte_rml_base.rml_components); - item != ompi_list_get_end(&orte_rml_base.rml_components); - item = ompi_list_get_next(item)) { + for(item = opal_list_get_first(&orte_rml_base.rml_components); + item != opal_list_get_end(&orte_rml_base.rml_components); + item = opal_list_get_next(item)) { orte_rml_component_t* component; cli = (mca_base_component_list_item_t *) item; @@ -75,9 +75,9 @@ int orte_rml_base_select(void) } /* unload all components that were not selected */ - item = ompi_list_get_first(&orte_rml_base.rml_components); - while(item != ompi_list_get_end(&orte_rml_base.rml_components)) { - ompi_list_item_t* next = ompi_list_get_next(item); + item = opal_list_get_first(&orte_rml_base.rml_components); + while(item != opal_list_get_end(&orte_rml_base.rml_components)) { + opal_list_item_t* next = opal_list_get_next(item); orte_rml_component_t* component; cli = (mca_base_component_list_item_t *) item; component = (orte_rml_component_t *) cli->cli_component; @@ -86,7 +86,7 @@ int orte_rml_base_select(void) "orte_rml_base_select: module %s unloaded", component->rml_version.mca_component_name); mca_base_component_repository_release((mca_base_component_t *) component); - ompi_list_remove_item(&orte_rml_base.rml_components, item); + opal_list_remove_item(&orte_rml_base.rml_components, item); OBJ_RELEASE(item); } item = next; diff --git a/orte/mca/schema/base/base.h b/orte/mca/schema/base/base.h index d78739f80a..a447e60668 100644 --- a/orte/mca/schema/base/base.h +++ b/orte/mca/schema/base/base.h @@ -32,7 +32,7 @@ #include "threads/mutex.h" #include "threads/condition.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/base/base.h" @@ -77,7 +77,7 @@ int orte_schema_base_get_std_subscription_name(char **name, */ extern int orte_schema_base_output; extern bool orte_schema_base_selected; -extern ompi_list_t orte_schema_base_components_available; +extern opal_list_t orte_schema_base_components_available; extern mca_schema_base_component_t orte_schema_base_selected_component; extern bool orte_schema_initialized; diff --git a/orte/mca/schema/base/schema_base_open.c b/orte/mca/schema/base/schema_base_open.c index ff3b671ddb..0989262289 100644 --- a/orte/mca/schema/base/schema_base_open.c +++ b/orte/mca/schema/base/schema_base_open.c @@ -55,7 +55,7 @@ OMPI_DECLSPEC orte_schema_base_module_t orte_schema = { int orte_schema_base_output; orte_schema_base_module_t orte_schema; bool orte_schema_base_selected = false; -ompi_list_t orte_schema_base_components_available; +opal_list_t orte_schema_base_components_available; mca_schema_base_component_t orte_schema_base_selected_component; bool orte_schema_initialized = false; diff --git a/orte/mca/schema/base/schema_base_select.c b/orte/mca/schema/base/schema_base_select.c index cd00daf2cf..fee717625a 100644 --- a/orte/mca/schema/base/schema_base_select.c +++ b/orte/mca/schema/base/schema_base_select.c @@ -27,7 +27,7 @@ */ int orte_schema_base_select(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; mca_schema_base_component_t *component, *best_component = NULL; orte_schema_base_module_t *module, *best_module = NULL; @@ -36,9 +36,9 @@ int orte_schema_base_select(void) /* Iterate through all the available components */ - for (item = ompi_list_get_first(&orte_schema_base_components_available); - item != ompi_list_get_end(&orte_schema_base_components_available); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_schema_base_components_available); + item != opal_list_get_end(&orte_schema_base_components_available); + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (mca_schema_base_component_t *) cli->cli_component; diff --git a/orte/mca/soh/base/base.h b/orte/mca/soh/base/base.h index 5eb957eaab..38d002d725 100644 --- a/orte/mca/soh/base/base.h +++ b/orte/mca/soh/base/base.h @@ -26,7 +26,7 @@ #include "include/orte_constants.h" #include "include/orte_types.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "dps/dps_types.h" #include "mca/mca.h" /* #include "mca/ns/ns_types.h" */ @@ -99,7 +99,7 @@ OMPI_DECLSPEC extern bool orte_soh_base_selected; typedef struct orte_soh_base_t { int soh_output; - ompi_list_t soh_components; + opal_list_t soh_components; } orte_soh_base_t; OMPI_DECLSPEC extern orte_soh_base_t orte_soh_base; diff --git a/orte/mca/soh/base/soh_base_local_functions.c b/orte/mca/soh/base/soh_base_local_functions.c index abc5fdd2b0..2ee6b5d530 100644 --- a/orte/mca/soh/base/soh_base_local_functions.c +++ b/orte/mca/soh/base/soh_base_local_functions.c @@ -21,7 +21,7 @@ */ #include "orte_config.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/mca.h" #include "mca/soh/base/base.h" diff --git a/orte/mca/soh/base/soh_base_select.c b/orte/mca/soh/base/soh_base_select.c index c1422c8d9c..708d4949d2 100644 --- a/orte/mca/soh/base/soh_base_select.c +++ b/orte/mca/soh/base/soh_base_select.c @@ -30,7 +30,7 @@ */ int orte_soh_base_select(void) { - ompi_list_item_t *item; + opal_list_item_t *item; mca_base_component_list_item_t *cli; orte_soh_base_component_t *component, *best_component = NULL; orte_soh_base_module_t *module, *best_module = NULL; @@ -38,9 +38,9 @@ int orte_soh_base_select(void) /* Iterate through all the available components */ - for (item = ompi_list_get_first(&orte_soh_base.soh_components); - item != ompi_list_get_end(&orte_soh_base.soh_components); - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&orte_soh_base.soh_components); + item != opal_list_get_end(&orte_soh_base.soh_components); + item = opal_list_get_next(item)) { cli = (mca_base_component_list_item_t *) item; component = (orte_soh_base_component_t *) cli->cli_component; diff --git a/orte/mca/soh/bproc/soh_bproc_control.c b/orte/mca/soh/bproc/soh_bproc_control.c index 1e5c89c5aa..9e519daf80 100644 --- a/orte/mca/soh/bproc/soh_bproc_control.c +++ b/orte/mca/soh/bproc/soh_bproc_control.c @@ -24,7 +24,7 @@ #include "pcm_bproc.h" #include "mca/pcm/pcm.h" #include "mca/pcm/base/base.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/pcm/base/base_job_track.h" #include "mca/ns/ns.h" #include "mca/ns/base/base.h" diff --git a/orte/mca/soh/bproc/soh_bproc_monitor.c b/orte/mca/soh/bproc/soh_bproc_monitor.c index 98d62926b3..689b628375 100644 --- a/orte/mca/soh/bproc/soh_bproc_monitor.c +++ b/orte/mca/soh/bproc/soh_bproc_monitor.c @@ -24,7 +24,7 @@ #include "pcm_bproc.h" #include "mca/pcm/pcm.h" #include "mca/pcm/base/base.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "runtime/runtime.h" #include "runtime/runtime_types.h" #include "runtime/ompi_rte_wait.h" diff --git a/orte/runtime/orte_wait.c b/orte/runtime/orte_wait.c index 493d4dbaba..a6ada429ca 100644 --- a/orte/runtime/orte_wait.c +++ b/orte/runtime/orte_wait.c @@ -32,7 +32,7 @@ #include "runtime/orte_wait.h" #include "util/output.h" #include "opal/class/opal_object.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "event/event.h" #include "include/constants.h" #include "threads/mutex.h" @@ -54,14 +54,14 @@ struct blk_waitpid_data_t { typedef struct blk_waitpid_data_t blk_waitpid_data_t; struct pending_pids_item_t { - ompi_list_item_t super; + opal_list_item_t super; pid_t pid; int status; }; typedef struct pending_pids_item_t pending_pids_item_t; struct registered_cb_item_t { - ompi_list_item_t super; + opal_list_item_t super; pid_t pid; orte_wait_fn_t callback; void *data; @@ -110,9 +110,9 @@ static OBJ_CLASS_INSTANCE(blk_waitpid_data_t, opal_object_t, blk_waitpid_data_construct, blk_waitpid_data_destruct); -static OBJ_CLASS_INSTANCE(pending_pids_item_t, ompi_list_item_t, NULL, NULL); +static OBJ_CLASS_INSTANCE(pending_pids_item_t, opal_list_item_t, NULL, NULL); -static OBJ_CLASS_INSTANCE(registered_cb_item_t, ompi_list_item_t, NULL, NULL); +static OBJ_CLASS_INSTANCE(registered_cb_item_t, opal_list_item_t, NULL, NULL); /********************************************************************* @@ -122,8 +122,8 @@ static OBJ_CLASS_INSTANCE(registered_cb_item_t, ompi_list_item_t, NULL, NULL); ********************************************************************/ static volatile int cb_enabled = true; static ompi_mutex_t mutex; -static ompi_list_t pending_pids; -static ompi_list_t registered_cb; +static opal_list_t pending_pids; +static opal_list_t registered_cb; static struct ompi_event handler; @@ -156,8 +156,8 @@ int orte_wait_init(void) { OBJ_CONSTRUCT(&mutex, ompi_mutex_t); - OBJ_CONSTRUCT(&pending_pids, ompi_list_t); - OBJ_CONSTRUCT(®istered_cb, ompi_list_t); + OBJ_CONSTRUCT(&pending_pids, opal_list_t); + OBJ_CONSTRUCT(®istered_cb, opal_list_t); ompi_event_set(&handler, SIGCHLD, OMPI_EV_SIGNAL|OMPI_EV_PERSIST, orte_wait_signal_callback, @@ -171,16 +171,16 @@ orte_wait_init(void) int orte_wait_finalize(void) { - ompi_list_item_t *item; + opal_list_item_t *item; OMPI_THREAD_LOCK(&mutex); ompi_event_del(&handler); /* clear out the lists */ - while (NULL != (item = ompi_list_remove_first(&pending_pids))) { + while (NULL != (item = opal_list_remove_first(&pending_pids))) { OBJ_RELEASE(item); } - while (NULL != (item = ompi_list_remove_first(®istered_cb))) { + while (NULL != (item = opal_list_remove_first(®istered_cb))) { OBJ_RELEASE(item); } OMPI_THREAD_UNLOCK(&mutex); @@ -195,13 +195,13 @@ orte_wait_finalize(void) int orte_wait_kill(int sig) { - ompi_list_t children; - ompi_list_item_t* item; + opal_list_t children; + opal_list_item_t* item; - OBJ_CONSTRUCT(&children, ompi_list_t); + OBJ_CONSTRUCT(&children, opal_list_t); OMPI_THREAD_LOCK(&mutex); do_waitall(0); - while (NULL != (item = ompi_list_remove_first(®istered_cb))) { + while (NULL != (item = opal_list_remove_first(®istered_cb))) { registered_cb_item_t *cb = (registered_cb_item_t*)item; pending_pids_item_t *pending = find_pending_pid(cb->pid,false); if(NULL == pending) { @@ -238,7 +238,7 @@ orte_waitpid(pid_t wpid, int *status, int options) if (NULL != pending) { *status = pending->status; ret = pending->pid; - ompi_list_remove_item(&pending_pids, (ompi_list_item_t*) pending); + opal_list_remove_item(&pending_pids, (opal_list_item_t*) pending); OBJ_RELEASE(pending); goto cleanup; } @@ -413,12 +413,12 @@ blk_waitpid_cb(pid_t wpid, int status, void *data) static pending_pids_item_t * find_pending_pid(pid_t pid, bool create) { - ompi_list_item_t *item; + opal_list_item_t *item; pending_pids_item_t *pending; - for (item = ompi_list_get_first(&pending_pids) ; - item != ompi_list_get_end(&pending_pids) ; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(&pending_pids) ; + item != opal_list_get_end(&pending_pids) ; + item = opal_list_get_next(item)) { pending = (pending_pids_item_t*) item; if (pending->pid == pid || -1 == pid) { @@ -432,7 +432,7 @@ find_pending_pid(pid_t pid, bool create) pending->pid = pid; pending->status = 0; - ompi_list_append(&pending_pids, (ompi_list_item_t*) pending); + opal_list_append(&pending_pids, (opal_list_item_t*) pending); return pending; } @@ -444,12 +444,12 @@ find_pending_pid(pid_t pid, bool create) static registered_cb_item_t * find_waiting_cb(pid_t pid, bool create) { - ompi_list_item_t *item = NULL; + opal_list_item_t *item = NULL; registered_cb_item_t *reg_cb = NULL; - for (item = ompi_list_get_first(®istered_cb) ; - item != ompi_list_get_end(®istered_cb) ; - item = ompi_list_get_next(item)) { + for (item = opal_list_get_first(®istered_cb) ; + item != opal_list_get_end(®istered_cb) ; + item = opal_list_get_next(item)) { reg_cb = (registered_cb_item_t*) item; if (reg_cb->pid == pid) { @@ -464,7 +464,7 @@ find_waiting_cb(pid_t pid, bool create) reg_cb->pid = pid; reg_cb->callback = NULL; reg_cb->data = NULL; - ompi_list_append(®istered_cb, (ompi_list_item_t*) reg_cb); + opal_list_append(®istered_cb, (opal_list_item_t*) reg_cb); return reg_cb; } @@ -490,9 +490,9 @@ do_waitall(int options) pending = OBJ_NEW(pending_pids_item_t); pending->pid = ret; pending->status = status; - ompi_list_append(&pending_pids, &pending->super); + opal_list_append(&pending_pids, &pending->super); } else { - ompi_list_remove_item(®istered_cb, &cb->super); + opal_list_remove_item(®istered_cb, &cb->super); OMPI_THREAD_UNLOCK(&mutex); cb->callback(cb->pid, status, cb->data); OMPI_THREAD_LOCK(&mutex); @@ -508,8 +508,8 @@ trigger_callback(registered_cb_item_t *cb, pending_pids_item_t *pending) assert(cb->pid == pending->pid); cb->callback(cb->pid, pending->status, cb->data); - ompi_list_remove_item(&pending_pids, (ompi_list_item_t*) pending); - ompi_list_remove_item(®istered_cb, (ompi_list_item_t*) cb); + opal_list_remove_item(&pending_pids, (opal_list_item_t*) pending); + opal_list_remove_item(®istered_cb, (opal_list_item_t*) cb); } @@ -546,7 +546,7 @@ unregister_callback(pid_t pid) reg_cb = find_waiting_cb(pid, false); if (NULL == reg_cb) return OMPI_ERR_BAD_PARAM; - ompi_list_remove_item(®istered_cb, (ompi_list_item_t*) reg_cb); + opal_list_remove_item(®istered_cb, (opal_list_item_t*) reg_cb); return OMPI_SUCCESS; } diff --git a/orte/tools/orted/orted.h b/orte/tools/orted/orted.h index 4b80036947..638db1952c 100644 --- a/orte/tools/orted/orted.h +++ b/orte/tools/orted/orted.h @@ -21,7 +21,7 @@ #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/mutex.h" #include "threads/condition.h" diff --git a/orte/tools/orteprobe/orteprobe.h b/orte/tools/orteprobe/orteprobe.h index 3a8675257a..b1bad009b6 100644 --- a/orte/tools/orteprobe/orteprobe.h +++ b/orte/tools/orteprobe/orteprobe.h @@ -21,7 +21,7 @@ #include -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "threads/mutex.h" #include "threads/condition.h" diff --git a/orte/tools/orterun/totalview.c b/orte/tools/orterun/totalview.c index bcd4ba6fc1..52f5ec98e7 100644 --- a/orte/tools/orterun/totalview.c +++ b/orte/tools/orterun/totalview.c @@ -40,7 +40,7 @@ #include #include "util/output.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" #include "mca/errmgr/errmgr.h" #include "mca/schema/schema.h" #include "mca/ns/ns.h" @@ -55,7 +55,7 @@ * Per process data object */ typedef struct { - ompi_list_item_t *item; + opal_list_item_t *item; char *nodename; char *IP_address; char *executable; @@ -90,7 +90,7 @@ static void orte_totalview_proc_data_destructor(orte_totalview_proc_data* ptr) /* define instance of orte_gpr_replica_segment_t */ OBJ_CLASS_INSTANCE( orte_totalview_proc_data_t, /* type name */ - ompi_list_item_t, /* parent "class" name */ + opal_list_item_t, /* parent "class" name */ orte_totalview_proc_data_construct, /* constructor */ orte_totalview_proc_data_destructor); /* destructor */ @@ -99,16 +99,16 @@ OBJ_CLASS_INSTANCE( * Local functions for retrieving daemon and app process info */ static int orte_totalview_get_job_info(size_t *num_procs, - ompi_list_t *ptr, + opal_list_t *ptr, orte_jobid_t jobid, orte_jobgrp_t job_grp); static int orte_totalview_get_daemon_info(size_t *num_procs, - ompi_list_t *ptr, + opal_list_t *ptr, orte_jobgrp_t job_grp); static int orte_totalview_get_app_info(size_t *num_procs, - ompi_list_t *ptr, + opal_list_t *ptr, orte_jobgrp_t job_grp); /* +++ begin MPICH/TotalView interface definitions */ @@ -167,9 +167,9 @@ static void dump(void) */ void orte_totalview_init(orte_jobgrp_t job_grp) { - ompi_list_t proc_info; + opal_list_t proc_info; - OBJ_CONSTRUCT(&proc_info, ompi_list_t); + OBJ_CONSTRUCT(&proc_info, opal_list_t); /* * fill in proc table @@ -293,7 +293,7 @@ void *MPIR_Breakpoint(void) * Get daemon info required for Totalview */ int orte_totalview_get_daemon_info(size_t *num_procs, - ompi_list_t *ptr, + opal_list_t *ptr, orte_jobgrp_t job_grp) { /* the daemons for a job group are ALWAYS located on jobid zero @@ -307,7 +307,7 @@ int orte_totalview_get_daemon_info(size_t *num_procs, } static int orte_totalview_get_job_info(size_t *num_procs, - ompi_list_t *ptr, + opal_list_t *ptr, orte_jobid_t jobid, orte_jobgrp_t job_grp) { @@ -388,7 +388,7 @@ static int orte_totalview_get_job_info(size_t *num_procs, continue; } } - ompi_list_append(ptr, pdat->item); + opal_list_append(ptr, pdat->item); OBJ_RELEASE(value); } @@ -407,9 +407,9 @@ static int orte_totalview_get_job_info(size_t *num_procs, * default path that was stored in the ORTE_JOB_GLOBALS * container - and store the default path in them */ - for (pdat = (orte_totalview_proc_data_t*)ompi_list_get_first(ptr); - pdat != (orte_totalview_proc_data_t*)ompi_list_get_end(ptr); - pdat = (orte_totalview_proc_data_t*)ompi_list_get_next(pdat)) { + for (pdat = (orte_totalview_proc_data_t*)opal_list_get_first(ptr); + pdat != (orte_totalview_proc_data_t*)opal_list_get_end(ptr); + pdat = (orte_totalview_proc_data_t*)opal_list_get_next(pdat)) { if (NULL == pdat->executable) pdat->executable = strdup(save_exec); } @@ -427,7 +427,7 @@ static int orte_totalview_get_job_info(size_t *num_procs, * Get application process info required for Totalview */ int orte_totalview_get_app_info(size_t *num_procs, - ompi_list_t *ptr, + opal_list_t *ptr, orte_jobgrp_t job_grp) { /* need to find all the jobid's that are part of this jobgrp. diff --git a/test/Unit-Test-Status.xls b/test/Unit-Test-Status.xls index 0abc25b891..c4e6d3550d 100644 Binary files a/test/Unit-Test-Status.xls and b/test/Unit-Test-Status.xls differ diff --git a/test/class/Makefile.am b/test/class/Makefile.am index 9606c6bf98..1bca37d99a 100644 --- a/test/class/Makefile.am +++ b/test/class/Makefile.am @@ -23,7 +23,7 @@ check_PROGRAMS = \ ompi_circular_buffer_fifo \ ompi_fifo \ ompi_hash_table \ - ompi_list \ + opal_list \ ompi_value_array \ ompi_pointer_array \ ompi_rb_tree \ @@ -50,11 +50,11 @@ ompi_fifo_LDADD = \ $(top_builddir)/test/support/libsupport.a ompi_fifo_DEPENDENCIES = $(ompi_fifo_LDADD) -ompi_list_SOURCES = ompi_list.c -ompi_list_LDADD = \ +opal_list_SOURCES = opal_list.c +opal_list_LDADD = \ $(top_builddir)/src/libmpi.la \ $(top_builddir)/test/support/libsupport.a -ompi_list_DEPENDENCIES = $(ompi_list_LDADD) +opal_list_DEPENDENCIES = $(opal_list_LDADD) ompi_hash_table_SOURCES = ompi_hash_table.c ompi_hash_table_LDADD = \ diff --git a/test/class/ompi_list.c b/test/class/ompi_list.c index 9ed16cb8b9..827254cae9 100644 --- a/test/class/ompi_list.c +++ b/test/class/ompi_list.c @@ -18,50 +18,50 @@ #include #include "support.h" -#include "class/ompi_list.h" +#include "opal/class/opal_list.h" /* * Data type used for testing */ typedef struct test_data { /* link list data structure */ - ompi_list_item_t ll_element; + opal_list_item_t ll_element; /* test data */ size_t data; } test_data_t; OBJ_CLASS_INSTANCE(test_data_t, - ompi_list_item_t, + opal_list_item_t, NULL, NULL); int main(int argc, char **argv) { /* local variables */ - ompi_list_t list, x; + opal_list_t list, x; size_t indx,i,list_size, tmp_size_1, tmp_size_2,size_elements; int error_cnt; test_data_t *elements, *ele; - ompi_list_item_t *item; + opal_list_item_t *item; - test_init("ompi_list_t"); + test_init("opal_list_t"); /* initialize list */ - OBJ_CONSTRUCT(&list, ompi_list_t); - OBJ_CONSTRUCT(&x, ompi_list_t); + OBJ_CONSTRUCT(&list, opal_list_t); + OBJ_CONSTRUCT(&x, opal_list_t); /* check length of list */ - list_size=ompi_list_get_size(&list); + list_size=opal_list_get_size(&list); if( 0 == list_size ) { test_success(); } else { - test_failure(" ompi_list_get_size"); + test_failure(" opal_list_get_size"); } /* check for empty */ - if (ompi_list_is_empty(&list)) { + if (opal_list_is_empty(&list)) { test_success(); } else { - test_failure(" ompi_list_is_empty(empty list)"); + test_failure(" opal_list_is_empty(empty list)"); } /* create test elements */ @@ -75,9 +75,9 @@ int main(int argc, char **argv) /* populate list */ for(i=0 ; i < size_elements ; i++) { - ompi_list_append(&list,(ompi_list_item_t *)(elements+i)); + opal_list_append(&list,(opal_list_item_t *)(elements+i)); } - list_size=ompi_list_get_size(&list); + list_size=opal_list_get_size(&list); if( list_size == size_elements ) { test_success(); } else { @@ -85,18 +85,18 @@ int main(int argc, char **argv) } /* checking for empty on non-empty list */ - if (!ompi_list_is_empty(&list)) { + if (!opal_list_is_empty(&list)) { test_success(); } else { - test_failure(" ompi_list_is_empty(non-empty list)"); + test_failure(" opal_list_is_empty(non-empty list)"); } /* check that list is ordered as expected */ i=0; error_cnt=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { if( ele->data != i ) error_cnt++; i++; @@ -107,132 +107,132 @@ int main(int argc, char **argv) test_failure(" error in list order "); } - /* check ompi_list_get_first */ + /* check opal_list_get_first */ ele = (test_data_t *)NULL; - ele = (test_data_t *) ompi_list_get_first(&list); + ele = (test_data_t *) opal_list_get_first(&list); assert(ele); if( 0 == ele->data ) { test_success(); } else { - test_failure(" error in ompi_list_get_first"); + test_failure(" error in opal_list_get_first"); } i=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { i++; } if( size_elements == i ) { test_success(); } else { - test_failure(" error in ompi_list_get_first - list size changed "); + test_failure(" error in opal_list_get_first - list size changed "); } - /* check ompi_list_get_last */ + /* check opal_list_get_last */ ele = (test_data_t *)NULL; - ele = (test_data_t *) ompi_list_get_last(&list); + ele = (test_data_t *) opal_list_get_last(&list); assert(ele); if( (size_elements-1) == ele->data ) { test_success(); } else { - test_failure(" error in ompi_list_get_last"); + test_failure(" error in opal_list_get_last"); } i=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { i++; } if( size_elements == i ) { test_success(); } else { - test_failure(" error in ompi_list_get_first - list size changed "); + test_failure(" error in opal_list_get_first - list size changed "); } - /* check ompi_list_remove_first */ + /* check opal_list_remove_first */ ele = (test_data_t *)NULL; - ele = (test_data_t *) ompi_list_remove_first(&list); + ele = (test_data_t *) opal_list_remove_first(&list); assert(ele); if( 0 == ele->data ) { test_success(); } else { - test_failure(" error in ompi_list_remove_first"); + test_failure(" error in opal_list_remove_first"); } i=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { i++; } if( (size_elements-1) == i ) { test_success(); } else { - test_failure(" error in ompi_list_remove_first - list size changed "); + test_failure(" error in opal_list_remove_first - list size changed "); } - /* test ompi_list_prepend */ - ompi_list_prepend(&list,(ompi_list_item_t *)elements); + /* test opal_list_prepend */ + opal_list_prepend(&list,(opal_list_item_t *)elements); ele = (test_data_t *)NULL; - ele = (test_data_t *) ompi_list_get_first(&list); + ele = (test_data_t *) opal_list_get_first(&list); assert(ele); if( 0 == ele->data ) { test_success(); } else { - test_failure(" error in ompi_list_prepend"); + test_failure(" error in opal_list_prepend"); } i=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { i++; } if( size_elements == i ) { test_success(); } else { - test_failure(" error in ompi_list_prepend - list size changed "); + test_failure(" error in opal_list_prepend - list size changed "); } - /* check ompi_list_remove_last */ + /* check opal_list_remove_last */ ele = (test_data_t *)NULL; - ele = (test_data_t *) ompi_list_remove_last(&list); + ele = (test_data_t *) opal_list_remove_last(&list); assert(ele); if( (size_elements-1) == ele->data ) { test_success(); } else { - test_failure(" error in ompi_list_remove_last"); + test_failure(" error in opal_list_remove_last"); } i=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { i++; } if( (size_elements-1) == i ) { test_success(); } else { - test_failure(" error in ompi_list_remove_last - list size changed "); + test_failure(" error in opal_list_remove_last - list size changed "); } - /* test ompi_list_append */ - ompi_list_append(&list,(ompi_list_item_t *)(elements+size_elements-1)); + /* test opal_list_append */ + opal_list_append(&list,(opal_list_item_t *)(elements+size_elements-1)); ele = (test_data_t *)NULL; - ele = (test_data_t *) ompi_list_get_last(&list); + ele = (test_data_t *) opal_list_get_last(&list); assert(ele); if( (size_elements-1) == ele->data ) { test_success(); } else { - test_failure(" error in ompi_list_append"); + test_failure(" error in opal_list_append"); } i=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { i++; } if( size_elements == i ) { test_success(); } else { - test_failure(" error in ompi_list_append - list size changed "); + test_failure(" error in opal_list_append - list size changed "); } /* remove element from list */ @@ -242,55 +242,55 @@ int main(int argc, char **argv) assert(2 <= size_elements); ele = (test_data_t *)NULL; ele = (test_data_t *) - ompi_list_remove_item(&list,(ompi_list_item_t *)(elements+indx)); + opal_list_remove_item(&list,(opal_list_item_t *)(elements+indx)); assert(ele); if( (indx-1) == ele->data ) { test_success(); } else { - test_failure(" error in ompi_list_remove - previous"); + test_failure(" error in opal_list_remove - previous"); } - ele=(test_data_t *)(((ompi_list_item_t *)ele)->ompi_list_next); + ele=(test_data_t *)(((opal_list_item_t *)ele)->opal_list_next); if( (indx+1) == ele->data ) { test_success(); } else { - test_failure(" error in ompi_list_remove - next"); + test_failure(" error in opal_list_remove - next"); } i=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { i++; } if( (size_elements-1) == i ) { test_success(); } else { - test_failure(" error in ompi_list_remove - list size changed incorrectly"); + test_failure(" error in opal_list_remove - list size changed incorrectly"); } /* test the insert function */ - i=ompi_list_insert(&list,(ompi_list_item_t *)(elements+indx),indx); + i=opal_list_insert(&list,(opal_list_item_t *)(elements+indx),indx); if( 1 == i ) { test_success(); } else { - test_failure(" error in ompi_list_remove_item \n"); + test_failure(" error in opal_list_remove_item \n"); } i=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { i++; } if( size_elements == i ) { test_success(); } else { - test_failure(" error in ompi_list_insert - incorrect list length"); + test_failure(" error in opal_list_insert - incorrect list length"); } i=0; error_cnt=0; - for(ele = (test_data_t *) ompi_list_get_first(&list); - ele != (test_data_t *) ompi_list_get_end(&list); - ele = (test_data_t *) ((ompi_list_item_t *)ele)->ompi_list_next) { + for(ele = (test_data_t *) opal_list_get_first(&list); + ele != (test_data_t *) opal_list_get_end(&list); + ele = (test_data_t *) ((opal_list_item_t *)ele)->opal_list_next) { if( ele->data != i ) error_cnt++; i++; @@ -298,18 +298,18 @@ int main(int argc, char **argv) if( 0 == error_cnt ) { test_success(); } else { - test_failure(" error in list order - ompi_list_remove_item "); + test_failure(" error in list order - opal_list_remove_item "); } /* test the splice and join functions */ - list_size = ompi_list_get_size(&list); - for (i = 0, item = ompi_list_get_first(&list) ; - i < list_size / 2 ; ++i, item = ompi_list_get_next(item)) { + list_size = opal_list_get_size(&list); + for (i = 0, item = opal_list_get_first(&list) ; + i < list_size / 2 ; ++i, item = opal_list_get_next(item)) { } - ompi_list_splice(&x, ompi_list_get_end(&x), - &list, item, ompi_list_get_end(&list)); - tmp_size_1 = ompi_list_get_size(&list); - tmp_size_2 = ompi_list_get_size(&x); + opal_list_splice(&x, opal_list_get_end(&x), + &list, item, opal_list_get_end(&list)); + tmp_size_1 = opal_list_get_size(&list); + tmp_size_2 = opal_list_get_size(&x); if (tmp_size_1 != i) { test_failure(" error in splice (size of list)"); } else if (tmp_size_2 != list_size - tmp_size_1) { @@ -318,9 +318,9 @@ int main(int argc, char **argv) test_success(); } - ompi_list_join(&list, ompi_list_get_end(&list), &x); - tmp_size_1 = ompi_list_get_size(&list); - tmp_size_2 = ompi_list_get_size(&x); + opal_list_join(&list, opal_list_get_end(&list), &x); + tmp_size_1 = opal_list_get_size(&list); + tmp_size_2 = opal_list_get_size(&x); if (tmp_size_1 != list_size) { test_failure(" error in join (size of list)"); } else if (tmp_size_2 != 0) { diff --git a/test/class/ompi_rb_tree.c b/test/class/ompi_rb_tree.c index ad6821df92..c0eae5a198 100644 --- a/test/class/ompi_rb_tree.c +++ b/test/class/ompi_rb_tree.c @@ -196,14 +196,14 @@ typedef struct ompi_test_rb_key_t ompi_test_rb_key_t; struct ompi_test_rb_value_t { - ompi_list_item_t super; /* the parent class */ + opal_list_item_t super; /* the parent class */ ompi_test_rb_key_t key; /* the key which holds the memory pointers */ mca_mpool_base_module_t* registered_mpools[MAX_REGISTRATIONS]; /* the mpools the memory is registered with */ }; typedef struct ompi_test_rb_value_t ompi_test_rb_value_t; -OBJ_CLASS_INSTANCE(ompi_test_rb_value_t, ompi_list_item_t, NULL, NULL); +OBJ_CLASS_INSTANCE(ompi_test_rb_value_t, opal_list_item_t, NULL, NULL); int mem_node_compare(void * key1, void * key2) { @@ -223,12 +223,12 @@ int mem_node_compare(void * key1, void * key2) void test2(void) { ompi_free_list_t key_list; - ompi_list_item_t * new_value; + opal_list_item_t * new_value; ompi_rb_tree_t tree; int rc, i, size; void * result, * lookup; void * mem[NUM_ALLOCATIONS]; - ompi_list_item_t * key_array[NUM_ALLOCATIONS]; + opal_list_item_t * key_array[NUM_ALLOCATIONS]; struct timeval start, end; OBJ_CONSTRUCT(&key_list, ompi_free_list_t); diff --git a/test/mca/gpr/gpr_overwrite.c b/test/mca/gpr/gpr_overwrite.c index db1c7f8ed0..adb6bf6082 100644 --- a/test/mca/gpr/gpr_overwrite.c +++ b/test/mca/gpr/gpr_overwrite.c @@ -55,7 +55,7 @@ static orte_gpr_base_module_t *gpr_module = NULL; */ struct test_node_t { /** Base object */ - ompi_list_item_t super; + opal_list_item_t super; /** String node name */ char *node_name; /** String of the architecture for the node. This is permitted to @@ -120,16 +120,16 @@ static void test_node_destruct(test_node_t* node) OBJ_CLASS_INSTANCE( test_node_t, - ompi_list_item_t, + opal_list_item_t, test_node_construct, test_node_destruct); -static int test_overwrite(ompi_list_t* nodes); +static int test_overwrite(opal_list_t* nodes); int main(int argc, char **argv) { - ompi_list_t nodes; + opal_list_t nodes; test_node_t *node; int i, rc; test_component_handle_t handle; @@ -248,7 +248,7 @@ int main(int argc, char **argv) } /* setup a node list */ - OBJ_CONSTRUCT(&nodes, ompi_list_t); + OBJ_CONSTRUCT(&nodes, opal_list_t); for (i=0; i < 5; i++) { node = OBJ_NEW(test_node_t); asprintf(&(node->node_name), "node-%d", i); @@ -259,7 +259,7 @@ int main(int argc, char **argv) node->node_slots_alloc = i%2; node->node_slots_inuse = i % 3; node->node_slots_max = i * 5; - ompi_list_append(&nodes, &node->super); + opal_list_append(&nodes, &node->super); } fprintf(test_out, "putting initial set of values on registry\n"); @@ -275,9 +275,9 @@ int main(int argc, char **argv) fprintf(test_out, "changing values for overwrite test\n"); /* change the arch, state, and slots_inuse values */ - for (i=0, node = (test_node_t*)ompi_list_get_first(&nodes); - node != (test_node_t*)ompi_list_get_end(&nodes); - node = (test_node_t*)ompi_list_get_next(node), i++) { + for (i=0, node = (test_node_t*)opal_list_get_first(&nodes); + node != (test_node_t*)opal_list_get_end(&nodes); + node = (test_node_t*)opal_list_get_next(node), i++) { free(node->node_arch); asprintf(&(node->node_arch), "new-arch-%d", i*10); @@ -297,7 +297,7 @@ int main(int argc, char **argv) gpr_module->dump_all(0); fprintf(stderr, "now finalize and see if all memory cleared\n"); - while (NULL != (node = (test_node_t*)ompi_list_remove_first(&nodes))) { + while (NULL != (node = (test_node_t*)opal_list_remove_first(&nodes))) { OBJ_RELEASE(node); } OBJ_DESTRUCT(&nodes); @@ -318,15 +318,15 @@ int main(int argc, char **argv) } -int test_overwrite(ompi_list_t* nodes) +int test_overwrite(opal_list_t* nodes) { - ompi_list_item_t* item; + opal_list_item_t* item; orte_gpr_value_t **values; int rc; test_node_t* node; size_t i, j, num_values; - num_values = ompi_list_get_size(nodes); + num_values = opal_list_get_size(nodes); if (0 >= num_values) { return ORTE_ERR_BAD_PARAM; } @@ -374,9 +374,9 @@ int test_overwrite(ompi_list_t* nodes) } } - for(i=0, item = ompi_list_get_first(nodes); - i < num_values && item != ompi_list_get_end(nodes); - i++, item = ompi_list_get_next(item)) { + for(i=0, item = opal_list_get_first(nodes); + i < num_values && item != opal_list_get_end(nodes); + i++, item = opal_list_get_next(item)) { orte_gpr_value_t* value = values[i]; node = (test_node_t*)item; diff --git a/test/mca/gpr/test_gpr_proxy.c b/test/mca/gpr/test_gpr_proxy.c index 6b234251e8..e1071ed541 100644 --- a/test/mca/gpr/test_gpr_proxy.c +++ b/test/mca/gpr/test_gpr_proxy.c @@ -154,14 +154,14 @@ int exec_client(int argc, char** argv) int run_test() { - ompi_list_t *test_list, *internal_tests; + opal_list_t *test_list, *internal_tests; ompi_registry_index_value_t *ptr; ompi_registry_internal_test_results_t *ptri; ompi_registry_object_t test_buffer; uint8_t *test_buf; ompi_registry_object_size_t input_size; ompi_registry_mode_t mode; - ompi_list_t *answer; + opal_list_t *answer; ompi_registry_value_t *ans; bool multi, hidden; int i, j; @@ -212,16 +212,16 @@ int run_test() /* check internals */ internal_tests = ompi_registry.test_internals(1); - if (0 == ompi_list_get_size(internal_tests)) { /* should have been something in list */ + if (0 == opal_list_get_size(internal_tests)) { /* should have been something in list */ fprintf(test_out, "internal tests failed\n"); test_failure("test_gpr_replica internal_tests failed\n"); test_finalize(); exit(1); } else { fprintf(test_out, "internal test results list\n"); - for (ptri = (ompi_registry_internal_test_results_t*)ompi_list_get_first(internal_tests); - ptri != (ompi_registry_internal_test_results_t*)ompi_list_get_end(internal_tests); - ptri = (ompi_registry_internal_test_results_t*)ompi_list_get_next(ptri)) { + for (ptri = (ompi_registry_internal_test_results_t*)opal_list_get_first(internal_tests); + ptri != (ompi_registry_internal_test_results_t*)opal_list_get_end(internal_tests); + ptri = (ompi_registry_internal_test_results_t*)opal_list_get_next(ptri)) { fprintf(test_out, "\t%s\n", ptri->test); fprintf(test_out, "\t%s\n", ptri->message); } @@ -230,16 +230,16 @@ int run_test() /* check index */ test_list = ompi_registry.index(NULL); - if (0 == ompi_list_get_size(test_list)) { /* should have been something in dictionary */ + if (0 == opal_list_get_size(test_list)) { /* should have been something in dictionary */ fprintf(test_out, "GPR replica: index function failed\n"); test_failure("test_gpr_replica index_global_dictionary failed\n"); test_finalize(); exit(1); } else { fprintf(test_out, "GPR index returned list\n"); - for (ptr = (ompi_registry_index_value_t*)ompi_list_get_first(test_list); - ptr != (ompi_registry_index_value_t*)ompi_list_get_end(test_list); - ptr = (ompi_registry_index_value_t*)ompi_list_get_next(ptr)) { + for (ptr = (ompi_registry_index_value_t*)opal_list_get_first(test_list); + ptr != (ompi_registry_index_value_t*)opal_list_get_end(test_list); + ptr = (ompi_registry_index_value_t*)opal_list_get_next(ptr)) { fprintf(test_out, "\t%s\n", ptr->token); } test_success(); @@ -322,9 +322,9 @@ int run_test() if (10 % i) { mode = OMPI_REGISTRY_AND; answer = ompi_registry.get(mode, name, name2); - for (ans = (ompi_registry_value_t*)ompi_list_get_first(answer); - ans != (ompi_registry_value_t*)ompi_list_get_end(answer); - ans = (ompi_registry_value_t*)ompi_list_get_next(ans)) { + for (ans = (ompi_registry_value_t*)opal_list_get_first(answer); + ans != (ompi_registry_value_t*)opal_list_get_end(answer); + ans = (ompi_registry_value_t*)opal_list_get_next(ans)) { if (ans->object_size != input_size) { success = false; } @@ -332,7 +332,7 @@ int run_test() } else { mode = OMPI_REGISTRY_XAND; answer = ompi_registry.get(mode, name, name3); - if (0 < ompi_list_get_size(answer)) { /* should not have gotten a result */ + if (0 < opal_list_get_size(answer)) { /* should not have gotten a result */ success = false; } } @@ -376,16 +376,16 @@ int run_test() for (i=0; i<5 && success; i++) { sprintf(name, "test-def-seg%d", i); test_list = ompi_registry.index(name); - if (0 == ompi_list_get_size(test_list)) { /* should have been something in dictionary */ + if (0 == opal_list_get_size(test_list)) { /* should have been something in dictionary */ fprintf(test_out, "GPR replica: index function failed\n"); test_failure("test_gpr_replica index_global_dictionary failed\n"); test_finalize(); exit(1); } else { fprintf(test_out, "GPR index returned list for segment %s\n", name); - for (ptr = (ompi_registry_index_value_t*)ompi_list_get_first(test_list); - ptr != (ompi_registry_index_value_t*)ompi_list_get_end(test_list); - ptr = (ompi_registry_index_value_t*)ompi_list_get_next(ptr)) { + for (ptr = (ompi_registry_index_value_t*)opal_list_get_first(test_list); + ptr != (ompi_registry_index_value_t*)opal_list_get_end(test_list); + ptr = (ompi_registry_index_value_t*)opal_list_get_next(ptr)) { fprintf(test_out, "\t%s\n", ptr->token); } } diff --git a/test/mca/gpr/test_gpr_replica.c b/test/mca/gpr/test_gpr_replica.c index f7ce191e14..a366bb6249 100644 --- a/test/mca/gpr/test_gpr_replica.c +++ b/test/mca/gpr/test_gpr_replica.c @@ -38,14 +38,14 @@ int main(int argc, char **argv) { bool multi_thread = false; bool hidden_thread = false; - ompi_list_t *test_list, *internal_tests; + opal_list_t *test_list, *internal_tests; ompi_registry_index_value_t *ptr; ompi_registry_internal_test_results_t *ptri; ompi_registry_object_t test_buffer; uint8_t *test_buf; ompi_registry_object_size_t input_size; ompi_registry_mode_t mode; - ompi_list_t *answer; + opal_list_t *answer; ompi_registry_value_t *ans; bool multi, hidden; int i, j, result; @@ -87,16 +87,16 @@ test_out = stderr; fprintf(test_out, "\n\ntesting internals\n"); /* check internals */ internal_tests = ompi_registry.test_internals(1); - if (0 == ompi_list_get_size(internal_tests)) { /* should have been something in list */ + if (0 == opal_list_get_size(internal_tests)) { /* should have been something in list */ fprintf(test_out, "internal tests failed\n"); test_failure("test_gpr_replica internal_tests failed\n"); test_finalize(); exit(1); } else { fprintf(test_out, "internal test results list\n"); - for (ptri = (ompi_registry_internal_test_results_t*)ompi_list_get_first(internal_tests); - ptri != (ompi_registry_internal_test_results_t*)ompi_list_get_end(internal_tests); - ptri = (ompi_registry_internal_test_results_t*)ompi_list_get_next(ptri)) { + for (ptri = (ompi_registry_internal_test_results_t*)opal_list_get_first(internal_tests); + ptri != (ompi_registry_internal_test_results_t*)opal_list_get_end(internal_tests); + ptri = (ompi_registry_internal_test_results_t*)opal_list_get_next(ptri)) { fprintf(test_out, "\t%s\n", ptri->test); fprintf(test_out, "\t%s\n", ptri->message); } @@ -106,16 +106,16 @@ test_out = stderr; fprintf(test_out, "\n\ntesting index\n"); /* check index */ test_list = ompi_registry.index(NULL); - if (0 == ompi_list_get_size(test_list)) { /* should have been something in dictionary */ + if (0 == opal_list_get_size(test_list)) { /* should have been something in dictionary */ fprintf(test_out, "GPR replica: index function failed\n"); test_failure("test_gpr_replica index_global_dictionary failed\n"); test_finalize(); exit(1); } else { fprintf(test_out, "GPR index returned list\n"); - for (ptr = (ompi_registry_index_value_t*)ompi_list_get_first(test_list); - ptr != (ompi_registry_index_value_t*)ompi_list_get_end(test_list); - ptr = (ompi_registry_index_value_t*)ompi_list_get_next(ptr)) { + for (ptr = (ompi_registry_index_value_t*)opal_list_get_first(test_list); + ptr != (ompi_registry_index_value_t*)opal_list_get_end(test_list); + ptr = (ompi_registry_index_value_t*)opal_list_get_next(ptr)) { fprintf(test_out, "\t%s\n", ptr->token); } test_success(); @@ -255,9 +255,9 @@ test_out = stderr; if (10 % i) { mode = OMPI_REGISTRY_AND; answer = ompi_registry.get(mode, name, name2); - for (ans = (ompi_registry_value_t*)ompi_list_get_first(answer); - ans != (ompi_registry_value_t*)ompi_list_get_end(answer); - ans = (ompi_registry_value_t*)ompi_list_get_next(ans)) { + for (ans = (ompi_registry_value_t*)opal_list_get_first(answer); + ans != (ompi_registry_value_t*)opal_list_get_end(answer); + ans = (ompi_registry_value_t*)opal_list_get_next(ans)) { if (ans->object_size != input_size) { success = false; } @@ -265,7 +265,7 @@ test_out = stderr; } else { mode = OMPI_REGISTRY_XAND; answer = ompi_registry.get(mode, name, name3); - if (0 < ompi_list_get_size(answer)) { /* should not have gotten a result */ + if (0 < opal_list_get_size(answer)) { /* should not have gotten a result */ success = false; } } @@ -313,16 +313,16 @@ test_out = stderr; for (i=0; i<5 && success; i++) { sprintf(name, "test-def-seg%d", i); test_list = ompi_registry.index(name); - if (0 == ompi_list_get_size(test_list)) { /* should have been something in dictionary */ + if (0 == opal_list_get_size(test_list)) { /* should have been something in dictionary */ fprintf(test_out, "GPR replica: index function failed\n"); test_failure("test_gpr_replica index_global_dictionary failed\n"); test_finalize(); exit(1); } else { fprintf(test_out, "GPR index returned list for segment %s\n", name); - for (ptr = (ompi_registry_index_value_t*)ompi_list_get_first(test_list); - ptr != (ompi_registry_index_value_t*)ompi_list_get_end(test_list); - ptr = (ompi_registry_index_value_t*)ompi_list_get_next(ptr)) { + for (ptr = (ompi_registry_index_value_t*)opal_list_get_first(test_list); + ptr != (ompi_registry_index_value_t*)opal_list_get_end(test_list); + ptr = (ompi_registry_index_value_t*)opal_list_get_next(ptr)) { fprintf(test_out, "\t%s\n", ptr->token); } } diff --git a/vcproj/ompi/ompi.vcproj b/vcproj/ompi/ompi.vcproj index ff01c28750..690202ccb5 100755 --- a/vcproj/ompi/ompi.vcproj +++ b/vcproj/ompi/ompi.vcproj @@ -173,10 +173,10 @@ RelativePath="..\..\src\class\ompi_hash_table.h"> + RelativePath="..\..\src\class\opal_list.c"> + RelativePath="..\..\src\class\opal_list.h">