Skip to content

Commit

Permalink
Merge pull request #5637 from hoopoepg/topic/shm-posix-cb-init-code-b…
Browse files Browse the repository at this point in the history
…eautify

SHM/POSIX: code beautify
  • Loading branch information
yosefe authored Sep 1, 2020
2 parents 571381c + 8a3d10a commit 9050b1a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions src/ucs/sys/stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ int64_t ucs_empty_function_return_zero_int64()
return 0;
}

int ucs_empty_function_return_zero_int()
{
return 0;
}

unsigned ucs_empty_function_return_one()
{
return 1;
Expand Down
1 change: 1 addition & 0 deletions src/ucs/sys/stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ void ucs_empty_function();
unsigned ucs_empty_function_return_zero();
unsigned ucs_empty_function_return_one();
int64_t ucs_empty_function_return_zero_int64();
int ucs_empty_function_return_zero_int();
ucs_status_t ucs_empty_function_return_success();
ucs_status_t ucs_empty_function_return_unsupported();
ucs_status_t ucs_empty_function_return_inprogress();
Expand Down
13 changes: 6 additions & 7 deletions src/uct/sm/mm/posix/mm_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,15 +655,14 @@ static uct_mm_md_mapper_ops_t uct_posix_md_ops = {
.query = uct_posix_md_query,
.mem_alloc = uct_posix_mem_alloc,
.mem_free = uct_posix_mem_free,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = (uct_md_mem_reg_func_t)ucs_empty_function_return_unsupported,
.mem_dereg = (uct_md_mem_dereg_func_t)ucs_empty_function_return_unsupported,
.mem_advise = ucs_empty_function_return_unsupported,
.mem_reg = ucs_empty_function_return_unsupported,
.mem_dereg = ucs_empty_function_return_unsupported,
.mkey_pack = uct_posix_md_mkey_pack,
.is_sockaddr_accessible = (uct_md_is_sockaddr_accessible_func_t)ucs_empty_function_return_zero,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported
.is_sockaddr_accessible = ucs_empty_function_return_zero_int,
.detect_memory_type = ucs_empty_function_return_unsupported
},
.query = (uct_mm_mapper_query_func_t)
ucs_empty_function_return_success,
.query = ucs_empty_function_return_success,
.iface_addr_length = uct_posix_iface_addr_length,
.iface_addr_pack = uct_posix_iface_addr_pack,
.mem_attach = uct_posix_mem_attach,
Expand Down

0 comments on commit 9050b1a

Please sign in to comment.