diff --git a/Cargo.lock b/Cargo.lock index cefe46d63..bd3d92f5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2111,6 +2111,26 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ref-cast" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "regex" version = "1.10.6" @@ -3704,9 +3724,9 @@ dependencies = [ [[package]] name = "z-serial" -version = "0.2.3" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f113597c6b880587004169f14bc010e4b440981ab2ad669779d3654f9b1c4af1" +checksum = "1660dfc9f90480610f94c285a9a967b49cd2f57b3b1267d9bd7fd5d4f57c36c8" dependencies = [ "cobs", "futures", @@ -3718,7 +3738,7 @@ dependencies = [ [[package]] name = "zenoh" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "ahash", "async-trait", @@ -3734,6 +3754,7 @@ dependencies = [ "petgraph", "phf", "rand", + "ref-cast", "rustc_version", "serde", "serde_json", @@ -3765,7 +3786,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "zenoh-collections", ] @@ -3802,7 +3823,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "tracing", "uhlc", @@ -3814,12 +3835,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" [[package]] name = "zenoh-config" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "json5", "num_cpus", @@ -3841,7 +3862,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "lazy_static", "tokio", @@ -3852,7 +3873,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "aes", "hmac", @@ -3865,8 +3886,9 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ + "async-trait", "bincode", "flume", "futures", @@ -3874,6 +3896,7 @@ dependencies = [ "serde", "tokio", "tracing", + "uhlc", "zenoh", "zenoh-macros", "zenoh-util", @@ -3882,7 +3905,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "hashbrown 0.14.5", "keyed-set", @@ -3896,7 +3919,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "zenoh-config", "zenoh-link-commons", @@ -3916,7 +3939,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "flume", @@ -3940,7 +3963,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "base64 0.22.1", @@ -3966,7 +3989,7 @@ dependencies = [ [[package]] name = "zenoh-link-serial" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "tokio", @@ -3984,7 +4007,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "socket2 0.5.7", @@ -4001,7 +4024,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "base64 0.22.1", @@ -4030,7 +4053,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "socket2 0.5.7", @@ -4049,7 +4072,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixpipe" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "advisory-lock", "async-trait", @@ -4071,7 +4094,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "nix 0.29.0", @@ -4089,7 +4112,7 @@ dependencies = [ [[package]] name = "zenoh-link-vsock" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "libc", @@ -4107,7 +4130,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "futures-util", @@ -4127,7 +4150,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "proc-macro2", "quote", @@ -4138,7 +4161,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "git-version", "libloading", @@ -4154,7 +4177,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "const_format", "rand", @@ -4168,7 +4191,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "anyhow", ] @@ -4176,7 +4199,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "lazy_static", "ron", @@ -4189,7 +4212,7 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "advisory-lock", "async-trait", @@ -4212,7 +4235,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "event-listener 5.3.1", "futures", @@ -4225,7 +4248,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "futures", "tokio", @@ -4238,7 +4261,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "crossbeam-utils", @@ -4272,7 +4295,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "const_format", diff --git a/build-resources/opaque-types/Cargo.lock b/build-resources/opaque-types/Cargo.lock index 9eec1c13f..f2948ecf6 100644 --- a/build-resources/opaque-types/Cargo.lock +++ b/build-resources/opaque-types/Cargo.lock @@ -1633,6 +1633,26 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ref-cast" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "regex" version = "1.10.6" @@ -3097,9 +3117,9 @@ dependencies = [ [[package]] name = "z-serial" -version = "0.2.3" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f113597c6b880587004169f14bc010e4b440981ab2ad669779d3654f9b1c4af1" +checksum = "1660dfc9f90480610f94c285a9a967b49cd2f57b3b1267d9bd7fd5d4f57c36c8" dependencies = [ "cobs", "futures", @@ -3111,7 +3131,7 @@ dependencies = [ [[package]] name = "zenoh" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "ahash", "async-trait", @@ -3127,6 +3147,7 @@ dependencies = [ "petgraph", "phf", "rand", + "ref-cast", "rustc_version", "serde", "serde_json", @@ -3158,7 +3179,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "zenoh-collections", ] @@ -3166,7 +3187,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "tracing", "uhlc", @@ -3178,12 +3199,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" [[package]] name = "zenoh-config" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "json5", "num_cpus", @@ -3205,7 +3226,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "lazy_static", "tokio", @@ -3216,7 +3237,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "aes", "hmac", @@ -3229,8 +3250,9 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ + "async-trait", "bincode", "flume", "futures", @@ -3238,6 +3260,7 @@ dependencies = [ "serde", "tokio", "tracing", + "uhlc", "zenoh", "zenoh-macros", "zenoh-util", @@ -3246,7 +3269,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "hashbrown", "keyed-set", @@ -3260,7 +3283,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "zenoh-config", "zenoh-link-commons", @@ -3280,7 +3303,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "flume", @@ -3304,7 +3327,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "base64 0.22.1", @@ -3330,7 +3353,7 @@ dependencies = [ [[package]] name = "zenoh-link-serial" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "tokio", @@ -3348,7 +3371,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "socket2", @@ -3365,7 +3388,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "base64 0.22.1", @@ -3394,7 +3417,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "socket2", @@ -3413,7 +3436,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixpipe" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "advisory-lock", "async-trait", @@ -3435,7 +3458,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "nix 0.29.0", @@ -3453,7 +3476,7 @@ dependencies = [ [[package]] name = "zenoh-link-vsock" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "libc", @@ -3471,7 +3494,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "futures-util", @@ -3491,7 +3514,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "proc-macro2", "quote", @@ -3502,7 +3525,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "git-version", "libloading", @@ -3518,7 +3541,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "const_format", "rand", @@ -3532,7 +3555,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "anyhow", ] @@ -3540,7 +3563,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "lazy_static", "ron", @@ -3553,7 +3576,7 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "advisory-lock", "async-trait", @@ -3576,7 +3599,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "event-listener", "futures", @@ -3589,7 +3612,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "futures", "tokio", @@ -3602,7 +3625,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "crossbeam-utils", @@ -3636,7 +3659,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#fb2d2bc2865beeb49a49337fcfe12654cd013ffc" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#2f27e18f0b2c3d339be81f3684eb8ba70c367c5d" dependencies = [ "async-trait", "const_format", diff --git a/build-resources/opaque-types/src/lib.rs b/build-resources/opaque-types/src/lib.rs index e5f958675..5cea34df4 100644 --- a/build-resources/opaque-types/src/lib.rs +++ b/build-resources/opaque-types/src/lib.rs @@ -22,9 +22,10 @@ use zenoh::{ }; #[cfg(feature = "unstable")] use zenoh::{ - liveliness::LivelinessToken, matching::MatchingListener, query::Querier, sample::SourceInfo, + matching::MatchingListener, query::Querier, sample::SourceInfo, session::EntityGlobalId, }; +use zenoh::liveliness::LivelinessToken; #[cfg(all(feature = "shared-memory", feature = "unstable"))] use zenoh::{ shm::zshm, shm::zshmmut, shm::AllocLayout, shm::ChunkAllocResult, shm::ChunkDescriptor, @@ -233,17 +234,14 @@ get_opaque_type_data!(Option>, z_owned_subscriber_t); /// A loaned Zenoh subscriber. get_opaque_type_data!(Subscriber<()>, z_loaned_subscriber_t); -#[cfg(feature = "unstable")] -/// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. /// @brief A liveliness token that can be used to provide the network with information about connectivity to its /// declarer: when constructed, a PUT sample will be received by liveliness subscribers on intersecting key /// expressions. /// /// A DELETE on the token's key expression will be received by subscribers if the token is destroyed, or if connectivity between the subscriber and the token's creator is lost. get_opaque_type_data!(Option, z_owned_liveliness_token_t); -#[cfg(feature = "unstable")] -/// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. get_opaque_type_data!(LivelinessToken, z_loaned_liveliness_token_t); + #[cfg(feature = "unstable")] /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. /// @brief An owned Zenoh publication cache. diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index e687b3f82..d1996f5f7 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -24,8 +24,7 @@ foreach(file ${files}) # Exclude Liveliness and zenoh-ext examples if unstable api feature is disabled if(NOT(ZENOHC_BUILD_WITH_UNSTABLE_API)) if( - (${target} MATCHES "^.*_liveliness.*$") - OR (${target} MATCHES "^.*_pub_cache.*$") + (${target} MATCHES "^.*_pub_cache.*$") OR (${target} MATCHES "^.*_query_sub.*$") OR (${target} MATCHES "^.*_querier.*$") ) diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h index e77821ef4..66db1ea7c 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 */ @@ -616,44 +777,32 @@ typedef struct z_moved_keyexpr_t { struct z_owned_keyexpr_t _this; } z_moved_keyexpr_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 { /** * If true, subscriber will receive the state change notifications for liveliness tokens that were declared before its declaration. */ 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 { /** * The timeout for the liveliness query in milliseconds. 0 means default query timeout from zenoh configuration. */ uint32_t timeout_ms; } z_liveliness_get_options_t; -#endif typedef struct z_moved_liveliness_token_t { struct z_owned_liveliness_token_t _this; } z_moved_liveliness_token_t; -typedef struct z_moved_memory_layout_t { - struct z_owned_memory_layout_t _this; -} z_moved_memory_layout_t; typedef struct z_moved_mutex_t { struct z_owned_mutex_t _this; } z_moved_mutex_t; @@ -907,15 +1056,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. @@ -925,6 +1111,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; @@ -999,9 +1226,6 @@ typedef struct zc_moved_concurrent_close_handle_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. @@ -1109,7 +1333,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. @@ -1118,7 +1342,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. @@ -1127,7 +1351,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. @@ -1136,7 +1360,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. @@ -1145,7 +1369,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. @@ -1153,7 +1377,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. @@ -1161,7 +1385,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. @@ -1169,8 +1393,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 @@ -1182,7 +1406,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*)); @@ -1197,7 +1421,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. @@ -1264,7 +1488,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. @@ -1273,7 +1497,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`. @@ -1400,7 +1624,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. @@ -1412,7 +1636,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. @@ -1485,7 +1709,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. @@ -1493,7 +1717,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 /** @@ -1502,7 +1726,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 /** @@ -2518,7 +2742,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. @@ -2526,7 +2750,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. @@ -2550,7 +2774,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. @@ -2558,7 +2782,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. @@ -2668,28 +2892,20 @@ ZENOHC_API bool z_internal_keyexpr_check(const struct z_owned_keyexpr_t *this_); */ ZENOHC_API void z_internal_keyexpr_null(struct z_owned_keyexpr_t *this_); /** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. * @brief Returns ``true`` if liveliness token is valid, ``false`` otherwise. */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -bool z_internal_liveliness_token_check(const struct z_owned_liveliness_token_t *this_); -#endif +ZENOHC_API bool z_internal_liveliness_token_check(const struct z_owned_liveliness_token_t *this_); /** - * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. * @brief Constructs liveliness token in its gravestone state. */ -#if defined(Z_FEATURE_UNSTABLE_API) -ZENOHC_API -void z_internal_liveliness_token_null(struct z_owned_liveliness_token_t *this_); -#endif +ZENOHC_API void z_internal_liveliness_token_null(struct z_owned_liveliness_token_t *this_); /** * @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. * @brief Returns ``true`` if `this` is valid. */ #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. @@ -2697,7 +2913,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. @@ -2812,7 +3028,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. @@ -2820,7 +3036,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. @@ -2828,7 +3044,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. @@ -2836,7 +3052,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. @@ -2844,7 +3060,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. @@ -2852,7 +3068,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. @@ -2860,7 +3076,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. @@ -2868,7 +3084,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. @@ -2876,7 +3092,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. @@ -2884,7 +3100,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. @@ -3080,7 +3296,6 @@ enum z_keyexpr_intersection_level_t z_keyexpr_relation_to(const struct z_loaned_ 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. @@ -3091,16 +3306,13 @@ enum z_keyexpr_intersection_level_t z_keyexpr_relation_to(const struct z_loaned_ * * @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 @@ -3111,15 +3323,12 @@ z_result_t z_liveliness_declare_subscriber(const struct z_loaned_session_t *sess * @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, struct z_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. @@ -3127,68 +3336,44 @@ z_result_t z_liveliness_declare_token(const struct z_loaned_session_t *session, * @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 +ZENOHC_API void z_liveliness_get_options_default(struct z_liveliness_get_options_t *this_); /** - * @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(struct z_moved_liveliness_token_t *this_); -#endif +ZENOHC_API void z_liveliness_token_drop(struct z_moved_liveliness_token_t *this_); /** - * @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 z_loaned_liveliness_token_t *z_liveliness_token_loan(const struct z_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 +ZENOHC_API void z_liveliness_token_options_default(struct z_liveliness_token_options_t *this_); /** - * @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(struct z_moved_liveliness_token_t *this_); -#endif +ZENOHC_API z_result_t z_liveliness_undeclare_token(struct z_moved_liveliness_token_t *this_); /** * @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. @@ -3196,7 +3381,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 @@ -3206,7 +3391,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. @@ -3214,7 +3399,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 @@ -3270,7 +3455,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. @@ -3278,7 +3463,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. @@ -3286,8 +3471,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. @@ -3647,7 +3832,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. @@ -3928,7 +4113,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. @@ -3936,7 +4121,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 @@ -3946,8 +4131,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. @@ -3955,7 +4140,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. @@ -3963,7 +4148,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. @@ -3971,8 +4156,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 /** @@ -3981,7 +4166,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. @@ -3989,8 +4174,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. @@ -3998,7 +4183,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. @@ -4006,7 +4191,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. @@ -4014,8 +4199,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. @@ -4023,7 +4208,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. @@ -4031,7 +4216,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. @@ -4039,7 +4224,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. @@ -4047,7 +4232,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. @@ -4055,7 +4240,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. @@ -4063,7 +4248,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. @@ -4071,7 +4256,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. @@ -4079,7 +4264,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. @@ -4087,7 +4272,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. @@ -4101,9 +4286,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. @@ -4112,7 +4297,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 @@ -4123,7 +4308,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 @@ -4134,7 +4319,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 @@ -4146,7 +4331,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, @@ -4160,7 +4345,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 @@ -4171,7 +4356,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 @@ -4181,7 +4366,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. @@ -4190,7 +4375,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. @@ -4198,7 +4383,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. @@ -4206,7 +4391,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. @@ -4214,7 +4399,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. @@ -4222,8 +4407,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 @@ -4233,7 +4418,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); @@ -4244,7 +4429,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); @@ -4255,7 +4440,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. @@ -4263,7 +4448,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. @@ -5017,7 +5202,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. @@ -5025,7 +5210,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_); +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. @@ -5159,9 +5344,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. @@ -5169,7 +5354,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. @@ -5177,7 +5362,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. @@ -5185,7 +5370,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. @@ -5193,7 +5378,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. diff --git a/include/zenoh_macros.h b/include/zenoh_macros.h index 62b5462a0..a1d871e1c 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); } @@ -22,7 +20,6 @@ static inline z_moved_fifo_handler_sample_t* z_fifo_handler_sample_move(z_owned_ 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_liveliness_token_t* z_liveliness_token_move(z_owned_liveliness_token_t* x) { return (z_moved_liveliness_token_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_querier_t* z_querier_move(z_owned_querier_t* x) { return (z_moved_querier_t*)(x); } @@ -35,11 +32,6 @@ 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); } @@ -50,7 +42,6 @@ static inline zc_moved_closure_log_t* zc_closure_log_move(zc_owned_closure_log_t 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_concurrent_close_handle_t* zc_concurrent_close_handle_move(zc_owned_concurrent_close_handle_t* x) { return (zc_moved_concurrent_close_handle_t*)(x); } static inline zc_moved_matching_listener_t* zc_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); } @@ -58,7 +49,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_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, \ @@ -75,7 +65,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_hello_t : z_hello_loan, \ z_owned_keyexpr_t : z_keyexpr_loan, \ z_owned_liveliness_token_t : z_liveliness_token_loan, \ - z_owned_memory_layout_t : z_memory_layout_loan, \ z_owned_publisher_t : z_publisher_loan, \ z_owned_querier_t : z_querier_loan, \ z_owned_query_t : z_query_loan, \ @@ -87,10 +76,6 @@ 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, \ @@ -101,7 +86,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x 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_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 \ @@ -122,19 +106,14 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_publisher_t : z_publisher_loan_mut, \ z_owned_querier_t : z_querier_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, \ @@ -149,7 +128,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_moved_hello_t* : z_hello_drop, \ z_moved_keyexpr_t* : z_keyexpr_drop, \ z_moved_liveliness_token_t* : z_liveliness_token_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_querier_t* : z_querier_drop, \ @@ -162,11 +140,6 @@ 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, \ @@ -177,7 +150,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x zc_moved_closure_matching_status_t* : zc_closure_matching_status_drop, \ zc_moved_concurrent_close_handle_t* : zc_concurrent_close_handle_drop, \ zc_moved_matching_listener_t* : zc_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 \ @@ -185,10 +157,8 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x #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, \ @@ -203,7 +173,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_hello_t : z_hello_move, \ z_owned_keyexpr_t : z_keyexpr_move, \ z_owned_liveliness_token_t : z_liveliness_token_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_querier_t : z_querier_move, \ @@ -216,11 +185,6 @@ 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, \ @@ -231,7 +195,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x zc_owned_closure_matching_status_t : zc_closure_matching_status_move, \ zc_owned_concurrent_close_handle_t : zc_concurrent_close_handle_move, \ zc_owned_matching_listener_t : zc_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 \ @@ -239,10 +202,8 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x #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, \ @@ -257,7 +218,6 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x z_owned_hello_t* : z_internal_hello_null, \ z_owned_keyexpr_t* : z_internal_keyexpr_null, \ z_owned_liveliness_token_t* : z_internal_liveliness_token_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_querier_t* : z_internal_querier_null, \ @@ -270,11 +230,6 @@ 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, \ @@ -285,16 +240,13 @@ static inline ze_moved_serializer_t* ze_serializer_move(ze_owned_serializer_t* x zc_owned_closure_matching_status_t* : zc_internal_closure_matching_status_null, \ zc_owned_concurrent_close_handle_t* : zc_internal_concurrent_close_handle_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); } @@ -309,7 +261,6 @@ static inline void z_fifo_handler_sample_take(z_owned_fifo_handler_sample_t* thi 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_liveliness_token_take(z_owned_liveliness_token_t* this_, z_moved_liveliness_token_t* x) { *this_ = x->_this; z_internal_liveliness_token_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_querier_take(z_owned_querier_t* this_, z_moved_querier_t* x) { *this_ = x->_this; z_internal_querier_null(&x->_this); } @@ -322,11 +273,6 @@ 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); } @@ -337,7 +283,6 @@ static inline void zc_closure_log_take(zc_owned_closure_log_t* closure_, zc_move 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_concurrent_close_handle_take(zc_owned_concurrent_close_handle_t* this_, zc_moved_concurrent_close_handle_t* x) { *this_ = x->_this; zc_internal_concurrent_close_handle_null(&x->_this); } static inline void zc_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); } @@ -345,10 +290,8 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser #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, \ @@ -363,7 +306,6 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser z_owned_hello_t* : z_hello_take, \ z_owned_keyexpr_t* : z_keyexpr_take, \ z_owned_liveliness_token_t* : z_liveliness_token_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_querier_t* : z_querier_take, \ @@ -376,11 +318,6 @@ 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, \ @@ -391,7 +328,6 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser zc_owned_closure_matching_status_t* : zc_closure_matching_status_take, \ zc_owned_concurrent_close_handle_t* : zc_concurrent_close_handle_take, \ zc_owned_matching_listener_t* : zc_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 \ @@ -399,10 +335,8 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser #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, \ @@ -417,7 +351,6 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser z_owned_hello_t : z_internal_hello_check, \ z_owned_keyexpr_t : z_internal_keyexpr_check, \ z_owned_liveliness_token_t : z_internal_liveliness_token_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_querier_t : z_internal_querier_check, \ @@ -430,11 +363,6 @@ 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, \ @@ -445,7 +373,6 @@ static inline void ze_serializer_take(ze_owned_serializer_t* this_, ze_moved_ser zc_owned_closure_matching_status_t : zc_internal_closure_matching_status_check, \ zc_owned_concurrent_close_handle_t : zc_internal_concurrent_close_handle_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 \ @@ -512,8 +439,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 \ @@ -521,10 +446,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); } @@ -539,7 +462,6 @@ static inline z_moved_fifo_handler_sample_t* z_fifo_handler_sample_move(z_owned_ 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_liveliness_token_t* z_liveliness_token_move(z_owned_liveliness_token_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_querier_t* z_querier_move(z_owned_querier_t* x) { return reinterpret_cast(x); } @@ -552,11 +474,6 @@ 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); } @@ -567,14 +484,12 @@ static inline zc_moved_closure_log_t* zc_closure_log_move(zc_owned_closure_log_t 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_concurrent_close_handle_t* zc_concurrent_close_handle_move(zc_owned_concurrent_close_handle_t* x) { return reinterpret_cast(x); } static inline zc_moved_matching_listener_t* zc_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); }; @@ -591,7 +506,6 @@ inline const z_loaned_fifo_handler_sample_t* z_loan(const z_owned_fifo_handler_s 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_liveliness_token_t* z_loan(const z_owned_liveliness_token_t& this_) { return z_liveliness_token_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_querier_t* z_loan(const z_owned_querier_t& this_) { return z_querier_loan(&this_); }; inline const z_loaned_query_t* z_loan(const z_owned_query_t& this_) { return z_query_loan(&this_); }; @@ -603,10 +517,6 @@ 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_); }; @@ -617,7 +527,6 @@ inline const z_loaned_slice_t* z_loan(const z_view_slice_t& this_) { return z_vi 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_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_); }; @@ -636,17 +545,12 @@ inline z_loaned_mutex_t* z_loan_mut(z_owned_mutex_t& this_) { return z_mutex_loa inline z_loaned_publisher_t* z_loan_mut(z_owned_publisher_t& this_) { return z_publisher_loan_mut(&this_); }; inline z_loaned_querier_t* z_loan_mut(z_owned_querier_t& this_) { return z_querier_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_); }; @@ -661,7 +565,6 @@ inline void z_drop(z_moved_fifo_handler_sample_t* this_) { z_fifo_handler_sample 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_liveliness_token_t* this_) { z_liveliness_token_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_querier_t* this_) { z_querier_drop(this_); }; @@ -674,11 +577,6 @@ 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_); }; @@ -689,16 +587,13 @@ inline void z_drop(zc_moved_closure_log_t* closure_) { zc_closure_log_drop(closu inline void z_drop(zc_moved_closure_matching_status_t* closure_) { zc_closure_matching_status_drop(closure_); }; inline void z_drop(zc_moved_concurrent_close_handle_t* this_) { zc_concurrent_close_handle_drop(this_); }; inline void z_drop(zc_moved_matching_listener_t* this_) { zc_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_); }; @@ -713,7 +608,6 @@ inline z_moved_fifo_handler_sample_t* z_move(z_owned_fifo_handler_sample_t& 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_liveliness_token_t* z_move(z_owned_liveliness_token_t& this_) { return z_liveliness_token_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_querier_t* z_move(z_owned_querier_t& this_) { return z_querier_move(&this_); }; @@ -726,11 +620,6 @@ 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_); }; @@ -741,16 +630,13 @@ inline zc_moved_closure_log_t* z_move(zc_owned_closure_log_t& closure_) { return 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_concurrent_close_handle_t* z_move(zc_owned_concurrent_close_handle_t& this_) { return zc_concurrent_close_handle_move(&this_); }; inline zc_moved_matching_listener_t* z_move(zc_owned_matching_listener_t& this_) { return zc_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_); }; @@ -765,7 +651,6 @@ inline void z_internal_null(z_owned_fifo_handler_sample_t* this_) { z_internal_f 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_liveliness_token_t* this_) { z_internal_liveliness_token_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_querier_t* this_) { z_internal_querier_null(this_); }; @@ -778,11 +663,6 @@ 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_); }; @@ -793,15 +673,12 @@ inline void z_internal_null(zc_owned_closure_log_t* this_) { zc_internal_closure 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_concurrent_close_handle_t* this_) { zc_internal_concurrent_close_handle_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); } @@ -816,7 +693,6 @@ static inline void z_fifo_handler_sample_take(z_owned_fifo_handler_sample_t* thi 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_liveliness_token_take(z_owned_liveliness_token_t* this_, z_moved_liveliness_token_t* x) { *this_ = x->_this; z_internal_liveliness_token_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_querier_take(z_owned_querier_t* this_, z_moved_querier_t* x) { *this_ = x->_this; z_internal_querier_null(&x->_this); } @@ -829,11 +705,6 @@ 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); } @@ -844,25 +715,18 @@ static inline void zc_closure_log_take(zc_owned_closure_log_t* closure_, zc_move 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_concurrent_close_handle_take(zc_owned_concurrent_close_handle_t* this_, zc_moved_concurrent_close_handle_t* x) { *this_ = x->_this; zc_internal_concurrent_close_handle_null(&x->_this); } static inline void zc_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); }; @@ -905,9 +769,6 @@ inline void z_take(z_owned_keyexpr_t* this_, z_moved_keyexpr_t* x) { inline void z_take(z_owned_liveliness_token_t* this_, z_moved_liveliness_token_t* x) { z_liveliness_token_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); }; @@ -944,21 +805,6 @@ 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); }; @@ -989,9 +835,6 @@ inline void z_take(zc_owned_concurrent_close_handle_t* this_, zc_moved_concurren inline void z_take(zc_owned_matching_listener_t* this_, zc_moved_matching_listener_t* x) { zc_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); }; @@ -1003,10 +846,8 @@ inline void z_take(ze_owned_serializer_t* this_, ze_moved_serializer_t* 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_); }; @@ -1021,7 +862,6 @@ inline bool z_internal_check(const z_owned_fifo_handler_sample_t& this_) { retur 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_liveliness_token_t& this_) { return z_internal_liveliness_token_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_querier_t& this_) { return z_internal_querier_check(&this_); }; @@ -1034,11 +874,6 @@ 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_); }; @@ -1049,7 +884,6 @@ inline bool z_internal_check(const zc_owned_closure_log_t& this_) { return zc_in 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_concurrent_close_handle_t& this_) { return zc_internal_concurrent_close_handle_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_); }; @@ -1180,12 +1014,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_); }; @@ -1198,8 +1026,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; }; @@ -1232,8 +1058,6 @@ template<> struct z_loaned_to_owned_type_t { typedef z_owned 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_liveliness_token_t type; }; template<> struct z_owned_to_loaned_type_t { typedef z_loaned_liveliness_token_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_querier_t type; }; @@ -1256,14 +1080,6 @@ 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; }; @@ -1278,8 +1094,6 @@ template<> struct z_loaned_to_owned_type_t { typedef zc 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_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; }; diff --git a/splitguide.yaml b/splitguide.yaml index 8ba0bf0d5..056d89cc6 100644 --- a/splitguide.yaml +++ b/splitguide.yaml @@ -56,8 +56,8 @@ zenoh_opaque.h: - zc_owned_matching_listener_t!#unstable - z_owned_subscriber_t! - z_loaned_subscriber_t! - - z_owned_liveliness_token_t!#unstable - - z_loaned_liveliness_token_t!#unstable + - z_owned_liveliness_token_t! + - z_loaned_liveliness_token_t! - ze_owned_publication_cache_t!#unstable - z_owned_mutex_t! - z_loaned_mutex_t! diff --git a/src/lib.rs b/src/lib.rs index e4a117bd2..3e5ede75a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,9 +65,7 @@ mod closures; pub use closures::*; pub mod platform; pub use platform::*; -#[cfg(feature = "unstable")] mod liveliness; -#[cfg(feature = "unstable")] pub use liveliness::*; #[cfg(feature = "unstable")] mod matching; diff --git a/src/liveliness.rs b/src/liveliness.rs index de6da556a..87742ceef 100644 --- a/src/liveliness.rs +++ b/src/liveliness.rs @@ -34,7 +34,6 @@ decl_c_type!( loaned(z_loaned_liveliness_token_t), ); -/// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. /// @brief Constructs liveliness token in its gravestone state. #[no_mangle] pub extern "C" fn z_internal_liveliness_token_null( @@ -43,28 +42,24 @@ pub extern "C" fn z_internal_liveliness_token_null( this_.as_rust_type_mut_uninit().write(None); } -/// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future release. /// @brief Returns ``true`` if liveliness token is valid, ``false`` otherwise. #[no_mangle] pub extern "C" fn z_internal_liveliness_token_check(this_: &z_owned_liveliness_token_t) -> bool { this_.as_rust_type_ref().is_some() } -/// @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 z_liveliness_token_drop(this_: &mut z_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 `z_liveliness_declare_token()`. #[repr(C)] 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 `z_liveliness_token_options_t`. #[no_mangle] pub extern "C" fn z_liveliness_token_options_default( @@ -73,7 +68,6 @@ pub extern "C" fn z_liveliness_token_options_default( 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)] @@ -86,7 +80,6 @@ pub unsafe extern "C" fn z_liveliness_token_loan( .as_loaned_c_type_ref() } -/// @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 @@ -119,7 +112,6 @@ pub extern "C" fn z_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 z_liveliness_undeclare_token( @@ -134,7 +126,6 @@ pub extern "C" fn z_liveliness_undeclare_token( result::Z_OK } -/// @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()` #[repr(C)] pub struct z_liveliness_subscriber_options_t { @@ -142,7 +133,6 @@ 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 `z_liveliness_declare_subscriber_options_t`. #[no_mangle] pub extern "C" fn z_liveliness_subscriber_options_default( @@ -175,7 +165,6 @@ fn _liveliness_declare_subscriber_inner<'a, 'b>( }); sub } -/// @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. @@ -218,6 +207,7 @@ pub extern "C" fn z_liveliness_declare_subscriber( /// /// @return 0 in case of success, negative error values otherwise. #[no_mangle] +#[cfg(feature = "unstable")] pub extern "C" fn zc_liveliness_declare_background_subscriber( session: &z_loaned_session_t, key_expr: &z_loaned_keyexpr_t, @@ -234,7 +224,6 @@ 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 `z_liveliness_get()` #[repr(C)] pub struct z_liveliness_get_options_t { @@ -242,7 +231,6 @@ 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 `z_liveliness_get_options_t`. #[no_mangle] pub extern "C" fn z_liveliness_get_options_default( @@ -251,7 +239,6 @@ pub extern "C" fn z_liveliness_get_options_default( 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. /// @brief Queries liveliness tokens currently on the network with a key expression intersecting with `key_expr`. /// /// @param session: The Zenoh session. diff --git a/src/publication_cache.rs b/src/publication_cache.rs index 5325bb22c..464adbe85 100644 --- a/src/publication_cache.rs +++ b/src/publication_cache.rs @@ -11,6 +11,7 @@ // Contributors: // ZettaScale Zenoh team, // +#![allow(deprecated)] use std::{mem::MaybeUninit, ptr::null}; diff --git a/src/querying_subscriber.rs b/src/querying_subscriber.rs index 919d748d5..aa13be223 100644 --- a/src/querying_subscriber.rs +++ b/src/querying_subscriber.rs @@ -11,6 +11,7 @@ // Contributors: // ZettaScale Zenoh team, // +#![allow(deprecated)] use std::mem::MaybeUninit; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5b6b9ad81..964c56e6e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -15,9 +15,9 @@ foreach(file ${files}) endif() endif() - # Exclude Liveliness and zenoh-ext tests if unstable api feature is disabled + # Exclude zenoh-ext tests if unstable api feature is disabled if(NOT(ZENOHC_BUILD_WITH_UNSTABLE_API)) - if((${target} MATCHES "^.*_liveliness.*$") OR (${target} MATCHES "^.*_query_sub_test.*$")) + if(${target} MATCHES "^.*_query_sub_test.*$") continue() endif() endif()