📄 gpr_replica.h
字号:
/* the segment upon which this data is located */ orte_gpr_replica_segment_t *seg; /* describe the data */ orte_gpr_addr_mode_t addr_mode; /**< Tokens/keys addressing mode */ orte_value_array_t tokentags; /**< Array of tokens defining which containers are affected */ orte_value_array_t keytags; /**< Array of keys defining which key-value pairs are affected */} orte_gpr_replica_ivalue_t;OBJ_CLASS_DECLARATION(orte_gpr_replica_ivalue_t);typedef struct { opal_object_t super; orte_gpr_replica_segment_t *seg; orte_gpr_replica_container_t *cptr; orte_gpr_replica_itagval_t *iptr; orte_gpr_replica_itagval_t trigger_level;} orte_gpr_replica_counter_t;OBJ_CLASS_DECLARATION(orte_gpr_replica_counter_t);typedef struct { opal_object_t super; /* index of this entry in requestor array */ orte_std_cntr_t index; /* process name of the recipient - set to NULL if local */ orte_process_name_t *requestor; /* idtag associated with this subscription */ orte_gpr_subscription_id_t idtag;} orte_gpr_replica_requestor_t;OBJ_CLASS_DECLARATION(orte_gpr_replica_requestor_t);typedef struct { opal_object_t super; /**< Makes this an object */ /* index of this entry in subscription array */ orte_std_cntr_t index; /* idtag for the subscription - may be different than index since * the data type can be different than orte_std_cntr_t */ orte_gpr_subscription_id_t idtag; /* name of this subscription, if provided */ char *name; /* boolean indicating if this subscription is active or not */ bool active; /* boolean indicating that this subscription is already being * processed - required to prevent infinite loops should a * callback function modify the registry */ bool processing; /* boolean indicating that this subscription * should be removed after processing * is completed */ bool cleanup; /* action flags describing when the subscription should * generate a notification message. This can be NULL if * the subscription only operates in conjunction * with a trigger */ orte_gpr_notify_action_t action; /* Array of ivalues that describe the data to be * returned when this subscription is "fired" */ orte_std_cntr_t num_values; orte_pointer_array_t *values; /* * Array of requestors that are "attached" to this subscription */ orte_std_cntr_t num_requestors; orte_pointer_array_t *requestors;} orte_gpr_replica_subscription_t;OBJ_CLASS_DECLARATION(orte_gpr_replica_subscription_t);typedef struct { opal_object_t super; /* index of this entry in array */ orte_std_cntr_t index; /* process name of the requestor - set to NULL if local */ orte_process_name_t *requestor; /* requestor's id for this trigger */ orte_gpr_trigger_id_t idtag;} orte_gpr_replica_trigger_requestor_t;OBJ_CLASS_DECLARATION(orte_gpr_replica_trigger_requestor_t);struct orte_gpr_replica_trigger_t { opal_object_t super; /**< Make this an object */ /* name of this trigger, if provided */ char *name; /* index of this trigger in the triggers array */ orte_std_cntr_t index; /* trigger id on the local system */ orte_gpr_trigger_id_t idtag; /* array of requestors that have "attached" themselves to this trigger */ orte_std_cntr_t num_attached; orte_pointer_array_t *attached; /* the "master" requestor - if someone asks to have all * output routed through them, we record their info here * so we can comply */ orte_gpr_replica_trigger_requestor_t *master; /* the action that causes the trigger to be fired */ orte_gpr_trigger_action_t action; /* boolean indicating that this trigger is already being * processed - required to prevent infinite loops should a * callback function modify the registry */ bool processing; /* flag that indicates this trigger is a one-shot, has fired and * now should be cleaned up */ bool one_shot_fired; /* pointers to the counters being monitored. This could * be counters we are using ourselves, or could be counters being run by someone * else. For those triggers that fire at a specified level (as opposed to * comparing values in two or more counters), store the trigger level for * each counter that we are monitoring until they reach a specified level. */ orte_std_cntr_t num_counters; orte_pointer_array_t *counters; /* a pointer to the subscriptions associated with this trigger. These * describe the data that will be returned when the trigger fires, and to * whom and where it goes. */ orte_std_cntr_t num_subscriptions; orte_pointer_array_t *subscriptions;};typedef struct orte_gpr_replica_trigger_t orte_gpr_replica_trigger_t;OBJ_CLASS_DECLARATION(orte_gpr_replica_trigger_t);/* * Action taken object - used to track what action was taken against what * registry object during the course of a registry request. For example, if * a PUT modifies an existing registry entry, then we store a pointer to that * entry and a flag indicating that it was modified. This info is required for * processing notification subscriptions. */typedef struct { opal_object_t super; /**< Make this an object */ orte_gpr_replica_action_t action; orte_gpr_replica_segment_t *seg; orte_gpr_replica_container_t *cptr; orte_gpr_replica_itagval_t *iptr;} orte_gpr_replica_action_taken_t;OBJ_CLASS_DECLARATION(orte_gpr_replica_action_taken_t);/* * Callback list objects */struct orte_gpr_replica_callbacks_t { opal_list_item_t item; orte_process_name_t *requestor; orte_gpr_notify_message_t *message;};typedef struct orte_gpr_replica_callbacks_t orte_gpr_replica_callbacks_t;OBJ_CLASS_DECLARATION(orte_gpr_replica_callbacks_t);/** List of replicas that hold a stored entry. * Each entry can have an arbitrary number of replicas that hold a copy * of the entry. The GPR requires that each entry be replicated in at least * two locations. This structure is used to create a linked list of * replicas for the entry. * * THIS IS NOT IMPLEMENTED YET */struct orte_gpr_replica_list_t { 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;OBJ_CLASS_DECLARATION(orte_gpr_replica_list_t);/** Write invalidate structure. * The structure used to indicate that an entry has been updated somewhere else in the GPR. * The structure contains a flag indicating that the locally stored copy of the entry * is no longer valid, a time tag indicating the time of the last known modification * of the entry within the global registry, and the replica holding the last known * up-to-date version of the entry. * * THIS IS NOT IMPLEMENTED YET */struct orte_gpr_replica_write_invalidate_t { bool invalidate; time_t last_mod; orte_process_name_t *valid_replica;};typedef struct orte_gpr_replica_write_invalidate_t orte_gpr_replica_write_invalidate_t;/* * globals needed within component */extern orte_gpr_replica_t orte_gpr_replica;extern orte_gpr_replica_globals_t orte_gpr_replica_globals;/* * Module open / close */int orte_gpr_replica_open(void);int orte_gpr_replica_close(void);/* * Startup / Shutdown */orte_gpr_base_module_t *orte_gpr_replica_init(bool *allow_multi_user_threads, bool *have_hidden_threads, int *priority);int orte_gpr_replica_finalize(void);int orte_gpr_replica_module_init(void);ORTE_MODULE_DECLSPEC extern mca_gpr_base_component_t mca_gpr_replica_component;#if defined(c_plusplus) || defined(__cplusplus)}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -