DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sdi_buf_store(D3sdi)


sdi_buf_store -- save values in the buf(D4) structure

Synopsis

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

void sdi_buf_store(buf_t *bp, daddr_t blkno)

Description

sdi_buf_store( ) saves the value of the b_iodone member of the buf(D4) structure so it can be restored by the sdi_buf_restore(D3sdi) function. It also optionally saves or replaces the value of the b_blkno member.

Arguments


bp
A previously allocated buf(D4) structure to be used for the I/O transfer.

blkno
A new block number for an I/O request. If set to -1, the b_blkno member is not changed.

Return values

None

Usage

sdi_buf_store( ) is called when a layered driver wants to modify either the b_iodone or, optionally, the b_blkno member of a buf structure. It saves the previous values of these members in a privately-allocated bit of memory.

Calls to the sdi_buf_store( ) function must be matched by calls to the sdi_buf_restore(D3sdi) function before the buffer is returned to a higher context.

Context and synchronization

Blockable context.

Driver-defined basic locks, read/write locks, and sleep locks cannot be held across calls to this function.

Hardware applicability

All

Version applicability

sdi: 4 layered drivers

References

buf(D4), sdi_buf_restore(D3sdi), sdi_get_blkno(D3sdi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005