Turn "on" the delete functionality for the registry. Should now be able to delete entries and segments, and get an index of the dictionary entries on the registry.
Haven't fully tested these yet (nobody is using them at the moment that I know of - good thing, since they haven't been working for a long time - though I know the MPI-2 stuff needs the functionality), but will do so shortly. For now, they compile. This commit was SVN r6567.
Этот коммит содержится в:
родитель
fd969ac833
Коммит
f604fb72db
@ -126,7 +126,7 @@ typedef uint8_t orte_gpr_cmd_flag_t;
|
||||
|
||||
OMPI_DECLSPEC int orte_gpr_base_pack_index(orte_buffer_t *cmd, char *segment);
|
||||
OMPI_DECLSPEC int orte_gpr_base_unpack_index(orte_buffer_t *cmd, int *ret, size_t *cnt,
|
||||
char **index);
|
||||
char ***index);
|
||||
|
||||
OMPI_DECLSPEC int orte_gpr_base_pack_subscribe(orte_buffer_t *cmd,
|
||||
size_t num_subs,
|
||||
|
@ -128,14 +128,11 @@ int orte_gpr_base_pack_index(orte_buffer_t *cmd, char *segment)
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (NULL == segment) { /* no segment specified - want universe dict */
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_dps.pack(cmd, &segment, 1, ORTE_STRING))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
/* it's okay to pack a NULL string, so pack the segment regardless */
|
||||
if (ORTE_SUCCESS != (rc = orte_dps.pack(cmd, &segment, 1, ORTE_STRING))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ int orte_gpr_base_unpack_delete_entries(orte_buffer_t *buffer, int *ret)
|
||||
}
|
||||
|
||||
|
||||
int orte_gpr_base_unpack_index(orte_buffer_t *buffer, int *ret, size_t *cnt, char **index)
|
||||
int orte_gpr_base_unpack_index(orte_buffer_t *buffer, int *ret, size_t *cnt, char ***index)
|
||||
{
|
||||
orte_gpr_cmd_flag_t command;
|
||||
size_t n;
|
||||
@ -87,6 +87,7 @@ int orte_gpr_base_unpack_index(orte_buffer_t *buffer, int *ret, size_t *cnt, cha
|
||||
int rc;
|
||||
|
||||
*cnt = 0;
|
||||
*index = NULL;
|
||||
|
||||
n = 1;
|
||||
if (ORTE_SUCCESS != (rc = orte_dps.unpack(buffer, &command, &n, ORTE_GPR_CMD))) {
|
||||
@ -115,23 +116,16 @@ int orte_gpr_base_unpack_index(orte_buffer_t *buffer, int *ret, size_t *cnt, cha
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
if (NULL != index) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
if (0 < n) {
|
||||
*index = (char *)malloc(n*sizeof(char*));
|
||||
*index = (char **)malloc(n*sizeof(char*));
|
||||
if (NULL == *index) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
}
|
||||
|
||||
/* need to unpack the string regardless of n to "clear" the entry from the buffer */
|
||||
if (ORTE_SUCCESS != (rc = orte_dps.unpack(buffer, index, &n, ORTE_STRING))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
if (ORTE_SUCCESS != (rc = orte_dps.unpack(buffer, *index, &n, ORTE_STRING))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
*cnt = n;
|
||||
|
||||
|
@ -355,9 +355,10 @@ typedef int (*orte_gpr_base_module_delete_entries_nb_fn_t)(
|
||||
* @param *segment (IN) A character string indicating the segment whose dictionary is to be
|
||||
* indexed. A value of NULL indicates that the global level dictionary is to be used.
|
||||
*
|
||||
* @param *cnt (OUT) A pointer to the number of tokens in the index.
|
||||
* @param **index (OUT) A char** array of strings containing an index of the
|
||||
* specified dictionary.
|
||||
* @param *cnt (IN) A pointer to a size_t location for storing the number of
|
||||
* tokens in the index.
|
||||
* @param ***index (IN) The address to place a char** array of strings containing an
|
||||
* index of the specified dictionary.
|
||||
*
|
||||
* @retval ORTE_SUCCESS Operation was successfully completed.
|
||||
* @retval ORTE_ERROR(s) Operation failed, returning the provided error code.
|
||||
@ -370,7 +371,7 @@ typedef int (*orte_gpr_base_module_delete_entries_nb_fn_t)(
|
||||
* status_code = orte_gpr.index(segment, &cnt, &index);
|
||||
* @endcode
|
||||
*/
|
||||
typedef int (*orte_gpr_base_module_index_fn_t)(char *segment, size_t *cnt, char **index);
|
||||
typedef int (*orte_gpr_base_module_index_fn_t)(char *segment, size_t *cnt, char ***index);
|
||||
|
||||
/*
|
||||
* Obtain an index of a specified dictionary (NON-BLOCKING)
|
||||
|
@ -75,8 +75,8 @@ typedef size_t orte_gpr_subscription_id_t;
|
||||
#define ORTE_GPR_TRIG_ROUTE_DATA_THRU_ME (uint8_t)0x04 /**< send all associated data to trigger callback fn */
|
||||
#define ORTE_GPR_TRIG_AT_LEVEL (uint8_t)0x08 /**< Trigger whenever count reaches specified level */
|
||||
#define ORTE_GPR_TRIG_CMP_LEVELS (uint8_t)0x80 /**< Trigger when all the specified values are equal */
|
||||
#define ORTE_GPR_TRIG_ALL_AT (uint8_t)0x7f /**< Use all trig defs except include trig data with AT - a typical situation */
|
||||
#define ORTE_GPR_TRIG_ALL_CMP (uint8_t)0xf7 /**< Use all trig defs except include trig data with CMP */
|
||||
#define ORTE_GPR_TRIG_ALL_AT (uint8_t)0x7b /**< Use all trig defs except include trig data with AT - a typical situation */
|
||||
#define ORTE_GPR_TRIG_ALL_CMP (uint8_t)0xf3 /**< Use all trig defs except include trig data with CMP */
|
||||
#define ORTE_GPR_TRIG_ANY (uint8_t)0xff /**< Used to test if any trigs are set */
|
||||
|
||||
typedef uint8_t orte_gpr_trigger_action_t;
|
||||
|
@ -124,7 +124,7 @@ int orte_gpr_proxy_delete_entries_nb(
|
||||
char *segment, char **tokens, char **keys,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag);
|
||||
|
||||
int orte_gpr_proxy_index(char *segment, size_t *cnt, char **index);
|
||||
int orte_gpr_proxy_index(char *segment, size_t *cnt, char ***index);
|
||||
|
||||
int orte_gpr_proxy_index_nb(char *segment,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag);
|
||||
|
@ -178,13 +178,19 @@ int orte_gpr_proxy_delete_entries_nb(
|
||||
}
|
||||
|
||||
|
||||
int orte_gpr_proxy_index(char *segment, size_t *cnt, char **index)
|
||||
int orte_gpr_proxy_index(char *segment, size_t *cnt, char ***index)
|
||||
{
|
||||
orte_buffer_t *cmd;
|
||||
orte_buffer_t *answer;
|
||||
int rc, ret;
|
||||
|
||||
index = NULL;
|
||||
if (NULL == index || NULL == cnt) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
*cnt = 0;
|
||||
*index = NULL;
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_index(orte_gpr_proxy_globals.compound_cmd, segment))) {
|
||||
|
@ -79,7 +79,7 @@ int orte_gpr_replica_delete_entries_nb(
|
||||
char *segment, char **tokens, char **keys,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag);
|
||||
|
||||
int orte_gpr_replica_index(char *segment, size_t *cnt, char **index);
|
||||
int orte_gpr_replica_index(char *segment, size_t *cnt, char ***index);
|
||||
|
||||
int orte_gpr_replica_index_nb(char *segment,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag);
|
||||
|
@ -136,11 +136,16 @@ int orte_gpr_replica_delete_entries_nb(
|
||||
}
|
||||
|
||||
|
||||
int orte_gpr_replica_index(char *segment, size_t *cnt, char **index)
|
||||
int orte_gpr_replica_index(char *segment, size_t *cnt, char ***index)
|
||||
{
|
||||
orte_gpr_replica_segment_t *seg=NULL;
|
||||
int rc;
|
||||
|
||||
if (NULL == index || NULL == cnt) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
if (NULL == segment) { /* want global level index */
|
||||
|
@ -230,7 +230,7 @@ int orte_gpr_replica_recv_index_cmd(orte_buffer_t *buffer,
|
||||
}
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (ret = orte_gpr_replica_index_fn(seg, &cnt, index))) {
|
||||
if (ORTE_SUCCESS != (ret = orte_gpr_replica_index_fn(seg, &cnt, &index))) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
goto RETURN_ERROR;
|
||||
}
|
||||
|
@ -28,7 +28,8 @@
|
||||
#include "include/orte_constants.h"
|
||||
|
||||
#include "opal/util/output.h"
|
||||
#include "util/proc_info.h"
|
||||
#include "orte/util/proc_info.h"
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
|
||||
#include "gpr_replica_fn.h"
|
||||
|
||||
@ -38,22 +39,20 @@ int orte_gpr_replica_delete_entries_fn(orte_gpr_addr_mode_t addr_mode,
|
||||
orte_gpr_replica_itag_t *token_itags, size_t num_tokens,
|
||||
orte_gpr_replica_itag_t *key_itags, size_t num_keys)
|
||||
{
|
||||
#if 0
|
||||
orte_gpr_replica_container_t **ptr;
|
||||
orte_gpr_replica_itagval_t **valptr;
|
||||
orte_gpr_replica_container_t **cptr;
|
||||
orte_gpr_replica_itagval_t **ivals;
|
||||
orte_gpr_replica_addr_mode_t tok_mode;
|
||||
size_t i, j, num_found;
|
||||
|
||||
if (orte_gpr_replica_globals.debug) {
|
||||
opal_output(0, "[%lu,%lu,%lu] replica_delete_object entered: segment %s",
|
||||
ORTE_NAME_ARGS(*(orte_process_info.my_name)), seg->name);
|
||||
}
|
||||
size_t i, j, k, n, p;
|
||||
int rc;
|
||||
|
||||
/* if num_tokens == 0 and num_keys == 0, remove segment. We don't record
|
||||
* any actions when doing this so that subscriptions don't fire like mad
|
||||
*/
|
||||
if (0 == num_tokens && 0 == num_keys) {
|
||||
return orte_gpr_replica_release_segment(seg);
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_release_segment(&seg))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* initialize storage for actions taken */
|
||||
@ -67,84 +66,56 @@ int orte_gpr_replica_delete_entries_fn(orte_gpr_addr_mode_t addr_mode,
|
||||
}
|
||||
|
||||
/* find the specified container(s) */
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_find_containers(&num_found, seg, tok_mode,
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_find_containers(seg, tok_mode,
|
||||
token_itags, num_tokens))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (NULL == token_itags && 0 == num_found) { /* wildcard tokens but nothing found */
|
||||
/* no ERROR_LOG entry created as this is not a system failure */
|
||||
return ORTE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* if num_tokens == 0 and num_keys > 0, check every container */
|
||||
if (0 == num_tokens) {
|
||||
ptr = (orte_gpr_replica_container_t**)((seg->containers)->addr);
|
||||
for (i=0; i < (seg->containers)->size; i++) {
|
||||
if (NULL != ptr[i]) {
|
||||
valptr = (orte_gpr_replica_itagval_t**)((ptr->itagvals)->addr);
|
||||
for (j=0; j < (ptr[i]->itagvals)->size; j++) {
|
||||
if (NULL != valptr[j]) {
|
||||
if (orte_gpr_replica_check_itag(valptr[j]->itag, key_itags, num_keys)) {
|
||||
OBJ_RELEASE(valptr[j]);
|
||||
if (ORTE_SUCCESS != (rc = orte_pointer_array_set_item(ptr[i]->itagvals, j, NULL))) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (0 == orte_gpr_replica_globals.num_srch_cptr) {
|
||||
/* nothing found - no ERROR_LOG entry created as this is
|
||||
* not a system failure. Likewise, don't return an error code
|
||||
* as this is not necessarily an error - don't want to cause
|
||||
* somebody to abort as a result.
|
||||
*/
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* if num_tokens > 0, find the specified container and then check it */
|
||||
ptr = (orte_gpr_replica_container_t**)((seg->containers)->addr);
|
||||
for (i=0; i < (seg->containers)->size; i++) {
|
||||
if (NULL != ptr[i]) {
|
||||
if (orte_gpr_replica_check_itag_list(addr_mode, num_tokens, token_itags,
|
||||
ptr[i]->num_itags, ptr[i]->itags)) {
|
||||
/* right container - check for matching entries and delete them.
|
||||
* if num_keys == 0, delete entire container
|
||||
*/
|
||||
if (0 == num_keys) {
|
||||
/* delete container */
|
||||
} else {
|
||||
/* delete entries */
|
||||
/* go through the containers looking for the specified entries,
|
||||
* removing those that are found
|
||||
*/
|
||||
cptr = (orte_gpr_replica_container_t**)(orte_gpr_replica_globals.srch_cptr)->addr;
|
||||
for (j=0, k=0; k < orte_gpr_replica_globals.num_srch_cptr &&
|
||||
j < (orte_gpr_replica_globals.srch_cptr)->size; j++) {
|
||||
if (NULL != cptr[j]) {
|
||||
k++;
|
||||
for (i=0; i < num_keys; i++) { /* for each provided key */
|
||||
if (ORTE_SUCCESS == orte_gpr_replica_search_container(
|
||||
ORTE_GPR_REPLICA_OR,
|
||||
key_itags, 1, cptr[j])) {
|
||||
if (0 < orte_gpr_replica_globals.num_srch_ival) {
|
||||
/* found this key at least once - delete all
|
||||
* occurrences
|
||||
*/
|
||||
ivals = (orte_gpr_replica_itagval_t**)
|
||||
(orte_gpr_replica_globals.srch_ival)->addr;
|
||||
for (n=0, p=0; p < orte_gpr_replica_globals.num_srch_ival &&
|
||||
n < (orte_gpr_replica_globals.srch_ival)->size; n++) {
|
||||
if (NULL != ivals[n]) {
|
||||
p++;
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_delete_itagval(seg, cptr[j], ivals[n]))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
count = 0;
|
||||
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*)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++;
|
||||
opal_list_remove_item(&seg->registry_entries, ®->item);
|
||||
}
|
||||
reg = next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* update trigger counters */
|
||||
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;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
int orte_gpr_replica_delete_entries_nb_fn(
|
||||
@ -158,41 +129,70 @@ int orte_gpr_replica_delete_entries_nb_fn(
|
||||
|
||||
|
||||
int orte_gpr_replica_index_fn(orte_gpr_replica_segment_t *seg,
|
||||
size_t *cnt, char **index)
|
||||
size_t *cnt, char ***index)
|
||||
{
|
||||
#if 0
|
||||
opal_list_t *answer;
|
||||
orte_gpr_replica_keytable_t *ptr;
|
||||
ompi_registry_index_value_t *ans;
|
||||
char **ptr;
|
||||
orte_gpr_replica_segment_t **segs;
|
||||
orte_gpr_replica_dict_t **dict;
|
||||
size_t i, j;
|
||||
|
||||
if (orte_gpr_replica_debug) {
|
||||
opal_output(0, "[%lu,%lu,%lu] gpr replica: index entered segment: %s",
|
||||
ORTE_NAME_ARGS(*ompi_rte_get_self()), seg->name);
|
||||
}
|
||||
|
||||
answer = OBJ_NEW(opal_list_t);
|
||||
|
||||
/* set default responses */
|
||||
*index = NULL;
|
||||
*cnt = 0;
|
||||
|
||||
if (NULL == seg) { /* looking for index of global registry */
|
||||
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);
|
||||
opal_list_append(answer, &ans->item);
|
||||
}
|
||||
} else { /* want index of specific segment */
|
||||
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);
|
||||
opal_list_append(answer, &ans->item);
|
||||
}
|
||||
|
||||
*index = (char**)malloc(orte_gpr_replica.num_segs * sizeof(char*));
|
||||
if (NULL == *index) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
ptr = *index;
|
||||
segs = (orte_gpr_replica_segment_t**) (orte_gpr_replica.segments)->addr;
|
||||
for (i=0, j=0; j < orte_gpr_replica.num_segs &&
|
||||
i < (orte_gpr_replica.segments)->size; i++) {
|
||||
if (NULL != segs[i]) {
|
||||
ptr[j] = strdup(segs[i]->name);
|
||||
if (NULL == ptr[j]) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
*cnt = j;
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
*cnt = orte_gpr_replica.num_segs;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
return answer;
|
||||
#endif
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
|
||||
/* must have requested index of a specific segment */
|
||||
if (0 < seg->num_dict_entries) {
|
||||
*index = (char**)malloc(orte_gpr_replica.num_segs * sizeof(char*));
|
||||
if (NULL == *index) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
ptr = *index;
|
||||
dict = (orte_gpr_replica_dict_t**)(seg->dict)->addr;
|
||||
|
||||
for (i=0, j=0; j < seg->num_dict_entries &&
|
||||
i < (seg->dict)->size; i++) {
|
||||
if (NULL != dict[i]) {
|
||||
ptr[j] = strdup(dict[i]->entry);
|
||||
if (NULL == ptr[j]) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
*cnt = j;
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
*cnt = seg->num_dict_entries;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/* it's okay if there are no entries, so return success */
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ int orte_gpr_replica_delete_entries_nb_fn(
|
||||
orte_gpr_replica_itag_t *key_tags, size_t num_keys);
|
||||
|
||||
int orte_gpr_replica_index_fn(orte_gpr_replica_segment_t *seg,
|
||||
size_t *cnt, char **index);
|
||||
size_t *cnt, char ***index);
|
||||
|
||||
int orte_gpr_replica_index_nb_fn(orte_gpr_replica_segment_t *seg,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag);
|
||||
|
@ -123,6 +123,14 @@ int orte_gpr_replica_release_container(orte_gpr_replica_segment_t *seg,
|
||||
orte_pointer_array_set_item(seg->containers, i, NULL);
|
||||
(seg->num_containers)--;
|
||||
|
||||
/* if the segment is now empty of containers, release it too */
|
||||
if (0 == seg->num_containers) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_release_segment(&seg))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
@ -213,6 +221,14 @@ MOVEON:
|
||||
orte_pointer_array_set_item(cptr->itagvals, i, NULL);
|
||||
(cptr->num_itagvals)--;
|
||||
|
||||
/* if the container is now empty, remove it too */
|
||||
if (0 == cptr->num_itagvals) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_release_container(seg, cptr))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ typedef uint8_t orte_gpr_replica_addr_mode_t;
|
||||
#define ORTE_GPR_REPLICA_ENTRY_CHG_FRM (int8_t) 0x10
|
||||
|
||||
|
||||
typedef int8_t orte_gpr_replica_action_t;
|
||||
typedef uint8_t orte_gpr_replica_action_t;
|
||||
|
||||
/*
|
||||
* Local subscription tracker for use by processes
|
||||
@ -327,7 +327,7 @@ struct orte_gpr_replica_trigger_t {
|
||||
*/
|
||||
orte_gpr_replica_trigger_requestor_t *master;
|
||||
/* the action that causes the trigger to be fired */
|
||||
orte_gpr_notify_action_t action;
|
||||
orte_gpr_trigger_action_t action;
|
||||
/* flag that indicates this trigger is a one-shot, has fired and
|
||||
* now should be cleaned up
|
||||
*/
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user