GETIOBUF(9)            NetBSD Kernel Developer's Manual            GETIOBUF(9)

NAME
     getiobuf, putiobuf -- I/O descriptor allocation interface

SYNOPSIS
     #include <sys/buf.h>

     struct buf *
     getiobuf(struct vnode *vp, bool waitok);

     void
     putiobuf(struct buf *bp);

DESCRIPTION
     getiobuf() allocates a buf structure.

     vp      The vnode to which the allocated buffer will be associated.  This
             can be NULL.

     waitok  If true, getiobuf can sleep until enough memory is available.
             Otherwise, it returns NULL immediately if not enough memory is
             available.

     Note that the allocated buffer doesn't belong to the buffer cache.  To
     free it, putiobuf() should be used.  brelse() should not be used on it.

     putiobuf() frees bp, which should be a buffer allocated with getiobuf().

SEE ALSO
     buffercache(9), intro(9)

NetBSD 6.0                        May 6, 2008                       NetBSD 6.0

You can also request any man page by name and (optionally) by section:

Command: 
Section: 
Architecture: 
Collection: 
 

Use the DEFAULT collection to view manual pages for third-party software.


©1994 Man-cgi 1.15, Panagiotis Christias <christia@softlab.ntua.gr>
©1996-2014 Modified for NetBSD by Kimmo Suominen