-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP on SHM migration * posix implementation * tests for shm api abstraction * - move advisory locking functionality to shm segment class - some good refactoring * fix lints * fix workspace clippy * handle flock errors more precisely * use advisory-lock-based persistency suppression only on linux, mac has (and always had) some issues to fix * Update unix.rs * Update unix.rs * Update unix.rs * remove unsupported index for shm segment * Update shm.rs * rough windows support for shm * Update unix.rs * - format fix - disable some shm tests only for macos * add missing win_sys * fix errors on win * Update unix.rs and windows.rs * - get rid of some unwrap - fix clippy - take new elem_count() behavior into account (elem_count may be bigger then the one requested upon segment creation) * Update shm.rs * Update shm.rs * Update array.rs and shm.rs * Update array.rs * Update array.rs * Get real segment size for created POSIX segment * fix bug with SHM protocol handshaking * Update unix.rs and windows.rs * fix posix segment tests * Update Cargo.lock, Cargo.toml, and 2 more files... * Update windows.rs * fix posix shm provider tests * Update windows.rs * Update posix_shm_provider_backend.rs, windows.rs, and posix_shm_provider.rs * fix allocator test * WIP on mac persistency problem (flock() doesn't always work on mac tmpfs, so need other bsd-specific mechanism) * Make BSD and non-BSD implementation for shared memory cleanup * Add config aliases to properly detect BSD systems * - fix CI - add comments * Update unix.rs * Apply advisory locking on non-tmpfs for BSD * fix issues on mac * Update unix.rs * Update unix.rs * Update windows.rs * Update unix.rs and windows.rs * - review fixes - fix segment collision from different runs * Update shm.rs * Update shm.rs * Review fixes
- Loading branch information
1 parent
cac67d9
commit e76243b
Showing
23 changed files
with
795 additions
and
434 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// | ||
// Copyright (c) 2025 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
use cfg_aliases::cfg_aliases; | ||
|
||
fn main() { | ||
// these aliases should at least be included in the same aliases of Nix crate: | ||
// ___________________ | ||
// | | | ||
// | Nix aliases | | ||
// | ___________ | | ||
// | | Our | | | ||
// | | aliases | | | ||
// | |_________| | | ||
// |_________________| | ||
cfg_aliases! { | ||
dragonfly: { target_os = "dragonfly" }, | ||
ios: { target_os = "ios" }, | ||
freebsd: { target_os = "freebsd" }, | ||
macos: { target_os = "macos" }, | ||
netbsd: { target_os = "netbsd" }, | ||
openbsd: { target_os = "openbsd" }, | ||
watchos: { target_os = "watchos" }, | ||
tvos: { target_os = "tvos" }, | ||
visionos: { target_os = "visionos" }, | ||
|
||
apple_targets: { any(ios, macos, watchos, tvos, visionos) }, | ||
bsd: { any(freebsd, dragonfly, netbsd, openbsd, apple_targets) }, | ||
|
||
// we use this alias to detect platforms that | ||
// don't support advisory file locking on tmpfs | ||
shm_external_lockfile: { any(bsd, target_os = "redox") }, | ||
} | ||
|
||
println!("cargo:rustc-check-cfg=cfg(apple_targets)"); | ||
println!("cargo:rustc-check-cfg=cfg(bsd)"); | ||
println!("cargo:rustc-check-cfg=cfg(shm_external_lockfile)"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.