LDI_EV_REMOVE_CALLBACKS(9F) Kernel Functions for Drivers

NAME


ldi_ev_remove_callbacks - remove all callbacks for a given callback
ID

SYNOPSIS


#include <sys/sunldi.h>

int ldi_ev_remove_callbacks(ldi_callback_id_t id);


INTERFACE LEVEL


illumos DDI specific (illumos DDI)

PARAMETERS


ldi_callback_id_t id

An opaque data structure returned on successful calls to
ldi_ev_register_callbacks(9F).


DESCRIPTION


The ldi_ev_remove_callback() function unregisters any callbacks that
were registered via ldi_ev_register_callbacks(9F). Once this function
returns, the callback ID is no longer valid.


The finalize and notify callbacks exist independently of the LDI
handle and are not automatically removed when the LDI handle is
closed. The layered driver removes these callbacks via
ldi_ev_remove_callbacks()() when the callbacks are no longer needed.
The LDI framework may panic the system if the entity registering the
callback (a dev_t, dip or module) no longer exists on the system and
the callbacks have not been unregistered.

RETURN VALUES


Upon successful completion, the ldi_ev_remove_callback() function
returns LDI_EV_SUCCESS. Otherwise, if an invalid callback ID of 0 is
supplied, or if the underlying call to ddi_remove_event_handler(9F)
failed, LDI_EV_FAILURE is returned.

CONTEXT


This function can be called from user and kernel contexts only.

SEE ALSO


ddi_remove_event_handler(9F), ldi_ev_get_cookie(9F),
ldi_ev_register_callbacks(9F)

August 22, 2023 LDI_EV_REMOVE_CALLBACKS(9F)

tribblix@gmail.com :: GitHub :: Privacy