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

NAME

6       biofini - uninitialize a buffer structure
7

SYNOPSIS

9       #include <sys/ddi.h>
10       #include <sys/sunddi.h>
11
12       void biofini(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  biofini()  function uninitializes a buf(9S) structure. If a buffer
24       structure has been allocated and initialized using  kmem_alloc(9F)  and
25       bioinit(9F) it needs to be uninitialized using biofini() before calling
26       kmem_free(9F). It is not necessary to call biofini() before  freeing  a
27       buffer  structure  using  freerbuf(9F)  because  freerbuf()  will  call
28       biofini() directly.
29

CONTEXT

31       The biofini() function can be called from any context.
32

EXAMPLES

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

SEE ALSO

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