MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers              ddiintrgetnintrs(9F)



NAME
     ddiintrgetnintrs, ddiintrgetnavail - return number  of
     interrupts supported or available for a given interrupt type

SYNOPSIS
     #include 
     #include 
     #include 
     #include 

     int ddiintrgetnintrs(devinfot *dip, int type, int *nintrsp);


     int ddiintrgetnavail(devinfot *dip, int type, int *navailp);


INTERFACE LEVEL
     Solaris DI specific (Solaris DI).

PARAMETERS
     ddiintrgetnintrs()

     dip        Pointer to devinfo structure


     type       Interrupt type


     nintrsp    Pointer to number of interrupts of the given type
                that are supported by the system



     ddiintrgetnavail()

     dip        Pointer to devinfo structure


     type       Interrupt type


     navailp    Pointer to number of interrupts of the given type
                that are currently available from the system


DESCRIPTION
     The ddiintrgetnintrs() function  returns  the  number  of
     interrupts  of  the  given  type  supported  by a particular
     hardware device. On a successful return, the number of  sup-
     ported  interrupts  is  returned as an integer pointed to by
     the nintrsp argument.




SunOS 5.11        Last change: 13 November 2006                 1






Kernel Functions for Drivers              ddiintrgetnintrs(9F)



     If the hardware device is not found to  support  any  inter-
     rupts  of  the  given type, the DINTRNOTFOUND failure is
     returned rather than a zero in nintrsp.


     The ddiintrgetnavail() function  returns  the  number  of
     interrupts of a given type that is available to a particular
     hardware device. On  a  successful  return,  the  number  of
     available interrupts is returned as an integer pointed to by
     navailp.


     The hardware device may support more than one interrupt  and
     can  request  that  all  interrupts  be  allocated. The host
     software can then use policy-based  decisions  to  determine
     how  many interrupts are made available to the device. Based
     on the determination, a value is  returned  that  should  be
     used  to  allocate interrupts with the ddiintalloc() func-
     tion.


     The ddiintrgetsupportedtypes(9F) function returns a list
     of  valid  supported types for the given hardware device. It
     must   be   called   prior    to    calling    either    the
     ddiintrgetnintrs() or ddiintrgetnavail().

RETURN VALUES
     The ddiintrgetnintrs()  and  ddiintrgetnavail()  func-
     tions return:

     DISUCES          On success.


     DIEINVAL           On encountering invalid  input  parame-
                          ters.


     DINTRNOTFOUND    On not finding any interrupts  for  the
                          given interrupt type.


     DIFAILURE          On any implementation specific failure.


CONTEXT
     The ddiintrgetnintrs()  and  ddiintrgetnavail()  func-
     tions can be called from either user or kernel non-interrupt
     context.

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



SunOS 5.11        Last change: 13 November 2006                 2






Kernel Functions for Drivers              ddiintrgetnintrs(9F)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    


SEE ALSO
     attributes(5),   ddiintralloc(9F),    ddiintrenable(9F),
     ddiintrgetsupportedtypes(9F)


     Writing Device Drivers

NOTES
     The ddiintrgetnintrs()  and  ddiintrgetnavail()  func-
     tions  can  be  called  at  any time, even if the driver has
     added an interrupt handler for a given interrupt  specifica-
     tion.


     On x86 platforms, the number of interrupts returned  by  the
     ddiintrgetnavail()  function  might  need  to  be further
     reduced by the  number  of  interrupts  available  for  each
     interrupt  priority  on  the  system.  In that case, drivers
     should use different priorities for some of the interrupts.


     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: 13 November 2006                 3



OpenSolaris man pages main menu

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