1 /* 2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana 3 * University Research and Technology 4 * Corporation. All rights reserved. 5 * Copyright (c) 2004-2011 The University of Tennessee and The University 6 * of Tennessee Research Foundation. All rights 7 * reserved. 8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 9 * University of Stuttgart. All rights reserved. 10 * Copyright (c) 2004-2005 The Regents of the University of California. 11 * All rights reserved. 12 * $COPYRIGHT$ 13 * 14 * Additional copyrights may follow 15 * 16 * $HEADER$ 17 */ 18 19 #ifndef MCA_BTL_TEMPLATE_PROC_H 20 #define MCA_BTL_TEMPLATE_PROC_H 21 22 #include "opal/class/opal_object.h" 23 #include "opal/util/proc.h" 24 #include "btl_template.h" 25 #include "btl_template_endpoint.h" 26 27 BEGIN_C_DECLS 28 29 /** 30 * Represents the state of a remote process and the set of addresses 31 * that it exports. Also cache an instance of mca_btl_base_endpoint_t for 32 * each 33 * BTL instance that attempts to open a connection to the process. 34 */ 35 struct mca_btl_template_proc_t { 36 opal_list_item_t super; 37 /**< allow proc to be placed on a list */ 38 39 opal_proc_t *proc_opal; 40 /**< pointer to corresponding opal_proc_t */ 41 42 size_t proc_addr_count; 43 /**< number of addresses published by endpoint */ 44 45 struct mca_btl_base_endpoint_t **proc_endpoints; 46 /**< array of endpoints that have been created to access this proc */ 47 48 size_t proc_endpoint_count; 49 /**< number of endpoints */ 50 51 opal_mutex_t proc_lock; 52 /**< lock to protect against concurrent access to proc state */ 53 }; 54 typedef struct mca_btl_template_proc_t mca_btl_template_proc_t; 55 OBJ_CLASS_DECLARATION(mca_btl_template_proc_t); 56 57 mca_btl_template_proc_t* mca_btl_template_proc_create(opal_proc_t* proc); 58 int mca_btl_template_proc_insert(mca_btl_template_proc_t*, mca_btl_base_endpoint_t*); 59 60 END_C_DECLS 61 #endif