cm_intr_attach(D3) cm_intr_attach(D3)
NAME
cm_intr_attach - attach device interrupts
SYNOPSIS
#include <sys/confmgr.h>
#include <sys/ddi.h>
int cm_intr_attach(rm_key_t key, void (*handler)(),
int *devflagp, void **intr_cookiep);
Arguments
key Resource manager key selecting a particular board
instance.
handler Interrupt handler function to attach.
devflagp Pointer to the calling driver's devflag(D1).
devflag is not changed by cm_intr_attach.
intr_cookiep
Pointer to location to store the interrupt "magic
cookie". intr_cookiep is used to provide a
reference to the attached interrupts that can
subsequently be used in a call to
cm_intr_detach(D3). If intr_cookiep is NULL, then
no interrupt cookie is stored, and it will not be
possible to subsequently detach interrupts.
DESCRIPTION
cm_intr_attach is used to attach an interrupt handler for the
board instance specified by key. key can be obtained by
calling cm_getbrdkey(D3).
Return Values
cm_intr_attach returns the number of interrupts successfully
attached. It will return 0 and fail to attach the interrupt
handler if key is invalid, or if key fails to have a
legitimate value for any of the following parameters: CM_IRQ,
CM_IPL, CM_ITYPE.
USAGE
Level
Initialization or Base.
Synchronization Constraints
May sleep.
Copyright 1994 Novell, Inc. Page 1
cm_intr_attach(D3) cm_intr_attach(D3)
Driver-defined basic locks and read/write locks may not be
held across calls to this function. Driver-defined sleep
locks may be held across calls to this function.
REFERENCES
cm_getbrdkey(D3), cm_intr_detach(D3), cm_params(D5)
NOTICES
Portability
All processors
Applicability
ddi: 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2