xref: /illumos-gate/usr/src/man/man9f/ddi_remove_event_handler.9f (revision 81b2d5738d8e67bdf2438cd3e8c79f379bce44d2)
te
Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
ddi_remove_event_handler 9F "2 May 2003" "SunOS 5.11" "Kernel Functions for Drivers"
NAME
ddi_remove_event_handler - remove an NDI event service callback handler
SYNOPSIS

#include <sys/dditypes.h>
#include <sys/sunddi.h>

int ddi_remove_event_handler(ddi_registration_id_t id);
INTERFACE LEVEL

Solaris DDI specific (Solaris DDI).

PARAMETERS

ddi_registration_id_t id

Unique system wide registration ID return by ddi_add_event_handler(9F) upon successful registration.

DESCRIPTION

The ddi_remove_event_handler() function removes the callback handler specified by the registration id (ddi_registration_id_t). Upon successful removal, the callback handler is removed from the system and will not be invoked in the face of the event.

RETURN VALUES

DDI_SUCCESS

Callback handler removed successfully.

DDI_FAILURE

Failed to remove callback handler.

CONTEXT

The ddi_remove_event_handler() function can be called from user and kernel contexts only.

ATTRIBUTES

See attributes(5) for a description of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Stability LevelCommitted
SEE ALSO

attributes(5), ddi_add_event_handler(9F), ddi_get_eventcookie(9F)

Writing Device Drivers

NOTES

Device drivers must remove all registered callback handlers before detach(9E) processing for that device instance is complete.