MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                 ddiintrgetcap(9F)



NAME
     ddiintrgetcap, ddiintrsetcap - get  or  set  interrupt
     capabilities for a given interrupt type

SYNOPSIS
     #include 
     #include 
     #include 
     #include 

     int ddiintrgetcap(ddiintrhandlet h, int *flagsp);


     int ddiintrsetcap(ddiintrhandlet h, int flags);


INTERFACE LEVEL
     Solaris DI specific (Solaris DI).

PARAMETERS
     ddiintrgetcap()

     h         DI interrupt handle


     flagsp    Pointer to the capability flags returned for  this
               handle



     ddiintrsetcap()

     h        DI interrupt handle


     flags    Contains the capability flag to be set


DESCRIPTION
     The ddiintrgetcap() function returns the interrupt  capa-
     bility  flags  for the interrupt handle h. Upon a successful
     return, the flags are returned in the integer pointed to  by
     the flagsp argument.


     These flags are typically combinations of the following:

     DINTRFLAGEDGE        For discrete interrupts, the  host
                               supports  edge  type  of  trigger.
                               This  flag  is  not  returned  for
                               DINTRTYPEMSI               or
                               DINTRTYPEMSIX       interrupt



SunOS 5.11          Last change: 20 Apr 2005                    1






Kernel Functions for Drivers                 ddiintrgetcap(9F)



                               types.  This  is a read-write (RW)
                               flag.


     DINTRFLAGLEVEL       For discrete interrupts  the  host
                               supports   level,  edge,  or  both
                               types of triggers.  This  flag  is
                               not returned for DINTRTYPEMSI
                               or  DINTRTYPEMSIX   interrupt
                               types.


     DINTRFLAGMASKABLE    The interrupt can be masked either
                               by  the  device  or  by  the  host
                               bridge, or optionally by the host.
                               This is a read-only (RO) flag.


     DINTRFLAGPENDING     The interrupt supports  an  inter-
                               rupt  pending bit. This is a read-
                               only (RO) flag.


     DINTRFLAGBLOCK       All interrupts of the  given  type
                               must  be block-enabled and are not
                               individually maskable. This  is  a
                               read-only (RO) flag.



     The ddiintrsetcap() function allows a driver  to  specify
     the  capability  flags  for  the  interrupt  handle  h. Only
     DINTRFLAGLEVEL and DINTRFLAGEDGE flags can be set.
     Some  devices can support both level and edge capability and
     either can be set by using the ddiintrsetcap()  function.
     Setting  the  capability flags is device and platform depen-
     dent.


     The ddiintrsetcap() function can be called  after  inter-
     rupts  are  allocated  and  prior  to  adding  the interrupt
     handler. For all other times it returns failure.

RETURN VALUES
     The  ddiintrgetcap()  and  ddiintrsetcap()   functions
     return:

     DISUCES    On success.


     DIEINVAL     On encountering invalid input parameters.




SunOS 5.11          Last change: 20 Apr 2005                    2






Kernel Functions for Drivers                 ddiintrgetcap(9F)



     DIFAILURE    On any implementation specific failure.


     DIENOTSUP    On device not supporting operation.


CONTEXT
     The ddiintrgetcap() and ddiintrsetcap() functions  can
     be called from either user or kernel non-interrupt context.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    


SEE ALSO
     attributes(5),                           ddiintralloc(9F),
     ddiintrblockenable(9F),          ddiintrgetnintrs(9F),
     ddiintrgetpending(9F),  ddiintrgetsupportedtypes(9F),
     ddiintrsetmask(9F)


     Writing Device Drivers

NOTES
     Consumers of these interfaces should verify that the  return
     value  is  not equal to DISUCES. Incomplete checking for
     failure codes could result in  inconsistent  behavior  among
     platforms.


















SunOS 5.11          Last change: 20 Apr 2005                    3



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™