1bioinit(9F)              Kernel Functions for Drivers              bioinit(9F)
2
3
4

NAME

6       bioinit - initialize a buffer structure
7

SYNOPSIS

9       #include <sys/ddi.h>
10       #include <sys/sunddi.h>
11
12       void bioinit(struct buf *bp);
13
14

INTERFACE LEVEL

16       Solaris DDI specific (Solaris DDI).
17

PARAMETERS

19       bp    Pointer to the buffer header structure.
20
21

DESCRIPTION

23       The bioinit() function initializes a buf(9S) structure. A buffer struc‐
24       ture contains state information which has to be initialized if the mem‐
25       ory for the buffer was allocated using kmem_alloc(9F). This is not nec‐
26       essary for a buffer allocated using getrbuf(9F) because getrbuf()  will
27       call bioinit() directly.
28

CONTEXT

30       The bioinit() function can be called from any context.
31

EXAMPLES

33       Example 1 Using bioinit()
34
35
36         struct buf *bp = kmem_alloc(biosize(), KM_SLEEP);
37         bioinit(bp);
38         /* use buffer */
39
40

SEE ALSO

42       biofini(9F),  bioreset(9F),  biosize(9F),  getrbuf(9F), kmem_alloc(9F),
43       buf(9S)
44
45
46       Writing Device Drivers
47
48
49
50SunOS 5.11                        20 Nov 1996                      bioinit(9F)
Impressum