- NetBSD Manual Pages
GETIOBUF(9) NetBSD Kernel Developer's Manual GETIOBUF(9)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
getiobuf, putiobuf -- I/O descriptor allocation interface
struct buf *
getiobuf(struct vnode *vp, bool waitok);
putiobuf(struct buf *bp);
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 enough memory is not
Note that the allocated buffer doesn't belong to 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().
NetBSD 5.0 May 6, 2008 NetBSD 5.0