-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c520e0d
commit 127fb3a
Showing
16 changed files
with
67 additions
and
50 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
use zenoh_core::Wait; | ||
use zenoh_shm::api::{ | ||
client::shm_client::ShmClient, | ||
protocol_implementations::posix::{ | ||
|
@@ -31,7 +32,7 @@ fn posix_shm_provider_create() { | |
let _backend = PosixShmProviderBackend::builder() | ||
.with_size(1024) | ||
.expect("Error creating Layout!") | ||
.res() | ||
.wait() | ||
.expect("Error creating PosixShmProviderBackend!"); | ||
} | ||
|
||
|
@@ -40,7 +41,7 @@ fn posix_shm_provider_alloc() { | |
let backend = PosixShmProviderBackend::builder() | ||
.with_size(1024) | ||
.expect("Error creating Layout!") | ||
.res() | ||
.wait() | ||
.expect("Error creating PosixShmProviderBackend!"); | ||
|
||
let layout = MemoryLayout::new(100, AllocAlignment::default()).unwrap(); | ||
|
@@ -55,7 +56,7 @@ fn posix_shm_provider_open() { | |
let backend = PosixShmProviderBackend::builder() | ||
.with_size(1024) | ||
.expect("Error creating Layout!") | ||
.res() | ||
.wait() | ||
.expect("Error creating PosixShmProviderBackend!"); | ||
|
||
let layout = MemoryLayout::new(100, AllocAlignment::default()).unwrap(); | ||
|
@@ -76,7 +77,7 @@ fn posix_shm_provider_allocator() { | |
let backend = PosixShmProviderBackend::builder() | ||
.with_size(BUFFER_SIZE * BUFFER_NUM) | ||
.expect("Error creating Layout!") | ||
.res() | ||
.wait() | ||
.expect("Error creating PosixShmProviderBackend!"); | ||
|
||
let layout = MemoryLayout::new(BUFFER_SIZE, AllocAlignment::default()).unwrap(); | ||
|
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
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 |
---|---|---|
|
@@ -11,8 +11,12 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use zenoh::shm::{ | ||
AllocAlignment, MemoryLayout, PosixShmProviderBackend, ShmProviderBuilder, POSIX_PROTOCOL_ID, | ||
use zenoh::{ | ||
shm::{ | ||
AllocAlignment, MemoryLayout, PosixShmProviderBackend, ShmProviderBuilder, | ||
POSIX_PROTOCOL_ID, | ||
}, | ||
Wait, | ||
}; | ||
|
||
fn main() { | ||
|
@@ -34,13 +38,13 @@ fn main() { | |
// Build a provider backend | ||
PosixShmProviderBackend::builder() | ||
.with_layout(provider_layout) | ||
.res() | ||
.wait() | ||
.unwrap() | ||
}; | ||
|
||
// Construct an SHM provider for particular backend and POSIX_PROTOCOL_ID | ||
let _shm_provider = ShmProviderBuilder::builder() | ||
.protocol_id::<POSIX_PROTOCOL_ID>() | ||
.backend(backend) | ||
.res(); | ||
.wait(); | ||
} |
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
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