The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

mapdev_dup (9)
  • >> mapdev_dup (9) ( Solaris man: Ядро )
  • 
    NAME
         mapdev_dup - device mapping duplication entry point
    
    SYNOPSIS
         #include <sys/sunddi.h>
    
          int  prefix  mapdev_dup(ddi_mapdev_handle_t  handle,   void
         *devprivate,     ddi_mapdev_handle_t     new_handle,    void
         **new_devprivatep);
    
    INTERFACE LEVEL
         Solaris DDI specific (Solaris DDI).
    
    PARAMETERS
         handle
               The handle of the mapping that is being duplicated.
    
         devprivate
               Driver private mapping data from the mapping  that  is
               being duplicated.
    
         new_handle
               An opaque pointer to the duplicated device mapping.
    
         new_devprivatep
               A pointer to be filled  in  by  the  driver  with  the
               driver  private mapping data for the duplicated device
               mapping.
    
    DESCRIPTION
         Future releases of Solaris will provide  this  function  for
         binary  and  source  compatibility.   However, for increased
         functionality,    use     devmap_dup(9E)    instead.     See
         devmap_dup(9E) for details.
    
         mapdev_dup() is called when a device mapping  is  duplicated
         such  as  through  fork(2). mapdev_dup() is expected to gen-
         erate new driver private data for the new mapping,  and  set
         new_devprivatep  to point to it. new_handle is the handle of
         the new mapped object.
    
         A non-zero return value from  mapdev_dup()  will  cause  the
         corresponding operation, such as fork() to fail.
    
    RETURN VALUES
         mapdev_dup() returns  0 for success or the appropriate error
         number on failure.
    
    CONTEXT
         This function is called from user context only.
    
    
    EXAMPLES
         Example 1:
    
         static int
         xxmapdev_dup(ddi_mapdev_handle_t handle, void *devprivate,
             ddi_mapdev_handle_t new_handle, void **new_devprivate)
         {
              struct xxpvtdata    *pvtdata;
              /* Allocate a new private data structure */
              pvtdata = kmem_alloc(sizeof (struct xxpvtdata), KM_SLEEP);
              /* Copy the old data to the new - device dependent*/
              ...
              /* Return the new data */
              *new_pvtdata = pvtdata;
              return (0);
         }
    
    SEE ALSO
         fork(2),   mmap(2),   mapdev_access(9E),    mapdev_free(9E),
         segmap(9E),     ddi_mapdev(9F),    ddi_mapdev_intercept(9F),
         ddi_mapdev_nointercept(9F), ddi_mapdev_ctl(9S)
    
    
         Writing Device Drivers
    
    
    
    


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру