ddi_intr_get_navail man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

DDI_INTR_GET_NINTRS(9F)				       DDI_INTR_GET_NINTRS(9F)

NAME
       ddi_intr_get_nintrs,  ddi_intr_get_navail - return number of interrupts
       supported or available for a given interrupt type

SYNOPSIS
       #include <sys/types.h>
       #include <sys/conf.h>
       #include <sys/ddi.h>
       #include <sys/sunddi.h>

       int ddi_intr_get_nintrs(dev_info_t *dip, int type, int *nintrsp);

       int ddi_intr_get_navail(dev_info_t *dip, int type, int *navailp);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

PARAMETERS
       ddi_intr_get_nintrs()

       dip
		  Pointer to dev_info structure

       type
		  Interrupt type

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

       ddi_intr_get_navail()

       dip
		  Pointer to dev_info structure

       type
		  Interrupt type

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

DESCRIPTION
       The ddi_intr_get_nintrs() function returns the number of interrupts  of
       the given type supported by a particular hardware device. On a success‐
       ful return, the number of supported interrupts is returned as an	 inte‐
       ger pointed to by the nintrsp argument.

       If  the	hardware  device is not found to support any interrupts of the
       given type, the DDI_INTR_NOTFOUND failure is  returned  rather  than  a
       zero in nintrsp.

       The  ddi_intr_get_navail() 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 pol‐
       icy-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  ddi_intr_alloc()	 func‐
       tion.

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

RETURN VALUES
       The ddi_intr_get_nintrs() and ddi_intr_get_navail() functions return:

       DDI_SUCCESS
			    On success.

       DDI_EINVAL
			    On encountering invalid input parameters.

       DDI_INTR_NOTFOUND
			    On not finding any interrupts for the given inter‐
			    rupt type.

       DDI_FAILURE
			    On any implementation specific failure.

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

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌────────────────────┬─────────────────┐
       │  ATTRIBUTE TYPE    │ ATTRIBUTE VALUE │
       ├────────────────────┼─────────────────┤
       │Interface Stability │ Committed	      │
       └────────────────────┴─────────────────┘

SEE ALSO
       attributes(5),	      ddi_intr_alloc(9F),	  ddi_intr_enable(9F),
       ddi_intr_get_supported_types(9F)

       Writing Device Drivers

NOTES
       The ddi_intr_get_nintrs() and ddi_intr_get_navail()  functions  can  be
       called  at  any time, even if the driver has added an interrupt handler
       for a given interrupt specification.

       On  x86	platforms,  the	 number	 of   interrupts   returned   by   the
       ddi_intr_get_navail()  function might need to be further reduced by the
       number of interrupts available for each interrupt priority on the  sys‐
       tem.  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 DDI_SUCCESS. Incomplete checking for failure codes could
       result in inconsistent behavior among platforms.

				 Dec 13, 2013	       DDI_INTR_GET_NINTRS(9F)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net