DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sdi_driver_desc_prep(D3sdi)


sdi_driver_desc_prep -- prepare an SDI layered driver description structure

Synopsis

   #include <sys/types.h>
   #include <sys/kmem.h>
   #include <sys/sdi.h>
   #include <sys/ddi.h>
   

boolean_t sdi_driver_desc_prep(sdi_driver_desc_t *sdi_desc, int flag);

Description

sdi_driver_desc_prep( ) prepares a sdi_driver_desc(D4sdi) structure for use. The sdi_driver_desc structure is used by layered I/O drivers to describe themselves to SDI.

Arguments


sdi_desc
Pointer to a previously allocated sdi_driver_desc(D4sdi) structure.

flag
Set to KM_SLEEP or KM_NOSLEEP to indicate whether the preparation may block.

Return values

On success, sdi_driver_desc_prep( ) returns B_TRUE.

On failure, the routine returns B_FALSE, either due to allocation failure in the KM_NOSLEEP case or due to unsupportable constraints specified in the sdi_desc argument.

Usage

sdi_driver_desc_prep( ) must be called after all necessary members in the structure pointed to by sdi_desc have been set, but before the structure is passed to any SDI functions such as sdi_driver_add(D3sdi)

This function can be called multiple times on the same sdi_driver_desc structure.

If the driver modifies the fields of the sdi_desc structure after it has been prepped, then the driver must call the sdi_driver_desc_prep( ) function again before actually using it.

Context and synchronization

Non-blockable context.

Driver-defined basic locks and read/write locks may be held across calls to this function if flag is KM_NOSLEEP, but may not be held if flag is KM_SLEEP.

Driver-defined sleep locks may be held across calls to this function regardless of the value of flag .

Hardware applicability

All

Version applicability

sdi: 4 layered drivers

References

sdi_driver_desc_alloc(D3sdi), sdi_driver_desc_free(D3sdi), sdi_driver_desc(D4sdi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005