Skip to main content

rust_ktrace_init_cpu_buffer

Function rust_ktrace_init_cpu_buffer 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn rust_ktrace_init_cpu_buffer( cpu_num: u32, spsc_buffer_ptr: *mut c_void, drop_stats_ptr: *mut c_void, process_koid: u64, thread_koid: u64, cpu_ref_header_entry: u16, ) -> i32
Expand description

Initializes the KTraceBuffer for a specific CPU using a pointer to the C++ SpscBuffer.

ยงSafety

  • spsc_buffer_ptr must point to a valid C++ SpscBuffer instance which is binary-compatible with spsc_buffer::Buffer<NoOpAllocator>.