diff --git a/contrib/check_inst_headers.sh b/contrib/check_inst_headers.sh index 8d761755d24..89f3feb9251 100755 --- a/contrib/check_inst_headers.sh +++ b/contrib/check_inst_headers.sh @@ -28,7 +28,7 @@ do fi # try to compile a test program (from stdin) which includes hfile - for compile in "${CC} -x c" "${CXX} -x c++" + for compile in "${CC} -Werror=strict-prototypes -x c" "${CXX} -x c++" do ${compile} -I. -c - -o /dev/null -DHAVE_CONFIG_H=1 <uct_flags); /* Invalidate the mismatching region and get a new one */ - ucs_rcache_region_invalidate(context->rcache, &memh->super, - ucs_empty_function, NULL); + ucs_rcache_region_invalidate( + context->rcache, &memh->super, + (ucs_rcache_invalidate_comp_func_t)ucs_empty_function, NULL); ucp_memh_put(memh); } } @@ -1974,8 +1975,10 @@ ucp_memh_import(ucp_context_h context, const void *export_mkey_buffer, "This may indicate that exported memory handle was " "destroyed, but imported memory handle was not", rregion->refcount); - ucs_rcache_region_invalidate(rcache, rregion, - ucs_empty_function, NULL); + ucs_rcache_region_invalidate( + rcache, rregion, + (ucs_rcache_invalidate_comp_func_t)ucs_empty_function, + NULL); ucs_rcache_region_put_unsafe(rcache, rregion); } } diff --git a/src/ucp/core/ucp_worker.c b/src/ucp/core/ucp_worker.c index 28e874d68ae..bf16568be17 100644 --- a/src/ucp/core/ucp_worker.c +++ b/src/ucp/core/ucp_worker.c @@ -109,8 +109,8 @@ static void ucp_am_mpool_obj_str(ucs_mpool_t *mp, void *obj, ucs_mpool_ops_t ucp_am_mpool_ops = { .chunk_alloc = ucs_mpool_hugetlb_malloc, .chunk_release = ucs_mpool_hugetlb_free, - .obj_init = ucs_empty_function, - .obj_cleanup = ucs_empty_function, + .obj_init = (ucs_mpool_obj_init_func_t)ucs_empty_function, + .obj_cleanup = (ucs_mpool_obj_cleanup_func_t)ucs_empty_function, .obj_str = ucp_am_mpool_obj_str }; @@ -118,7 +118,7 @@ ucs_mpool_ops_t ucp_reg_mpool_ops = { .chunk_alloc = ucp_reg_mpool_malloc, .chunk_release = ucp_reg_mpool_free, .obj_init = ucp_mpool_obj_init, - .obj_cleanup = ucs_empty_function, + .obj_cleanup = (ucs_mpool_obj_cleanup_func_t)ucs_empty_function, .obj_str = NULL }; diff --git a/src/ucp/rndv/rndv.c b/src/ucp/rndv/rndv.c index ea510e20b22..3e8dc66dcdb 100644 --- a/src/ucp/rndv/rndv.c +++ b/src/ucp/rndv/rndv.c @@ -1129,7 +1129,7 @@ ucs_mpool_ops_t ucp_frag_mpool_ops = { .chunk_alloc = ucp_frag_mpool_malloc, .chunk_release = ucp_frag_mpool_free, .obj_init = ucp_frag_mpool_obj_init, - .obj_cleanup = ucs_empty_function + .obj_cleanup = (ucs_mpool_obj_cleanup_func_t)ucs_empty_function }; ucp_mem_desc_t * diff --git a/src/ucs/async/async.c b/src/ucs/async/async.c index 8e019ffc718..b8d1a876f73 100644 --- a/src/ucs/async/async.c +++ b/src/ucs/async/async.c @@ -78,14 +78,14 @@ static ucs_async_ops_t ucs_async_poll_ops = { .block = ucs_empty_function, .unblock = ucs_empty_function, .context_init = ucs_async_poll_init, - .context_cleanup = ucs_empty_function, + .context_cleanup = (ucs_async_context_cleanup_t)ucs_empty_function, .context_try_block = ucs_async_poll_tryblock, - .context_unblock = ucs_empty_function, + .context_unblock = (ucs_async_context_unblock_t)ucs_empty_function, .add_event_fd = (ucs_async_add_event_fd_t)ucs_empty_function_return_success, - .remove_event_fd = ucs_empty_function_return_success, + .remove_event_fd = (ucs_async_remove_event_fd_t)ucs_empty_function_return_success, .modify_event_fd = (ucs_async_modify_event_fd_t)ucs_empty_function_return_success, - .add_timer = ucs_empty_function_return_success, - .remove_timer = ucs_empty_function_return_success, + .add_timer = (ucs_async_add_timer_t)ucs_empty_function_return_success, + .remove_timer = (ucs_async_remove_timer_t)ucs_empty_function_return_success, }; static inline khiter_t ucs_async_handler_kh_get(int id) diff --git a/src/ucs/async/signal.c b/src/ucs/async/signal.c index 712bad097ab..187056860e1 100644 --- a/src/ucs/async/signal.c +++ b/src/ucs/async/signal.c @@ -624,7 +624,7 @@ ucs_async_ops_t ucs_async_signal_ops = { .block = ucs_async_signal_block_all, .unblock = ucs_async_signal_unblock_all, .context_init = ucs_async_signal_init, - .context_cleanup = ucs_async_signal_cleanup, + .context_cleanup = (ucs_async_context_cleanup_t)ucs_async_signal_cleanup, .context_try_block = ucs_async_signal_try_block, .context_unblock = ucs_async_signal_unblock, .add_event_fd = ucs_async_signal_add_event_fd, diff --git a/src/ucs/config/global_opts.h b/src/ucs/config/global_opts.h index 208c85a42c4..f1d4540e8a6 100644 --- a/src/ucs/config/global_opts.h +++ b/src/ucs/config/global_opts.h @@ -169,15 +169,15 @@ typedef struct { extern ucs_global_opts_t ucs_global_opts; -void ucs_global_opts_init(); -void ucs_global_opts_cleanup(); +void ucs_global_opts_init(void); +void ucs_global_opts_cleanup(void); ucs_status_t ucs_global_opts_set_value(const char *name, const char *value); ucs_status_t ucs_global_opts_set_value_modifiable(const char *name, const char *value); ucs_status_t ucs_global_opts_get_value(const char *name, char *value, size_t max); ucs_status_t ucs_global_opts_clone(void *dst); -void ucs_global_opts_release(); +void ucs_global_opts_release(void); void ucs_global_opts_print(FILE *stream, ucs_config_print_flags_t print_flags); END_C_DECLS diff --git a/src/ucs/config/parser.h b/src/ucs/config/parser.h index f6803ffcdbd..9fd6a0ab8df 100644 --- a/src/ucs/config/parser.h +++ b/src/ucs/config/parser.h @@ -504,7 +504,7 @@ void ucs_config_parse_config_file(const char *dir_path, const char *file_name, * Parse configuration files. This function searches for config in several * locations and parses them in order of precedence. */ -void ucs_config_parse_config_files(); +void ucs_config_parse_config_files(void); /** @@ -632,7 +632,7 @@ void ucs_config_parser_get_env_vars(ucs_string_buffer_t *env_strb, /** * Global cleanup of the configuration parser. */ -void ucs_config_parser_cleanup(); +void ucs_config_parser_cleanup(void); END_C_DECLS diff --git a/src/ucs/datastruct/mpool.h b/src/ucs/datastruct/mpool.h index a2120c9217e..aacc499001d 100644 --- a/src/ucs/datastruct/mpool.h +++ b/src/ucs/datastruct/mpool.h @@ -89,60 +89,96 @@ struct ucs_mpool_data { }; +/** + * Allocate a chunk of memory to be used by the mpool. + * + * @param mp Memory pool structure. + * @param size_p Points to minimal size to allocate. The function may + * modify it to the actual allocated size. which must be + * larger or equal. + * @param chunk_p Filled with a pointer to the allocated chunk. + * + * @return Error status. + */ +typedef ucs_status_t (*ucs_mpool_chunk_alloc_func_t)(ucs_mpool_t *mp, + size_t *size_p, + void **chunk_p); + + +/** + * Release previously allocated chunk of memory. + * + * @param mp Memory pool structure. + * @param chunk Chunk to release. + */ +typedef void (*ucs_mpool_chunk_release_func_t)(ucs_mpool_t *mp, void *chunk); + + +/** + * Initialize an object in the memory pool on the first time it's allocated. + * May be NULL. + * + * @param mp Memory pool structure. + * @param obj Object to initialize. + * @param chunk The chunk on which the object was allocated, as returned + * from chunk_alloc(). + */ +typedef void (*ucs_mpool_obj_init_func_t)(ucs_mpool_t *mp, void *obj, void *chunk); + + +/** + * Cleanup an object in the memory pool just before its memory is released. + * May be NULL. + * + * @param mp Memory pool structure. + * @param obj Object to initialize. + */ +typedef void (*ucs_mpool_obj_cleanup_func_t)(ucs_mpool_t *mp, void *obj); + + +/** + * Return a string representing the object, used for debug. + * May be NULL. + * + * @param mp Memory pool structure. + * @param obj Object to show. + * @param strb String buffer to fill with object information. + */ +typedef void (*ucs_mpool_obj_str_func_t)(ucs_mpool_t *mp, void *obj, + ucs_string_buffer_t *strb); + + /** * Defines callbacks for memory pool operations. */ struct ucs_mpool_ops { /** * Allocate a chunk of memory to be used by the mpool. - * - * @param mp Memory pool structure. - * @param size_p Points to minimal size to allocate. The function may - * modify it to the actual allocated size. which must be - * larger or equal. - * @param chunk_p Filled with a pointer to the allocated chunk. - * - * @return Error status. */ - ucs_status_t (*chunk_alloc)(ucs_mpool_t *mp, size_t *size_p, void **chunk_p); + ucs_mpool_chunk_alloc_func_t chunk_alloc; /** * Release previously allocated chunk of memory. - * - * @param mp Memory pool structure. - * @param chunk Chunk to release. */ - void (*chunk_release)(ucs_mpool_t *mp, void *chunk); + ucs_mpool_chunk_release_func_t chunk_release; /** * Initialize an object in the memory pool on the first time it's allocated. * May be NULL. - * - * @param mp Memory pool structure. - * @param obj Object to initialize. - * @param chunk The chunk on which the object was allocated, as returned - * from chunk_alloc(). */ - void (*obj_init)(ucs_mpool_t *mp, void *obj, void *chunk); + ucs_mpool_obj_init_func_t obj_init; /** * Cleanup an object in the memory pool just before its memory is released. * May be NULL. - * - * @param mp Memory pool structure. - * @param obj Object to initialize. */ - void (*obj_cleanup)(ucs_mpool_t *mp, void *obj); + ucs_mpool_obj_cleanup_func_t obj_cleanup; /** * Return a string representing the object, used for debug. * May be NULL. - * - * @param mp Memory pool structure. - * @param obj Object to show. - * @param strb String buffer to fill with object information. */ - void (*obj_str)(ucs_mpool_t *mp, void *obj, ucs_string_buffer_t *strb); + ucs_mpool_obj_str_func_t obj_str; }; diff --git a/src/ucs/debug/log_def.h b/src/ucs/debug/log_def.h index 69faaef7712..05718b7f66c 100644 --- a/src/ucs/debug/log_def.h +++ b/src/ucs/debug/log_def.h @@ -132,13 +132,13 @@ void ucs_log_dispatch(const char *file, unsigned line, const char *function, /** * Flush logging output. */ -void ucs_log_flush(); +void ucs_log_flush(void); /** * @return Configured log buffer size */ -size_t ucs_log_get_buffer_size(); +size_t ucs_log_get_buffer_size(void); /** @@ -169,10 +169,10 @@ void ucs_log_fatal_error(const char *format, ...) UCS_F_PRINTF(1, 2); /** * Initialize/cleanup logging subsystem. */ -void ucs_log_early_init(); -void ucs_log_init(); -void ucs_component_log_init(); -void ucs_log_cleanup(); +void ucs_log_early_init(void); +void ucs_log_init(void); +void ucs_component_log_init(void); +void ucs_log_cleanup(void); const char *ucs_log_bitmap_to_str(unsigned n, uint8_t *bitmap, size_t length); @@ -181,8 +181,8 @@ const char *ucs_log_bitmap_to_str(unsigned n, uint8_t *bitmap, size_t length); * Add/remove logging handlers */ void ucs_log_push_handler(ucs_log_func_t handler); -void ucs_log_pop_handler(); -unsigned ucs_log_num_handlers(); +void ucs_log_pop_handler(void); +unsigned ucs_log_num_handlers(void); /** @@ -198,7 +198,7 @@ void ucs_log_indent(int delta); /** * @return Current log indent level. */ -int ucs_log_get_current_indent(); +int ucs_log_get_current_indent(void); /** diff --git a/src/ucs/memory/memtype_cache.h b/src/ucs/memory/memtype_cache.h index d9c69acdadc..bf570d08190 100644 --- a/src/ucs/memory/memtype_cache.h +++ b/src/ucs/memory/memtype_cache.h @@ -43,8 +43,8 @@ struct ucs_memtype_cache { }; -void ucs_memtype_cache_global_init(); -void ucs_memtype_cache_cleanup(); +void ucs_memtype_cache_global_init(void); +void ucs_memtype_cache_cleanup(void); /** @@ -96,7 +96,7 @@ void ucs_memtype_cache_remove(const void *address, size_t size); * * @return 1 if empty 0 if otherwise. */ -static UCS_F_ALWAYS_INLINE int ucs_memtype_cache_is_empty() +static UCS_F_ALWAYS_INLINE int ucs_memtype_cache_is_empty(void) { return (ucs_memtype_cache_global_instance != NULL) && (ucs_memtype_cache_global_instance->pgtable.num_regions == 0); diff --git a/src/ucs/memory/numa.h b/src/ucs/memory/numa.h index c446a08b175..e311043fda1 100644 --- a/src/ucs/memory/numa.h +++ b/src/ucs/memory/numa.h @@ -24,22 +24,22 @@ typedef int16_t ucs_numa_node_t; extern const char *ucs_numa_policy_names[]; -void ucs_numa_init(); +void ucs_numa_init(void); -void ucs_numa_cleanup(); +void ucs_numa_cleanup(void); /** * @return The number of CPU cores in the system. */ -unsigned ucs_numa_num_configured_cpus(); +unsigned ucs_numa_num_configured_cpus(void); /** * @return The number of memory nodes in the system. */ -unsigned ucs_numa_num_configured_nodes(); +unsigned ucs_numa_num_configured_nodes(void); /** diff --git a/src/ucs/sys/math.h b/src/ucs/sys/math.h index 269667a35a1..ed48b8d3801 100644 --- a/src/ucs/sys/math.h +++ b/src/ucs/sys/math.h @@ -153,13 +153,13 @@ uint64_t ucs_get_prime(unsigned index); /* * Generate a random seed */ -void ucs_rand_seed_init(); +void ucs_rand_seed_init(void); /* * Generate a random number in the range 0..RAND_MAX */ -int ucs_rand(); +int ucs_rand(void); /* diff --git a/src/ucs/sys/sock.h b/src/ucs/sys/sock.h index df9006b9497..846e1446149 100644 --- a/src/ucs/sys/sock.h +++ b/src/ucs/sys/sock.h @@ -254,7 +254,7 @@ ucs_status_t ucs_socket_server_init(const struct sockaddr *saddr, socklen_t sock * @return The queue length for completely established sockets * waiting to be accepted. */ -int ucs_socket_max_conn(); +int ucs_socket_max_conn(void); /** diff --git a/src/ucs/sys/stubs.h b/src/ucs/sys/stubs.h index 37e042f762a..83dda9ee54d 100644 --- a/src/ucs/sys/stubs.h +++ b/src/ucs/sys/stubs.h @@ -20,25 +20,25 @@ BEGIN_C_DECLS /** * Empty function which can be casted to a no-operation callback in various situations. */ -void ucs_empty_function(); -unsigned ucs_empty_function_return_zero(); -unsigned ucs_empty_function_return_one(); -int ucs_empty_function_return_one_int(); -int64_t ucs_empty_function_return_zero_int64(); -int ucs_empty_function_return_zero_int(); -size_t ucs_empty_function_return_zero_size_t(); -ucs_status_t ucs_empty_function_return_success(); -ucs_status_t ucs_empty_function_return_unsupported(); -ucs_status_ptr_t ucs_empty_function_return_ptr_unsupported(); -ucs_status_t ucs_empty_function_return_inprogress(); -ucs_status_t ucs_empty_function_return_no_resource(); -ucs_status_t ucs_empty_function_return_invalid_param(); -ucs_status_ptr_t ucs_empty_function_return_ptr_no_resource(); -ucs_status_t ucs_empty_function_return_ep_timeout(); -ssize_t ucs_empty_function_return_bc_ep_timeout(); -ucs_status_t ucs_empty_function_return_busy(); -int ucs_empty_function_do_assert(); -void ucs_empty_function_do_assert_void(); +void ucs_empty_function(void); +unsigned ucs_empty_function_return_zero(void); +unsigned ucs_empty_function_return_one(void); +int ucs_empty_function_return_one_int(void); +int64_t ucs_empty_function_return_zero_int64(void); +int ucs_empty_function_return_zero_int(void); +size_t ucs_empty_function_return_zero_size_t(void); +ucs_status_t ucs_empty_function_return_success(void); +ucs_status_t ucs_empty_function_return_unsupported(void); +ucs_status_ptr_t ucs_empty_function_return_ptr_unsupported(void); +ucs_status_t ucs_empty_function_return_inprogress(void); +ucs_status_t ucs_empty_function_return_no_resource(void); +ucs_status_t ucs_empty_function_return_invalid_param(void); +ucs_status_ptr_t ucs_empty_function_return_ptr_no_resource(void); +ucs_status_t ucs_empty_function_return_ep_timeout(void); +ssize_t ucs_empty_function_return_bc_ep_timeout(void); +ucs_status_t ucs_empty_function_return_busy(void); +int ucs_empty_function_do_assert(void); +void ucs_empty_function_do_assert_void(void); END_C_DECLS diff --git a/src/ucs/sys/topo/base/topo.h b/src/ucs/sys/topo/base/topo.h index c2504d4cd67..d30e0ec6d98 100644 --- a/src/ucs/sys/topo/base/topo.h +++ b/src/ucs/sys/topo/base/topo.h @@ -245,7 +245,7 @@ ucs_numa_node_t ucs_topo_sys_device_get_numa_node(ucs_sys_device_t sys_dev); * * @return Number of system devices. */ -unsigned ucs_topo_num_devices(); +unsigned ucs_topo_num_devices(void); /** @@ -258,13 +258,13 @@ void ucs_topo_print_info(FILE *stream); /** * Initialize UCS topology subsystem. */ -void ucs_topo_init(); +void ucs_topo_init(void); /** * Cleanup UCS topology subsystem. */ -void ucs_topo_cleanup(); +void ucs_topo_cleanup(void); END_C_DECLS diff --git a/src/ucs/sys/uid.h b/src/ucs/sys/uid.h index 0da4dec97d5..74becb1393e 100644 --- a/src/ucs/sys/uid.h +++ b/src/ucs/sys/uid.h @@ -21,7 +21,7 @@ BEGIN_C_DECLS * * @return 64-bit value representing system ID. */ -uint64_t ucs_get_system_id(); +uint64_t ucs_get_system_id(void); END_C_DECLS diff --git a/src/ucs/vfs/fuse/vfs_fuse.c b/src/ucs/vfs/fuse/vfs_fuse.c index f983be95efa..d5626014685 100644 --- a/src/ucs/vfs/fuse/vfs_fuse.c +++ b/src/ucs/vfs/fuse/vfs_fuse.c @@ -496,7 +496,7 @@ static void ucs_fuse_thread_stop() sighandler_t orig_handler; int ret; - orig_handler = signal(SIGUSR1, ucs_empty_function); + orig_handler = signal(SIGUSR1, (sighandler_t)ucs_empty_function); pthread_mutex_lock(&ucs_vfs_fuse_context.mutex); diff --git a/src/uct/cuda/cuda_copy/cuda_copy_iface.c b/src/uct/cuda/cuda_copy/cuda_copy_iface.c index 49b45df9bf1..7c308975795 100644 --- a/src/uct/cuda/cuda_copy/cuda_copy_iface.c +++ b/src/uct/cuda/cuda_copy/cuda_copy_iface.c @@ -333,8 +333,8 @@ static uct_iface_ops_t uct_cuda_copy_iface_ops = { .ep_put_short = uct_cuda_copy_ep_put_short, .ep_get_zcopy = uct_cuda_copy_ep_get_zcopy, .ep_put_zcopy = uct_cuda_copy_ep_put_zcopy, - .ep_pending_add = ucs_empty_function_return_busy, - .ep_pending_purge = ucs_empty_function, + .ep_pending_add = (uct_ep_pending_add_func_t)ucs_empty_function_return_busy, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_flush = uct_cuda_copy_ep_flush, .ep_fence = uct_base_ep_fence, .ep_create = UCS_CLASS_NEW_FUNC_NAME(uct_cuda_copy_ep_t), @@ -464,7 +464,7 @@ static uct_iface_internal_ops_t uct_cuda_copy_iface_internal_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = (uct_ep_query_func_t)ucs_empty_function_return_unsupported, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_cuda_copy_iface_is_reachable_v2, .ep_is_connected = uct_base_ep_is_connected }; diff --git a/src/uct/cuda/cuda_copy/cuda_copy_md.c b/src/uct/cuda/cuda_copy/cuda_copy_md.c index ba873106a9e..df46630726a 100644 --- a/src/uct/cuda/cuda_copy/cuda_copy_md.c +++ b/src/uct/cuda/cuda_copy/cuda_copy_md.c @@ -856,7 +856,7 @@ static uct_md_ops_t md_ops = { .mkey_pack = uct_cuda_copy_mkey_pack, .mem_reg = uct_cuda_copy_mem_reg, .mem_dereg = uct_cuda_copy_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mem_query = uct_cuda_copy_md_mem_query, .detect_memory_type = uct_cuda_copy_md_detect_memory_type }; @@ -922,9 +922,9 @@ uct_cuda_copy_md_open(uct_component_t *component, const char *md_name, uct_component_t uct_cuda_copy_component = { .query_md_resources = uct_cuda_base_query_md_resources, .md_open = uct_cuda_copy_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_cuda_copy_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, .rkey_release = uct_cuda_copy_rkey_release, .rkey_compare = uct_base_rkey_compare, .name = "cuda_cpy", diff --git a/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c b/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c index 4e67c777138..b6ab3e3a83a 100644 --- a/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c +++ b/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c @@ -429,11 +429,11 @@ static ucs_status_t uct_cuda_ipc_iface_event_fd_arm(uct_iface_h tl_iface, static uct_iface_ops_t uct_cuda_ipc_iface_ops = { .ep_get_zcopy = uct_cuda_ipc_ep_get_zcopy, .ep_put_zcopy = uct_cuda_ipc_ep_put_zcopy, - .ep_pending_add = ucs_empty_function_return_busy, - .ep_pending_purge = ucs_empty_function, + .ep_pending_add = (uct_ep_pending_add_func_t)ucs_empty_function_return_busy, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_flush = uct_base_ep_flush, .ep_fence = uct_base_ep_fence, - .ep_check = ucs_empty_function_return_unsupported, + .ep_check = (uct_ep_check_func_t)ucs_empty_function_return_unsupported, .ep_create = UCS_CLASS_NEW_FUNC_NAME(uct_cuda_ipc_ep_t), .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_cuda_ipc_ep_t), .iface_flush = uct_cuda_ipc_iface_flush, @@ -558,7 +558,7 @@ static uct_iface_internal_ops_t uct_cuda_ipc_iface_internal_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = (uct_ep_query_func_t)ucs_empty_function_return_unsupported, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_cuda_ipc_iface_is_reachable_v2, .ep_is_connected = uct_cuda_ipc_ep_is_connected }; diff --git a/src/uct/cuda/cuda_ipc/cuda_ipc_md.c b/src/uct/cuda/cuda_ipc/cuda_ipc_md.c index fd1f588657e..86a42f15237 100644 --- a/src/uct/cuda/cuda_ipc/cuda_ipc_md.c +++ b/src/uct/cuda/cuda_ipc/cuda_ipc_md.c @@ -487,8 +487,8 @@ uct_cuda_ipc_md_open(uct_component_t *component, const char *md_name, .mkey_pack = uct_cuda_ipc_mkey_pack, .mem_reg = uct_cuda_ipc_mem_reg, .mem_dereg = uct_cuda_ipc_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, - .detect_memory_type = ucs_empty_function_return_unsupported + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported }; uct_cuda_ipc_md_config_t *ipc_config = ucs_derived_of(config, uct_cuda_ipc_md_config_t); @@ -512,9 +512,9 @@ uct_cuda_ipc_component_t uct_cuda_ipc_component = { .super = { .query_md_resources = uct_cuda_base_query_md_resources, .md_open = uct_cuda_ipc_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_cuda_ipc_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, .rkey_release = uct_cuda_ipc_rkey_release, .rkey_compare = uct_base_rkey_compare, .name = "cuda_ipc", diff --git a/src/uct/cuda/gdr_copy/gdr_copy_iface.c b/src/uct/cuda/gdr_copy/gdr_copy_iface.c index b6634080a5b..b15b213b4b2 100644 --- a/src/uct/cuda/gdr_copy/gdr_copy_iface.c +++ b/src/uct/cuda/gdr_copy/gdr_copy_iface.c @@ -188,17 +188,17 @@ uct_gdr_copy_estimate_perf(uct_iface_h tl_iface, uct_perf_attr_t *perf_attr) static uct_iface_ops_t uct_gdr_copy_iface_ops = { .ep_put_short = uct_gdr_copy_ep_put_short, .ep_get_short = uct_gdr_copy_ep_get_short, - .ep_pending_add = ucs_empty_function_return_busy, - .ep_pending_purge = ucs_empty_function, + .ep_pending_add = (uct_ep_pending_add_func_t)ucs_empty_function_return_busy, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_flush = uct_base_ep_flush, .ep_fence = uct_base_ep_fence, .ep_create = UCS_CLASS_NEW_FUNC_NAME(uct_gdr_copy_ep_t), .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_gdr_copy_ep_t), .iface_flush = uct_base_iface_flush, .iface_fence = uct_base_iface_fence, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, - .iface_progress = ucs_empty_function_return_zero, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, + .iface_progress = (uct_iface_progress_func_t)ucs_empty_function_return_zero, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_gdr_copy_iface_t), .iface_query = uct_gdr_copy_iface_query, .iface_get_device_address = (uct_iface_get_device_address_func_t)ucs_empty_function_return_success, @@ -211,7 +211,7 @@ static uct_iface_internal_ops_t uct_gdr_copy_iface_internal_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = (uct_ep_query_func_t)ucs_empty_function_return_unsupported, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_gdr_copy_iface_is_reachable_v2, .ep_is_connected = uct_base_ep_is_connected }; diff --git a/src/uct/cuda/gdr_copy/gdr_copy_md.c b/src/uct/cuda/gdr_copy/gdr_copy_md.c index f613dc4d4df..38cb582dbaa 100644 --- a/src/uct/cuda/gdr_copy/gdr_copy_md.c +++ b/src/uct/cuda/gdr_copy/gdr_copy_md.c @@ -319,8 +319,8 @@ static uct_md_ops_t uct_gdr_copy_md_ops = { .mkey_pack = uct_gdr_copy_mkey_pack, .mem_reg = uct_gdr_copy_mem_reg, .mem_dereg = uct_gdr_copy_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, - .detect_memory_type = ucs_empty_function_return_unsupported + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported }; /** @@ -375,7 +375,7 @@ static uct_md_ops_t uct_gdr_copy_md_rcache_ops = { .mkey_pack = uct_gdr_copy_mkey_pack, .mem_reg = uct_gdr_copy_mem_rcache_reg, .mem_dereg = uct_gdr_copy_mem_rcache_dereg, - .detect_memory_type = ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported, }; static ucs_status_t @@ -533,9 +533,9 @@ uct_gdr_copy_md_open(uct_component_t *component, const char *md_name, uct_component_t uct_gdr_copy_component = { .query_md_resources = uct_gdr_copy_query_md_resources, .md_open = uct_gdr_copy_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_gdr_copy_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, .rkey_release = uct_gdr_copy_rkey_release, .rkey_compare = uct_base_rkey_compare, .name = "gdr_copy", diff --git a/src/uct/ib/base/ib_md.c b/src/uct/ib/base/ib_md.c index af601449e0a..0e766cf37ab 100644 --- a/src/uct/ib/base/ib_md.c +++ b/src/uct/ib/base/ib_md.c @@ -1116,8 +1116,9 @@ uct_ib_query_md_resources(uct_component_t *component, uct_md_resource_desc_t **resources_p, unsigned *num_resources_p) { - return uct_ib_base_query_md_resources(resources_p, num_resources_p, - ucs_empty_function_return_one_int); + return uct_ib_base_query_md_resources( + resources_p, num_resources_p, + (uct_ib_check_device_cb_t)ucs_empty_function_return_one_int); } static ucs_status_t @@ -1565,10 +1566,10 @@ static uct_ib_md_ops_t uct_ib_verbs_md_ops = { .query = uct_ib_md_query, .mem_reg = uct_ib_verbs_mem_reg, .mem_dereg = uct_ib_verbs_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mem_advise = uct_ib_mem_advise, .mkey_pack = uct_ib_verbs_mkey_pack, - .detect_memory_type = ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported, }, .open = uct_ib_verbs_md_open, }; @@ -1578,10 +1579,10 @@ static UCT_IB_MD_DEFINE_ENTRY(verbs, uct_ib_verbs_md_ops); uct_component_t uct_ib_component = { .query_md_resources = uct_ib_query_md_resources, .md_open = uct_ib_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_ib_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, - .rkey_release = ucs_empty_function_return_success, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, + .rkey_release = (uct_component_rkey_release_func_t)ucs_empty_function_return_success, .rkey_compare = uct_base_rkey_compare, .name = "ib", .md_config = { diff --git a/src/uct/ib/efa/base/ib_efa_md.c b/src/uct/ib/efa/base/ib_efa_md.c index b3bdfe990dd..2df5945575b 100644 --- a/src/uct/ib/efa/base/ib_efa_md.c +++ b/src/uct/ib/efa/base/ib_efa_md.c @@ -94,10 +94,10 @@ static uct_ib_md_ops_t uct_ib_efa_md_ops = { .query = uct_ib_md_query, .mem_reg = uct_ib_verbs_mem_reg, .mem_dereg = uct_ib_verbs_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, + .mem_attach =(uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mem_advise = uct_ib_mem_advise, .mkey_pack = uct_ib_verbs_mkey_pack, - .detect_memory_type = ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported, }, .open = uct_ib_efa_md_open, }; diff --git a/src/uct/ib/efa/srd/srd_iface.c b/src/uct/ib/efa/srd/srd_iface.c index 97f7c780dac..3295a4bfcbe 100644 --- a/src/uct/ib/efa/srd/srd_iface.c +++ b/src/uct/ib/efa/srd/srd_iface.c @@ -30,10 +30,12 @@ uct_srd_iface_get_address(uct_iface_h tl_iface, uct_iface_addr_t *iface_addr) static uct_ib_iface_ops_t uct_srd_iface_ops = { .super = { .iface_estimate_perf = uct_base_iface_estimate_perf, - .iface_vfs_refresh = ucs_empty_function, + .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t) + ucs_empty_function, .ep_query = (uct_ep_query_func_t) ucs_empty_function_return_unsupported, - .ep_invalidate = ucs_empty_function_return_unsupported, + .ep_invalidate = (uct_ep_invalidate_func_t) + ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_ib_iface_is_reachable_v2, }, .create_cq = uct_ib_verbs_create_cq, @@ -329,27 +331,36 @@ uct_srd_query_tl_devices(uct_md_h md, uct_tl_device_resource_t **tl_devices_p, } static uct_iface_ops_t uct_srd_iface_tl_ops = { - .ep_flush = ucs_empty_function_return_unsupported, - .ep_fence = ucs_empty_function_return_unsupported, - .ep_create = ucs_empty_function_return_unsupported, - .ep_get_address = ucs_empty_function_return_unsupported, - .ep_connect_to_ep = ucs_empty_function_return_unsupported, + .ep_flush = (uct_ep_flush_func_t) + ucs_empty_function_return_unsupported, + .ep_fence = (uct_ep_fence_func_t) + ucs_empty_function_return_unsupported, + .ep_create = (uct_ep_create_func_t) + ucs_empty_function_return_unsupported, + .ep_get_address = (uct_ep_get_address_func_t) + ucs_empty_function_return_unsupported, + .ep_connect_to_ep = (uct_ep_connect_to_ep_func_t) + ucs_empty_function_return_unsupported, .ep_destroy = (uct_ep_destroy_func_t) ucs_empty_function_return_unsupported, .ep_am_bcopy = (uct_ep_am_bcopy_func_t) ucs_empty_function_return_unsupported, .ep_am_zcopy = (uct_ep_am_zcopy_func_t) ucs_empty_function_return_unsupported, - .ep_get_zcopy = ucs_empty_function_return_unsupported, + .ep_get_zcopy = (uct_ep_get_zcopy_func_t) + ucs_empty_function_return_unsupported, .ep_am_short = (uct_ep_am_short_func_t) ucs_empty_function_return_unsupported, .ep_am_short_iov = (uct_ep_am_short_iov_func_t) ucs_empty_function_return_unsupported, - .ep_pending_add = ucs_empty_function_return_unsupported, + .ep_pending_add = (uct_ep_pending_add_func_t) + ucs_empty_function_return_unsupported, .ep_pending_purge = (uct_ep_pending_purge_func_t) ucs_empty_function_return_unsupported, - .iface_flush = ucs_empty_function_return_unsupported, - .iface_fence = ucs_empty_function_return_unsupported, + .iface_flush = (uct_iface_flush_func_t) + ucs_empty_function_return_unsupported, + .iface_fence = (uct_iface_fence_func_t) + ucs_empty_function_return_unsupported, .iface_progress_enable = (uct_iface_progress_enable_func_t) ucs_empty_function_return_unsupported, .iface_progress_disable = (uct_iface_progress_disable_func_t) diff --git a/src/uct/ib/mlx5/dc/dc_mlx5.c b/src/uct/ib/mlx5/dc/dc_mlx5.c index aba1de49b38..2e4ae4d85b0 100644 --- a/src/uct/ib/mlx5/dc/dc_mlx5.c +++ b/src/uct/ib/mlx5/dc/dc_mlx5.c @@ -1401,7 +1401,7 @@ static uct_rc_iface_ops_t uct_dc_mlx5_iface_ops = { .iface_vfs_refresh = uct_dc_mlx5_iface_vfs_refresh, .ep_query = (uct_ep_query_func_t)ucs_empty_function_return_unsupported, .ep_invalidate = uct_dc_mlx5_ep_invalidate, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_dc_mlx5_iface_is_reachable_v2, .ep_is_connected = uct_dc_mlx5_ep_is_connected }, diff --git a/src/uct/ib/mlx5/dv/ib_mlx5dv_md.c b/src/uct/ib/mlx5/dv/ib_mlx5dv_md.c index e5626040f79..c8a89cff0c5 100644 --- a/src/uct/ib/mlx5/dv/ib_mlx5dv_md.c +++ b/src/uct/ib/mlx5/dv/ib_mlx5dv_md.c @@ -3110,7 +3110,7 @@ static uct_ib_md_ops_t uct_ib_mlx5_devx_md_ops = { .mem_attach = uct_ib_mlx5_devx_mem_attach, .mem_advise = uct_ib_mem_advise, .mkey_pack = uct_ib_mlx5_devx_mkey_pack, - .detect_memory_type = ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported, }, .open = uct_ib_mlx5_devx_md_open, }; @@ -3327,10 +3327,10 @@ static uct_ib_md_ops_t uct_ib_mlx5_md_ops = { .query = uct_ib_md_query, .mem_reg = uct_ib_verbs_mem_reg, .mem_dereg = uct_ib_verbs_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mem_advise = uct_ib_mem_advise, .mkey_pack = uct_ib_verbs_mkey_pack, - .detect_memory_type = ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported, }, .open = uct_ib_mlx5dv_md_open, }; diff --git a/src/uct/ib/mlx5/gga/gga_mlx5.c b/src/uct/ib/mlx5/gga/gga_mlx5.c index 2299b1e3b18..4e5b0bcd896 100644 --- a/src/uct/ib/mlx5/gga/gga_mlx5.c +++ b/src/uct/ib/mlx5/gga/gga_mlx5.c @@ -229,9 +229,9 @@ uct_ib_mlx5_gga_md_open(uct_component_t *component, const char *md_name, static uct_component_t uct_gga_component = { .query_md_resources = uct_ib_mlx5_gga_query_md_resources, .md_open = uct_ib_mlx5_gga_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_gga_mlx5_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, .rkey_release = uct_gga_mlx5_rkey_release, .rkey_compare = uct_base_rkey_compare, .name = "gga", @@ -632,26 +632,26 @@ uct_gga_mlx5_iface_get_address(uct_iface_h tl_iface, uct_iface_addr_t *addr) } static uct_iface_ops_t uct_gga_mlx5_iface_tl_ops = { - .ep_put_short = ucs_empty_function_return_unsupported, + .ep_put_short = (uct_ep_put_short_func_t)ucs_empty_function_return_unsupported, .ep_put_bcopy = (uct_ep_put_bcopy_func_t)ucs_empty_function_return_unsupported, .ep_put_zcopy = uct_gga_mlx5_ep_put_zcopy, - .ep_get_bcopy = ucs_empty_function_return_unsupported, + .ep_get_bcopy = (uct_ep_get_bcopy_func_t)ucs_empty_function_return_unsupported, .ep_get_zcopy = uct_gga_mlx5_ep_get_zcopy, .ep_am_short = (uct_ep_am_short_func_t)ucs_empty_function_return_unsupported, .ep_am_short_iov = (uct_ep_am_short_iov_func_t)ucs_empty_function_return_unsupported, .ep_am_bcopy = (uct_ep_am_bcopy_func_t)ucs_empty_function_return_unsupported, .ep_am_zcopy = (uct_ep_am_zcopy_func_t)ucs_empty_function_return_unsupported, - .ep_atomic_cswap64 = ucs_empty_function_return_unsupported, - .ep_atomic_cswap32 = ucs_empty_function_return_unsupported, - .ep_atomic64_post = ucs_empty_function_return_unsupported, - .ep_atomic32_post = ucs_empty_function_return_unsupported, - .ep_atomic64_fetch = ucs_empty_function_return_unsupported, - .ep_atomic32_fetch = ucs_empty_function_return_unsupported, + .ep_atomic_cswap64 = (uct_ep_atomic_cswap64_func_t)ucs_empty_function_return_unsupported, + .ep_atomic_cswap32 = (uct_ep_atomic_cswap32_func_t)ucs_empty_function_return_unsupported, + .ep_atomic64_post = (uct_ep_atomic64_post_func_t)ucs_empty_function_return_unsupported, + .ep_atomic32_post = (uct_ep_atomic32_post_func_t)ucs_empty_function_return_unsupported, + .ep_atomic64_fetch = (uct_ep_atomic64_fetch_func_t)ucs_empty_function_return_unsupported, + .ep_atomic32_fetch = (uct_ep_atomic32_fetch_func_t)ucs_empty_function_return_unsupported, .ep_pending_add = uct_rc_ep_pending_add, .ep_pending_purge = uct_rc_ep_pending_purge, .ep_flush = uct_rc_mlx5_base_ep_flush, .ep_fence = uct_rc_mlx5_base_ep_fence, - .ep_check = ucs_empty_function_return_unsupported, + .ep_check = (uct_ep_check_func_t)ucs_empty_function_return_unsupported, .ep_create = UCS_CLASS_NEW_FUNC_NAME(uct_gga_mlx5_ep_t), .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_gga_mlx5_ep_t), .ep_get_address = uct_gga_mlx5_ep_get_address, @@ -739,11 +739,11 @@ static uct_rc_iface_ops_t uct_gga_mlx5_iface_ops = { .event_cq = uct_rc_mlx5_iface_common_event_cq, .handle_failure = uct_rc_mlx5_iface_handle_failure, }, - .init_rx = ucs_empty_function_return_success, - .cleanup_rx = ucs_empty_function, - .fc_ctrl = ucs_empty_function_return_unsupported, + .init_rx = (uct_rc_iface_init_rx_func_t)ucs_empty_function_return_success, + .cleanup_rx = (uct_rc_iface_cleanup_rx_func_t)ucs_empty_function, + .fc_ctrl = (uct_rc_iface_fc_ctrl_func_t)ucs_empty_function_return_unsupported, .fc_handler = (uct_rc_iface_fc_handler_func_t)ucs_empty_function_do_assert, - .cleanup_qp = ucs_empty_function_do_assert_void, + .cleanup_qp = (uct_rc_iface_qp_cleanup_func_t)ucs_empty_function_do_assert_void, .ep_post_check = uct_rc_mlx5_base_ep_post_check, .ep_vfs_populate = uct_rc_mlx5_base_ep_vfs_populate }; @@ -853,7 +853,7 @@ static uct_md_ops_t uct_mlx5_gga_md_ops = { .mem_attach = uct_ib_mlx5_devx_mem_attach, .mem_advise = uct_ib_mem_advise, .mkey_pack = uct_ib_mlx5_gga_mkey_pack, - .detect_memory_type = ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported, }; static ucs_status_t diff --git a/src/uct/ib/rc/verbs/rc_verbs_iface.c b/src/uct/ib/rc/verbs/rc_verbs_iface.c index 19bb718fb7c..777019b84c4 100644 --- a/src/uct/ib/rc/verbs/rc_verbs_iface.c +++ b/src/uct/ib/rc/verbs/rc_verbs_iface.c @@ -505,7 +505,7 @@ static uct_iface_ops_t uct_rc_verbs_iface_tl_ops = { .iface_event_arm = uct_rc_iface_event_arm, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_rc_verbs_iface_t), .iface_query = uct_rc_verbs_iface_query, - .iface_get_address = ucs_empty_function_return_success, + .iface_get_address = (uct_iface_get_address_func_t)ucs_empty_function_return_success, .iface_get_device_address = uct_ib_iface_get_device_address, .iface_is_reachable = uct_base_iface_is_reachable, }; diff --git a/src/uct/ib/rdmacm/rdmacm_cm.c b/src/uct/ib/rdmacm/rdmacm_cm.c index d083bc10631..09b5dc18b49 100644 --- a/src/uct/ib/rdmacm/rdmacm_cm.c +++ b/src/uct/ib/rdmacm/rdmacm_cm.c @@ -842,7 +842,7 @@ static uct_cm_ops_t uct_rdmacm_cm_ops = { }; static uct_iface_ops_t uct_rdmacm_cm_iface_ops = { - .ep_pending_purge = ucs_empty_function, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_connect = uct_rdmacm_cm_ep_connect, .ep_disconnect = uct_rdmacm_cm_ep_disconnect, .cm_ep_conn_notify = uct_rdmacm_cm_ep_conn_notify, @@ -866,12 +866,12 @@ static uct_iface_ops_t uct_rdmacm_cm_iface_ops = { .ep_create = (uct_ep_create_func_t)ucs_empty_function_return_unsupported, .iface_flush = (uct_iface_flush_func_t)ucs_empty_function_return_unsupported, .iface_fence = (uct_iface_fence_func_t)ucs_empty_function_return_unsupported, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, .iface_progress = (uct_iface_progress_func_t)ucs_empty_function_return_zero, .iface_event_fd_get = (uct_iface_event_fd_get_func_t)ucs_empty_function_return_unsupported, .iface_event_arm = (uct_iface_event_arm_func_t)ucs_empty_function_return_unsupported, - .iface_close = ucs_empty_function, + .iface_close = (uct_iface_close_func_t)ucs_empty_function, .iface_query = (uct_iface_query_func_t)ucs_empty_function_return_unsupported, .iface_get_device_address = (uct_iface_get_device_address_func_t)ucs_empty_function_return_unsupported, .iface_get_address = (uct_iface_get_address_func_t)ucs_empty_function_return_unsupported, @@ -883,7 +883,7 @@ static uct_iface_internal_ops_t uct_rdmacm_cm_iface_internal_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = uct_rdmacm_ep_query, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = (uct_iface_is_reachable_v2_func_t)ucs_empty_function_return_zero, .ep_is_connected = (uct_ep_is_connected_func_t)ucs_empty_function_return_zero_int }; diff --git a/src/uct/ib/rdmacm/rdmacm_component.c b/src/uct/ib/rdmacm/rdmacm_component.c index 310ad814967..2acdd33f972 100644 --- a/src/uct/ib/rdmacm/rdmacm_component.c +++ b/src/uct/ib/rdmacm/rdmacm_component.c @@ -46,11 +46,11 @@ uct_rdmacm_query_md_resources(uct_component_t *component, uct_component_t uct_rdmacm_component = { .query_md_resources = uct_rdmacm_query_md_resources, - .md_open = ucs_empty_function_return_unsupported, + .md_open = (uct_component_md_open_func_t)ucs_empty_function_return_unsupported, .cm_open = UCS_CLASS_NEW_FUNC_NAME(uct_rdmacm_cm_t), - .rkey_unpack = ucs_empty_function_return_unsupported, - .rkey_ptr = ucs_empty_function_return_unsupported, - .rkey_release = ucs_empty_function_return_success, + .rkey_unpack = (uct_component_rkey_unpack_func_t)ucs_empty_function_return_unsupported, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, + .rkey_release = (uct_component_rkey_release_func_t)ucs_empty_function_return_success, .rkey_compare = uct_base_rkey_compare, .name = "rdmacm", .md_config = UCS_CONFIG_EMPTY_GLOBAL_LIST_ENTRY, diff --git a/src/uct/rocm/copy/rocm_copy_iface.c b/src/uct/rocm/copy/rocm_copy_iface.c index 49cbcd85ab1..eaee542429b 100644 --- a/src/uct/rocm/copy/rocm_copy_iface.c +++ b/src/uct/rocm/copy/rocm_copy_iface.c @@ -171,8 +171,8 @@ static uct_iface_ops_t uct_rocm_copy_iface_ops = { .ep_put_short = uct_rocm_copy_ep_put_short, .ep_get_zcopy = uct_rocm_copy_ep_get_zcopy, .ep_put_zcopy = uct_rocm_copy_ep_put_zcopy, - .ep_pending_add = ucs_empty_function_return_busy, - .ep_pending_purge = ucs_empty_function, + .ep_pending_add = (uct_ep_pending_add_func_t)ucs_empty_function_return_busy, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_flush = uct_base_ep_flush, .ep_fence = uct_base_ep_fence, .ep_create = UCS_CLASS_NEW_FUNC_NAME(uct_rocm_copy_ep_t), @@ -291,7 +291,7 @@ static uct_iface_internal_ops_t uct_rocm_copy_iface_internal_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = (uct_ep_query_func_t)ucs_empty_function_return_unsupported, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_rocm_copy_iface_is_reachable_v2, .ep_is_connected = uct_base_ep_is_connected }; diff --git a/src/uct/rocm/copy/rocm_copy_md.c b/src/uct/rocm/copy/rocm_copy_md.c index b400c7097e5..91588e2cf00 100644 --- a/src/uct/rocm/copy/rocm_copy_md.c +++ b/src/uct/rocm/copy/rocm_copy_md.c @@ -287,7 +287,7 @@ static uct_md_ops_t md_ops = { .mem_free = uct_rocm_copy_mem_free, .mem_reg = uct_rocm_copy_mem_reg, .mem_dereg = uct_rocm_copy_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mem_query = uct_rocm_base_mem_query, .detect_memory_type = uct_rocm_base_detect_memory_type, }; @@ -345,7 +345,7 @@ static uct_md_ops_t md_rcache_ops = { .mkey_pack = uct_rocm_copy_mkey_pack, .mem_reg = uct_rocm_copy_mem_rcache_reg, .mem_dereg = uct_rocm_copy_mem_rcache_dereg, - .mem_attach = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mem_query = uct_rocm_base_mem_query, .detect_memory_type = uct_rocm_base_detect_memory_type, }; @@ -463,9 +463,9 @@ uct_rocm_copy_md_open(uct_component_h component, const char *md_name, uct_component_t uct_rocm_copy_component = { .query_md_resources = uct_rocm_base_query_md_resources, .md_open = uct_rocm_copy_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_rocm_copy_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, .rkey_release = uct_rocm_copy_rkey_release, .rkey_compare = uct_base_rkey_compare, .name = "rocm_cpy", diff --git a/src/uct/rocm/ipc/rocm_ipc_iface.c b/src/uct/rocm/ipc/rocm_ipc_iface.c index 1559c01e4f1..4e51f04cb33 100644 --- a/src/uct/rocm/ipc/rocm_ipc_iface.c +++ b/src/uct/rocm/ipc/rocm_ipc_iface.c @@ -158,15 +158,15 @@ static uct_iface_internal_ops_t uct_rocm_ipc_iface_internal_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = (uct_ep_query_func_t)ucs_empty_function_return_unsupported, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_rocm_ipc_iface_is_reachable_v2 }; static uct_iface_ops_t uct_rocm_ipc_iface_ops = { .ep_put_zcopy = uct_rocm_ipc_ep_put_zcopy, .ep_get_zcopy = uct_rocm_ipc_ep_get_zcopy, - .ep_pending_add = ucs_empty_function_return_busy, - .ep_pending_purge = ucs_empty_function, + .ep_pending_add = (uct_ep_pending_add_func_t)ucs_empty_function_return_busy, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_flush = uct_base_ep_flush, .ep_fence = uct_base_ep_fence, .ep_create = UCS_CLASS_NEW_FUNC_NAME(uct_rocm_ipc_ep_t), diff --git a/src/uct/rocm/ipc/rocm_ipc_md.c b/src/uct/rocm/ipc/rocm_ipc_md.c index 8d475557d8b..f9fe39ff5e1 100644 --- a/src/uct/rocm/ipc/rocm_ipc_md.c +++ b/src/uct/rocm/ipc/rocm_ipc_md.c @@ -127,9 +127,9 @@ uct_rocm_ipc_md_open(uct_component_h component, const char *md_name, .mkey_pack = uct_rocm_ipc_mkey_pack, .mem_reg = uct_rocm_ipc_mem_reg, .mem_dereg = uct_rocm_ipc_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, - .mem_query = ucs_empty_function_return_unsupported, - .detect_memory_type = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, + .mem_query = (uct_md_mem_query_func_t)ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported, }; static uct_md_t md = { .ops = &md_ops, @@ -171,9 +171,9 @@ static ucs_status_t uct_rocm_ipc_rkey_release(uct_component_t *component, uct_component_t uct_rocm_ipc_component = { .query_md_resources = uct_rocm_base_query_md_resources, .md_open = uct_rocm_ipc_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_rocm_ipc_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, .rkey_release = uct_rocm_ipc_rkey_release, .rkey_compare = uct_base_rkey_compare, .name = "rocm_ipc", diff --git a/src/uct/sm/mm/base/mm_iface.c b/src/uct/sm/mm/base/mm_iface.c index e6ac056f6e7..08df20e106a 100644 --- a/src/uct/sm/mm/base/mm_iface.c +++ b/src/uct/sm/mm/base/mm_iface.c @@ -602,7 +602,7 @@ static uct_iface_internal_ops_t uct_mm_iface_internal_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = (uct_ep_query_func_t)ucs_empty_function, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_mm_iface_is_reachable_v2, .ep_is_connected = uct_mm_ep_is_connected }; diff --git a/src/uct/sm/mm/base/mm_md.h b/src/uct/sm/mm/base/mm_md.h index 66a6ceccdc4..3d5b28f648a 100644 --- a/src/uct/sm/mm/base/mm_md.h +++ b/src/uct/sm/mm/base/mm_md.h @@ -167,7 +167,7 @@ typedef struct uct_mm_component { .super = { \ .query_md_resources = uct_mm_query_md_resources, \ .md_open = uct_mm_md_open, \ - .cm_open = ucs_empty_function_return_unsupported, \ + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, \ .rkey_unpack = _rkey_unpack, \ .rkey_ptr = uct_sm_rkey_ptr, \ .rkey_release = _rkey_release, \ diff --git a/src/uct/sm/mm/posix/mm_posix.c b/src/uct/sm/mm/posix/mm_posix.c index 667a0e85830..114f0b1a952 100644 --- a/src/uct/sm/mm/posix/mm_posix.c +++ b/src/uct/sm/mm/posix/mm_posix.c @@ -764,12 +764,12 @@ 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 = ucs_empty_function_return_unsupported, - .mem_reg = ucs_empty_function_return_unsupported, - .mem_dereg = ucs_empty_function_return_unsupported, - .mem_attach = ucs_empty_function_return_unsupported, + .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_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mkey_pack = uct_posix_md_mkey_pack, - .detect_memory_type = ucs_empty_function_return_unsupported + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported }, .query = uct_posix_query, .iface_addr_length = uct_posix_iface_addr_length, diff --git a/src/uct/sm/mm/sysv/mm_sysv.c b/src/uct/sm/mm/sysv/mm_sysv.c index dd3ba458792..b5410bdd4c2 100644 --- a/src/uct/sm/mm/sysv/mm_sysv.c +++ b/src/uct/sm/mm/sysv/mm_sysv.c @@ -199,19 +199,19 @@ static uct_mm_md_mapper_ops_t uct_sysv_md_ops = { .query = uct_sysv_md_query, .mem_alloc = uct_sysv_mem_alloc, .mem_free = uct_sysv_mem_free, - .mem_advise = ucs_empty_function_return_unsupported, - .mem_reg = ucs_empty_function_return_unsupported, - .mem_dereg = ucs_empty_function_return_unsupported, - .mem_attach = ucs_empty_function_return_unsupported, + .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_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mkey_pack = uct_sysv_md_mkey_pack, - .detect_memory_type = ucs_empty_function_return_unsupported + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported }, .query = uct_sysv_query, - .iface_addr_length = ucs_empty_function_return_zero_size_t, - .iface_addr_pack = ucs_empty_function_return_success, + .iface_addr_length = (uct_mm_mapper_iface_addr_length_func_t)ucs_empty_function_return_zero_size_t, + .iface_addr_pack = (uct_mm_mapper_iface_addr_pack_func_t)ucs_empty_function_return_success, .mem_attach = uct_sysv_mem_attach, .mem_detach = uct_sysv_mem_detach, - .is_reachable = ucs_empty_function_return_one_int + .is_reachable = (uct_mm_mapper_is_reachable_func_t)ucs_empty_function_return_one_int }; UCT_MM_TL_DEFINE(sysv, &uct_sysv_md_ops, uct_sysv_rkey_unpack, diff --git a/src/uct/sm/mm/xpmem/mm_xpmem.c b/src/uct/sm/mm/xpmem/mm_xpmem.c index a79e374dd4a..2407b24af51 100644 --- a/src/uct/sm/mm/xpmem/mm_xpmem.c +++ b/src/uct/sm/mm/xpmem/mm_xpmem.c @@ -534,21 +534,21 @@ static uct_mm_md_mapper_ops_t uct_xpmem_md_ops = { .super = { .close = uct_mm_md_close, .query = uct_xpmem_md_query, - .mem_alloc = ucs_empty_function_return_unsupported, - .mem_free = ucs_empty_function_return_unsupported, - .mem_advise = ucs_empty_function_return_unsupported, + .mem_alloc = (uct_md_mem_alloc_func_t)ucs_empty_function_return_unsupported, + .mem_free = (uct_md_mem_free_func_t)ucs_empty_function_return_unsupported, + .mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported, .mem_reg = uct_xmpem_mem_reg, .mem_dereg = uct_xmpem_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mkey_pack = uct_xpmem_mkey_pack, - .detect_memory_type = ucs_empty_function_return_unsupported + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported }, .query = uct_xpmem_query, .iface_addr_length = uct_xpmem_iface_addr_length, .iface_addr_pack = uct_xpmem_iface_addr_pack, .mem_attach = uct_xpmem_mem_attach, .mem_detach = uct_xpmem_mem_detach, - .is_reachable = ucs_empty_function_return_one_int + .is_reachable = (uct_mm_mapper_is_reachable_func_t)ucs_empty_function_return_one_int }; static void uct_xpmem_global_init() diff --git a/src/uct/sm/scopy/cma/cma_iface.c b/src/uct/sm/scopy/cma/cma_iface.c index ee634d1326d..f16f685acfb 100644 --- a/src/uct/sm/scopy/cma/cma_iface.c +++ b/src/uct/sm/scopy/cma/cma_iface.c @@ -132,8 +132,8 @@ static UCS_CLASS_DECLARE_DELETE_FUNC(uct_cma_iface_t, uct_iface_t); static uct_iface_ops_t uct_cma_iface_tl_ops = { .ep_put_zcopy = uct_scopy_ep_put_zcopy, .ep_get_zcopy = uct_scopy_ep_get_zcopy, - .ep_pending_add = ucs_empty_function_return_busy, - .ep_pending_purge = ucs_empty_function, + .ep_pending_add = (uct_ep_pending_add_func_t)ucs_empty_function_return_busy, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_flush = uct_scopy_ep_flush, .ep_fence = uct_sm_ep_fence, .ep_check = uct_cma_ep_check, @@ -141,10 +141,10 @@ static uct_iface_ops_t uct_cma_iface_tl_ops = { .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_cma_ep_t), .iface_flush = uct_scopy_iface_flush, .iface_fence = uct_sm_iface_fence, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, .iface_progress = uct_scopy_iface_progress, - .iface_event_fd_get = ucs_empty_function_return_unsupported, + .iface_event_fd_get = (uct_iface_event_fd_get_func_t)ucs_empty_function_return_unsupported, .iface_event_arm = uct_scopy_iface_event_arm, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_cma_iface_t), .iface_query = uct_cma_iface_query, @@ -159,7 +159,7 @@ static uct_scopy_iface_ops_t uct_cma_iface_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = (uct_ep_query_func_t)ucs_empty_function_return_unsupported, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_cma_iface_is_reachable_v2, .ep_is_connected = uct_cma_ep_is_connected }, diff --git a/src/uct/sm/scopy/cma/cma_md.c b/src/uct/sm/scopy/cma/cma_md.c index 340fbac2aaf..4ad1ea39388 100644 --- a/src/uct/sm/scopy/cma/cma_md.c +++ b/src/uct/sm/scopy/cma/cma_md.c @@ -169,8 +169,8 @@ uct_cma_md_open(uct_component_t *component, const char *md_name, .mkey_pack = (uct_md_mkey_pack_func_t)ucs_empty_function_return_success, .mem_reg = uct_md_dummy_mem_reg, .mem_dereg = uct_md_dummy_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, - .detect_memory_type = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported, }; uct_cma_md_t *cma_md; @@ -208,10 +208,10 @@ ucs_status_t uct_cma_md_query(uct_md_h uct_md, uct_md_attr_v2_t *md_attr) uct_component_t uct_cma_component = { .query_md_resources = uct_cma_query_md_resources, .md_open = uct_cma_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_md_stub_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, - .rkey_release = ucs_empty_function_return_success, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, + .rkey_release = (uct_component_rkey_release_func_t)ucs_empty_function_return_success, .rkey_compare = uct_base_rkey_compare, .name = "cma", .md_config = { diff --git a/src/uct/sm/scopy/knem/knem_iface.c b/src/uct/sm/scopy/knem/knem_iface.c index f70df785cf8..3f379d122fa 100644 --- a/src/uct/sm/scopy/knem/knem_iface.c +++ b/src/uct/sm/scopy/knem/knem_iface.c @@ -53,23 +53,23 @@ static UCS_CLASS_DECLARE_DELETE_FUNC(uct_knem_iface_t, uct_iface_t); static uct_iface_ops_t uct_knem_iface_tl_ops = { .ep_put_zcopy = uct_scopy_ep_put_zcopy, .ep_get_zcopy = uct_scopy_ep_get_zcopy, - .ep_pending_add = ucs_empty_function_return_busy, - .ep_pending_purge = ucs_empty_function, + .ep_pending_add = (uct_ep_pending_add_func_t)ucs_empty_function_return_busy, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_flush = uct_scopy_ep_flush, .ep_fence = uct_sm_ep_fence, .ep_create = UCS_CLASS_NEW_FUNC_NAME(uct_knem_ep_t), .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_knem_ep_t), .iface_flush = uct_scopy_iface_flush, .iface_fence = uct_sm_iface_fence, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, .iface_progress = uct_scopy_iface_progress, - .iface_event_fd_get = ucs_empty_function_return_unsupported, + .iface_event_fd_get = (uct_iface_event_fd_get_func_t)ucs_empty_function_return_unsupported, .iface_event_arm = uct_scopy_iface_event_arm, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_knem_iface_t), .iface_query = uct_knem_iface_query, .iface_get_device_address = uct_sm_iface_get_device_address, - .iface_get_address = ucs_empty_function_return_success, + .iface_get_address = (uct_iface_get_address_func_t)ucs_empty_function_return_success, .iface_is_reachable = uct_base_iface_is_reachable, }; @@ -79,7 +79,7 @@ static uct_scopy_iface_ops_t uct_knem_iface_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = (uct_ep_query_func_t)ucs_empty_function_return_unsupported, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_knem_iface_is_reachable_v2, .ep_is_connected = uct_base_ep_is_connected }, diff --git a/src/uct/sm/scopy/knem/knem_md.c b/src/uct/sm/scopy/knem/knem_md.c index 9dbb38b9c19..69af6e1d98e 100644 --- a/src/uct/sm/scopy/knem/knem_md.c +++ b/src/uct/sm/scopy/knem/knem_md.c @@ -250,8 +250,8 @@ static uct_md_ops_t md_ops = { .mkey_pack = uct_knem_mkey_pack, .mem_reg = uct_knem_mem_reg, .mem_dereg = uct_knem_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, - .detect_memory_type = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported, }; static ucs_status_t @@ -284,9 +284,9 @@ uct_knem_md_open(uct_component_t *component, const char *md_name, uct_component_t uct_knem_component = { .query_md_resources = uct_knem_query_md_resources, .md_open = uct_knem_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_knem_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, .rkey_release = uct_knem_rkey_release, .rkey_compare = uct_base_rkey_compare, .name = "knem", diff --git a/src/uct/sm/self/self.c b/src/uct/sm/self/self.c index 6b36da84ad4..5a767a2e84e 100644 --- a/src/uct/sm/self/self.c +++ b/src/uct/sm/self/self.c @@ -384,7 +384,7 @@ static uct_iface_internal_ops_t uct_self_iface_internal_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = (uct_ep_query_func_t)ucs_empty_function_return_unsupported, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_self_iface_is_reachable_v2, .ep_is_connected = uct_base_ep_is_connected }; @@ -404,19 +404,19 @@ static uct_iface_ops_t uct_self_iface_ops = { .ep_atomic32_fetch = uct_sm_ep_atomic32_fetch, .ep_flush = uct_base_ep_flush, .ep_fence = uct_base_ep_fence, - .ep_check = ucs_empty_function_return_success, - .ep_pending_add = ucs_empty_function_return_busy, - .ep_pending_purge = ucs_empty_function, + .ep_check = (uct_ep_check_func_t)ucs_empty_function_return_success, + .ep_pending_add = (uct_ep_pending_add_func_t)ucs_empty_function_return_busy, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_create = UCS_CLASS_NEW_FUNC_NAME(uct_self_ep_t), .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_self_ep_t), .iface_flush = uct_base_iface_flush, .iface_fence = uct_base_iface_fence, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, - .iface_progress = ucs_empty_function_return_zero, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, + .iface_progress = (uct_iface_progress_func_t)ucs_empty_function_return_zero, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_self_iface_t), .iface_query = uct_self_iface_query, - .iface_get_device_address = ucs_empty_function_return_success, + .iface_get_device_address = (uct_iface_get_device_address_func_t)ucs_empty_function_return_success, .iface_get_address = uct_self_iface_get_address, .iface_is_reachable = uct_base_iface_is_reachable }; @@ -440,13 +440,13 @@ static ucs_status_t uct_self_md_open(uct_component_t *component, const char *md_ uct_self_md_config_t *md_config = ucs_derived_of(config, uct_self_md_config_t); static uct_md_ops_t md_ops = { - .close = ucs_empty_function, + .close = (uct_md_close_func_t)ucs_empty_function, .query = uct_self_md_query, - .mkey_pack = ucs_empty_function_return_success, + .mkey_pack = (uct_md_mkey_pack_func_t)ucs_empty_function_return_success, .mem_reg = uct_md_dummy_mem_reg, .mem_dereg = uct_md_dummy_mem_dereg, - .mem_attach = ucs_empty_function_return_unsupported, - .detect_memory_type = ucs_empty_function_return_unsupported + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported }; static uct_self_md_t md; @@ -475,10 +475,10 @@ static ucs_status_t uct_self_md_rkey_unpack(uct_component_t *component, static uct_component_t uct_self_component = { .query_md_resources = uct_md_query_single_md_resource, .md_open = uct_self_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_self_md_rkey_unpack, .rkey_ptr = uct_sm_rkey_ptr, - .rkey_release = ucs_empty_function_return_success, + .rkey_release = (uct_component_rkey_release_func_t)ucs_empty_function_return_success, .rkey_compare = uct_base_rkey_compare, .name = UCT_SELF_NAME, .md_config = { diff --git a/src/uct/tcp/tcp_ep.c b/src/uct/tcp/tcp_ep.c index 4cf94c809bb..08e49966732 100644 --- a/src/uct/tcp/tcp_ep.c +++ b/src/uct/tcp/tcp_ep.c @@ -376,8 +376,10 @@ static UCS_CLASS_CLEANUP_FUNC(uct_tcp_ep_t) uct_tcp_iface_t *iface = ucs_derived_of(self->super.super.iface, uct_tcp_iface_t); - uct_ep_pending_purge(&self->super.super, ucs_empty_function_do_assert_void, - NULL); + uct_ep_pending_purge( + &self->super.super, + (uct_pending_purge_callback_t)ucs_empty_function_do_assert_void, + NULL); if (self->flags & UCT_TCP_EP_FLAG_ON_MATCH_CTX) { uct_tcp_cm_remove_ep(iface, self); diff --git a/src/uct/tcp/tcp_iface.c b/src/uct/tcp/tcp_iface.c index 1b9d62e9ead..6d2a99f8a61 100644 --- a/src/uct/tcp/tcp_iface.c +++ b/src/uct/tcp/tcp_iface.c @@ -517,7 +517,7 @@ static uct_iface_ops_t uct_tcp_iface_ops = { .iface_progress_disable = uct_base_iface_progress_disable, .iface_progress = uct_tcp_iface_progress, .iface_event_fd_get = uct_tcp_iface_event_fd_get, - .iface_event_arm = ucs_empty_function_return_success, + .iface_event_arm = (uct_iface_event_arm_func_t)ucs_empty_function_return_success, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_tcp_iface_t), .iface_query = uct_tcp_iface_query, .iface_get_address = uct_tcp_iface_get_address, diff --git a/src/uct/tcp/tcp_md.c b/src/uct/tcp/tcp_md.c index a515d08525f..c5988dff7ba 100644 --- a/src/uct/tcp/tcp_md.c +++ b/src/uct/tcp/tcp_md.c @@ -49,10 +49,10 @@ static void uct_tcp_md_close(uct_md_h md) static uct_md_ops_t uct_tcp_md_ops = { .close = uct_tcp_md_close, .query = uct_tcp_md_query, - .mkey_pack = ucs_empty_function_return_success, + .mkey_pack = (uct_md_mkey_pack_func_t)ucs_empty_function_return_success, .mem_reg = uct_md_dummy_mem_reg, .mem_dereg = uct_md_dummy_mem_dereg, - .detect_memory_type = ucs_empty_function_return_unsupported + .detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported }; static ucs_status_t @@ -116,8 +116,8 @@ uct_component_t uct_tcp_component = { .md_open = uct_tcp_md_open, .cm_open = UCS_CLASS_NEW_FUNC_NAME(uct_tcp_sockcm_t), .rkey_unpack = uct_tcp_md_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, - .rkey_release = ucs_empty_function_return_success, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, + .rkey_release = (uct_component_rkey_release_func_t)ucs_empty_function_return_success, .rkey_compare = uct_base_rkey_compare, .name = UCT_TCP_NAME, .md_config = { diff --git a/src/uct/tcp/tcp_sockcm.c b/src/uct/tcp/tcp_sockcm.c index f5af66d723f..2dea7fa3d6d 100644 --- a/src/uct/tcp/tcp_sockcm.c +++ b/src/uct/tcp/tcp_sockcm.c @@ -181,12 +181,12 @@ static uct_iface_ops_t uct_tcp_sockcm_iface_ops = { .ep_create = (uct_ep_create_func_t)ucs_empty_function_return_unsupported, .iface_flush = (uct_iface_flush_func_t)ucs_empty_function_return_unsupported, .iface_fence = (uct_iface_fence_func_t)ucs_empty_function_return_unsupported, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, .iface_progress = (uct_iface_progress_func_t)ucs_empty_function_return_zero, .iface_event_fd_get = (uct_iface_event_fd_get_func_t)ucs_empty_function_return_unsupported, .iface_event_arm = (uct_iface_event_arm_func_t)ucs_empty_function_return_unsupported, - .iface_close = ucs_empty_function, + .iface_close = (uct_iface_close_func_t)ucs_empty_function, .iface_query = (uct_iface_query_func_t)ucs_empty_function_return_unsupported, .iface_get_device_address = (uct_iface_get_device_address_func_t)ucs_empty_function_return_unsupported, .iface_get_address = (uct_iface_get_address_func_t)ucs_empty_function_return_unsupported, @@ -198,7 +198,7 @@ static uct_iface_internal_ops_t uct_tcp_sockcm_iface_internal_ops = { .iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function, .ep_query = uct_tcp_sockcm_ep_query, .ep_invalidate = (uct_ep_invalidate_func_t)ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = (uct_iface_is_reachable_v2_func_t)ucs_empty_function_return_zero, .ep_is_connected = (uct_ep_is_connected_func_t)ucs_empty_function_return_zero_int }; diff --git a/src/uct/ugni/base/ugni_md.c b/src/uct/ugni/base/ugni_md.c index 175549c597d..78182f9208e 100644 --- a/src/uct/ugni/base/ugni_md.c +++ b/src/uct/ugni/base/ugni_md.c @@ -190,9 +190,9 @@ uct_ugni_md_open(uct_component_h component,const char *md_name, md_ops.mem_free = (void*)ucs_empty_function; md_ops.mem_reg = uct_ugni_mem_reg; md_ops.mem_dereg = uct_ugni_mem_dereg; - md_ops.mem_attach = ucs_empty_function_return_unsupported; + md_ops.mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported; md_ops.mkey_pack = uct_ugni_mkey_pack; - md_ops.detect_memory_type = ucs_empty_function_return_unsupported; + md_ops.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported; md.super.ops = &md_ops; md.super.component = &uct_ugni_component; @@ -223,9 +223,9 @@ uct_ugni_md_open(uct_component_h component,const char *md_name, uct_component_t uct_ugni_component = { .query_md_resources = uct_ugni_query_md_resources, .md_open = uct_ugni_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_ugni_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, .rkey_release = uct_ugni_rkey_release, .rkey_compare = uct_base_rkey_compare, .name = UCT_UGNI_MD_NAME, diff --git a/src/uct/ugni/rdma/ugni_rdma_iface.c b/src/uct/ugni/rdma/ugni_rdma_iface.c index f81cc254ec8..ee74b6c2869 100644 --- a/src/uct/ugni/rdma/ugni_rdma_iface.c +++ b/src/uct/ugni/rdma/ugni_rdma_iface.c @@ -203,8 +203,8 @@ static uct_iface_ops_t uct_ugni_aries_rdma_iface_ops = { .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_ugni_ep_t), .iface_flush = uct_ugni_iface_flush, .iface_fence = uct_base_iface_fence, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, .iface_progress = (void*)uct_ugni_progress, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_ugni_rdma_iface_t), .iface_query = uct_ugni_rdma_iface_query, @@ -230,8 +230,8 @@ static uct_iface_ops_t uct_ugni_gemini_rdma_iface_ops = { .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_ugni_ep_t), .iface_flush = uct_ugni_iface_flush, .iface_fence = uct_base_iface_fence, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, .iface_progress = (void*)uct_ugni_progress, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_ugni_rdma_iface_t), .iface_query = uct_ugni_rdma_iface_query, diff --git a/src/uct/ugni/smsg/ugni_smsg_iface.c b/src/uct/ugni/smsg/ugni_smsg_iface.c index 9269d48520e..96817a160bc 100644 --- a/src/uct/ugni/smsg/ugni_smsg_iface.c +++ b/src/uct/ugni/smsg/ugni_smsg_iface.c @@ -243,8 +243,8 @@ static uct_iface_ops_t uct_ugni_smsg_iface_ops = { .ep_connect_to_ep = uct_base_ep_connect_to_ep, .iface_flush = uct_ugni_iface_flush, .iface_fence = uct_base_iface_fence, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, .iface_progress = (void*)uct_ugni_smsg_progress, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_ugni_smsg_iface_t), .iface_query = uct_ugni_smsg_iface_query, diff --git a/src/uct/ugni/udt/ugni_udt_iface.c b/src/uct/ugni/udt/ugni_udt_iface.c index 758fdff255f..4cf18003a61 100644 --- a/src/uct/ugni/udt/ugni_udt_iface.c +++ b/src/uct/ugni/udt/ugni_udt_iface.c @@ -366,9 +366,9 @@ static uct_iface_ops_t uct_ugni_udt_iface_ops = { .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_ugni_udt_ep_t), .iface_flush = uct_ugni_iface_flush, .iface_fence = uct_base_iface_fence, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, - .iface_progress = (void*)uct_ugni_udt_progress, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, + .iface_progress = (void*)uct_ugni_udt_progress, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_ugni_udt_iface_t), .iface_query = uct_ugni_udt_iface_query, .iface_get_address = uct_ugni_iface_get_address, diff --git a/src/uct/ze/copy/ze_copy_iface.c b/src/uct/ze/copy/ze_copy_iface.c index 4a25a444b1a..5972cea4576 100644 --- a/src/uct/ze/copy/ze_copy_iface.c +++ b/src/uct/ze/copy/ze_copy_iface.c @@ -111,8 +111,8 @@ static uct_iface_ops_t uct_ze_copy_iface_ops = { .ep_put_short = uct_ze_copy_ep_put_short, .ep_get_zcopy = uct_ze_copy_ep_get_zcopy, .ep_put_zcopy = uct_ze_copy_ep_put_zcopy, - .ep_pending_add = ucs_empty_function_return_busy, - .ep_pending_purge = ucs_empty_function, + .ep_pending_add = (uct_ep_pending_add_func_t)ucs_empty_function_return_busy, + .ep_pending_purge = (uct_ep_pending_purge_func_t)ucs_empty_function, .ep_flush = uct_base_ep_flush, .ep_fence = uct_base_ep_fence, .ep_create = uct_ep_create, @@ -121,12 +121,12 @@ static uct_iface_ops_t uct_ze_copy_iface_ops = { .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_ze_copy_ep_t), .iface_flush = uct_base_iface_flush, .iface_fence = uct_base_iface_fence, - .iface_progress_enable = ucs_empty_function, - .iface_progress_disable = ucs_empty_function, - .iface_progress = ucs_empty_function_return_zero, + .iface_progress_enable = (uct_iface_progress_enable_func_t)ucs_empty_function, + .iface_progress_disable = (uct_iface_progress_disable_func_t)ucs_empty_function, + .iface_progress = (uct_iface_progress_func_t)ucs_empty_function_return_zero, .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_ze_copy_iface_t), .iface_query = uct_ze_copy_iface_query, - .iface_get_device_address = ucs_empty_function_return_success, + .iface_get_device_address = (uct_iface_get_device_address_func_t)ucs_empty_function_return_success, .iface_get_address = uct_ze_copy_iface_get_address, .iface_is_reachable = uct_base_iface_is_reachable, }; @@ -189,7 +189,7 @@ static uct_iface_internal_ops_t uct_ze_copy_iface_internal_ops = { .iface_vfs_refresh = ucs_empty_function, .ep_query = ucs_empty_function_return_unsupported, .ep_invalidate = ucs_empty_function_return_unsupported, - .ep_connect_to_ep_v2 = ucs_empty_function_return_unsupported, + .ep_connect_to_ep_v2 = (uct_ep_connect_to_ep_v2_func_t)ucs_empty_function_return_unsupported, .iface_is_reachable_v2 = uct_ze_copy_iface_is_reachable_v2, .ep_is_connected = uct_base_ep_is_connected }; diff --git a/src/uct/ze/copy/ze_copy_md.c b/src/uct/ze/copy/ze_copy_md.c index f4599d727e1..3884273ce4a 100644 --- a/src/uct/ze/copy/ze_copy_md.c +++ b/src/uct/ze/copy/ze_copy_md.c @@ -248,7 +248,7 @@ static uct_md_ops_t md_ops = { .mkey_pack = ucs_empty_function_return_success, .mem_reg = uct_ze_copy_mem_reg, .mem_dereg = ucs_empty_function_return_success, - .mem_attach = ucs_empty_function_return_unsupported, + .mem_attach = (uct_md_mem_attach_func_t)ucs_empty_function_return_unsupported, .mem_query = uct_ze_copy_md_mem_query, .detect_memory_type = uct_ze_copy_md_detect_memory_type, }; @@ -299,10 +299,10 @@ uct_ze_copy_md_open(uct_component_h component, const char *md_name, uct_component_t uct_ze_copy_component = { .query_md_resources = uct_ze_base_query_md_resources, .md_open = uct_ze_copy_md_open, - .cm_open = ucs_empty_function_return_unsupported, + .cm_open = (uct_component_cm_open_func_t)ucs_empty_function_return_unsupported, .rkey_unpack = uct_ze_copy_rkey_unpack, - .rkey_ptr = ucs_empty_function_return_unsupported, - .rkey_release = ucs_empty_function_return_success, + .rkey_ptr = (uct_component_rkey_ptr_func_t)ucs_empty_function_return_unsupported, + .rkey_release = (uct_component_rkey_release_func_t)ucs_empty_function_return_success, .name = "ze_cpy", .md_config = { .name = "ze-copy memory domain",