MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                         ddipoke(9F)



NAME
     ddipoke,  ddipoke8,  ddipoke16,  ddipoke32,  ddipoke64,
     ddipokec,  ddipokes,  ddipokel, ddipoked - write a value
     to a location

SYNOPSIS
     #include 
     #include 



     int ddipoke8(devinfot *dip, int8t *addr, int8t value);


     int ddipoke16(devinfot *dip, int16t *addr, int16t value);


     int ddipoke32(devinfot *dip, int32t *addr, int32t value);


     int ddipoke64(devinfot *dip, int64t *addr, int64t value);


INTERFACE LEVEL
     Solaris  DI  specific  (Solaris  DI).   The   ddipokec(),
     ddipokes(),  ddipokel(),  and  ddipoked()  functions  are
     obsolete.  Use,  respectively,  ddipoke8(),   ddipoke16(),
     ddipoke32(), and ddipoke64(), instead.

PARAMETERS
     dip      A pointer to the device's devinfo structure.


     addr     Virtual address of the location to be written to.


     value    Value to be written to the location.


DESCRIPTION
     These routines cautiously attempt to  write  a  value  to  a
     specified  virtual address, using the parent nexus driver to
     assist in the process where necessary.


     If the address is not valid, or the value cannot be  written
     without an error occurring, an error code is returned.


     These routines are most useful when first trying  to  estab-
     lish  the  presence  of  a  given  device on the system in a
     driver's probe(9E) or attach(9E) routines.



SunOS 5.11          Last change: 16 Jan 2006                    1






Kernel Functions for Drivers                         ddipoke(9F)



     On multiprocessing machines these routines can be  extremely
     heavy-weight,  so  use  the ddipeek(9F) routines instead if
     possible.

RETURN VALUES
     DISUCES    The value was  successfully  written  to  the
                    given virtual address.


     DIFAILURE    An error occurred while trying  to  write  to
                    the location.


CONTEXT
     These functions can be called from user, interrupt, or  ker-
     nel context.

SEE ALSO
     attach(9E), probe(9E), ddipeek(9F)


     Writing Device Drivers

NOTES
     The functions described in this manual page previously  used
     symbolic  names  which specified their data access size; the
     function names have been  changed  so  they  now  specify  a
     fixed-width  data  size. See the following table for the new
     name equivalents:



     
     Previous Name                 New Name                    
     ddipokec                     ddipoke8                   
     ddipokes                     ddipoke16                  
     ddipokel                     ddipoke32                  
     ddipoked                     ddipoke64                  
    
















SunOS 5.11          Last change: 16 Jan 2006                    2



OpenSolaris man pages main menu

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