Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Data Structures for Driversddi_mapdev_ctl(9S)


NAME

 ddi_mapdev_ctl - device mapping-control structure

SYNOPSIS

 
#include <sys/conf.h>
#include <sys/devops.h>

INTERFACE LEVEL

 

Solaris DDI specific (Solaris DDI).

DESCRIPTION

 

Future releases of Solaris will provide this structure for binary and source compatibility. However, for increased functionality, use devmap_callback_ctl(9S) instead. See devmap_callback_ctl(9S) for details.

A ddi_mapdev_ctl structure describes a set of routines that allow a device driver to manage events on mappings of the device created by ddi_mapdev(9F).

See mapdev_access(9E), mapdev_dup(9E) and mapdev_free(9E) for more details on these entry points.

STRUCTURE MEMBERS

 
 
int     mapdev_rev;
int     (*mapdev_access)(ddi_mapdev_handle_t handle, void *devprivate,
	            off_t offset);
void    (*mapdev_free)(ddi_mapdev_handle_t handle, void *devprivate);
int     (*mapdev_dup)(ddi_mapdev_handle_t handle, void *devprivate,
	            ddi_mapdev_handle_t new_handle, void **new_devprivate);

A device driver should allocate the device mapping control structure and initialize the following fields:

mapdev_rev
Must be set to MAPDEV_REV.
mapdev_access
Must be set to the address of the mapdev_access(9E) entry point.
mapdev_free
Must be set to the address of the mapdev_free(9E) entry point.
mapdev_dup
Must be set to the address of the mapdev_dup(9E) entry point.

SEE ALSO

 

exit(2), fork(2), mmap(2), munmap(2), mapdev_access(9E), mapdev_dup(9E), mapdev_free(9E), segmap(9E), ddi_mapdev(9F), ddi_mapdev_intercept(9F), ddi_mapdev_nointercept(9F)

Writing Device Drivers


SunOS 5.9Go To TopLast Changed 14 Jan 1997

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.