Index Index for
Section 9
Index Alphabetical
listing for H
Bottom of page Bottom of
page

handler_add(9r)

NAME

handler_add - Registers a device driver's interrupt handler

SYNOPSIS

ihandler_id_t * handler_add( ihandler_t *handler );

ARGUMENTS

handler Specifies a pointer to an ihandler_t data structure.

DESCRIPTION

The handler_add interface registers a device driver's interrupt handler and its associated ihandler_t data structure to the bus-specific interrupt- dispatching algorithm. The ih_bus member of the ihandler_t structure specifies the parent bus structure for the bus controlling the driver being loaded. For controller devices, handler_add sets ih_bus to the address of the bus structure for the bus the controller resides on.

NOTES

Device drivers call the handler_add interface to register a device driver's interrupt handler.

RETURN VALUES

Upon successful completion, the handler_add interface returns an opaque ihandler_id_t key, which is a unique number that identifies the ISIs to be acted on by subsequent calls to handler_del, handler_disable, and handler_enable. To implement this ihandler_id_t key, each call to handler_add causes the handler_key data structure to be allocated. The handler_add interface returns the value NULL if it cannot allocate the appropriate resources or if it detected an error.

EXAMPLE

See Writing Device Drivers: Tutorial for a code example of the handler_add interface.

SEE ALSO

Kernel Interfaces: handler_del(9r), handler_disable(9r), handler_enable(9r) Data Structures: ihandler_t(9s)

Index Index for
Section 9
Index Alphabetical
listing for H
Top of page Top of
page