mirror of
https://github.com/bspeice/aeron-rs
synced 2025-07-01 22:06:16 -04:00
Theoretically able to shut down a driver?
In practice, I can't get any combination of C's aeronmd, C++'s DriverTool, Rust's `aeronmd`, and `do_terminate`.
This commit is contained in:
@ -50,7 +50,8 @@
|
||||
#[repr(C, align(4))]
|
||||
pub struct MetaDataDefinition {
|
||||
cnc_version: i32,
|
||||
_to_driver_buffer_length: i32,
|
||||
/// Size of the buffer containing data going to the media driver
|
||||
pub to_driver_buffer_length: i32,
|
||||
_to_client_buffer_length: i32,
|
||||
_counter_metadata_buffer_length: i32,
|
||||
_counter_values_buffer_length: i32,
|
||||
|
@ -34,8 +34,10 @@ impl<'a> AtomicBuffer<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
fn overlay<T>(&self, offset: IndexT) -> Result<&T>
|
||||
/// Overlay a struct on a buffer.
|
||||
///
|
||||
/// NOTE: Has the potential to cause undefined behavior if alignment is incorrect.
|
||||
pub fn overlay<T>(&self, offset: IndexT) -> Result<&T>
|
||||
where
|
||||
T: Sized,
|
||||
{
|
||||
|
@ -199,7 +199,6 @@ impl<'a> ManyToOneRingBuffer<'a> {
|
||||
.unwrap();
|
||||
let available_capacity = self.capacity - (tail - head) as IndexT;
|
||||
|
||||
println!("Available: {}", available_capacity);
|
||||
if required > available_capacity {
|
||||
// UNWRAP: Known-valid offset calculated during initialization
|
||||
head = self
|
||||
@ -225,7 +224,6 @@ impl<'a> ManyToOneRingBuffer<'a> {
|
||||
tail_index = (tail & i64::from(mask)) as IndexT;
|
||||
let to_buffer_end_length = self.capacity - tail_index;
|
||||
|
||||
println!("To buffer end: {}", to_buffer_end_length);
|
||||
if required > to_buffer_end_length {
|
||||
let mut head_index = (head & i64::from(mask)) as IndexT;
|
||||
|
||||
|
Reference in New Issue
Block a user