Skip to main content

hurray_buffer_handoff_event

Function hurray_buffer_handoff_event 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn hurray_buffer_handoff_event( buffer: *const HurrayBuffer, payload: *const HurraySyncEventPayload, ) -> HurrayStatus
Expand description

Validates an Event-mode sync handoff from producer to consumer.

Checks that:

  • The buffer’s declared sync mode is SyncMode::Event.
  • payload.sync_handle is non-null.
  • payload.event_release_fn is non-null.
  • payload.sync_handle_device_tag matches the buffer’s declared device tag.

Returns HURRAY_OK if all checks pass; HURRAY_ERR_SYNC_MODE_MISMATCH otherwise.

§Safety

buffer and payload MUST be valid, non-null pointers pointing to live objects.