1
1

Rename tsd interface function calls

Co-authored by: Artem Polykaov <artemp@mellanox.com>
Signed-off-by: Tomislav Janjusic <tomislavj@mellanox.com>
Этот коммит содержится в:
Tomislav Janjusic 2020-07-14 04:36:14 +03:00
родитель cb1955bb53
Коммит cba5a0e117
5 изменённых файлов: 12 добавлений и 12 удалений

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

@ -115,7 +115,7 @@ get_print_name_buffer(void)
fns_init = true;
}
ret = opal_tsd_getspecific(print_args_tsd_key, (void**)&ptr);
ret = opal_tsd_get(print_args_tsd_key, (void**)&ptr);
if (OPAL_SUCCESS != ret) return NULL;
if (NULL == ptr) {
@ -124,7 +124,7 @@ get_print_name_buffer(void)
ptr->buffers[i] = (char *) malloc((OPAL_PRINT_NAME_ARGS_MAX_SIZE+1) * sizeof(char));
}
ptr->cntr = 0;
ret = opal_tsd_setspecific(print_args_tsd_key, (void*)ptr);
ret = opal_tsd_set(print_args_tsd_key, (void*)ptr);
}
return (opal_print_args_buffers_t*) ptr;

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

@ -726,7 +726,7 @@ static _tlocal_table_t* _common_ucx_tls_init(opal_common_ucx_wpool_t *wpool)
return NULL;
}
opal_tsd_setspecific(wpool->tls_key, tls);
opal_tsd_set(wpool->tls_key, tls);
return tls;
}
@ -734,7 +734,7 @@ static _tlocal_table_t* _common_ucx_tls_init(opal_common_ucx_wpool_t *wpool)
static inline _tlocal_table_t *
_tlocal_get_tls(opal_common_ucx_wpool_t *wpool){
_tlocal_table_t *tls;
int rc = opal_tsd_getspecific(wpool->tls_key, (void**)&tls);
int rc = opal_tsd_get(wpool->tls_key, (void**)&tls);
if (OPAL_SUCCESS != rc) {
return NULL;
@ -795,7 +795,7 @@ static void _common_ucx_tls_cleanup(_tlocal_table_t *tls)
free(tls->ctx_tbl[i]);
}
opal_tsd_setspecific(tls->wpool->tls_key, NULL);
opal_tsd_set(tls->wpool->tls_key, NULL);
OBJ_RELEASE(tls);
return;
@ -1051,7 +1051,7 @@ static _tlocal_mem_t *_tlocal_add_mem(_tlocal_table_t *tls,
calloc(1, sizeof(*tls->mem_tbl[free_idx]->mem_tls_ptr));
tls->mem_tbl[free_idx]->mem_tls_ptr->winfo = ctx_rec->winfo;
tls->mem_tbl[free_idx]->mem_tls_ptr->rkeys = tls->mem_tbl[free_idx]->mem->rkeys;
opal_tsd_setspecific(mem->mem_tls_key, tls->mem_tbl[free_idx]->mem_tls_ptr);
opal_tsd_set(mem->mem_tls_key, tls->mem_tbl[free_idx]->mem_tls_ptr);
/* Make sure that we completed all the data structures before
* placing the item to the list

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

@ -201,7 +201,7 @@ opal_common_ucx_tlocal_fetch(opal_common_ucx_wpmem_t *mem, int target,
int rc = OPAL_SUCCESS;
/* First check the fast-path */
rc = opal_tsd_getspecific(mem->mem_tls_key, (void**)&fp);
rc = opal_tsd_get(mem->mem_tls_key, (void**)&fp);
if (OPAL_SUCCESS != rc) {
return rc;
}
@ -212,7 +212,7 @@ opal_common_ucx_tlocal_fetch(opal_common_ucx_wpmem_t *mem, int target,
if (OPAL_SUCCESS != rc) {
return rc;
}
rc = opal_tsd_getspecific(mem->mem_tls_key, (void**)&fp);
rc = opal_tsd_get(mem->mem_tls_key, (void**)&fp);
if (OPAL_SUCCESS != rc) {
return rc;
}

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

@ -307,7 +307,7 @@ opal_hwloc_print_buffers_t *opal_hwloc_get_print_buffer(void)
fns_init = true;
}
ret = opal_tsd_getspecific(print_tsd_key, (void**)&ptr);
ret = opal_tsd_get(print_tsd_key, (void**)&ptr);
if (OPAL_SUCCESS != ret) return NULL;
if (NULL == ptr) {
@ -316,7 +316,7 @@ opal_hwloc_print_buffers_t *opal_hwloc_get_print_buffer(void)
ptr->buffers[i] = (char *) malloc((OPAL_HWLOC_PRINT_MAX_SIZE+1) * sizeof(char));
}
ptr->cntr = 0;
ret = opal_tsd_setspecific(print_tsd_key, (void*)ptr);
ret = opal_tsd_set(print_tsd_key, (void*)ptr);
}
return (opal_hwloc_print_buffers_t*) ptr;

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

@ -121,12 +121,12 @@ get_hostname_buffer(void)
void *buffer;
int ret;
ret = opal_tsd_getspecific(hostname_tsd_key, &buffer);
ret = opal_tsd_get(hostname_tsd_key, &buffer);
if (OPAL_SUCCESS != ret) return NULL;
if (NULL == buffer) {
buffer = (void*) malloc((NI_MAXHOST + 1) * sizeof(char));
ret = opal_tsd_setspecific(hostname_tsd_key, buffer);
ret = opal_tsd_set(hostname_tsd_key, buffer);
}
return (char*) buffer;