From 37e2a3822935e946f9126443115ba977f17d0701 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 18 Nov 2024 19:31:54 +0100 Subject: [PATCH] renamed z_liveliness* function to make it accord to correct ones in zenoh-pico --- docs/api.rst | 24 +- examples/z_get_liveliness.c | 2 +- examples/z_liveliness.c | 2 +- examples/z_sub_liveliness.c | 2 +- include/zenoh_commons.h | 844 +++++++++++++++++++++++------------- include/zenoh_macros.h | 317 +------------- src/liveliness.rs | 58 +-- tests/z_api_liveliness.c | 16 +- 8 files changed, 586 insertions(+), 679 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 1cad3d826..31c711a34 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -816,24 +816,24 @@ Types ----- .. doxygenstruct:: zc_owned_liveliness_token_t -.. doxygenstruct:: zc_liveliness_declaration_options_t -.. doxygenstruct:: zc_liveliness_get_options_t -.. doxygenstruct:: zc_liveliness_subscriber_options_t +.. doxygenstruct:: z_liveliness_token_options_t +.. doxygenstruct:: z_liveliness_get_options_t +.. doxygenstruct:: z_liveliness_subscriber_options_t Functions --------- -.. doxygenfunction:: zc_liveliness_declare_subscriber +.. doxygenfunction:: z_liveliness_declare_subscriber .. doxygenfunction:: zc_liveliness_declare_background_subscriber -.. doxygenfunction:: zc_liveliness_get +.. doxygenfunction:: z_liveliness_get -.. doxygenfunction:: zc_liveliness_declare_token -.. doxygenfunction:: zc_liveliness_undeclare_token -.. doxygenfunction:: zc_liveliness_token_loan -.. doxygenfunction:: zc_liveliness_token_drop +.. doxygenfunction:: z_liveliness_declare_token +.. doxygenfunction:: z_liveliness_undeclare_token +.. doxygenfunction:: z_liveliness_token_loan +.. doxygenfunction:: z_liveliness_token_drop -.. doxygenfunction:: zc_liveliness_subscriber_options_default -.. doxygenfunction:: zc_liveliness_declaration_options_default -.. doxygenfunction:: zc_liveliness_get_options_default +.. doxygenfunction:: z_liveliness_subscriber_options_default +.. doxygenfunction:: z_liveliness_token_options_default +.. doxygenfunction:: z_liveliness_get_options_default Publication Cache ================= diff --git a/examples/z_get_liveliness.c b/examples/z_get_liveliness.c index fcb1d5b1d..91d9e11b5 100644 --- a/examples/z_get_liveliness.c +++ b/examples/z_get_liveliness.c @@ -47,7 +47,7 @@ int main(int argc, char** argv) { z_owned_fifo_handler_reply_t handler; z_owned_closure_reply_t closure; z_fifo_channel_reply_new(&closure, &handler, 16); - zc_liveliness_get(z_loan(s), z_loan(keyexpr), z_move(closure), NULL); + z_liveliness_get(z_loan(s), z_loan(keyexpr), z_move(closure), NULL); z_owned_reply_t reply; for (z_result_t res = z_recv(z_loan(handler), &reply); res == Z_OK; res = z_recv(z_loan(handler), &reply)) { if (z_reply_is_ok(z_loan(reply))) { diff --git a/examples/z_liveliness.c b/examples/z_liveliness.c index 987f8c4b9..73316b20c 100644 --- a/examples/z_liveliness.c +++ b/examples/z_liveliness.c @@ -45,7 +45,7 @@ int main(int argc, char** argv) { printf("Declaring liveliness token '%s'...\n", args.keyexpr); zc_owned_liveliness_token_t token; - if (zc_liveliness_declare_token(z_loan(s), &token, z_loan(keyexpr), NULL) < 0) { + if (z_liveliness_declare_token(z_loan(s), &token, z_loan(keyexpr), NULL) < 0) { printf("Unable to create liveliness token!\n"); exit(-1); } diff --git a/examples/z_sub_liveliness.c b/examples/z_sub_liveliness.c index 4279959b2..10fe9b978 100644 --- a/examples/z_sub_liveliness.c +++ b/examples/z_sub_liveliness.c @@ -60,7 +60,7 @@ int main(int argc, char** argv) { z_owned_closure_sample_t callback; z_closure(&callback, data_handler, NULL, NULL); z_owned_subscriber_t sub; - if (zc_liveliness_declare_subscriber(z_loan(s), &sub, z_loan(ke), z_move(callback), NULL) < 0) { + if (z_liveliness_declare_subscriber(z_loan(s), &sub, z_loan(ke), z_move(callback), NULL) < 0) { printf("Unable to declare liveliness subscriber.\n"); exit(-1); } diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h index 09d6b862a..24a0a680d 100644 --- a/include/zenoh_commons.h +++ b/include/zenoh_commons.h @@ -16,6 +16,32 @@ #define ALIGN(n) #define ZENOHC_API #endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Allocation errors + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef enum z_alloc_error_t { +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * Defragmentation needed. + */ + Z_ALLOC_ERROR_NEED_DEFRAGMENT, +#endif +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * The provider is out of memory. + */ + Z_ALLOC_ERROR_OUT_OF_MEMORY, +#endif +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * Other error. + */ + Z_ALLOC_ERROR_OTHER, +#endif +} z_alloc_error_t; +#endif typedef enum z_congestion_control_t { /** * Messages are not dropped in case of congestion. @@ -77,6 +103,26 @@ typedef enum z_keyexpr_intersection_level_t { Z_KEYEXPR_INTERSECTION_LEVEL_EQUALS = 3, } z_keyexpr_intersection_level_t; #endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Layouting errors + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef enum z_layout_error_t { +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * Layout arguments are incorrect. + */ + Z_LAYOUT_ERROR_INCORRECT_LAYOUT_ARGS, +#endif +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * Layout incompatible with provider. + */ + Z_LAYOUT_ERROR_PROVIDER_INCOMPATIBLE_LAYOUT, +#endif +} z_layout_error_t; +#endif /** * The priority of zenoh messages. */ @@ -169,6 +215,52 @@ typedef enum z_whatami_t { Z_WHATAMI_PEER = 2, Z_WHATAMI_CLIENT = 4, } z_whatami_t; +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Status of SHM buffer allocation operation. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef enum zc_buf_alloc_status_t { +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * Allocation ok + */ + ZC_BUF_ALLOC_STATUS_OK = 0, +#endif +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * Allocation error + */ + ZC_BUF_ALLOC_STATUS_ALLOC_ERROR = 1, +#endif +} zc_buf_alloc_status_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Status of SHM buffer layouting + allocation operation. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef enum zc_buf_layout_alloc_status_t { +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * Allocation ok + */ + ZC_BUF_LAYOUT_ALLOC_STATUS_OK = 0, +#endif +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * Allocation error + */ + ZC_BUF_LAYOUT_ALLOC_STATUS_ALLOC_ERROR = 1, +#endif +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) + /** + * Layouting error + */ + ZC_BUF_LAYOUT_ALLOC_STATUS_LAYOUT_ERROR = 2, +#endif +} zc_buf_layout_alloc_status_t; +#endif /** * The locality of samples to be received by subscribers or targeted by publishers. */ @@ -237,19 +329,56 @@ typedef enum zc_reply_keyexpr_t { ZC_REPLY_KEYEXPR_MATCHING_QUERY = 1, } zc_reply_keyexpr_t; #endif -typedef struct z_moved_alloc_layout_t { - struct z_owned_alloc_layout_t _this; -} z_moved_alloc_layout_t; +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief A result of SHM buffer allocation operation. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct z_buf_alloc_result_t { + enum zc_buf_alloc_status_t status; + z_owned_shm_mut_t buf; + enum z_alloc_error_t error; +} z_buf_alloc_result_t; +#endif typedef int8_t z_result_t; +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief An AllocAlignment. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct z_alloc_alignment_t { + uint8_t pow; +} z_alloc_alignment_t; +#endif +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct zc_threadsafe_context_data_t { + void *ptr; +} zc_threadsafe_context_data_t; +#endif +/** + * A tread-safe droppable context. + * Contexts are idiomatically used in C together with callback interfaces to deliver associated state + * information to each callback. + * + * This is a thread-safe context - the associated callbacks may be executed concurrently with the same + * zc_context_t instance. In other words, all the callbacks associated with this context data MUST be + * thread-safe. + * + * Once moved to zenoh-c ownership, this context is guaranteed to execute delete_fn when deleted.The + * delete_fn is guaranteed to be executed only once at some point of time after the last associated + * callback call returns. + * NOTE: if user doesn't pass the instance of this context to zenoh-c, the delete_fn callback won't + * be executed. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct zc_threadsafe_context_t { + struct zc_threadsafe_context_data_t context; + void (*delete_fn)(void*); +} zc_threadsafe_context_t; +#endif typedef struct z_moved_bytes_t { struct z_owned_bytes_t _this; } z_moved_bytes_t; -typedef struct z_moved_shm_t { - struct z_owned_shm_t _this; -} z_moved_shm_t; -typedef struct z_moved_shm_mut_t { - struct z_owned_shm_mut_t _this; -} z_moved_shm_mut_t; typedef struct z_moved_slice_t { struct z_owned_slice_t _this; } z_moved_slice_t; @@ -265,9 +394,41 @@ typedef struct ALIGN(8) z_bytes_slice_iterator_t { typedef struct z_moved_bytes_writer_t { struct z_owned_bytes_writer_t _this; } z_moved_bytes_writer_t; -typedef struct z_moved_chunk_alloc_result_t { - struct z_owned_chunk_alloc_result_t _this; -} z_moved_chunk_alloc_result_t; +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Unique segment identifier. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef uint32_t z_segment_id_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Chunk id within it's segment. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef uint32_t z_chunk_id_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief A ChunkDescriptor. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct z_chunk_descriptor_t { + z_segment_id_t segment; + z_chunk_id_t chunk; + size_t len; +} z_chunk_descriptor_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief An AllocatedChunk. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct z_allocated_chunk_t { + struct z_chunk_descriptor_t descriptpr; + void *data; +} z_allocated_chunk_t; +#endif /** * Monotonic clock */ @@ -477,9 +638,6 @@ typedef struct z_moved_fifo_handler_sample_t { typedef struct z_query_consolidation_t { enum z_consolidation_mode_t mode; } z_query_consolidation_t; -typedef struct z_moved_source_info_t { - struct z_owned_source_info_t _this; -} z_moved_source_info_t; /** * Options passed to the `z_get()` function. */ @@ -534,7 +692,7 @@ typedef struct z_get_options_t { * * The source info for the query. */ - struct z_moved_source_info_t *source_info; + z_moved_source_info_t *source_info; #endif /** * An optional attachment to attach to the query. @@ -551,9 +709,33 @@ typedef struct z_moved_hello_t { typedef struct z_moved_keyexpr_t { struct z_owned_keyexpr_t _this; } z_moved_keyexpr_t; -typedef struct z_moved_memory_layout_t { - struct z_owned_memory_layout_t _this; -} z_moved_memory_layout_t; +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief The options for `z_liveliness_declare_subscriber()` + */ +#if defined(Z_FEATURE_UNSTABLE_API) +typedef struct z_liveliness_subscriber_options_t { + bool history; +} z_liveliness_subscriber_options_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief The options for `z_liveliness_declare_token()`. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +typedef struct z_liveliness_token_options_t { + uint8_t _dummy; +} z_liveliness_token_options_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief The options for `z_liveliness_get()` + */ +#if defined(Z_FEATURE_UNSTABLE_API) +typedef struct z_liveliness_get_options_t { + uint32_t timeout_ms; +} z_liveliness_get_options_t; +#endif typedef struct z_moved_mutex_t { struct z_owned_mutex_t _this; } z_moved_mutex_t; @@ -594,7 +776,7 @@ typedef struct z_publisher_put_options_t { * * The source info for the publication. */ - struct z_moved_source_info_t *source_info; + z_moved_source_info_t *source_info; #endif /** * The attachment to attach to the publication. @@ -647,7 +829,7 @@ typedef struct z_put_options_t { * * The source info for the message. */ - struct z_moved_source_info_t *source_info; + z_moved_source_info_t *source_info; #endif /** * The attachment to this message. @@ -688,7 +870,7 @@ typedef struct z_query_reply_options_t { * * The source info for the reply. */ - struct z_moved_source_info_t *source_info; + z_moved_source_info_t *source_info; #endif /** * The attachment to this reply. @@ -722,7 +904,7 @@ typedef struct z_query_reply_del_options_t { * * The source info for the reply. */ - struct z_moved_source_info_t *source_info; + z_moved_source_info_t *source_info; #endif /** * The attachment to this reply. @@ -776,15 +958,52 @@ typedef struct z_scout_options_t { typedef struct z_moved_session_t { struct z_owned_session_t _this; } z_moved_session_t; -typedef struct z_moved_shm_client_t { - struct z_owned_shm_client_t _this; -} z_moved_shm_client_t; -typedef struct z_moved_shm_client_storage_t { - struct z_owned_shm_client_storage_t _this; -} z_moved_shm_client_storage_t; -typedef struct z_moved_shm_provider_t { - struct z_owned_shm_provider_t _this; -} z_moved_shm_provider_t; +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Callbacks for ShmSegment. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct zc_shm_segment_callbacks_t { + /** + * Obtain the actual region of memory identified by it's id. + */ + uint8_t *(*map_fn)(z_chunk_id_t chunk_id, void *context); +} zc_shm_segment_callbacks_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief An ShmSegment. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct z_shm_segment_t { + struct zc_threadsafe_context_t context; + struct zc_shm_segment_callbacks_t callbacks; +} z_shm_segment_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Callback for ShmClient. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct zc_shm_client_callbacks_t { + /** + * Attach to particular shared memory segment + */ + bool (*attach_fn)(struct z_shm_segment_t *out_segment, z_segment_id_t segment_id, void *context); +} zc_shm_client_callbacks_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief A result of SHM buffer layouting + allocation operation. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct z_buf_layout_alloc_result_t { + enum zc_buf_layout_alloc_status_t status; + z_owned_shm_mut_t buf; + enum z_alloc_error_t alloc_error; + enum z_layout_error_t layout_error; +} z_buf_layout_alloc_result_t; +#endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. * @brief Unique protocol identifier. @@ -794,6 +1013,47 @@ typedef struct z_moved_shm_provider_t { #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) typedef uint32_t z_protocol_id_t; #endif +/** + * A non-tread-safe droppable context. + * Contexts are idiomatically used in C together with callback interfaces to deliver associated state + * information to each callback. + * + * This is a non-thread-safe context - zenoh-c guarantees that associated callbacks that share the same + * zc_context_t instance will never be executed concurrently. In other words, all the callbacks associated + * with this context data are not required to be thread-safe. + * + * NOTE: Remember that the same callback interfaces associated with different zc_context_t instances can + * still be executed concurrently. The exact behavior depends on user's application, but we strongly + * discourage our users from pinning to some specific behavior unless they _really_ understand what they + * are doing. + * + * Once moved to zenoh-c ownership, this context is guaranteed to execute delete_fn when deleted. The + * delete_fn is guaranteed to be executed only once at some point of time after the last associated + * callback call returns. + * NOTE: if user doesn't pass the instance of this context to zenoh-c, the delete_fn callback won't + * be executed. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct zc_context_t { + void *context; + void (*delete_fn)(void*); +} zc_context_t; +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Callbacks for ShmProviderBackend. + */ +#if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) +typedef struct zc_shm_provider_backend_callbacks_t { + void (*alloc_fn)(z_owned_chunk_alloc_result_t *out_result, + const z_loaned_memory_layout_t *layout, + void *context); + void (*free_fn)(const struct z_chunk_descriptor_t *chunk, void *context); + size_t (*defragment_fn)(void *context); + size_t (*available_fn)(void *context); + void (*layout_for_fn)(z_owned_memory_layout_t *layout, void *context); +} zc_shm_provider_backend_callbacks_t; +#endif typedef struct z_moved_string_array_t { struct z_owned_string_array_t _this; } z_moved_string_array_t; @@ -855,49 +1115,22 @@ typedef struct zc_owned_closure_matching_status_t { #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Moved closure. + * @brief Loaned closure. */ #if defined(Z_FEATURE_UNSTABLE_API) -typedef struct zc_moved_closure_matching_status_t { - struct zc_owned_closure_matching_status_t _this; -} zc_moved_closure_matching_status_t; +typedef struct zc_loaned_closure_matching_status_t { + size_t _0[3]; +} zc_loaned_closure_matching_status_t; #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief The options for `zc_liveliness_declare_token()`. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -typedef struct zc_liveliness_declaration_options_t { - uint8_t _dummy; -} zc_liveliness_declaration_options_t; -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief The options for `zc_liveliness_declare_subscriber()` - */ -#if defined(Z_FEATURE_UNSTABLE_API) -typedef struct zc_liveliness_subscriber_options_t { - bool history; -} zc_liveliness_subscriber_options_t; -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief The options for `zc_liveliness_get()` + * @brief Moved closure. */ #if defined(Z_FEATURE_UNSTABLE_API) -typedef struct zc_liveliness_get_options_t { - uint32_t timeout_ms; -} zc_liveliness_get_options_t; +typedef struct zc_moved_closure_matching_status_t { + struct zc_owned_closure_matching_status_t _this; +} zc_moved_closure_matching_status_t; #endif -typedef struct zc_moved_liveliness_token_t { - struct zc_owned_liveliness_token_t _this; -} zc_moved_liveliness_token_t; -typedef struct zc_moved_matching_listener_t { - struct zc_owned_matching_listener_t _this; -} zc_moved_matching_listener_t; -typedef struct zc_moved_shm_client_list_t { - struct zc_owned_shm_client_list_t _this; -} zc_moved_shm_client_list_t; /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. * @brief Options passed to the `ze_declare_publication_cache()` function. @@ -966,19 +1199,6 @@ typedef struct ze_querying_subscriber_options_t { uint64_t query_timeout_ms; } ze_querying_subscriber_options_t; #endif -typedef struct ze_moved_publication_cache_t { - struct ze_owned_publication_cache_t _this; -} ze_moved_publication_cache_t; -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief A loaned Zenoh publication cache. - */ -typedef struct ALIGN(8) ze_loaned_publication_cache_t { - uint8_t _0[96]; -} ze_loaned_publication_cache_t; -typedef struct ze_moved_querying_subscriber_t { - struct ze_owned_querying_subscriber_t _this; -} ze_moved_querying_subscriber_t; typedef struct ze_moved_serializer_t { struct ze_owned_serializer_t _this; } ze_moved_serializer_t; @@ -1005,7 +1225,7 @@ ZENOHC_API extern const unsigned int Z_SHM_POSIX_PROTOCOL_ID; #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_alloc_layout_alloc(struct z_buf_alloc_result_t *out_result, - const struct z_loaned_alloc_layout_t *layout); + const z_loaned_alloc_layout_t *layout); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1014,7 +1234,7 @@ void z_alloc_layout_alloc(struct z_buf_alloc_result_t *out_result, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_alloc_layout_alloc_gc(struct z_buf_alloc_result_t *out_result, - const struct z_loaned_alloc_layout_t *layout); + const z_loaned_alloc_layout_t *layout); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1023,7 +1243,7 @@ void z_alloc_layout_alloc_gc(struct z_buf_alloc_result_t *out_result, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_alloc_layout_alloc_gc_defrag(struct z_buf_alloc_result_t *out_result, - const struct z_loaned_alloc_layout_t *layout); + const z_loaned_alloc_layout_t *layout); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1032,7 +1252,7 @@ void z_alloc_layout_alloc_gc_defrag(struct z_buf_alloc_result_t *out_result, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_alloc_layout_alloc_gc_defrag_blocking(struct z_buf_alloc_result_t *out_result, - const struct z_loaned_alloc_layout_t *layout); + const z_loaned_alloc_layout_t *layout); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1041,7 +1261,7 @@ void z_alloc_layout_alloc_gc_defrag_blocking(struct z_buf_alloc_result_t *out_re #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_alloc_layout_alloc_gc_defrag_dealloc(struct z_buf_alloc_result_t *out_result, - const struct z_loaned_alloc_layout_t *layout); + const z_loaned_alloc_layout_t *layout); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1049,7 +1269,7 @@ void z_alloc_layout_alloc_gc_defrag_dealloc(struct z_buf_alloc_result_t *out_res */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_alloc_layout_drop(struct z_moved_alloc_layout_t *this_); +void z_alloc_layout_drop(z_moved_alloc_layout_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1057,7 +1277,7 @@ void z_alloc_layout_drop(struct z_moved_alloc_layout_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -const struct z_loaned_alloc_layout_t *z_alloc_layout_loan(const struct z_owned_alloc_layout_t *this_); +const z_loaned_alloc_layout_t *z_alloc_layout_loan(const z_owned_alloc_layout_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1065,8 +1285,8 @@ const struct z_loaned_alloc_layout_t *z_alloc_layout_loan(const struct z_owned_a */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -z_result_t z_alloc_layout_new(struct z_owned_alloc_layout_t *this_, - const struct z_loaned_shm_provider_t *provider, +z_result_t z_alloc_layout_new(z_owned_alloc_layout_t *this_, + const z_loaned_shm_provider_t *provider, size_t size, struct z_alloc_alignment_t alignment); #endif @@ -1078,7 +1298,7 @@ z_result_t z_alloc_layout_new(struct z_owned_alloc_layout_t *this_, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API z_result_t z_alloc_layout_threadsafe_alloc_gc_defrag_async(struct z_buf_alloc_result_t *out_result, - const struct z_loaned_alloc_layout_t *layout, + const z_loaned_alloc_layout_t *layout, struct zc_threadsafe_context_t result_context, void (*result_callback)(void*, struct z_buf_alloc_result_t*)); @@ -1093,7 +1313,7 @@ z_result_t z_alloc_layout_threadsafe_alloc_gc_defrag_async(struct z_buf_alloc_re #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API z_result_t z_bytes_as_loaned_shm(const struct z_loaned_bytes_t *this_, - const struct z_loaned_shm_t **dst); + const z_loaned_shm_t **dst); #endif /** * Constructs an owned shallow copy of data in provided uninitialized memory location. @@ -1160,7 +1380,7 @@ z_result_t z_bytes_from_buf(struct z_owned_bytes_t *this_, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API z_result_t z_bytes_from_shm(struct z_owned_bytes_t *this_, - struct z_moved_shm_t *shm); + z_moved_shm_t *shm); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1169,7 +1389,7 @@ z_result_t z_bytes_from_shm(struct z_owned_bytes_t *this_, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API z_result_t z_bytes_from_shm_mut(struct z_owned_bytes_t *this_, - struct z_moved_shm_mut_t *shm); + z_moved_shm_mut_t *shm); #endif /** * Converts a slice into `z_owned_bytes_t`. @@ -1296,7 +1516,7 @@ bool z_bytes_slice_iterator_next(struct z_bytes_slice_iterator_t *this_, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API z_result_t z_bytes_to_mut_loaned_shm(struct z_loaned_bytes_t *this_, - struct z_loaned_shm_t **dst); + z_loaned_shm_t **dst); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1308,7 +1528,7 @@ z_result_t z_bytes_to_mut_loaned_shm(struct z_loaned_bytes_t *this_, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API z_result_t z_bytes_to_owned_shm(const struct z_loaned_bytes_t *this_, - struct z_owned_shm_t *dst); + z_owned_shm_t *dst); #endif /** * Converts data into an owned slice. @@ -1381,7 +1601,7 @@ z_result_t z_bytes_writer_write_all(struct z_loaned_bytes_writer_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_chunk_alloc_result_drop(struct z_moved_chunk_alloc_result_t *this_); +void z_chunk_alloc_result_drop(z_moved_chunk_alloc_result_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -1389,7 +1609,7 @@ void z_chunk_alloc_result_drop(struct z_moved_chunk_alloc_result_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_chunk_alloc_result_new_error(struct z_owned_chunk_alloc_result_t *this_, +void z_chunk_alloc_result_new_error(z_owned_chunk_alloc_result_t *this_, enum z_alloc_error_t alloc_error); #endif /** @@ -1398,7 +1618,7 @@ void z_chunk_alloc_result_new_error(struct z_owned_chunk_alloc_result_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -z_result_t z_chunk_alloc_result_new_ok(struct z_owned_chunk_alloc_result_t *this_, +z_result_t z_chunk_alloc_result_new_ok(z_owned_chunk_alloc_result_t *this_, struct z_allocated_chunk_t allocated_chunk); #endif /** @@ -2196,7 +2416,7 @@ const struct z_loaned_encoding_t *z_encoding_zenoh_string(void); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -uint32_t z_entity_global_id_eid(const struct z_entity_global_id_t *this_); +uint32_t z_entity_global_id_eid(const z_entity_global_id_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2204,7 +2424,7 @@ uint32_t z_entity_global_id_eid(const struct z_entity_global_id_t *this_); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -struct z_id_t z_entity_global_id_zid(const struct z_entity_global_id_t *this_); +struct z_id_t z_entity_global_id_zid(const z_entity_global_id_t *this_); #endif /** * Constructs send and recieve ends of the fifo channel @@ -2394,7 +2614,7 @@ ZENOHC_API struct z_id_t z_info_zid(const struct z_loaned_session_t *session); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -bool z_internal_alloc_layout_check(const struct z_owned_alloc_layout_t *this_); +bool z_internal_alloc_layout_check(const z_owned_alloc_layout_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2402,7 +2622,7 @@ bool z_internal_alloc_layout_check(const struct z_owned_alloc_layout_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_internal_alloc_layout_null(struct z_owned_alloc_layout_t *this_); +void z_internal_alloc_layout_null(z_owned_alloc_layout_t *this_); #endif /** * Returns ``true`` if `this_` is in a valid state, ``false`` if it is in a gravestone state. @@ -2426,7 +2646,7 @@ ZENOHC_API void z_internal_bytes_writer_null(struct z_owned_bytes_writer_t *this */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -bool z_internal_chunk_alloc_result_check(const struct z_owned_chunk_alloc_result_t *this_); +bool z_internal_chunk_alloc_result_check(const z_owned_chunk_alloc_result_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2434,7 +2654,7 @@ bool z_internal_chunk_alloc_result_check(const struct z_owned_chunk_alloc_result */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_internal_chunk_alloc_result_null(struct z_owned_chunk_alloc_result_t *this_); +void z_internal_chunk_alloc_result_null(z_owned_chunk_alloc_result_t *this_); #endif /** * Returns ``true`` if closure is valid, ``false`` if it is in gravestone state. @@ -2549,7 +2769,7 @@ ZENOHC_API void z_internal_keyexpr_null(struct z_owned_keyexpr_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -bool z_internal_memory_layout_check(const struct z_owned_memory_layout_t *this_); +bool z_internal_memory_layout_check(const z_owned_memory_layout_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2557,7 +2777,7 @@ bool z_internal_memory_layout_check(const struct z_owned_memory_layout_t *this_) */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_internal_memory_layout_null(struct z_owned_memory_layout_t *this_); +void z_internal_memory_layout_null(z_owned_memory_layout_t *this_); #endif /** * Returns ``true`` if mutex is valid, ``false`` otherwise. @@ -2656,7 +2876,7 @@ ZENOHC_API void z_internal_session_null(struct z_owned_session_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -bool z_internal_shm_check(const struct z_owned_shm_t *this_); +bool z_internal_shm_check(const z_owned_shm_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2664,7 +2884,7 @@ bool z_internal_shm_check(const struct z_owned_shm_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -bool z_internal_shm_client_check(const struct z_owned_shm_client_t *this_); +bool z_internal_shm_client_check(const z_owned_shm_client_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2672,7 +2892,7 @@ bool z_internal_shm_client_check(const struct z_owned_shm_client_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_internal_shm_client_null(struct z_owned_shm_client_t *this_); +void z_internal_shm_client_null(z_owned_shm_client_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2680,7 +2900,7 @@ void z_internal_shm_client_null(struct z_owned_shm_client_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -bool z_internal_shm_client_storage_check(const struct z_owned_shm_client_storage_t *this_); +bool z_internal_shm_client_storage_check(const z_owned_shm_client_storage_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2688,7 +2908,7 @@ bool z_internal_shm_client_storage_check(const struct z_owned_shm_client_storage */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_internal_shm_client_storage_null(struct z_owned_shm_client_storage_t *this_); +void z_internal_shm_client_storage_null(z_owned_shm_client_storage_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2696,7 +2916,7 @@ void z_internal_shm_client_storage_null(struct z_owned_shm_client_storage_t *thi */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -bool z_internal_shm_mut_check(const struct z_owned_shm_mut_t *this_); +bool z_internal_shm_mut_check(const z_owned_shm_mut_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2704,7 +2924,7 @@ bool z_internal_shm_mut_check(const struct z_owned_shm_mut_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_internal_shm_mut_null(struct z_owned_shm_mut_t *this_); +void z_internal_shm_mut_null(z_owned_shm_mut_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2712,7 +2932,7 @@ void z_internal_shm_mut_null(struct z_owned_shm_mut_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_internal_shm_null(struct z_owned_shm_t *this_); +void z_internal_shm_null(z_owned_shm_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2720,7 +2940,7 @@ void z_internal_shm_null(struct z_owned_shm_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -bool z_internal_shm_provider_check(const struct z_owned_shm_provider_t *this_); +bool z_internal_shm_provider_check(const z_owned_shm_provider_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2728,7 +2948,7 @@ bool z_internal_shm_provider_check(const struct z_owned_shm_provider_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_internal_shm_provider_null(struct z_owned_shm_provider_t *this_); +void z_internal_shm_provider_null(z_owned_shm_provider_t *this_); #endif /** * @return ``true`` if slice is not empty, ``false`` otherwise. @@ -2744,7 +2964,7 @@ ZENOHC_API void z_internal_slice_null(struct z_owned_slice_t *this_); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -bool z_internal_source_info_check(const struct z_owned_source_info_t *this_); +bool z_internal_source_info_check(const z_owned_source_info_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2752,7 +2972,7 @@ bool z_internal_source_info_check(const struct z_owned_source_info_t *this_); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -void z_internal_source_info_null(struct z_owned_source_info_t *this_); +void z_internal_source_info_null(z_owned_source_info_t *this_); #endif /** * @return ``true`` if the string array is valid, ``false`` if it is in a gravestone state. @@ -2923,13 +3143,116 @@ ZENOHC_API enum z_keyexpr_intersection_level_t z_keyexpr_relation_to(const struct z_loaned_keyexpr_t *left, const struct z_loaned_keyexpr_t *right); #endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Declares a subscriber on liveliness tokens that intersect `key_expr`. + * + * @param session: A Zenoh session. + * @param subscriber: An uninitialized memory location where subscriber will be constructed. + * @param key_expr: The key expression to subscribe to. + * @param callback: The callback function that will be called each time a liveliness token status is changed. + * @param options: The options to be passed to the liveliness subscriber declaration. + * + * @return 0 in case of success, negative error values otherwise. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +ZENOHC_API +z_result_t z_liveliness_declare_subscriber(const struct z_loaned_session_t *session, + struct z_owned_subscriber_t *subscriber, + const struct z_loaned_keyexpr_t *key_expr, + struct z_moved_closure_sample_t *callback, + struct z_liveliness_subscriber_options_t *options); +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Constructs and declares a liveliness token on the network. + * + * Liveliness token subscribers on an intersecting key expression will receive a PUT sample when connectivity + * is achieved, and a DELETE sample if it's lost. + * + * @param session: A Zenos session to declare the liveliness token. + * @param token: An uninitialized memory location where liveliness token will be constructed. + * @param key_expr: A keyexpr to declare a liveliess token for. + * @param _options: Liveliness token declaration properties. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +ZENOHC_API +z_result_t z_liveliness_declare_token(const struct z_loaned_session_t *session, + zc_owned_liveliness_token_t *token, + const struct z_loaned_keyexpr_t *key_expr, + const struct z_liveliness_token_options_t *_options); +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Queries liveliness tokens currently on the network with a key expression intersecting with `key_expr`. + * + * @param session: The Zenoh session. + * @param key_expr: The key expression to query liveliness tokens for. + * @param callback: The callback function that will be called for each received reply. + * @param options: Additional options for the liveliness get operation. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +ZENOHC_API +z_result_t z_liveliness_get(const struct z_loaned_session_t *session, + const struct z_loaned_keyexpr_t *key_expr, + struct z_moved_closure_reply_t *callback, + struct z_liveliness_get_options_t *options); +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Constructs default value `z_liveliness_get_options_t`. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +ZENOHC_API +void z_liveliness_get_options_default(struct z_liveliness_get_options_t *this_); +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Constucts default value for `z_liveliness_declare_subscriber_options_t`. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +ZENOHC_API +void z_liveliness_subscriber_options_default(struct z_liveliness_subscriber_options_t *this_); +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Undeclares liveliness token, frees memory and resets it to a gravestone state. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +ZENOHC_API +void z_liveliness_token_drop(zc_moved_liveliness_token_t *this_); +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Borrows token. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +ZENOHC_API +const zc_loaned_liveliness_token_t *z_liveliness_token_loan(const zc_owned_liveliness_token_t *this_); +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Constructs default value for `z_liveliness_token_options_t`. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +ZENOHC_API +void z_liveliness_token_options_default(struct z_liveliness_token_options_t *this_); +#endif +/** + * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. + * @brief Destroys a liveliness token, notifying subscribers of its destruction. + */ +#if defined(Z_FEATURE_UNSTABLE_API) +ZENOHC_API +z_result_t z_liveliness_undeclare_token(zc_moved_liveliness_token_t *this_); +#endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. * @brief Deletes Memory Layout. */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_memory_layout_drop(struct z_moved_memory_layout_t *this_); +void z_memory_layout_drop(z_moved_memory_layout_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2937,7 +3260,7 @@ void z_memory_layout_drop(struct z_moved_memory_layout_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_memory_layout_get_data(const struct z_loaned_memory_layout_t *this_, +void z_memory_layout_get_data(const z_loaned_memory_layout_t *this_, size_t *out_size, struct z_alloc_alignment_t *out_alignment); #endif @@ -2947,7 +3270,7 @@ void z_memory_layout_get_data(const struct z_loaned_memory_layout_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -const struct z_loaned_memory_layout_t *z_memory_layout_loan(const struct z_owned_memory_layout_t *this_); +const z_loaned_memory_layout_t *z_memory_layout_loan(const z_owned_memory_layout_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -2955,7 +3278,7 @@ const struct z_loaned_memory_layout_t *z_memory_layout_loan(const struct z_owned */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -z_result_t z_memory_layout_new(struct z_owned_memory_layout_t *this_, +z_result_t z_memory_layout_new(z_owned_memory_layout_t *this_, size_t size, struct z_alloc_alignment_t alignment); #endif @@ -3011,7 +3334,7 @@ ZENOHC_API void z_open_options_default(struct z_open_options_t *this_); ZENOHC_API z_result_t z_open_with_custom_shm_clients(struct z_owned_session_t *this_, struct z_moved_config_t *config, - const struct z_loaned_shm_client_storage_t *shm_clients); + const z_loaned_shm_client_storage_t *shm_clients); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3019,7 +3342,7 @@ z_result_t z_open_with_custom_shm_clients(struct z_owned_session_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_posix_shm_client_new(struct z_owned_shm_client_t *this_); +void z_posix_shm_client_new(z_owned_shm_client_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3027,8 +3350,8 @@ void z_posix_shm_client_new(struct z_owned_shm_client_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -z_result_t z_posix_shm_provider_new(struct z_owned_shm_provider_t *this_, - const struct z_loaned_memory_layout_t *layout); +z_result_t z_posix_shm_provider_new(z_owned_shm_provider_t *this_, + const z_loaned_memory_layout_t *layout); #endif /** * Returns the default value of #z_priority_t. @@ -3057,7 +3380,7 @@ ZENOHC_API void z_publisher_drop(struct z_moved_publisher_t *this_); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -struct z_entity_global_id_t z_publisher_id(const struct z_loaned_publisher_t *publisher); +z_entity_global_id_t z_publisher_id(const struct z_loaned_publisher_t *publisher); #endif /** * Returns the key expression of the publisher. @@ -3278,7 +3601,7 @@ ZENOHC_API void z_queryable_drop(struct z_moved_queryable_t *this_); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -struct z_entity_global_id_t z_queryable_id(const struct z_loaned_queryable_t *queryable); +z_entity_global_id_t z_queryable_id(const struct z_loaned_queryable_t *queryable); #endif ZENOHC_API const struct z_loaned_queryable_t *z_queryable_loan(const struct z_owned_queryable_t *this_); @@ -3312,7 +3635,7 @@ ZENOHC_API uint8_t z_random_u8(void); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_ref_shm_client_storage_global(struct z_owned_shm_client_storage_t *this_); +void z_ref_shm_client_storage_global(z_owned_shm_client_storage_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3547,7 +3870,7 @@ enum z_reliability_t z_sample_reliability(const struct z_loaned_sample_t *this_) */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -const struct z_loaned_source_info_t *z_sample_source_info(const struct z_loaned_sample_t *this_); +const z_loaned_source_info_t *z_sample_source_info(const struct z_loaned_sample_t *this_); #endif /** * Returns the sample timestamp. @@ -3593,7 +3916,7 @@ ZENOHC_API struct z_loaned_session_t *z_session_loan_mut(struct z_owned_session_ */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_client_drop(struct z_moved_shm_client_t *this_); +void z_shm_client_drop(z_moved_shm_client_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3601,7 +3924,7 @@ void z_shm_client_drop(struct z_moved_shm_client_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_client_new(struct z_owned_shm_client_t *this_, +void z_shm_client_new(z_owned_shm_client_t *this_, struct zc_threadsafe_context_t context, struct zc_shm_client_callbacks_t callbacks); #endif @@ -3611,8 +3934,8 @@ void z_shm_client_new(struct z_owned_shm_client_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_client_storage_clone(struct z_owned_shm_client_storage_t *this_, - const struct z_loaned_shm_client_storage_t *from); +void z_shm_client_storage_clone(z_owned_shm_client_storage_t *this_, + const z_loaned_shm_client_storage_t *from); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3620,7 +3943,7 @@ void z_shm_client_storage_clone(struct z_owned_shm_client_storage_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_client_storage_drop(struct z_moved_shm_client_storage_t *this_); +void z_shm_client_storage_drop(z_moved_shm_client_storage_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3628,7 +3951,7 @@ void z_shm_client_storage_drop(struct z_moved_shm_client_storage_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -const struct z_loaned_shm_client_storage_t *z_shm_client_storage_loan(const struct z_owned_shm_client_storage_t *this_); +const z_loaned_shm_client_storage_t *z_shm_client_storage_loan(const z_owned_shm_client_storage_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3636,8 +3959,8 @@ const struct z_loaned_shm_client_storage_t *z_shm_client_storage_loan(const stru */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -z_result_t z_shm_client_storage_new(struct z_owned_shm_client_storage_t *this_, - const struct zc_loaned_shm_client_list_t *clients, +z_result_t z_shm_client_storage_new(z_owned_shm_client_storage_t *this_, + const zc_loaned_shm_client_list_t *clients, bool add_default_client_set); #endif /** @@ -3646,7 +3969,7 @@ z_result_t z_shm_client_storage_new(struct z_owned_shm_client_storage_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_client_storage_new_default(struct z_owned_shm_client_storage_t *this_); +void z_shm_client_storage_new_default(z_owned_shm_client_storage_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3654,8 +3977,8 @@ void z_shm_client_storage_new_default(struct z_owned_shm_client_storage_t *this_ */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_clone(struct z_owned_shm_t *out, - const struct z_loaned_shm_t *this_); +void z_shm_clone(z_owned_shm_t *out, + const z_loaned_shm_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3663,7 +3986,7 @@ void z_shm_clone(struct z_owned_shm_t *out, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -const unsigned char *z_shm_data(const struct z_loaned_shm_t *this_); +const unsigned char *z_shm_data(const z_loaned_shm_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3671,7 +3994,7 @@ const unsigned char *z_shm_data(const struct z_loaned_shm_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_drop(struct z_moved_shm_t *this_); +void z_shm_drop(z_moved_shm_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3679,8 +4002,8 @@ void z_shm_drop(struct z_moved_shm_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_from_mut(struct z_owned_shm_t *this_, - struct z_moved_shm_mut_t *that); +void z_shm_from_mut(z_owned_shm_t *this_, + z_moved_shm_mut_t *that); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3688,7 +4011,7 @@ void z_shm_from_mut(struct z_owned_shm_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -size_t z_shm_len(const struct z_loaned_shm_t *this_); +size_t z_shm_len(const z_loaned_shm_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3696,7 +4019,7 @@ size_t z_shm_len(const struct z_loaned_shm_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -const struct z_loaned_shm_t *z_shm_loan(const struct z_owned_shm_t *this_); +const z_loaned_shm_t *z_shm_loan(const z_owned_shm_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3704,7 +4027,7 @@ const struct z_loaned_shm_t *z_shm_loan(const struct z_owned_shm_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -struct z_loaned_shm_t *z_shm_loan_mut(struct z_owned_shm_t *this_); +z_loaned_shm_t *z_shm_loan_mut(z_owned_shm_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3712,7 +4035,7 @@ struct z_loaned_shm_t *z_shm_loan_mut(struct z_owned_shm_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -const unsigned char *z_shm_mut_data(const struct z_loaned_shm_mut_t *this_); +const unsigned char *z_shm_mut_data(const z_loaned_shm_mut_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3720,7 +4043,7 @@ const unsigned char *z_shm_mut_data(const struct z_loaned_shm_mut_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -unsigned char *z_shm_mut_data_mut(struct z_loaned_shm_mut_t *this_); +unsigned char *z_shm_mut_data_mut(z_loaned_shm_mut_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3728,7 +4051,7 @@ unsigned char *z_shm_mut_data_mut(struct z_loaned_shm_mut_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_mut_drop(struct z_moved_shm_mut_t *this_); +void z_shm_mut_drop(z_moved_shm_mut_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3736,7 +4059,7 @@ void z_shm_mut_drop(struct z_moved_shm_mut_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -size_t z_shm_mut_len(const struct z_loaned_shm_mut_t *this_); +size_t z_shm_mut_len(const z_loaned_shm_mut_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3744,7 +4067,7 @@ size_t z_shm_mut_len(const struct z_loaned_shm_mut_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -const struct z_loaned_shm_mut_t *z_shm_mut_loan(const struct z_owned_shm_mut_t *this_); +const z_loaned_shm_mut_t *z_shm_mut_loan(const z_owned_shm_mut_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3752,7 +4075,7 @@ const struct z_loaned_shm_mut_t *z_shm_mut_loan(const struct z_owned_shm_mut_t * */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -struct z_loaned_shm_mut_t *z_shm_mut_loan_mut(struct z_owned_shm_mut_t *this_); +z_loaned_shm_mut_t *z_shm_mut_loan_mut(z_owned_shm_mut_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3766,9 +4089,9 @@ struct z_loaned_shm_mut_t *z_shm_mut_loan_mut(struct z_owned_shm_mut_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -z_result_t z_shm_mut_try_from_immut(struct z_owned_shm_mut_t *this_, - struct z_moved_shm_t *that, - struct z_owned_shm_t *immut); +z_result_t z_shm_mut_try_from_immut(z_owned_shm_mut_t *this_, + z_moved_shm_t *that, + z_owned_shm_t *immut); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3777,7 +4100,7 @@ z_result_t z_shm_mut_try_from_immut(struct z_owned_shm_mut_t *this_, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_shm_provider_alloc(struct z_buf_layout_alloc_result_t *out_result, - const struct z_loaned_shm_provider_t *provider, + const z_loaned_shm_provider_t *provider, size_t size, struct z_alloc_alignment_t alignment); #endif @@ -3788,7 +4111,7 @@ void z_shm_provider_alloc(struct z_buf_layout_alloc_result_t *out_result, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_shm_provider_alloc_gc(struct z_buf_layout_alloc_result_t *out_result, - const struct z_loaned_shm_provider_t *provider, + const z_loaned_shm_provider_t *provider, size_t size, struct z_alloc_alignment_t alignment); #endif @@ -3799,7 +4122,7 @@ void z_shm_provider_alloc_gc(struct z_buf_layout_alloc_result_t *out_result, #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_shm_provider_alloc_gc_defrag(struct z_buf_layout_alloc_result_t *out_result, - const struct z_loaned_shm_provider_t *provider, + const z_loaned_shm_provider_t *provider, size_t size, struct z_alloc_alignment_t alignment); #endif @@ -3811,7 +4134,7 @@ void z_shm_provider_alloc_gc_defrag(struct z_buf_layout_alloc_result_t *out_resu #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API z_result_t z_shm_provider_alloc_gc_defrag_async(struct z_buf_layout_alloc_result_t *out_result, - const struct z_loaned_shm_provider_t *provider, + const z_loaned_shm_provider_t *provider, size_t size, struct z_alloc_alignment_t alignment, struct zc_threadsafe_context_t result_context, @@ -3825,7 +4148,7 @@ z_result_t z_shm_provider_alloc_gc_defrag_async(struct z_buf_layout_alloc_result #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_shm_provider_alloc_gc_defrag_blocking(struct z_buf_layout_alloc_result_t *out_result, - const struct z_loaned_shm_provider_t *provider, + const z_loaned_shm_provider_t *provider, size_t size, struct z_alloc_alignment_t alignment); #endif @@ -3836,7 +4159,7 @@ void z_shm_provider_alloc_gc_defrag_blocking(struct z_buf_layout_alloc_result_t #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API void z_shm_provider_alloc_gc_defrag_dealloc(struct z_buf_layout_alloc_result_t *out_result, - const struct z_loaned_shm_provider_t *provider, + const z_loaned_shm_provider_t *provider, size_t size, struct z_alloc_alignment_t alignment); #endif @@ -3846,7 +4169,7 @@ void z_shm_provider_alloc_gc_defrag_dealloc(struct z_buf_layout_alloc_result_t * */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -size_t z_shm_provider_available(const struct z_loaned_shm_provider_t *provider); +size_t z_shm_provider_available(const z_loaned_shm_provider_t *provider); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3855,7 +4178,7 @@ size_t z_shm_provider_available(const struct z_loaned_shm_provider_t *provider); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -size_t z_shm_provider_defragment(const struct z_loaned_shm_provider_t *provider); +size_t z_shm_provider_defragment(const z_loaned_shm_provider_t *provider); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3863,7 +4186,7 @@ size_t z_shm_provider_defragment(const struct z_loaned_shm_provider_t *provider) */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_provider_drop(struct z_moved_shm_provider_t *this_); +void z_shm_provider_drop(z_moved_shm_provider_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3871,7 +4194,7 @@ void z_shm_provider_drop(struct z_moved_shm_provider_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -size_t z_shm_provider_garbage_collect(const struct z_loaned_shm_provider_t *provider); +size_t z_shm_provider_garbage_collect(const z_loaned_shm_provider_t *provider); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3879,7 +4202,7 @@ size_t z_shm_provider_garbage_collect(const struct z_loaned_shm_provider_t *prov */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -const struct z_loaned_shm_provider_t *z_shm_provider_loan(const struct z_owned_shm_provider_t *this_); +const z_loaned_shm_provider_t *z_shm_provider_loan(const z_owned_shm_provider_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3887,8 +4210,8 @@ const struct z_loaned_shm_provider_t *z_shm_provider_loan(const struct z_owned_s */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -z_result_t z_shm_provider_map(struct z_owned_shm_mut_t *out_result, - const struct z_loaned_shm_provider_t *provider, +z_result_t z_shm_provider_map(z_owned_shm_mut_t *out_result, + const z_loaned_shm_provider_t *provider, struct z_allocated_chunk_t allocated_chunk, size_t len); #endif @@ -3898,7 +4221,7 @@ z_result_t z_shm_provider_map(struct z_owned_shm_mut_t *out_result, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_provider_new(struct z_owned_shm_provider_t *this_, +void z_shm_provider_new(z_owned_shm_provider_t *this_, z_protocol_id_t id, struct zc_context_t context, struct zc_shm_provider_backend_callbacks_t callbacks); @@ -3909,7 +4232,7 @@ void z_shm_provider_new(struct z_owned_shm_provider_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void z_shm_provider_threadsafe_new(struct z_owned_shm_provider_t *this_, +void z_shm_provider_threadsafe_new(z_owned_shm_provider_t *this_, z_protocol_id_t id, struct zc_threadsafe_context_t context, struct zc_shm_provider_backend_callbacks_t callbacks); @@ -3920,7 +4243,7 @@ void z_shm_provider_threadsafe_new(struct z_owned_shm_provider_t *this_, */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -struct z_loaned_shm_mut_t *z_shm_try_mut(struct z_owned_shm_t *this_); +z_loaned_shm_mut_t *z_shm_try_mut(z_owned_shm_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -3928,7 +4251,7 @@ struct z_loaned_shm_mut_t *z_shm_try_mut(struct z_owned_shm_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -struct z_loaned_shm_mut_t *z_shm_try_reloan_mut(struct z_loaned_shm_t *this_); +z_loaned_shm_mut_t *z_shm_try_reloan_mut(z_loaned_shm_t *this_); #endif /** * Puts current thread to sleep for specified amount of milliseconds. @@ -4001,7 +4324,7 @@ ZENOHC_API const struct z_loaned_slice_t *z_slice_loan(const struct z_owned_slic */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -void z_source_info_drop(struct z_moved_source_info_t *this_); +void z_source_info_drop(z_moved_source_info_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4009,7 +4332,7 @@ void z_source_info_drop(struct z_moved_source_info_t *this_); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -struct z_entity_global_id_t z_source_info_id(const struct z_loaned_source_info_t *this_); +z_entity_global_id_t z_source_info_id(const z_loaned_source_info_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4017,7 +4340,7 @@ struct z_entity_global_id_t z_source_info_id(const struct z_loaned_source_info_t */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -const struct z_loaned_source_info_t *z_source_info_loan(const struct z_owned_source_info_t *this_); +const z_loaned_source_info_t *z_source_info_loan(const z_owned_source_info_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4025,8 +4348,8 @@ const struct z_loaned_source_info_t *z_source_info_loan(const struct z_owned_sou */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -z_result_t z_source_info_new(struct z_owned_source_info_t *this_, - const struct z_entity_global_id_t *source_id, +z_result_t z_source_info_new(z_owned_source_info_t *this_, + const z_entity_global_id_t *source_id, uint32_t source_sn); #endif /** @@ -4035,7 +4358,7 @@ z_result_t z_source_info_new(struct z_owned_source_info_t *this_, */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -uint32_t z_source_info_sn(const struct z_loaned_source_info_t *this_); +uint32_t z_source_info_sn(const z_loaned_source_info_t *this_); #endif /** * Constructs an owned copy of a string array. @@ -4629,7 +4952,7 @@ void zc_internal_closure_matching_status_null(struct zc_owned_closure_matching_s */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -bool zc_internal_liveliness_token_check(const struct zc_owned_liveliness_token_t *this_); +bool zc_internal_liveliness_token_check(const zc_owned_liveliness_token_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4637,7 +4960,7 @@ bool zc_internal_liveliness_token_check(const struct zc_owned_liveliness_token_t */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -void zc_internal_liveliness_token_null(struct zc_owned_liveliness_token_t *this_); +void zc_internal_liveliness_token_null(zc_owned_liveliness_token_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4645,7 +4968,7 @@ void zc_internal_liveliness_token_null(struct zc_owned_liveliness_token_t *this_ */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -bool zc_internal_matching_listener_check(const struct zc_owned_matching_listener_t *this_); +bool zc_internal_matching_listener_check(const zc_owned_matching_listener_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4653,7 +4976,7 @@ bool zc_internal_matching_listener_check(const struct zc_owned_matching_listener */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -void zc_internal_matching_listener_null(struct zc_owned_matching_listener_t *this_); +void zc_internal_matching_listener_null(zc_owned_matching_listener_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4661,7 +4984,7 @@ void zc_internal_matching_listener_null(struct zc_owned_matching_listener_t *thi */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -bool zc_internal_shm_client_list_check(const struct zc_owned_shm_client_list_t *this_); +bool zc_internal_shm_client_list_check(const zc_owned_shm_client_list_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4669,15 +4992,7 @@ bool zc_internal_shm_client_list_check(const struct zc_owned_shm_client_list_t * */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void zc_internal_shm_client_list_null(struct zc_owned_shm_client_list_t *this_); -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Constructs default value for `zc_liveliness_declaration_options_t`. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -void zc_liveliness_declaration_options_default(struct zc_liveliness_declaration_options_t *this_); +void zc_internal_shm_client_list_null(zc_owned_shm_client_list_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4695,102 +5010,7 @@ ZENOHC_API z_result_t zc_liveliness_declare_background_subscriber(const struct z_loaned_session_t *session, const struct z_loaned_keyexpr_t *key_expr, struct z_moved_closure_sample_t *callback, - struct zc_liveliness_subscriber_options_t *options); -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Declares a subscriber on liveliness tokens that intersect `key_expr`. - * - * @param session: A Zenoh session. - * @param subscriber: An uninitialized memory location where subscriber will be constructed. - * @param key_expr: The key expression to subscribe to. - * @param callback: The callback function that will be called each time a liveliness token status is changed. - * @param options: The options to be passed to the liveliness subscriber declaration. - * - * @return 0 in case of success, negative error values otherwise. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -z_result_t zc_liveliness_declare_subscriber(const struct z_loaned_session_t *session, - struct z_owned_subscriber_t *subscriber, - const struct z_loaned_keyexpr_t *key_expr, - struct z_moved_closure_sample_t *callback, - struct zc_liveliness_subscriber_options_t *options); -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Constructs and declares a liveliness token on the network. - * - * Liveliness token subscribers on an intersecting key expression will receive a PUT sample when connectivity - * is achieved, and a DELETE sample if it's lost. - * - * @param session: A Zenos session to declare the liveliness token. - * @param token: An uninitialized memory location where liveliness token will be constructed. - * @param key_expr: A keyexpr to declare a liveliess token for. - * @param _options: Liveliness token declaration properties. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -z_result_t zc_liveliness_declare_token(const struct z_loaned_session_t *session, - struct zc_owned_liveliness_token_t *token, - const struct z_loaned_keyexpr_t *key_expr, - const struct zc_liveliness_declaration_options_t *_options); -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Queries liveliness tokens currently on the network with a key expression intersecting with `key_expr`. - * - * @param session: The Zenoh session. - * @param key_expr: The key expression to query liveliness tokens for. - * @param callback: The callback function that will be called for each received reply. - * @param options: Additional options for the liveliness get operation. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -z_result_t zc_liveliness_get(const struct z_loaned_session_t *session, - const struct z_loaned_keyexpr_t *key_expr, - struct z_moved_closure_reply_t *callback, - struct zc_liveliness_get_options_t *options); -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Constructs default value `zc_liveliness_get_options_t`. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -void zc_liveliness_get_options_default(struct zc_liveliness_get_options_t *this_); -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Constucts default value for `zc_liveliness_declare_subscriber_options_t`. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -void zc_liveliness_subscriber_options_default(struct zc_liveliness_subscriber_options_t *this_); -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Undeclares liveliness token, frees memory and resets it to a gravestone state. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -void zc_liveliness_token_drop(struct zc_moved_liveliness_token_t *this_); -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Borrows token. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -const struct zc_loaned_liveliness_token_t *zc_liveliness_token_loan(const struct zc_owned_liveliness_token_t *this_); -#endif -/** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. - * @brief Destroys a liveliness token, notifying subscribers of its destruction. - */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -z_result_t zc_liveliness_undeclare_token(struct zc_moved_liveliness_token_t *this_); + struct z_liveliness_subscriber_options_t *options); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4828,7 +5048,7 @@ z_result_t zc_publisher_declare_background_matching_listener(const struct z_loan #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API z_result_t zc_publisher_declare_matching_listener(const struct z_loaned_publisher_t *publisher, - struct zc_owned_matching_listener_t *matching_listener, + zc_owned_matching_listener_t *matching_listener, struct zc_moved_closure_matching_status_t *callback); #endif /** @@ -4848,7 +5068,7 @@ z_result_t zc_publisher_get_matching_status(const struct z_loaned_publisher_t *t */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -void zc_publisher_matching_listener_drop(struct zc_moved_matching_listener_t *this_); +void zc_publisher_matching_listener_drop(zc_moved_matching_listener_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4864,9 +5084,9 @@ enum zc_reply_keyexpr_t zc_reply_keyexpr_default(void); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -z_result_t zc_shm_client_list_add_client(struct zc_loaned_shm_client_list_t *this_, +z_result_t zc_shm_client_list_add_client(zc_loaned_shm_client_list_t *this_, z_protocol_id_t id, - struct z_moved_shm_client_t *client); + z_moved_shm_client_t *client); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4874,7 +5094,7 @@ z_result_t zc_shm_client_list_add_client(struct zc_loaned_shm_client_list_t *thi */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void zc_shm_client_list_drop(struct zc_moved_shm_client_list_t *this_); +void zc_shm_client_list_drop(zc_moved_shm_client_list_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4882,7 +5102,7 @@ void zc_shm_client_list_drop(struct zc_moved_shm_client_list_t *this_); */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -const struct zc_loaned_shm_client_list_t *zc_shm_client_list_loan(const struct zc_owned_shm_client_list_t *this_); +const zc_loaned_shm_client_list_t *zc_shm_client_list_loan(const zc_owned_shm_client_list_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4890,7 +5110,7 @@ const struct zc_loaned_shm_client_list_t *zc_shm_client_list_loan(const struct z */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -struct zc_loaned_shm_client_list_t *zc_shm_client_list_loan_mut(struct zc_owned_shm_client_list_t *this_); +zc_loaned_shm_client_list_t *zc_shm_client_list_loan_mut(zc_owned_shm_client_list_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -4898,7 +5118,7 @@ struct zc_loaned_shm_client_list_t *zc_shm_client_list_loan_mut(struct zc_owned_ */ #if (defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)) ZENOHC_API -void zc_shm_client_list_new(struct zc_owned_shm_client_list_t *this_); +void zc_shm_client_list_new(zc_owned_shm_client_list_t *this_); #endif /** * Stops all Zenoh tasks and drops all related static variables. @@ -4966,7 +5186,7 @@ z_result_t ze_declare_background_querying_subscriber(const struct z_loaned_sessi #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API z_result_t ze_declare_publication_cache(const struct z_loaned_session_t *session, - struct ze_owned_publication_cache_t *pub_cache, + ze_owned_publication_cache_t *pub_cache, const struct z_loaned_keyexpr_t *key_expr, struct ze_publication_cache_options_t *options); #endif @@ -4985,7 +5205,7 @@ z_result_t ze_declare_publication_cache(const struct z_loaned_session_t *session #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API z_result_t ze_declare_querying_subscriber(const struct z_loaned_session_t *session, - struct ze_owned_querying_subscriber_t *querying_subscriber, + ze_owned_querying_subscriber_t *querying_subscriber, const struct z_loaned_keyexpr_t *key_expr, struct z_moved_closure_sample_t *callback, struct ze_querying_subscriber_options_t *options); @@ -5169,7 +5389,7 @@ ZENOHC_API bool ze_deserializer_is_done(const struct ze_deserializer_t *this_); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -bool ze_internal_publication_cache_check(const struct ze_owned_publication_cache_t *this_); +bool ze_internal_publication_cache_check(const ze_owned_publication_cache_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -5177,7 +5397,7 @@ bool ze_internal_publication_cache_check(const struct ze_owned_publication_cache */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -void ze_internal_publication_cache_null(struct ze_owned_publication_cache_t *this_); +void ze_internal_publication_cache_null(ze_owned_publication_cache_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -5185,13 +5405,13 @@ void ze_internal_publication_cache_null(struct ze_owned_publication_cache_t *thi */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -bool ze_internal_querying_subscriber_check(const struct ze_owned_querying_subscriber_t *this_); +bool ze_internal_querying_subscriber_check(const ze_owned_querying_subscriber_t *this_); #endif /** * Constructs a querying subscriber in a gravestone state. */ #if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API void ze_internal_querying_subscriber_null(struct ze_owned_querying_subscriber_t *this_); +ZENOHC_API void ze_internal_querying_subscriber_null(ze_owned_querying_subscriber_t *this_); #endif /** * @brief Returns ``true`` if `this_` is in a valid state, ``false`` if it is in a gravestone state. @@ -5208,7 +5428,7 @@ ZENOHC_API void ze_internal_serializer_null(struct ze_owned_serializer_t *this_) */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -void ze_publication_cache_drop(struct ze_moved_publication_cache_t *this_); +void ze_publication_cache_drop(ze_moved_publication_cache_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -5216,7 +5436,7 @@ void ze_publication_cache_drop(struct ze_moved_publication_cache_t *this_); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -const struct z_loaned_keyexpr_t *ze_publication_cache_keyexpr(const struct ze_loaned_publication_cache_t *this_); +const struct z_loaned_keyexpr_t *ze_publication_cache_keyexpr(const ze_loaned_publication_cache_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -5224,7 +5444,7 @@ const struct z_loaned_keyexpr_t *ze_publication_cache_keyexpr(const struct ze_lo */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -const struct ze_loaned_publication_cache_t *ze_publication_cache_loan(const struct ze_owned_publication_cache_t *this_); +const ze_loaned_publication_cache_t *ze_publication_cache_loan(const ze_owned_publication_cache_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -5241,7 +5461,7 @@ void ze_publication_cache_options_default(struct ze_publication_cache_options_t */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -void ze_querying_subscriber_drop(struct ze_moved_querying_subscriber_t *this_); +void ze_querying_subscriber_drop(ze_moved_querying_subscriber_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -5251,7 +5471,7 @@ void ze_querying_subscriber_drop(struct ze_moved_querying_subscriber_t *this_); */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -z_result_t ze_querying_subscriber_get(const struct ze_loaned_querying_subscriber_t *this_, +z_result_t ze_querying_subscriber_get(const ze_loaned_querying_subscriber_t *this_, const struct z_loaned_keyexpr_t *selector, struct z_get_options_t *options); #endif @@ -5261,7 +5481,7 @@ z_result_t ze_querying_subscriber_get(const struct ze_loaned_querying_subscriber */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -const struct ze_loaned_querying_subscriber_t *ze_querying_subscriber_loan(const struct ze_owned_querying_subscriber_t *this_); +const ze_loaned_querying_subscriber_t *ze_querying_subscriber_loan(const ze_owned_querying_subscriber_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -5506,7 +5726,7 @@ z_result_t ze_serializer_serialize_uint8(struct ze_loaned_serializer_t *this_, */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -z_result_t ze_undeclare_publication_cache(struct ze_moved_publication_cache_t *this_); +z_result_t ze_undeclare_publication_cache(ze_moved_publication_cache_t *this_); #endif /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -5516,5 +5736,5 @@ z_result_t ze_undeclare_publication_cache(struct ze_moved_publication_cache_t *t */ #if defined(Z_FEATURE_UNSTABLE_API) ZENOHC_API -z_result_t ze_undeclare_querying_subscriber(struct ze_moved_querying_subscriber_t *this_); +z_result_t ze_undeclare_querying_subscriber(ze_moved_querying_subscriber_t *this_); #endif diff --git a/include/zenoh_macros.h b/include/zenoh_macros.h index 9bc08707c..e03ca9db1 100644 --- a/include/zenoh_macros.h +++ b/include/zenoh_macros.h @@ -4,10 +4,8 @@ #ifndef __cplusplus -static inline z_moved_alloc_layout_t* z_alloc_layout_move(z_owned_alloc_layout_t* x) { return (z_moved_alloc_layout_t*)(x); } static inline z_moved_bytes_t* z_bytes_move(z_owned_bytes_t* x) { return (z_moved_bytes_t*)(x); } static inline z_moved_bytes_writer_t* z_bytes_writer_move(z_owned_bytes_writer_t* x) { return (z_moved_bytes_writer_t*)(x); } -static inline z_moved_chunk_alloc_result_t* z_chunk_alloc_result_move(z_owned_chunk_alloc_result_t* x) { return (z_moved_chunk_alloc_result_t*)(x); } static inline z_moved_closure_hello_t* z_closure_hello_move(z_owned_closure_hello_t* x) { return (z_moved_closure_hello_t*)(x); } static inline z_moved_closure_query_t* z_closure_query_move(z_owned_closure_query_t* x) { return (z_moved_closure_query_t*)(x); } static inline z_moved_closure_reply_t* z_closure_reply_move(z_owned_closure_reply_t* x) { return (z_moved_closure_reply_t*)(x); } @@ -21,7 +19,6 @@ static inline z_moved_fifo_handler_reply_t* z_fifo_handler_reply_move(z_owned_fi static inline z_moved_fifo_handler_sample_t* z_fifo_handler_sample_move(z_owned_fifo_handler_sample_t* x) { return (z_moved_fifo_handler_sample_t*)(x); } static inline z_moved_hello_t* z_hello_move(z_owned_hello_t* x) { return (z_moved_hello_t*)(x); } static inline z_moved_keyexpr_t* z_keyexpr_move(z_owned_keyexpr_t* x) { return (z_moved_keyexpr_t*)(x); } -static inline z_moved_memory_layout_t* z_memory_layout_move(z_owned_memory_layout_t* x) { return (z_moved_memory_layout_t*)(x); } static inline z_moved_mutex_t* z_mutex_move(z_owned_mutex_t* x) { return (z_moved_mutex_t*)(x); } static inline z_moved_publisher_t* z_publisher_move(z_owned_publisher_t* x) { return (z_moved_publisher_t*)(x); } static inline z_moved_query_t* z_query_move(z_owned_query_t* x) { return (z_moved_query_t*)(x); } @@ -33,30 +30,17 @@ static inline z_moved_ring_handler_reply_t* z_ring_handler_reply_move(z_owned_ri static inline z_moved_ring_handler_sample_t* z_ring_handler_sample_move(z_owned_ring_handler_sample_t* x) { return (z_moved_ring_handler_sample_t*)(x); } static inline z_moved_sample_t* z_sample_move(z_owned_sample_t* x) { return (z_moved_sample_t*)(x); } static inline z_moved_session_t* z_session_move(z_owned_session_t* x) { return (z_moved_session_t*)(x); } -static inline z_moved_shm_client_t* z_shm_client_move(z_owned_shm_client_t* x) { return (z_moved_shm_client_t*)(x); } -static inline z_moved_shm_client_storage_t* z_shm_client_storage_move(z_owned_shm_client_storage_t* x) { return (z_moved_shm_client_storage_t*)(x); } -static inline z_moved_shm_t* z_shm_move(z_owned_shm_t* x) { return (z_moved_shm_t*)(x); } -static inline z_moved_shm_mut_t* z_shm_mut_move(z_owned_shm_mut_t* x) { return (z_moved_shm_mut_t*)(x); } -static inline z_moved_shm_provider_t* z_shm_provider_move(z_owned_shm_provider_t* x) { return (z_moved_shm_provider_t*)(x); } static inline z_moved_slice_t* z_slice_move(z_owned_slice_t* x) { return (z_moved_slice_t*)(x); } -static inline z_moved_source_info_t* z_source_info_move(z_owned_source_info_t* x) { return (z_moved_source_info_t*)(x); } static inline z_moved_string_array_t* z_string_array_move(z_owned_string_array_t* x) { return (z_moved_string_array_t*)(x); } static inline z_moved_string_t* z_string_move(z_owned_string_t* x) { return (z_moved_string_t*)(x); } static inline z_moved_subscriber_t* z_subscriber_move(z_owned_subscriber_t* x) { return (z_moved_subscriber_t*)(x); } static inline z_moved_task_t* z_task_move(z_owned_task_t* x) { return (z_moved_task_t*)(x); } static inline zc_moved_closure_log_t* zc_closure_log_move(zc_owned_closure_log_t* x) { return (zc_moved_closure_log_t*)(x); } -static inline zc_moved_closure_matching_status_t* zc_closure_matching_status_move(zc_owned_closure_matching_status_t* x) { return (zc_moved_closure_matching_status_t*)(x); } -static inline zc_moved_liveliness_token_t* zc_liveliness_token_move(zc_owned_liveliness_token_t* x) { return (zc_moved_liveliness_token_t*)(x); } -static inline zc_moved_matching_listener_t* zc_publisher_matching_listener_move(zc_owned_matching_listener_t* x) { return (zc_moved_matching_listener_t*)(x); } -static inline zc_moved_shm_client_list_t* zc_shm_client_list_move(zc_owned_shm_client_list_t* x) { return (zc_moved_shm_client_list_t*)(x); } -static inline ze_moved_publication_cache_t* ze_publication_cache_move(ze_owned_publication_cache_t* x) { return (ze_moved_publication_cache_t*)(x); } -static inline ze_moved_querying_subscriber_t* ze_querying_subscriber_move(ze_owned_querying_subscriber_t* x) { return (ze_moved_querying_subscriber_t*)(x); } static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x) { return (ze_moved_serializer_t*)(x); } #define z_loan(this_) \ _Generic((this_), \ - z_owned_alloc_layout_t : z_alloc_layout_loan, \ z_owned_bytes_t : z_bytes_loan, \ z_owned_bytes_writer_t : z_bytes_writer_loan, \ z_owned_closure_hello_t : z_closure_hello_loan, \ @@ -72,7 +56,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_fifo_handler_sample_t : z_fifo_handler_sample_loan, \ z_owned_hello_t : z_hello_loan, \ z_owned_keyexpr_t : z_keyexpr_loan, \ - z_owned_memory_layout_t : z_memory_layout_loan, \ z_owned_publisher_t : z_publisher_loan, \ z_owned_query_t : z_query_loan, \ z_owned_queryable_t : z_queryable_loan, \ @@ -83,12 +66,7 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_ring_handler_sample_t : z_ring_handler_sample_loan, \ z_owned_sample_t : z_sample_loan, \ z_owned_session_t : z_session_loan, \ - z_owned_shm_client_storage_t : z_shm_client_storage_loan, \ - z_owned_shm_t : z_shm_loan, \ - z_owned_shm_mut_t : z_shm_mut_loan, \ - z_owned_shm_provider_t : z_shm_provider_loan, \ z_owned_slice_t : z_slice_loan, \ - z_owned_source_info_t : z_source_info_loan, \ z_owned_string_array_t : z_string_array_loan, \ z_owned_string_t : z_string_loan, \ z_owned_subscriber_t : z_subscriber_loan, \ @@ -96,11 +74,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_view_slice_t : z_view_slice_loan, \ z_view_string_t : z_view_string_loan, \ zc_owned_closure_log_t : zc_closure_log_loan, \ - zc_owned_closure_matching_status_t : zc_closure_matching_status_loan, \ - zc_owned_liveliness_token_t : zc_liveliness_token_loan, \ - zc_owned_shm_client_list_t : zc_shm_client_list_loan, \ - ze_owned_publication_cache_t : ze_publication_cache_loan, \ - ze_owned_querying_subscriber_t : ze_querying_subscriber_loan, \ ze_owned_serializer_t : ze_serializer_loan \ )(&this_) @@ -118,19 +91,14 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_mutex_t : z_mutex_loan_mut, \ z_owned_publisher_t : z_publisher_loan_mut, \ z_owned_session_t : z_session_loan_mut, \ - z_owned_shm_t : z_shm_loan_mut, \ - z_owned_shm_mut_t : z_shm_mut_loan_mut, \ z_owned_string_array_t : z_string_array_loan_mut, \ - zc_owned_shm_client_list_t : zc_shm_client_list_loan_mut, \ ze_owned_serializer_t : ze_serializer_loan_mut \ )(&this_) #define z_drop(this_) \ _Generic((this_), \ - z_moved_alloc_layout_t* : z_alloc_layout_drop, \ z_moved_bytes_t* : z_bytes_drop, \ z_moved_bytes_writer_t* : z_bytes_writer_drop, \ - z_moved_chunk_alloc_result_t* : z_chunk_alloc_result_drop, \ z_moved_closure_hello_t* : z_closure_hello_drop, \ z_moved_closure_query_t* : z_closure_query_drop, \ z_moved_closure_reply_t* : z_closure_reply_drop, \ @@ -144,7 +112,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_moved_fifo_handler_sample_t* : z_fifo_handler_sample_drop, \ z_moved_hello_t* : z_hello_drop, \ z_moved_keyexpr_t* : z_keyexpr_drop, \ - z_moved_memory_layout_t* : z_memory_layout_drop, \ z_moved_mutex_t* : z_mutex_drop, \ z_moved_publisher_t* : z_publisher_drop, \ z_moved_query_t* : z_query_drop, \ @@ -156,33 +123,19 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_moved_ring_handler_sample_t* : z_ring_handler_sample_drop, \ z_moved_sample_t* : z_sample_drop, \ z_moved_session_t* : z_session_drop, \ - z_moved_shm_client_t* : z_shm_client_drop, \ - z_moved_shm_client_storage_t* : z_shm_client_storage_drop, \ - z_moved_shm_t* : z_shm_drop, \ - z_moved_shm_mut_t* : z_shm_mut_drop, \ - z_moved_shm_provider_t* : z_shm_provider_drop, \ z_moved_slice_t* : z_slice_drop, \ - z_moved_source_info_t* : z_source_info_drop, \ z_moved_string_array_t* : z_string_array_drop, \ z_moved_string_t* : z_string_drop, \ z_moved_subscriber_t* : z_subscriber_drop, \ z_moved_task_t* : z_task_drop, \ zc_moved_closure_log_t* : zc_closure_log_drop, \ - zc_moved_closure_matching_status_t* : zc_closure_matching_status_drop, \ - zc_moved_liveliness_token_t* : zc_liveliness_token_drop, \ - zc_moved_matching_listener_t* : zc_publisher_matching_listener_drop, \ - zc_moved_shm_client_list_t* : zc_shm_client_list_drop, \ - ze_moved_publication_cache_t* : ze_publication_cache_drop, \ - ze_moved_querying_subscriber_t* : ze_querying_subscriber_drop, \ ze_moved_serializer_t* : ze_serializer_drop \ )(this_) #define z_move(this_) \ _Generic((this_), \ - z_owned_alloc_layout_t : z_alloc_layout_move, \ z_owned_bytes_t : z_bytes_move, \ z_owned_bytes_writer_t : z_bytes_writer_move, \ - z_owned_chunk_alloc_result_t : z_chunk_alloc_result_move, \ z_owned_closure_hello_t : z_closure_hello_move, \ z_owned_closure_query_t : z_closure_query_move, \ z_owned_closure_reply_t : z_closure_reply_move, \ @@ -196,7 +149,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_fifo_handler_sample_t : z_fifo_handler_sample_move, \ z_owned_hello_t : z_hello_move, \ z_owned_keyexpr_t : z_keyexpr_move, \ - z_owned_memory_layout_t : z_memory_layout_move, \ z_owned_mutex_t : z_mutex_move, \ z_owned_publisher_t : z_publisher_move, \ z_owned_query_t : z_query_move, \ @@ -208,33 +160,19 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_ring_handler_sample_t : z_ring_handler_sample_move, \ z_owned_sample_t : z_sample_move, \ z_owned_session_t : z_session_move, \ - z_owned_shm_client_t : z_shm_client_move, \ - z_owned_shm_client_storage_t : z_shm_client_storage_move, \ - z_owned_shm_t : z_shm_move, \ - z_owned_shm_mut_t : z_shm_mut_move, \ - z_owned_shm_provider_t : z_shm_provider_move, \ z_owned_slice_t : z_slice_move, \ - z_owned_source_info_t : z_source_info_move, \ z_owned_string_array_t : z_string_array_move, \ z_owned_string_t : z_string_move, \ z_owned_subscriber_t : z_subscriber_move, \ z_owned_task_t : z_task_move, \ zc_owned_closure_log_t : zc_closure_log_move, \ - zc_owned_closure_matching_status_t : zc_closure_matching_status_move, \ - zc_owned_liveliness_token_t : zc_liveliness_token_move, \ - zc_owned_matching_listener_t : zc_publisher_matching_listener_move, \ - zc_owned_shm_client_list_t : zc_shm_client_list_move, \ - ze_owned_publication_cache_t : ze_publication_cache_move, \ - ze_owned_querying_subscriber_t : ze_querying_subscriber_move, \ ze_owned_serializer_t : ze_serializer_move \ )(&this_) #define z_internal_null(this_) \ _Generic((this_), \ - z_owned_alloc_layout_t* : z_internal_alloc_layout_null, \ z_owned_bytes_t* : z_internal_bytes_null, \ z_owned_bytes_writer_t* : z_internal_bytes_writer_null, \ - z_owned_chunk_alloc_result_t* : z_internal_chunk_alloc_result_null, \ z_owned_closure_hello_t* : z_internal_closure_hello_null, \ z_owned_closure_query_t* : z_internal_closure_query_null, \ z_owned_closure_reply_t* : z_internal_closure_reply_null, \ @@ -248,7 +186,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_fifo_handler_sample_t* : z_internal_fifo_handler_sample_null, \ z_owned_hello_t* : z_internal_hello_null, \ z_owned_keyexpr_t* : z_internal_keyexpr_null, \ - z_owned_memory_layout_t* : z_internal_memory_layout_null, \ z_owned_mutex_t* : z_internal_mutex_null, \ z_owned_publisher_t* : z_internal_publisher_null, \ z_owned_query_t* : z_internal_query_null, \ @@ -260,31 +197,17 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_ring_handler_sample_t* : z_internal_ring_handler_sample_null, \ z_owned_sample_t* : z_internal_sample_null, \ z_owned_session_t* : z_internal_session_null, \ - z_owned_shm_client_t* : z_internal_shm_client_null, \ - z_owned_shm_client_storage_t* : z_internal_shm_client_storage_null, \ - z_owned_shm_mut_t* : z_internal_shm_mut_null, \ - z_owned_shm_t* : z_internal_shm_null, \ - z_owned_shm_provider_t* : z_internal_shm_provider_null, \ z_owned_slice_t* : z_internal_slice_null, \ - z_owned_source_info_t* : z_internal_source_info_null, \ z_owned_string_array_t* : z_internal_string_array_null, \ z_owned_string_t* : z_internal_string_null, \ z_owned_subscriber_t* : z_internal_subscriber_null, \ z_owned_task_t* : z_internal_task_null, \ zc_owned_closure_log_t* : zc_internal_closure_log_null, \ - zc_owned_closure_matching_status_t* : zc_internal_closure_matching_status_null, \ - zc_owned_liveliness_token_t* : zc_internal_liveliness_token_null, \ - zc_owned_matching_listener_t* : zc_internal_matching_listener_null, \ - zc_owned_shm_client_list_t* : zc_internal_shm_client_list_null, \ - ze_owned_publication_cache_t* : ze_internal_publication_cache_null, \ - ze_owned_querying_subscriber_t* : ze_internal_querying_subscriber_null, \ ze_owned_serializer_t* : ze_internal_serializer_null \ )(this_) -static inline void z_alloc_layout_take(z_owned_alloc_layout_t* this_, z_moved_alloc_layout_t* x) { *this_ = x->_this; z_internal_alloc_layout_null(&x->_this); } static inline void z_bytes_take(z_owned_bytes_t* this_, z_moved_bytes_t* x) { *this_ = x->_this; z_internal_bytes_null(&x->_this); } static inline void z_bytes_writer_take(z_owned_bytes_writer_t* this_, z_moved_bytes_writer_t* x) { *this_ = x->_this; z_internal_bytes_writer_null(&x->_this); } -static inline void z_chunk_alloc_result_take(z_owned_chunk_alloc_result_t* this_, z_moved_chunk_alloc_result_t* x) { *this_ = x->_this; z_internal_chunk_alloc_result_null(&x->_this); } static inline void z_closure_hello_take(z_owned_closure_hello_t* this_, z_moved_closure_hello_t* x) { *this_ = x->_this; z_internal_closure_hello_null(&x->_this); } static inline void z_closure_query_take(z_owned_closure_query_t* closure_, z_moved_closure_query_t* x) { *closure_ = x->_this; z_internal_closure_query_null(&x->_this); } static inline void z_closure_reply_take(z_owned_closure_reply_t* closure_, z_moved_closure_reply_t* x) { *closure_ = x->_this; z_internal_closure_reply_null(&x->_this); } @@ -298,7 +221,6 @@ static inline void z_fifo_handler_reply_take(z_owned_fifo_handler_reply_t* this_ static inline void z_fifo_handler_sample_take(z_owned_fifo_handler_sample_t* this_, z_moved_fifo_handler_sample_t* x) { *this_ = x->_this; z_internal_fifo_handler_sample_null(&x->_this); } static inline void z_hello_take(z_owned_hello_t* this_, z_moved_hello_t* x) { *this_ = x->_this; z_internal_hello_null(&x->_this); } static inline void z_keyexpr_take(z_owned_keyexpr_t* this_, z_moved_keyexpr_t* x) { *this_ = x->_this; z_internal_keyexpr_null(&x->_this); } -static inline void z_memory_layout_take(z_owned_memory_layout_t* this_, z_moved_memory_layout_t* x) { *this_ = x->_this; z_internal_memory_layout_null(&x->_this); } static inline void z_mutex_take(z_owned_mutex_t* this_, z_moved_mutex_t* x) { *this_ = x->_this; z_internal_mutex_null(&x->_this); } static inline void z_publisher_take(z_owned_publisher_t* this_, z_moved_publisher_t* x) { *this_ = x->_this; z_internal_publisher_null(&x->_this); } static inline void z_query_take(z_owned_query_t* this_, z_moved_query_t* x) { *this_ = x->_this; z_internal_query_null(&x->_this); } @@ -310,33 +232,19 @@ static inline void z_ring_handler_reply_take(z_owned_ring_handler_reply_t* this_ static inline void z_ring_handler_sample_take(z_owned_ring_handler_sample_t* this_, z_moved_ring_handler_sample_t* x) { *this_ = x->_this; z_internal_ring_handler_sample_null(&x->_this); } static inline void z_sample_take(z_owned_sample_t* this_, z_moved_sample_t* x) { *this_ = x->_this; z_internal_sample_null(&x->_this); } static inline void z_session_take(z_owned_session_t* this_, z_moved_session_t* x) { *this_ = x->_this; z_internal_session_null(&x->_this); } -static inline void z_shm_client_take(z_owned_shm_client_t* this_, z_moved_shm_client_t* x) { *this_ = x->_this; z_internal_shm_client_null(&x->_this); } -static inline void z_shm_client_storage_take(z_owned_shm_client_storage_t* this_, z_moved_shm_client_storage_t* x) { *this_ = x->_this; z_internal_shm_client_storage_null(&x->_this); } -static inline void z_shm_take(z_owned_shm_t* this_, z_moved_shm_t* x) { *this_ = x->_this; z_internal_shm_null(&x->_this); } -static inline void z_shm_mut_take(z_owned_shm_mut_t* this_, z_moved_shm_mut_t* x) { *this_ = x->_this; z_internal_shm_mut_null(&x->_this); } -static inline void z_shm_provider_take(z_owned_shm_provider_t* this_, z_moved_shm_provider_t* x) { *this_ = x->_this; z_internal_shm_provider_null(&x->_this); } static inline void z_slice_take(z_owned_slice_t* this_, z_moved_slice_t* x) { *this_ = x->_this; z_internal_slice_null(&x->_this); } -static inline void z_source_info_take(z_owned_source_info_t* this_, z_moved_source_info_t* x) { *this_ = x->_this; z_internal_source_info_null(&x->_this); } static inline void z_string_array_take(z_owned_string_array_t* this_, z_moved_string_array_t* x) { *this_ = x->_this; z_internal_string_array_null(&x->_this); } static inline void z_string_take(z_owned_string_t* this_, z_moved_string_t* x) { *this_ = x->_this; z_internal_string_null(&x->_this); } static inline void z_subscriber_take(z_owned_subscriber_t* this_, z_moved_subscriber_t* x) { *this_ = x->_this; z_internal_subscriber_null(&x->_this); } static inline void z_task_take(z_owned_task_t* this_, z_moved_task_t* x) { *this_ = x->_this; z_internal_task_null(&x->_this); } static inline void zc_closure_log_take(zc_owned_closure_log_t* closure_, zc_moved_closure_log_t* x) { *closure_ = x->_this; zc_internal_closure_log_null(&x->_this); } -static inline void zc_closure_matching_status_take(zc_owned_closure_matching_status_t* closure_, zc_moved_closure_matching_status_t* x) { *closure_ = x->_this; zc_internal_closure_matching_status_null(&x->_this); } -static inline void zc_liveliness_token_take(zc_owned_liveliness_token_t* this_, zc_moved_liveliness_token_t* x) { *this_ = x->_this; zc_internal_liveliness_token_null(&x->_this); } -static inline void zc_publisher_matching_listener_take(zc_owned_matching_listener_t* this_, zc_moved_matching_listener_t* x) { *this_ = x->_this; zc_internal_matching_listener_null(&x->_this); } -static inline void zc_shm_client_list_take(zc_owned_shm_client_list_t* this_, zc_moved_shm_client_list_t* x) { *this_ = x->_this; zc_internal_shm_client_list_null(&x->_this); } -static inline void ze_publication_cache_take(ze_owned_publication_cache_t* this_, ze_moved_publication_cache_t* x) { *this_ = x->_this; ze_internal_publication_cache_null(&x->_this); } -static inline void ze_querying_subscriber_take(ze_owned_querying_subscriber_t* this_, ze_moved_querying_subscriber_t* x) { *this_ = x->_this; ze_internal_querying_subscriber_null(&x->_this); } static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_serializer_t* x) { *this_ = x->_this; ze_internal_serializer_null(&x->_this); } #define z_take(this_, x) \ _Generic((this_), \ - z_owned_alloc_layout_t* : z_alloc_layout_take, \ z_owned_bytes_t* : z_bytes_take, \ z_owned_bytes_writer_t* : z_bytes_writer_take, \ - z_owned_chunk_alloc_result_t* : z_chunk_alloc_result_take, \ z_owned_closure_hello_t* : z_closure_hello_take, \ z_owned_closure_query_t* : z_closure_query_take, \ z_owned_closure_reply_t* : z_closure_reply_take, \ @@ -350,7 +258,6 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser z_owned_fifo_handler_sample_t* : z_fifo_handler_sample_take, \ z_owned_hello_t* : z_hello_take, \ z_owned_keyexpr_t* : z_keyexpr_take, \ - z_owned_memory_layout_t* : z_memory_layout_take, \ z_owned_mutex_t* : z_mutex_take, \ z_owned_publisher_t* : z_publisher_take, \ z_owned_query_t* : z_query_take, \ @@ -362,33 +269,19 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser z_owned_ring_handler_sample_t* : z_ring_handler_sample_take, \ z_owned_sample_t* : z_sample_take, \ z_owned_session_t* : z_session_take, \ - z_owned_shm_client_t* : z_shm_client_take, \ - z_owned_shm_client_storage_t* : z_shm_client_storage_take, \ - z_owned_shm_t* : z_shm_take, \ - z_owned_shm_mut_t* : z_shm_mut_take, \ - z_owned_shm_provider_t* : z_shm_provider_take, \ z_owned_slice_t* : z_slice_take, \ - z_owned_source_info_t* : z_source_info_take, \ z_owned_string_array_t* : z_string_array_take, \ z_owned_string_t* : z_string_take, \ z_owned_subscriber_t* : z_subscriber_take, \ z_owned_task_t* : z_task_take, \ zc_owned_closure_log_t* : zc_closure_log_take, \ - zc_owned_closure_matching_status_t* : zc_closure_matching_status_take, \ - zc_owned_liveliness_token_t* : zc_liveliness_token_take, \ - zc_owned_matching_listener_t* : zc_publisher_matching_listener_take, \ - zc_owned_shm_client_list_t* : zc_shm_client_list_take, \ - ze_owned_publication_cache_t* : ze_publication_cache_take, \ - ze_owned_querying_subscriber_t* : ze_querying_subscriber_take, \ ze_owned_serializer_t* : ze_serializer_take \ )(this_, x) #define z_internal_check(this_) \ _Generic((this_), \ - z_owned_alloc_layout_t : z_internal_alloc_layout_check, \ z_owned_bytes_t : z_internal_bytes_check, \ z_owned_bytes_writer_t : z_internal_bytes_writer_check, \ - z_owned_chunk_alloc_result_t : z_internal_chunk_alloc_result_check, \ z_owned_closure_hello_t : z_internal_closure_hello_check, \ z_owned_closure_query_t : z_internal_closure_query_check, \ z_owned_closure_reply_t : z_internal_closure_reply_check, \ @@ -402,7 +295,6 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser z_owned_fifo_handler_sample_t : z_internal_fifo_handler_sample_check, \ z_owned_hello_t : z_internal_hello_check, \ z_owned_keyexpr_t : z_internal_keyexpr_check, \ - z_owned_memory_layout_t : z_internal_memory_layout_check, \ z_owned_mutex_t : z_internal_mutex_check, \ z_owned_publisher_t : z_internal_publisher_check, \ z_owned_query_t : z_internal_query_check, \ @@ -414,24 +306,12 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser z_owned_ring_handler_sample_t : z_internal_ring_handler_sample_check, \ z_owned_sample_t : z_internal_sample_check, \ z_owned_session_t : z_internal_session_check, \ - z_owned_shm_t : z_internal_shm_check, \ - z_owned_shm_client_t : z_internal_shm_client_check, \ - z_owned_shm_client_storage_t : z_internal_shm_client_storage_check, \ - z_owned_shm_mut_t : z_internal_shm_mut_check, \ - z_owned_shm_provider_t : z_internal_shm_provider_check, \ z_owned_slice_t : z_internal_slice_check, \ - z_owned_source_info_t : z_internal_source_info_check, \ z_owned_string_array_t : z_internal_string_array_check, \ z_owned_string_t : z_internal_string_check, \ z_owned_subscriber_t : z_internal_subscriber_check, \ z_owned_task_t : z_internal_task_check, \ zc_owned_closure_log_t : zc_internal_closure_log_check, \ - zc_owned_closure_matching_status_t : zc_internal_closure_matching_status_check, \ - zc_owned_liveliness_token_t : zc_internal_liveliness_token_check, \ - zc_owned_matching_listener_t : zc_internal_matching_listener_check, \ - zc_owned_shm_client_list_t : zc_internal_shm_client_list_check, \ - ze_owned_publication_cache_t : ze_internal_publication_cache_check, \ - ze_owned_querying_subscriber_t : ze_internal_querying_subscriber_check, \ ze_owned_serializer_t : ze_internal_serializer_check \ )(&this_) @@ -441,8 +321,7 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser const z_loaned_closure_query_t* : z_closure_query_call, \ const z_loaned_closure_reply_t* : z_closure_reply_call, \ const z_loaned_closure_sample_t* : z_closure_sample_call, \ - const z_loaned_closure_zid_t* : z_closure_zid_call, \ - const zc_loaned_closure_matching_status_t* : zc_closure_matching_status_call \ + const z_loaned_closure_zid_t* : z_closure_zid_call \ )(closure, hello) typedef void(*z_closure_drop_callback_t)(void *context); @@ -452,7 +331,6 @@ typedef void(*z_closure_reply_callback_t)(z_loaned_reply_t *reply, void *context typedef void(*z_closure_sample_callback_t)(z_loaned_sample_t *sample, void *context); typedef void(*z_closure_zid_callback_t)(const z_id_t *z_id, void *context); typedef void(*zc_closure_log_callback_t)(zc_log_severity_t severity, const z_loaned_string_t *msg, void *context); -typedef void(*zc_closure_matching_status_callback_t)(const zc_matching_status_t *matching_status, void *context); #define z_closure(this_, call, drop, context) \ _Generic((this_), \ @@ -461,8 +339,7 @@ typedef void(*zc_closure_matching_status_callback_t)(const zc_matching_status_t z_owned_closure_reply_t* : z_closure_reply, \ z_owned_closure_sample_t* : z_closure_sample, \ z_owned_closure_zid_t* : z_closure_zid, \ - zc_owned_closure_log_t* : zc_closure_log, \ - zc_owned_closure_matching_status_t* : zc_closure_matching_status \ + zc_owned_closure_log_t* : zc_closure_log \ )(this_, call, drop, context) #define z_try_recv(this_, query) \ @@ -496,8 +373,6 @@ typedef void(*zc_closure_matching_status_callback_t)(const zc_matching_status_t z_owned_reply_t* : z_reply_clone, \ z_owned_reply_err_t* : z_reply_err_clone, \ z_owned_sample_t* : z_sample_clone, \ - z_owned_shm_client_storage_t* : z_shm_client_storage_clone, \ - z_owned_shm_t* : z_shm_clone, \ z_owned_slice_t* : z_slice_clone, \ z_owned_string_array_t* : z_string_array_clone, \ z_owned_string_t* : z_string_clone \ @@ -505,10 +380,8 @@ typedef void(*zc_closure_matching_status_callback_t)(const zc_matching_status_t #else // #ifndef __cplusplus -static inline z_moved_alloc_layout_t* z_alloc_layout_move(z_owned_alloc_layout_t* x) { return reinterpret_cast(x); } static inline z_moved_bytes_t* z_bytes_move(z_owned_bytes_t* x) { return reinterpret_cast(x); } static inline z_moved_bytes_writer_t* z_bytes_writer_move(z_owned_bytes_writer_t* x) { return reinterpret_cast(x); } -static inline z_moved_chunk_alloc_result_t* z_chunk_alloc_result_move(z_owned_chunk_alloc_result_t* x) { return reinterpret_cast(x); } static inline z_moved_closure_hello_t* z_closure_hello_move(z_owned_closure_hello_t* x) { return reinterpret_cast(x); } static inline z_moved_closure_query_t* z_closure_query_move(z_owned_closure_query_t* x) { return reinterpret_cast(x); } static inline z_moved_closure_reply_t* z_closure_reply_move(z_owned_closure_reply_t* x) { return reinterpret_cast(x); } @@ -522,7 +395,6 @@ static inline z_moved_fifo_handler_reply_t* z_fifo_handler_reply_move(z_owned_fi static inline z_moved_fifo_handler_sample_t* z_fifo_handler_sample_move(z_owned_fifo_handler_sample_t* x) { return reinterpret_cast(x); } static inline z_moved_hello_t* z_hello_move(z_owned_hello_t* x) { return reinterpret_cast(x); } static inline z_moved_keyexpr_t* z_keyexpr_move(z_owned_keyexpr_t* x) { return reinterpret_cast(x); } -static inline z_moved_memory_layout_t* z_memory_layout_move(z_owned_memory_layout_t* x) { return reinterpret_cast(x); } static inline z_moved_mutex_t* z_mutex_move(z_owned_mutex_t* x) { return reinterpret_cast(x); } static inline z_moved_publisher_t* z_publisher_move(z_owned_publisher_t* x) { return reinterpret_cast(x); } static inline z_moved_query_t* z_query_move(z_owned_query_t* x) { return reinterpret_cast(x); } @@ -534,29 +406,16 @@ static inline z_moved_ring_handler_reply_t* z_ring_handler_reply_move(z_owned_ri static inline z_moved_ring_handler_sample_t* z_ring_handler_sample_move(z_owned_ring_handler_sample_t* x) { return reinterpret_cast(x); } static inline z_moved_sample_t* z_sample_move(z_owned_sample_t* x) { return reinterpret_cast(x); } static inline z_moved_session_t* z_session_move(z_owned_session_t* x) { return reinterpret_cast(x); } -static inline z_moved_shm_client_t* z_shm_client_move(z_owned_shm_client_t* x) { return reinterpret_cast(x); } -static inline z_moved_shm_client_storage_t* z_shm_client_storage_move(z_owned_shm_client_storage_t* x) { return reinterpret_cast(x); } -static inline z_moved_shm_t* z_shm_move(z_owned_shm_t* x) { return reinterpret_cast(x); } -static inline z_moved_shm_mut_t* z_shm_mut_move(z_owned_shm_mut_t* x) { return reinterpret_cast(x); } -static inline z_moved_shm_provider_t* z_shm_provider_move(z_owned_shm_provider_t* x) { return reinterpret_cast(x); } static inline z_moved_slice_t* z_slice_move(z_owned_slice_t* x) { return reinterpret_cast(x); } -static inline z_moved_source_info_t* z_source_info_move(z_owned_source_info_t* x) { return reinterpret_cast(x); } static inline z_moved_string_array_t* z_string_array_move(z_owned_string_array_t* x) { return reinterpret_cast(x); } static inline z_moved_string_t* z_string_move(z_owned_string_t* x) { return reinterpret_cast(x); } static inline z_moved_subscriber_t* z_subscriber_move(z_owned_subscriber_t* x) { return reinterpret_cast(x); } static inline z_moved_task_t* z_task_move(z_owned_task_t* x) { return reinterpret_cast(x); } static inline zc_moved_closure_log_t* zc_closure_log_move(zc_owned_closure_log_t* x) { return reinterpret_cast(x); } -static inline zc_moved_closure_matching_status_t* zc_closure_matching_status_move(zc_owned_closure_matching_status_t* x) { return reinterpret_cast(x); } -static inline zc_moved_liveliness_token_t* zc_liveliness_token_move(zc_owned_liveliness_token_t* x) { return reinterpret_cast(x); } -static inline zc_moved_matching_listener_t* zc_publisher_matching_listener_move(zc_owned_matching_listener_t* x) { return reinterpret_cast(x); } -static inline zc_moved_shm_client_list_t* zc_shm_client_list_move(zc_owned_shm_client_list_t* x) { return reinterpret_cast(x); } -static inline ze_moved_publication_cache_t* ze_publication_cache_move(ze_owned_publication_cache_t* x) { return reinterpret_cast(x); } -static inline ze_moved_querying_subscriber_t* ze_querying_subscriber_move(ze_owned_querying_subscriber_t* x) { return reinterpret_cast(x); } static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x) { return reinterpret_cast(x); } -inline const z_loaned_alloc_layout_t* z_loan(const z_owned_alloc_layout_t& this_) { return z_alloc_layout_loan(&this_); }; inline const z_loaned_bytes_t* z_loan(const z_owned_bytes_t& this_) { return z_bytes_loan(&this_); }; inline const z_loaned_bytes_writer_t* z_loan(const z_owned_bytes_writer_t& this_) { return z_bytes_writer_loan(&this_); }; inline const z_loaned_closure_hello_t* z_loan(const z_owned_closure_hello_t& closure) { return z_closure_hello_loan(&closure); }; @@ -572,7 +431,6 @@ inline const z_loaned_fifo_handler_reply_t* z_loan(const z_owned_fifo_handler_re inline const z_loaned_fifo_handler_sample_t* z_loan(const z_owned_fifo_handler_sample_t& this_) { return z_fifo_handler_sample_loan(&this_); }; inline const z_loaned_hello_t* z_loan(const z_owned_hello_t& this_) { return z_hello_loan(&this_); }; inline const z_loaned_keyexpr_t* z_loan(const z_owned_keyexpr_t& this_) { return z_keyexpr_loan(&this_); }; -inline const z_loaned_memory_layout_t* z_loan(const z_owned_memory_layout_t& this_) { return z_memory_layout_loan(&this_); }; inline const z_loaned_publisher_t* z_loan(const z_owned_publisher_t& this_) { return z_publisher_loan(&this_); }; inline const z_loaned_query_t* z_loan(const z_owned_query_t& this_) { return z_query_loan(&this_); }; inline const z_loaned_queryable_t* z_loan(const z_owned_queryable_t& this_) { return z_queryable_loan(&this_); }; @@ -583,12 +441,7 @@ inline const z_loaned_ring_handler_reply_t* z_loan(const z_owned_ring_handler_re inline const z_loaned_ring_handler_sample_t* z_loan(const z_owned_ring_handler_sample_t& this_) { return z_ring_handler_sample_loan(&this_); }; inline const z_loaned_sample_t* z_loan(const z_owned_sample_t& this_) { return z_sample_loan(&this_); }; inline const z_loaned_session_t* z_loan(const z_owned_session_t& this_) { return z_session_loan(&this_); }; -inline const z_loaned_shm_client_storage_t* z_loan(const z_owned_shm_client_storage_t& this_) { return z_shm_client_storage_loan(&this_); }; -inline const z_loaned_shm_t* z_loan(const z_owned_shm_t& this_) { return z_shm_loan(&this_); }; -inline const z_loaned_shm_mut_t* z_loan(const z_owned_shm_mut_t& this_) { return z_shm_mut_loan(&this_); }; -inline const z_loaned_shm_provider_t* z_loan(const z_owned_shm_provider_t& this_) { return z_shm_provider_loan(&this_); }; inline const z_loaned_slice_t* z_loan(const z_owned_slice_t& this_) { return z_slice_loan(&this_); }; -inline const z_loaned_source_info_t* z_loan(const z_owned_source_info_t& this_) { return z_source_info_loan(&this_); }; inline const z_loaned_string_array_t* z_loan(const z_owned_string_array_t& this_) { return z_string_array_loan(&this_); }; inline const z_loaned_string_t* z_loan(const z_owned_string_t& this_) { return z_string_loan(&this_); }; inline const z_loaned_subscriber_t* z_loan(const z_owned_subscriber_t& this_) { return z_subscriber_loan(&this_); }; @@ -596,11 +449,6 @@ inline const z_loaned_keyexpr_t* z_loan(const z_view_keyexpr_t& this_) { return inline const z_loaned_slice_t* z_loan(const z_view_slice_t& this_) { return z_view_slice_loan(&this_); }; inline const z_loaned_string_t* z_loan(const z_view_string_t& this_) { return z_view_string_loan(&this_); }; inline const zc_loaned_closure_log_t* z_loan(const zc_owned_closure_log_t& closure) { return zc_closure_log_loan(&closure); }; -inline const zc_loaned_closure_matching_status_t* z_loan(const zc_owned_closure_matching_status_t& closure) { return zc_closure_matching_status_loan(&closure); }; -inline const zc_loaned_liveliness_token_t* z_loan(const zc_owned_liveliness_token_t& this_) { return zc_liveliness_token_loan(&this_); }; -inline const zc_loaned_shm_client_list_t* z_loan(const zc_owned_shm_client_list_t& this_) { return zc_shm_client_list_loan(&this_); }; -inline const ze_loaned_publication_cache_t* z_loan(const ze_owned_publication_cache_t& this_) { return ze_publication_cache_loan(&this_); }; -inline const ze_loaned_querying_subscriber_t* z_loan(const ze_owned_querying_subscriber_t& this_) { return ze_querying_subscriber_loan(&this_); }; inline const ze_loaned_serializer_t* z_loan(const ze_owned_serializer_t& this_) { return ze_serializer_loan(&this_); }; @@ -616,17 +464,12 @@ inline z_loaned_encoding_t* z_loan_mut(z_owned_encoding_t& this_) { return z_enc inline z_loaned_mutex_t* z_loan_mut(z_owned_mutex_t& this_) { return z_mutex_loan_mut(&this_); }; inline z_loaned_publisher_t* z_loan_mut(z_owned_publisher_t& this_) { return z_publisher_loan_mut(&this_); }; inline z_loaned_session_t* z_loan_mut(z_owned_session_t& this_) { return z_session_loan_mut(&this_); }; -inline z_loaned_shm_t* z_loan_mut(z_owned_shm_t& this_) { return z_shm_loan_mut(&this_); }; -inline z_loaned_shm_mut_t* z_loan_mut(z_owned_shm_mut_t& this_) { return z_shm_mut_loan_mut(&this_); }; inline z_loaned_string_array_t* z_loan_mut(z_owned_string_array_t& this_) { return z_string_array_loan_mut(&this_); }; -inline zc_loaned_shm_client_list_t* z_loan_mut(zc_owned_shm_client_list_t& this_) { return zc_shm_client_list_loan_mut(&this_); }; inline ze_loaned_serializer_t* z_loan_mut(ze_owned_serializer_t& this_) { return ze_serializer_loan_mut(&this_); }; -inline void z_drop(z_moved_alloc_layout_t* this_) { z_alloc_layout_drop(this_); }; inline void z_drop(z_moved_bytes_t* this_) { z_bytes_drop(this_); }; inline void z_drop(z_moved_bytes_writer_t* this_) { z_bytes_writer_drop(this_); }; -inline void z_drop(z_moved_chunk_alloc_result_t* this_) { z_chunk_alloc_result_drop(this_); }; inline void z_drop(z_moved_closure_hello_t* this_) { z_closure_hello_drop(this_); }; inline void z_drop(z_moved_closure_query_t* closure_) { z_closure_query_drop(closure_); }; inline void z_drop(z_moved_closure_reply_t* closure_) { z_closure_reply_drop(closure_); }; @@ -640,7 +483,6 @@ inline void z_drop(z_moved_fifo_handler_reply_t* this_) { z_fifo_handler_reply_d inline void z_drop(z_moved_fifo_handler_sample_t* this_) { z_fifo_handler_sample_drop(this_); }; inline void z_drop(z_moved_hello_t* this_) { z_hello_drop(this_); }; inline void z_drop(z_moved_keyexpr_t* this_) { z_keyexpr_drop(this_); }; -inline void z_drop(z_moved_memory_layout_t* this_) { z_memory_layout_drop(this_); }; inline void z_drop(z_moved_mutex_t* this_) { z_mutex_drop(this_); }; inline void z_drop(z_moved_publisher_t* this_) { z_publisher_drop(this_); }; inline void z_drop(z_moved_query_t* this_) { z_query_drop(this_); }; @@ -652,31 +494,17 @@ inline void z_drop(z_moved_ring_handler_reply_t* this_) { z_ring_handler_reply_d inline void z_drop(z_moved_ring_handler_sample_t* this_) { z_ring_handler_sample_drop(this_); }; inline void z_drop(z_moved_sample_t* this_) { z_sample_drop(this_); }; inline void z_drop(z_moved_session_t* this_) { z_session_drop(this_); }; -inline void z_drop(z_moved_shm_client_t* this_) { z_shm_client_drop(this_); }; -inline void z_drop(z_moved_shm_client_storage_t* this_) { z_shm_client_storage_drop(this_); }; -inline void z_drop(z_moved_shm_t* this_) { z_shm_drop(this_); }; -inline void z_drop(z_moved_shm_mut_t* this_) { z_shm_mut_drop(this_); }; -inline void z_drop(z_moved_shm_provider_t* this_) { z_shm_provider_drop(this_); }; inline void z_drop(z_moved_slice_t* this_) { z_slice_drop(this_); }; -inline void z_drop(z_moved_source_info_t* this_) { z_source_info_drop(this_); }; inline void z_drop(z_moved_string_array_t* this_) { z_string_array_drop(this_); }; inline void z_drop(z_moved_string_t* this_) { z_string_drop(this_); }; inline void z_drop(z_moved_subscriber_t* this_) { z_subscriber_drop(this_); }; inline void z_drop(z_moved_task_t* this_) { z_task_drop(this_); }; inline void z_drop(zc_moved_closure_log_t* closure_) { zc_closure_log_drop(closure_); }; -inline void z_drop(zc_moved_closure_matching_status_t* closure_) { zc_closure_matching_status_drop(closure_); }; -inline void z_drop(zc_moved_liveliness_token_t* this_) { zc_liveliness_token_drop(this_); }; -inline void z_drop(zc_moved_matching_listener_t* this_) { zc_publisher_matching_listener_drop(this_); }; -inline void z_drop(zc_moved_shm_client_list_t* this_) { zc_shm_client_list_drop(this_); }; -inline void z_drop(ze_moved_publication_cache_t* this_) { ze_publication_cache_drop(this_); }; -inline void z_drop(ze_moved_querying_subscriber_t* this_) { ze_querying_subscriber_drop(this_); }; inline void z_drop(ze_moved_serializer_t* this_) { ze_serializer_drop(this_); }; -inline z_moved_alloc_layout_t* z_move(z_owned_alloc_layout_t& this_) { return z_alloc_layout_move(&this_); }; inline z_moved_bytes_t* z_move(z_owned_bytes_t& this_) { return z_bytes_move(&this_); }; inline z_moved_bytes_writer_t* z_move(z_owned_bytes_writer_t& this_) { return z_bytes_writer_move(&this_); }; -inline z_moved_chunk_alloc_result_t* z_move(z_owned_chunk_alloc_result_t& this_) { return z_chunk_alloc_result_move(&this_); }; inline z_moved_closure_hello_t* z_move(z_owned_closure_hello_t& this_) { return z_closure_hello_move(&this_); }; inline z_moved_closure_query_t* z_move(z_owned_closure_query_t& closure_) { return z_closure_query_move(&closure_); }; inline z_moved_closure_reply_t* z_move(z_owned_closure_reply_t& closure_) { return z_closure_reply_move(&closure_); }; @@ -690,7 +518,6 @@ inline z_moved_fifo_handler_reply_t* z_move(z_owned_fifo_handler_reply_t& this_) inline z_moved_fifo_handler_sample_t* z_move(z_owned_fifo_handler_sample_t& this_) { return z_fifo_handler_sample_move(&this_); }; inline z_moved_hello_t* z_move(z_owned_hello_t& this_) { return z_hello_move(&this_); }; inline z_moved_keyexpr_t* z_move(z_owned_keyexpr_t& this_) { return z_keyexpr_move(&this_); }; -inline z_moved_memory_layout_t* z_move(z_owned_memory_layout_t& this_) { return z_memory_layout_move(&this_); }; inline z_moved_mutex_t* z_move(z_owned_mutex_t& this_) { return z_mutex_move(&this_); }; inline z_moved_publisher_t* z_move(z_owned_publisher_t& this_) { return z_publisher_move(&this_); }; inline z_moved_query_t* z_move(z_owned_query_t& this_) { return z_query_move(&this_); }; @@ -702,31 +529,17 @@ inline z_moved_ring_handler_reply_t* z_move(z_owned_ring_handler_reply_t& this_) inline z_moved_ring_handler_sample_t* z_move(z_owned_ring_handler_sample_t& this_) { return z_ring_handler_sample_move(&this_); }; inline z_moved_sample_t* z_move(z_owned_sample_t& this_) { return z_sample_move(&this_); }; inline z_moved_session_t* z_move(z_owned_session_t& this_) { return z_session_move(&this_); }; -inline z_moved_shm_client_t* z_move(z_owned_shm_client_t& this_) { return z_shm_client_move(&this_); }; -inline z_moved_shm_client_storage_t* z_move(z_owned_shm_client_storage_t& this_) { return z_shm_client_storage_move(&this_); }; -inline z_moved_shm_t* z_move(z_owned_shm_t& this_) { return z_shm_move(&this_); }; -inline z_moved_shm_mut_t* z_move(z_owned_shm_mut_t& this_) { return z_shm_mut_move(&this_); }; -inline z_moved_shm_provider_t* z_move(z_owned_shm_provider_t& this_) { return z_shm_provider_move(&this_); }; inline z_moved_slice_t* z_move(z_owned_slice_t& this_) { return z_slice_move(&this_); }; -inline z_moved_source_info_t* z_move(z_owned_source_info_t& this_) { return z_source_info_move(&this_); }; inline z_moved_string_array_t* z_move(z_owned_string_array_t& this_) { return z_string_array_move(&this_); }; inline z_moved_string_t* z_move(z_owned_string_t& this_) { return z_string_move(&this_); }; inline z_moved_subscriber_t* z_move(z_owned_subscriber_t& this_) { return z_subscriber_move(&this_); }; inline z_moved_task_t* z_move(z_owned_task_t& this_) { return z_task_move(&this_); }; inline zc_moved_closure_log_t* z_move(zc_owned_closure_log_t& closure_) { return zc_closure_log_move(&closure_); }; -inline zc_moved_closure_matching_status_t* z_move(zc_owned_closure_matching_status_t& closure_) { return zc_closure_matching_status_move(&closure_); }; -inline zc_moved_liveliness_token_t* z_move(zc_owned_liveliness_token_t& this_) { return zc_liveliness_token_move(&this_); }; -inline zc_moved_matching_listener_t* z_move(zc_owned_matching_listener_t& this_) { return zc_publisher_matching_listener_move(&this_); }; -inline zc_moved_shm_client_list_t* z_move(zc_owned_shm_client_list_t& this_) { return zc_shm_client_list_move(&this_); }; -inline ze_moved_publication_cache_t* z_move(ze_owned_publication_cache_t& this_) { return ze_publication_cache_move(&this_); }; -inline ze_moved_querying_subscriber_t* z_move(ze_owned_querying_subscriber_t& this_) { return ze_querying_subscriber_move(&this_); }; inline ze_moved_serializer_t* z_move(ze_owned_serializer_t& this_) { return ze_serializer_move(&this_); }; -inline void z_internal_null(z_owned_alloc_layout_t* this_) { z_internal_alloc_layout_null(this_); }; inline void z_internal_null(z_owned_bytes_t* this_) { z_internal_bytes_null(this_); }; inline void z_internal_null(z_owned_bytes_writer_t* this_) { z_internal_bytes_writer_null(this_); }; -inline void z_internal_null(z_owned_chunk_alloc_result_t* this_) { z_internal_chunk_alloc_result_null(this_); }; inline void z_internal_null(z_owned_closure_hello_t* this_) { z_internal_closure_hello_null(this_); }; inline void z_internal_null(z_owned_closure_query_t* this_) { z_internal_closure_query_null(this_); }; inline void z_internal_null(z_owned_closure_reply_t* this_) { z_internal_closure_reply_null(this_); }; @@ -740,7 +553,6 @@ inline void z_internal_null(z_owned_fifo_handler_reply_t* this_) { z_internal_fi inline void z_internal_null(z_owned_fifo_handler_sample_t* this_) { z_internal_fifo_handler_sample_null(this_); }; inline void z_internal_null(z_owned_hello_t* this_) { z_internal_hello_null(this_); }; inline void z_internal_null(z_owned_keyexpr_t* this_) { z_internal_keyexpr_null(this_); }; -inline void z_internal_null(z_owned_memory_layout_t* this_) { z_internal_memory_layout_null(this_); }; inline void z_internal_null(z_owned_mutex_t* this_) { z_internal_mutex_null(this_); }; inline void z_internal_null(z_owned_publisher_t* this_) { z_internal_publisher_null(this_); }; inline void z_internal_null(z_owned_query_t* this_) { z_internal_query_null(this_); }; @@ -752,30 +564,16 @@ inline void z_internal_null(z_owned_ring_handler_reply_t* this_) { z_internal_ri inline void z_internal_null(z_owned_ring_handler_sample_t* this_) { z_internal_ring_handler_sample_null(this_); }; inline void z_internal_null(z_owned_sample_t* this_) { z_internal_sample_null(this_); }; inline void z_internal_null(z_owned_session_t* this_) { z_internal_session_null(this_); }; -inline void z_internal_null(z_owned_shm_client_t* this_) { z_internal_shm_client_null(this_); }; -inline void z_internal_null(z_owned_shm_client_storage_t* this_) { z_internal_shm_client_storage_null(this_); }; -inline void z_internal_null(z_owned_shm_mut_t* this_) { z_internal_shm_mut_null(this_); }; -inline void z_internal_null(z_owned_shm_t* this_) { z_internal_shm_null(this_); }; -inline void z_internal_null(z_owned_shm_provider_t* this_) { z_internal_shm_provider_null(this_); }; inline void z_internal_null(z_owned_slice_t* this_) { z_internal_slice_null(this_); }; -inline void z_internal_null(z_owned_source_info_t* this_) { z_internal_source_info_null(this_); }; inline void z_internal_null(z_owned_string_array_t* this_) { z_internal_string_array_null(this_); }; inline void z_internal_null(z_owned_string_t* this_) { z_internal_string_null(this_); }; inline void z_internal_null(z_owned_subscriber_t* this_) { z_internal_subscriber_null(this_); }; inline void z_internal_null(z_owned_task_t* this_) { z_internal_task_null(this_); }; inline void z_internal_null(zc_owned_closure_log_t* this_) { zc_internal_closure_log_null(this_); }; -inline void z_internal_null(zc_owned_closure_matching_status_t* this_) { zc_internal_closure_matching_status_null(this_); }; -inline void z_internal_null(zc_owned_liveliness_token_t* this_) { zc_internal_liveliness_token_null(this_); }; -inline void z_internal_null(zc_owned_matching_listener_t* this_) { zc_internal_matching_listener_null(this_); }; -inline void z_internal_null(zc_owned_shm_client_list_t* this_) { zc_internal_shm_client_list_null(this_); }; -inline void z_internal_null(ze_owned_publication_cache_t* this_) { ze_internal_publication_cache_null(this_); }; -inline void z_internal_null(ze_owned_querying_subscriber_t* this_) { ze_internal_querying_subscriber_null(this_); }; inline void z_internal_null(ze_owned_serializer_t* this_) { ze_internal_serializer_null(this_); }; -static inline void z_alloc_layout_take(z_owned_alloc_layout_t* this_, z_moved_alloc_layout_t* x) { *this_ = x->_this; z_internal_alloc_layout_null(&x->_this); } static inline void z_bytes_take(z_owned_bytes_t* this_, z_moved_bytes_t* x) { *this_ = x->_this; z_internal_bytes_null(&x->_this); } static inline void z_bytes_writer_take(z_owned_bytes_writer_t* this_, z_moved_bytes_writer_t* x) { *this_ = x->_this; z_internal_bytes_writer_null(&x->_this); } -static inline void z_chunk_alloc_result_take(z_owned_chunk_alloc_result_t* this_, z_moved_chunk_alloc_result_t* x) { *this_ = x->_this; z_internal_chunk_alloc_result_null(&x->_this); } static inline void z_closure_hello_take(z_owned_closure_hello_t* this_, z_moved_closure_hello_t* x) { *this_ = x->_this; z_internal_closure_hello_null(&x->_this); } static inline void z_closure_query_take(z_owned_closure_query_t* closure_, z_moved_closure_query_t* x) { *closure_ = x->_this; z_internal_closure_query_null(&x->_this); } static inline void z_closure_reply_take(z_owned_closure_reply_t* closure_, z_moved_closure_reply_t* x) { *closure_ = x->_this; z_internal_closure_reply_null(&x->_this); } @@ -789,7 +587,6 @@ static inline void z_fifo_handler_reply_take(z_owned_fifo_handler_reply_t* this_ static inline void z_fifo_handler_sample_take(z_owned_fifo_handler_sample_t* this_, z_moved_fifo_handler_sample_t* x) { *this_ = x->_this; z_internal_fifo_handler_sample_null(&x->_this); } static inline void z_hello_take(z_owned_hello_t* this_, z_moved_hello_t* x) { *this_ = x->_this; z_internal_hello_null(&x->_this); } static inline void z_keyexpr_take(z_owned_keyexpr_t* this_, z_moved_keyexpr_t* x) { *this_ = x->_this; z_internal_keyexpr_null(&x->_this); } -static inline void z_memory_layout_take(z_owned_memory_layout_t* this_, z_moved_memory_layout_t* x) { *this_ = x->_this; z_internal_memory_layout_null(&x->_this); } static inline void z_mutex_take(z_owned_mutex_t* this_, z_moved_mutex_t* x) { *this_ = x->_this; z_internal_mutex_null(&x->_this); } static inline void z_publisher_take(z_owned_publisher_t* this_, z_moved_publisher_t* x) { *this_ = x->_this; z_internal_publisher_null(&x->_this); } static inline void z_query_take(z_owned_query_t* this_, z_moved_query_t* x) { *this_ = x->_this; z_internal_query_null(&x->_this); } @@ -801,40 +598,22 @@ static inline void z_ring_handler_reply_take(z_owned_ring_handler_reply_t* this_ static inline void z_ring_handler_sample_take(z_owned_ring_handler_sample_t* this_, z_moved_ring_handler_sample_t* x) { *this_ = x->_this; z_internal_ring_handler_sample_null(&x->_this); } static inline void z_sample_take(z_owned_sample_t* this_, z_moved_sample_t* x) { *this_ = x->_this; z_internal_sample_null(&x->_this); } static inline void z_session_take(z_owned_session_t* this_, z_moved_session_t* x) { *this_ = x->_this; z_internal_session_null(&x->_this); } -static inline void z_shm_client_take(z_owned_shm_client_t* this_, z_moved_shm_client_t* x) { *this_ = x->_this; z_internal_shm_client_null(&x->_this); } -static inline void z_shm_client_storage_take(z_owned_shm_client_storage_t* this_, z_moved_shm_client_storage_t* x) { *this_ = x->_this; z_internal_shm_client_storage_null(&x->_this); } -static inline void z_shm_take(z_owned_shm_t* this_, z_moved_shm_t* x) { *this_ = x->_this; z_internal_shm_null(&x->_this); } -static inline void z_shm_mut_take(z_owned_shm_mut_t* this_, z_moved_shm_mut_t* x) { *this_ = x->_this; z_internal_shm_mut_null(&x->_this); } -static inline void z_shm_provider_take(z_owned_shm_provider_t* this_, z_moved_shm_provider_t* x) { *this_ = x->_this; z_internal_shm_provider_null(&x->_this); } static inline void z_slice_take(z_owned_slice_t* this_, z_moved_slice_t* x) { *this_ = x->_this; z_internal_slice_null(&x->_this); } -static inline void z_source_info_take(z_owned_source_info_t* this_, z_moved_source_info_t* x) { *this_ = x->_this; z_internal_source_info_null(&x->_this); } static inline void z_string_array_take(z_owned_string_array_t* this_, z_moved_string_array_t* x) { *this_ = x->_this; z_internal_string_array_null(&x->_this); } static inline void z_string_take(z_owned_string_t* this_, z_moved_string_t* x) { *this_ = x->_this; z_internal_string_null(&x->_this); } static inline void z_subscriber_take(z_owned_subscriber_t* this_, z_moved_subscriber_t* x) { *this_ = x->_this; z_internal_subscriber_null(&x->_this); } static inline void z_task_take(z_owned_task_t* this_, z_moved_task_t* x) { *this_ = x->_this; z_internal_task_null(&x->_this); } static inline void zc_closure_log_take(zc_owned_closure_log_t* closure_, zc_moved_closure_log_t* x) { *closure_ = x->_this; zc_internal_closure_log_null(&x->_this); } -static inline void zc_closure_matching_status_take(zc_owned_closure_matching_status_t* closure_, zc_moved_closure_matching_status_t* x) { *closure_ = x->_this; zc_internal_closure_matching_status_null(&x->_this); } -static inline void zc_liveliness_token_take(zc_owned_liveliness_token_t* this_, zc_moved_liveliness_token_t* x) { *this_ = x->_this; zc_internal_liveliness_token_null(&x->_this); } -static inline void zc_publisher_matching_listener_take(zc_owned_matching_listener_t* this_, zc_moved_matching_listener_t* x) { *this_ = x->_this; zc_internal_matching_listener_null(&x->_this); } -static inline void zc_shm_client_list_take(zc_owned_shm_client_list_t* this_, zc_moved_shm_client_list_t* x) { *this_ = x->_this; zc_internal_shm_client_list_null(&x->_this); } -static inline void ze_publication_cache_take(ze_owned_publication_cache_t* this_, ze_moved_publication_cache_t* x) { *this_ = x->_this; ze_internal_publication_cache_null(&x->_this); } -static inline void ze_querying_subscriber_take(ze_owned_querying_subscriber_t* this_, ze_moved_querying_subscriber_t* x) { *this_ = x->_this; ze_internal_querying_subscriber_null(&x->_this); } static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_serializer_t* x) { *this_ = x->_this; ze_internal_serializer_null(&x->_this); } -inline void z_take(z_owned_alloc_layout_t* this_, z_moved_alloc_layout_t* x) { - z_alloc_layout_take(this_, x); -}; inline void z_take(z_owned_bytes_t* this_, z_moved_bytes_t* x) { z_bytes_take(this_, x); }; inline void z_take(z_owned_bytes_writer_t* this_, z_moved_bytes_writer_t* x) { z_bytes_writer_take(this_, x); }; -inline void z_take(z_owned_chunk_alloc_result_t* this_, z_moved_chunk_alloc_result_t* x) { - z_chunk_alloc_result_take(this_, x); -}; inline void z_take(z_owned_closure_hello_t* this_, z_moved_closure_hello_t* x) { z_closure_hello_take(this_, x); }; @@ -874,9 +653,6 @@ inline void z_take(z_owned_hello_t* this_, z_moved_hello_t* x) { inline void z_take(z_owned_keyexpr_t* this_, z_moved_keyexpr_t* x) { z_keyexpr_take(this_, x); }; -inline void z_take(z_owned_memory_layout_t* this_, z_moved_memory_layout_t* x) { - z_memory_layout_take(this_, x); -}; inline void z_take(z_owned_mutex_t* this_, z_moved_mutex_t* x) { z_mutex_take(this_, x); }; @@ -910,27 +686,9 @@ inline void z_take(z_owned_sample_t* this_, z_moved_sample_t* x) { inline void z_take(z_owned_session_t* this_, z_moved_session_t* x) { z_session_take(this_, x); }; -inline void z_take(z_owned_shm_client_t* this_, z_moved_shm_client_t* x) { - z_shm_client_take(this_, x); -}; -inline void z_take(z_owned_shm_client_storage_t* this_, z_moved_shm_client_storage_t* x) { - z_shm_client_storage_take(this_, x); -}; -inline void z_take(z_owned_shm_t* this_, z_moved_shm_t* x) { - z_shm_take(this_, x); -}; -inline void z_take(z_owned_shm_mut_t* this_, z_moved_shm_mut_t* x) { - z_shm_mut_take(this_, x); -}; -inline void z_take(z_owned_shm_provider_t* this_, z_moved_shm_provider_t* x) { - z_shm_provider_take(this_, x); -}; inline void z_take(z_owned_slice_t* this_, z_moved_slice_t* x) { z_slice_take(this_, x); }; -inline void z_take(z_owned_source_info_t* this_, z_moved_source_info_t* x) { - z_source_info_take(this_, x); -}; inline void z_take(z_owned_string_array_t* this_, z_moved_string_array_t* x) { z_string_array_take(this_, x); }; @@ -946,33 +704,13 @@ inline void z_take(z_owned_task_t* this_, z_moved_task_t* x) { inline void z_take(zc_owned_closure_log_t* closure_, zc_moved_closure_log_t* x) { zc_closure_log_take(closure_, x); }; -inline void z_take(zc_owned_closure_matching_status_t* closure_, zc_moved_closure_matching_status_t* x) { - zc_closure_matching_status_take(closure_, x); -}; -inline void z_take(zc_owned_liveliness_token_t* this_, zc_moved_liveliness_token_t* x) { - zc_liveliness_token_take(this_, x); -}; -inline void z_take(zc_owned_matching_listener_t* this_, zc_moved_matching_listener_t* x) { - zc_publisher_matching_listener_take(this_, x); -}; -inline void z_take(zc_owned_shm_client_list_t* this_, zc_moved_shm_client_list_t* x) { - zc_shm_client_list_take(this_, x); -}; -inline void z_take(ze_owned_publication_cache_t* this_, ze_moved_publication_cache_t* x) { - ze_publication_cache_take(this_, x); -}; -inline void z_take(ze_owned_querying_subscriber_t* this_, ze_moved_querying_subscriber_t* x) { - ze_querying_subscriber_take(this_, x); -}; inline void z_take(ze_owned_serializer_t* this_, ze_moved_serializer_t* x) { ze_serializer_take(this_, x); }; -inline bool z_internal_check(const z_owned_alloc_layout_t& this_) { return z_internal_alloc_layout_check(&this_); }; inline bool z_internal_check(const z_owned_bytes_t& this_) { return z_internal_bytes_check(&this_); }; inline bool z_internal_check(const z_owned_bytes_writer_t& this_) { return z_internal_bytes_writer_check(&this_); }; -inline bool z_internal_check(const z_owned_chunk_alloc_result_t& this_) { return z_internal_chunk_alloc_result_check(&this_); }; inline bool z_internal_check(const z_owned_closure_hello_t& this_) { return z_internal_closure_hello_check(&this_); }; inline bool z_internal_check(const z_owned_closure_query_t& this_) { return z_internal_closure_query_check(&this_); }; inline bool z_internal_check(const z_owned_closure_reply_t& this_) { return z_internal_closure_reply_check(&this_); }; @@ -986,7 +724,6 @@ inline bool z_internal_check(const z_owned_fifo_handler_reply_t& this_) { return inline bool z_internal_check(const z_owned_fifo_handler_sample_t& this_) { return z_internal_fifo_handler_sample_check(&this_); }; inline bool z_internal_check(const z_owned_hello_t& this_) { return z_internal_hello_check(&this_); }; inline bool z_internal_check(const z_owned_keyexpr_t& this_) { return z_internal_keyexpr_check(&this_); }; -inline bool z_internal_check(const z_owned_memory_layout_t& this_) { return z_internal_memory_layout_check(&this_); }; inline bool z_internal_check(const z_owned_mutex_t& this_) { return z_internal_mutex_check(&this_); }; inline bool z_internal_check(const z_owned_publisher_t& this_) { return z_internal_publisher_check(&this_); }; inline bool z_internal_check(const z_owned_query_t& query) { return z_internal_query_check(&query); }; @@ -998,24 +735,12 @@ inline bool z_internal_check(const z_owned_ring_handler_reply_t& this_) { return inline bool z_internal_check(const z_owned_ring_handler_sample_t& this_) { return z_internal_ring_handler_sample_check(&this_); }; inline bool z_internal_check(const z_owned_sample_t& this_) { return z_internal_sample_check(&this_); }; inline bool z_internal_check(const z_owned_session_t& this_) { return z_internal_session_check(&this_); }; -inline bool z_internal_check(const z_owned_shm_t& this_) { return z_internal_shm_check(&this_); }; -inline bool z_internal_check(const z_owned_shm_client_t& this_) { return z_internal_shm_client_check(&this_); }; -inline bool z_internal_check(const z_owned_shm_client_storage_t& this_) { return z_internal_shm_client_storage_check(&this_); }; -inline bool z_internal_check(const z_owned_shm_mut_t& this_) { return z_internal_shm_mut_check(&this_); }; -inline bool z_internal_check(const z_owned_shm_provider_t& this_) { return z_internal_shm_provider_check(&this_); }; inline bool z_internal_check(const z_owned_slice_t& this_) { return z_internal_slice_check(&this_); }; -inline bool z_internal_check(const z_owned_source_info_t& this_) { return z_internal_source_info_check(&this_); }; inline bool z_internal_check(const z_owned_string_array_t& this_) { return z_internal_string_array_check(&this_); }; inline bool z_internal_check(const z_owned_string_t& this_) { return z_internal_string_check(&this_); }; inline bool z_internal_check(const z_owned_subscriber_t& this_) { return z_internal_subscriber_check(&this_); }; inline bool z_internal_check(const z_owned_task_t& this_) { return z_internal_task_check(&this_); }; inline bool z_internal_check(const zc_owned_closure_log_t& this_) { return zc_internal_closure_log_check(&this_); }; -inline bool z_internal_check(const zc_owned_closure_matching_status_t& this_) { return zc_internal_closure_matching_status_check(&this_); }; -inline bool z_internal_check(const zc_owned_liveliness_token_t& this_) { return zc_internal_liveliness_token_check(&this_); }; -inline bool z_internal_check(const zc_owned_matching_listener_t& this_) { return zc_internal_matching_listener_check(&this_); }; -inline bool z_internal_check(const zc_owned_shm_client_list_t& this_) { return zc_internal_shm_client_list_check(&this_); }; -inline bool z_internal_check(const ze_owned_publication_cache_t& this_) { return ze_internal_publication_cache_check(&this_); }; -inline bool z_internal_check(const ze_owned_querying_subscriber_t& this_) { return ze_internal_querying_subscriber_check(&this_); }; inline bool z_internal_check(const ze_owned_serializer_t& this_) { return ze_internal_serializer_check(&this_); }; @@ -1034,9 +759,6 @@ inline void z_call(const z_loaned_closure_sample_t* closure, z_loaned_sample_t* inline void z_call(const z_loaned_closure_zid_t* closure, const z_id_t* z_id) { z_closure_zid_call(closure, z_id); }; -inline void z_call(const zc_loaned_closure_matching_status_t* closure, const zc_matching_status_t* mathing_status) { - zc_closure_matching_status_call(closure, mathing_status); -}; extern "C" using z_closure_drop_callback_t = void(void* context); extern "C" using z_closure_hello_callback_t = void(z_loaned_hello_t *hello, void *context); @@ -1045,7 +767,6 @@ extern "C" using z_closure_reply_callback_t = void(z_loaned_reply_t *reply, void extern "C" using z_closure_sample_callback_t = void(z_loaned_sample_t *sample, void *context); extern "C" using z_closure_zid_callback_t = void(const z_id_t *z_id, void *context); extern "C" using zc_closure_log_callback_t = void(zc_log_severity_t severity, const z_loaned_string_t *msg, void *context); -extern "C" using zc_closure_matching_status_callback_t = void(const zc_matching_status_t *matching_status, void *context); inline void z_closure(z_owned_closure_hello_t* this_, z_closure_hello_callback_t* call, z_closure_drop_callback_t* drop, void* context) { @@ -1071,10 +792,6 @@ inline void z_closure(zc_owned_closure_log_t* this_, zc_closure_log_callback_t* z_closure_drop_callback_t* drop, void* context) { zc_closure_log(this_, call, drop, context); }; -inline void z_closure(zc_owned_closure_matching_status_t* this_, zc_closure_matching_status_callback_t* call, - z_closure_drop_callback_t* drop, void* context) { - zc_closure_matching_status(this_, call, drop, context); -}; inline z_result_t z_try_recv(const z_loaned_fifo_handler_query_t* this_, z_owned_query_t* query) { @@ -1144,12 +861,6 @@ inline void z_clone(z_owned_reply_err_t* dst, z_loaned_reply_err_t* this_) { inline void z_clone(z_owned_sample_t* dst, z_loaned_sample_t* this_) { z_sample_clone(dst, this_); }; -inline void z_clone(z_owned_shm_client_storage_t* this_, z_loaned_shm_client_storage_t* from) { - z_shm_client_storage_clone(this_, from); -}; -inline void z_clone(z_owned_shm_t* out, z_loaned_shm_t* this_) { - z_shm_clone(out, this_); -}; inline void z_clone(z_owned_slice_t* dst, z_loaned_slice_t* this_) { z_slice_clone(dst, this_); }; @@ -1162,8 +873,6 @@ inline void z_clone(z_owned_string_t* dst, z_loaned_string_t* this_) { template struct z_loaned_to_owned_type_t {}; template struct z_owned_to_loaned_type_t {}; -template<> struct z_loaned_to_owned_type_t { typedef z_owned_alloc_layout_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef z_loaned_alloc_layout_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_bytes_t type; }; template<> struct z_owned_to_loaned_type_t { typedef z_loaned_bytes_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_bytes_writer_t type; }; @@ -1194,8 +903,6 @@ template<> struct z_loaned_to_owned_type_t { typedef z_owned_h template<> struct z_owned_to_loaned_type_t { typedef z_loaned_hello_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_keyexpr_t type; }; template<> struct z_owned_to_loaned_type_t { typedef z_loaned_keyexpr_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef z_owned_memory_layout_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef z_loaned_memory_layout_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_publisher_t type; }; template<> struct z_owned_to_loaned_type_t { typedef z_loaned_publisher_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_query_t type; }; @@ -1216,18 +923,8 @@ template<> struct z_loaned_to_owned_type_t { typedef z_owned_ template<> struct z_owned_to_loaned_type_t { typedef z_loaned_sample_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_session_t type; }; template<> struct z_owned_to_loaned_type_t { typedef z_loaned_session_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef z_owned_shm_client_storage_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef z_loaned_shm_client_storage_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef z_owned_shm_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef z_loaned_shm_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef z_owned_shm_mut_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef z_loaned_shm_mut_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef z_owned_shm_provider_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef z_loaned_shm_provider_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_slice_t type; }; template<> struct z_owned_to_loaned_type_t { typedef z_loaned_slice_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef z_owned_source_info_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef z_loaned_source_info_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_string_array_t type; }; template<> struct z_owned_to_loaned_type_t { typedef z_loaned_string_array_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_string_t type; }; @@ -1236,16 +933,6 @@ template<> struct z_loaned_to_owned_type_t { typedef z_ow template<> struct z_owned_to_loaned_type_t { typedef z_loaned_subscriber_t type; }; template<> struct z_loaned_to_owned_type_t { typedef zc_owned_closure_log_t type; }; template<> struct z_owned_to_loaned_type_t { typedef zc_loaned_closure_log_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef zc_owned_closure_matching_status_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef zc_loaned_closure_matching_status_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef zc_owned_liveliness_token_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef zc_loaned_liveliness_token_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef zc_owned_shm_client_list_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef zc_loaned_shm_client_list_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef ze_owned_publication_cache_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef ze_loaned_publication_cache_t type; }; -template<> struct z_loaned_to_owned_type_t { typedef ze_owned_querying_subscriber_t type; }; -template<> struct z_owned_to_loaned_type_t { typedef ze_loaned_querying_subscriber_t type; }; template<> struct z_loaned_to_owned_type_t { typedef ze_owned_serializer_t type; }; template<> struct z_owned_to_loaned_type_t { typedef ze_loaned_serializer_t type; }; template<> struct z_loaned_to_owned_type_t { typedef z_owned_mutex_t type; }; diff --git a/src/liveliness.rs b/src/liveliness.rs index 61641ab01..7f75bfdb1 100644 --- a/src/liveliness.rs +++ b/src/liveliness.rs @@ -53,31 +53,31 @@ pub extern "C" fn zc_internal_liveliness_token_check(this_: &zc_owned_liveliness /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. /// @brief Undeclares liveliness token, frees memory and resets it to a gravestone state. #[no_mangle] -pub extern "C" fn zc_liveliness_token_drop(this_: &mut zc_moved_liveliness_token_t) { +pub extern "C" fn z_liveliness_token_drop(this_: &mut zc_moved_liveliness_token_t) { let _ = this_.take_rust_type(); } /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. -/// @brief The options for `zc_liveliness_declare_token()`. +/// @brief The options for `z_liveliness_declare_token()`. #[repr(C)] -pub struct zc_liveliness_declaration_options_t { +pub struct z_liveliness_token_options_t { _dummy: u8, } /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. -/// @brief Constructs default value for `zc_liveliness_declaration_options_t`. +/// @brief Constructs default value for `z_liveliness_token_options_t`. #[no_mangle] -pub extern "C" fn zc_liveliness_declaration_options_default( - this: &mut MaybeUninit, +pub extern "C" fn z_liveliness_token_options_default( + this: &mut MaybeUninit, ) { - this.write(zc_liveliness_declaration_options_t { _dummy: 0 }); + this.write(z_liveliness_token_options_t { _dummy: 0 }); } /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. /// @brief Borrows token. #[no_mangle] #[allow(clippy::missing_safety_doc)] -pub unsafe extern "C" fn zc_liveliness_token_loan( +pub unsafe extern "C" fn z_liveliness_token_loan( this: &zc_owned_liveliness_token_t, ) -> &zc_loaned_liveliness_token_t { this.as_rust_type_ref() @@ -97,11 +97,11 @@ pub unsafe extern "C" fn zc_liveliness_token_loan( /// @param key_expr: A keyexpr to declare a liveliess token for. /// @param _options: Liveliness token declaration properties. #[no_mangle] -pub extern "C" fn zc_liveliness_declare_token( +pub extern "C" fn z_liveliness_declare_token( session: &z_loaned_session_t, token: &mut MaybeUninit, key_expr: &z_loaned_keyexpr_t, - _options: Option<&zc_liveliness_declaration_options_t>, + _options: Option<&z_liveliness_token_options_t>, ) -> result::z_result_t { let this = token.as_rust_type_mut_uninit(); let session = session.as_rust_type_ref(); @@ -122,7 +122,7 @@ pub extern "C" fn zc_liveliness_declare_token( /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. /// @brief Destroys a liveliness token, notifying subscribers of its destruction. #[no_mangle] -pub extern "C" fn zc_liveliness_undeclare_token( +pub extern "C" fn z_liveliness_undeclare_token( this: &mut zc_moved_liveliness_token_t, ) -> result::z_result_t { if let Some(token) = this.take_rust_type() { @@ -135,26 +135,26 @@ pub extern "C" fn zc_liveliness_undeclare_token( } /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. -/// @brief The options for `zc_liveliness_declare_subscriber()` +/// @brief The options for `z_liveliness_declare_subscriber()` #[repr(C)] -pub struct zc_liveliness_subscriber_options_t { +pub struct z_liveliness_subscriber_options_t { history: bool, } /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. -/// @brief Constucts default value for `zc_liveliness_declare_subscriber_options_t`. +/// @brief Constucts default value for `z_liveliness_declare_subscriber_options_t`. #[no_mangle] -pub extern "C" fn zc_liveliness_subscriber_options_default( - this: &mut MaybeUninit, +pub extern "C" fn z_liveliness_subscriber_options_default( + this: &mut MaybeUninit, ) { - this.write(zc_liveliness_subscriber_options_t { history: false }); + this.write(z_liveliness_subscriber_options_t { history: false }); } fn _liveliness_declare_subscriber_inner<'a, 'b>( session: &'a z_loaned_session_t, key_expr: &'b z_loaned_keyexpr_t, callback: &mut z_moved_closure_sample_t, - options: Option<&mut zc_liveliness_subscriber_options_t>, + options: Option<&mut z_liveliness_subscriber_options_t>, ) -> LivelinessSubscriberBuilder<'a, 'b, Callback> { let session = session.as_rust_type_ref(); let key_expr = key_expr.as_rust_type_ref(); @@ -185,12 +185,12 @@ fn _liveliness_declare_subscriber_inner<'a, 'b>( /// /// @return 0 in case of success, negative error values otherwise. #[no_mangle] -pub extern "C" fn zc_liveliness_declare_subscriber( +pub extern "C" fn z_liveliness_declare_subscriber( session: &z_loaned_session_t, subscriber: &mut MaybeUninit, key_expr: &z_loaned_keyexpr_t, callback: &mut z_moved_closure_sample_t, - options: Option<&mut zc_liveliness_subscriber_options_t>, + options: Option<&mut z_liveliness_subscriber_options_t>, ) -> result::z_result_t { let this = subscriber.as_rust_type_mut_uninit(); let subscriber = _liveliness_declare_subscriber_inner(session, key_expr, callback, options); @@ -221,7 +221,7 @@ pub extern "C" fn zc_liveliness_declare_background_subscriber( session: &z_loaned_session_t, key_expr: &z_loaned_keyexpr_t, callback: &mut z_moved_closure_sample_t, - options: Option<&mut zc_liveliness_subscriber_options_t>, + options: Option<&mut z_liveliness_subscriber_options_t>, ) -> result::z_result_t { let subscriber = _liveliness_declare_subscriber_inner(session, key_expr, callback, options); match subscriber.background().wait() { @@ -234,19 +234,19 @@ pub extern "C" fn zc_liveliness_declare_background_subscriber( } /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. -/// @brief The options for `zc_liveliness_get()` +/// @brief The options for `z_liveliness_get()` #[repr(C)] -pub struct zc_liveliness_get_options_t { +pub struct z_liveliness_get_options_t { timeout_ms: u32, } /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. -/// @brief Constructs default value `zc_liveliness_get_options_t`. +/// @brief Constructs default value `z_liveliness_get_options_t`. #[no_mangle] -pub extern "C" fn zc_liveliness_get_options_default( - this: &mut MaybeUninit, +pub extern "C" fn z_liveliness_get_options_default( + this: &mut MaybeUninit, ) { - this.write(zc_liveliness_get_options_t { timeout_ms: 10000 }); + this.write(z_liveliness_get_options_t { timeout_ms: 10000 }); } /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. @@ -257,11 +257,11 @@ pub extern "C" fn zc_liveliness_get_options_default( /// @param callback: The callback function that will be called for each received reply. /// @param options: Additional options for the liveliness get operation. #[no_mangle] -pub extern "C" fn zc_liveliness_get( +pub extern "C" fn z_liveliness_get( session: &z_loaned_session_t, key_expr: &z_loaned_keyexpr_t, callback: &mut z_moved_closure_reply_t, - options: Option<&mut zc_liveliness_get_options_t>, + options: Option<&mut z_liveliness_get_options_t>, ) -> result::z_result_t { let session = session.as_rust_type_ref(); let key_expr = key_expr.as_rust_type_ref(); diff --git a/tests/z_api_liveliness.c b/tests/z_api_liveliness.c index d68aff490..bf2f77814 100644 --- a/tests/z_api_liveliness.c +++ b/tests/z_api_liveliness.c @@ -71,25 +71,25 @@ void test_liveliness_sub() { z_closure(&closure, on_receive, NULL, (void*)(&context)); z_owned_subscriber_t sub; - zc_liveliness_declare_subscriber(z_loan(s2), &sub, z_loan(k), z_move(closure), NULL); + z_liveliness_declare_subscriber(z_loan(s2), &sub, z_loan(k), z_move(closure), NULL); z_sleep_s(1); zc_owned_liveliness_token_t t1, t2; - zc_liveliness_declare_token(z_loan(s1), &t1, z_loan(k1), NULL); - zc_liveliness_declare_token(z_loan(s1), &t2, z_loan(k2), NULL); + z_liveliness_declare_token(z_loan(s1), &t1, z_loan(k1), NULL); + z_liveliness_declare_token(z_loan(s1), &t2, z_loan(k2), NULL); z_sleep_s(1); assert(context.token1_put); assert(context.token2_put); - zc_liveliness_undeclare_token(z_move(t1)); + z_liveliness_undeclare_token(z_move(t1)); z_sleep_s(1); assert(context.token1_drop); assert(!context.token2_drop); - zc_liveliness_undeclare_token(z_move(t2)); + z_liveliness_undeclare_token(z_move(t2)); z_sleep_s(1); assert(context.token2_drop); } @@ -110,14 +110,14 @@ void test_liveliness_get() { z_sleep_s(1); zc_owned_liveliness_token_t t1; - zc_liveliness_declare_token(z_loan(s1), &t1, z_loan(k1), NULL); + z_liveliness_declare_token(z_loan(s1), &t1, z_loan(k1), NULL); z_sleep_s(1); z_owned_fifo_handler_reply_t handler; z_owned_closure_reply_t cb; z_fifo_channel_reply_new(&cb, &handler, 3); - zc_liveliness_get(z_loan(s2), z_loan(k), z_move(cb), NULL); + z_liveliness_get(z_loan(s2), z_loan(k), z_move(cb), NULL); z_owned_reply_t reply; assert(z_recv(z_loan(handler), &reply) == Z_OK); assert(z_reply_is_ok(z_loan(reply))); @@ -134,7 +134,7 @@ void test_liveliness_get() { z_sleep_s(1); z_fifo_channel_reply_new(&cb, &handler, 3); - zc_liveliness_get(z_loan(s2), z_loan(k), z_move(cb), NULL); + z_liveliness_get(z_loan(s2), z_loan(k), z_move(cb), NULL); assert(z_recv(z_loan(handler), &reply) == Z_CHANNEL_DISCONNECTED); z_drop(z_move(handler));