Query: getrbuf
OS: opensolaris
Section: 9f
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
getrbuf(9F) Kernel Functions for Drivers getrbuf(9F)NAMEgetrbuf - get a raw buffer headerSYNOPSIS#include <sys/buf.h> #include <sys/kmem.h> #include <sys/ddi.h> struct buf *getrbuf(int sleepflag);INTERFACE LEVELArchitecture independent level 1 (DDI/DKI).PARAMETERSsleepflag Indicates whether driver should sleep for free space.DESCRIPTIONThe getrbuf() function allocates the space for a buffer header to the caller. It is used in cases where a block driver is performing raw (character interface) I/O and needs to set up a buffer header that is not associated with the buffer cache. The getrbuf() function calls kmem_alloc(9F) to perform the memory allocation. kmem_alloc()requires the information included in the sleep- flag argument. If sleepflag is set to KM_SLEEP, the driver may sleep until the space is freed up. If sleepflag is set to KM_NOSLEEP, the driver will not sleep. In either case, a pointer to the allocated space is returned or NULL to indicate that no space was available.RETURN VALUESThe getrbuf() function returns a pointer to the allocated buffer header, or NULL if no space is available.CONTEXTThe getrbuf() function can be called from user, interrupt, or kernel context. (Drivers must not allow getrbuf() to sleep if called from an interrupt routine.)SEE ALSObioinit(9F), freerbuf(9F), kmem_alloc(9F), kmem_free(9F) Writing Device Drivers SunOS 5.11 16 Jan 2006 getrbuf(9F)
Related Man Pages |
---|
getrbuf(9f) - minix |
getrbuf(9f) - suse |
getrbuf(9f) - bsd |
getrbuf(9f) - v7 |
getrbuf(9f) - hpux |