Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#96] introduce monitoring #99

Merged
merged 12 commits into from
Feb 17, 2024
5 changes: 5 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
* Buddy allocator for sender data-segment
* Introduce runtime fixed-size types

## Expert/Advanced Features

* [ ] Filtering/Routing of messages in pub-sub
* [ ] Handle approach to resend samples that could not be delivered caused by a full queue in pub-sub

## Robustness

* [ ] Add ability to recover samples when subscriber died
Expand Down
1 change: 1 addition & 0 deletions doc/release-notes/iceoryx2-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<!-- NOTE: Add new entries sorted by issue number to minimize the possibility of conflicts when merging. -->

* Introduce `iceoryx2-bb-posix::process_state` for process monitoring [#96](https://github.com/eclipse-iceoryx/iceoryx2/issues/96)
* Introduce concept `iceoryx2-cal::monitoring` [#96](https://github.com/eclipse-iceoryx/iceoryx2/issues/96)

### Bugfixes

Expand Down
16 changes: 8 additions & 8 deletions iceoryx2-bb/lock-free/src/mpmc/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,14 @@ impl<T: Copy + Debug> Container<T> {
///
pub unsafe fn add(&self, value: T) -> Option<UniqueIndex<'_>> {
self.verify_memory_initialization("add");
match self
.index_set
.acquire_with_additional_cleanup(|index: u32| {
// set deactivate the active index to indicate that the value can be used again
// requires that T does not implement drop
unsafe { &*self.active_index_ptr.as_ptr().offset(index as isize) }
.store(false, Ordering::Relaxed);
}) {
let cleanup_call = |index: u32| {
// set deactivate the active index to indicate that the value can be used again
// requires that T does not implement drop
unsafe { &*self.active_index_ptr.as_ptr().offset(index as isize) }
.store(false, Ordering::Relaxed);
};

match self.index_set.acquire_with_additional_cleanup(cleanup_call) {
Some(index) => {
unsafe {
*(*self.data_ptr.as_ptr().offset(index.value() as isize)).get() =
Expand Down
5 changes: 3 additions & 2 deletions iceoryx2-bb/posix/src/shared_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,10 @@ impl SharedMemoryCreationBuilder {

if self.config.zero_memory {
if POSIX_SUPPORT_ADVANCED_SIGNAL_HANDLING {
match SignalHandler::call_and_fetch(|| unsafe {
let memset_call = || unsafe {
posix::memset(shm.base_address as *mut posix::void, 0, self.config.size);
}) {
};
match SignalHandler::call_and_fetch(memset_call) {
None => (),
Some(v) => {
fail!(from self.config, with SharedMemoryCreationError::InsufficientMemory,
Expand Down
6 changes: 4 additions & 2 deletions iceoryx2-bb/posix/src/udp_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,11 @@ impl UdpClient {
"This should never happen! {} since the socket could not be attached to a fd set.", msg);

let mut received_bytes = Ok(0);
match fd_set.timed_wait(timeout, FileEvent::Read, |_| {
let receive_call = |_: &FileDescriptor| {
received_bytes = self.socket.receive(buffer);
}) {
};

match fd_set.timed_wait(timeout, FileEvent::Read, receive_call) {
Err(FileDescriptorSetWaitError::Interrupt) => {
fail!(from self, with UdpReceiveError::Interrupt,
"{} since an interrupt signal was received.", msg);
Expand Down
3 changes: 1 addition & 2 deletions iceoryx2-bb/system-types/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ pub use iceoryx2_bb_container::semantic_string::SemanticString;
use core::hash::{Hash, Hasher};
use iceoryx2_bb_container::byte_string::FixedSizeByteString;
use iceoryx2_bb_container::semantic_string;

use iceoryx2_bb_container::semantic_string::*;
use iceoryx2_bb_log::fail;
use iceoryx2_pal_configuration::{FILENAME_LENGTH, PATH_SEPARATOR, ROOT};

use crate::file_path::FilePath;
use iceoryx2_bb_container::semantic_string::SemanticStringError;

const PATH_LENGTH: usize = iceoryx2_pal_configuration::PATH_LENGTH;

Expand Down
1 change: 1 addition & 0 deletions iceoryx2-cal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub mod communication_channel;
pub mod dynamic_storage;
pub mod event;
pub mod hash;
pub mod monitoring;
pub mod named_concept;
pub mod reactor;
pub mod serialize;
Expand Down
Loading
Loading