|
|
#include <sys/types.h> #include <sys/ddi.h>
Drivers must also avoid using kmem_alloc(sizeof (struct_t)), because this will place a fixed structure size into the object code.
Drivers can only reference those structure members described on the manual page. The actual data structures may have additional structure members beyond those described, but drivers must not reference them.
Some structure members are flags fields that consist of a bitmask of flags. Drivers must never directly assign values to these structure members. Drivers should only set and clear flags they are interested in, since the actual implementation may contain unlisted flags.
Data structures that are ``black boxes'' to drivers are not described in this section. These structures are referenced on the manual pages where they are used. Drivers should not be written to use any of their structure members. Their only valid use is passing pointers to the structures to the particular kernel routines.