ddi_get_instance man page on SunOS

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

ddi_get_instance(9F)	 Kernel Functions for Drivers	  ddi_get_instance(9F)

NAME
       ddi_get_instance - get device instance number

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

       int ddi_get_instance(dev_info_t *dip);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

PARAMETERS
       dip	Pointer to dev_info structure.

DESCRIPTION
       The  ddi_get_instance()	function  returns  the	instance number of the
       device corresponding to dip.

       The system assigns an instance number to every device.	Instance  num‐
       bers   for  devices  attached to the same driver are unique.  This pro‐
       vides a way for the system and the driver to uniquely identify  one  or
       more  devices  of  the same type. The instance number is derived by the
       system from different properties	 for  different	 device	 types	in  an
       implementation specific manner.

       Once  an	 instance number has been assigned to a device, it will remain
       the same even across reconfigurations and reboots. Therefore,  instance
       numbers seen by a driver may not appear to be in consecutive order. For
       example, if device foo0 has been assigned an instance number of
	0 and device foo1 has been assigned an instance number of 1,  if  foo0
       is  removed, foo1 will continue to be associated with instance number 1
       (even though foo1 is now the only device of its type on the system).

RETURN VALUES
       The ddi_get_instance() function returns	the  instance  number  of  the
       device corresponding to dip.

CONTEXT
       The  ddi_get_instance() function can be called from user, interrupt, or
       kernel context.

SEE ALSO
       path_to_inst(4)

       Writing Device Drivers

SunOS 5.10			  16 Jan 2006		  ddi_get_instance(9F)
[top]

List of man pages available for SunOS

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