xref: /386bsd/usr/share/man/cat9/rlist.0 (revision a2142627)
1RLIST(9)               386BSD Kernel Programmer's Manual              RLIST(9)
2
3NNAAMMEE
4     rrlliisstt - resource list
5
6SSYYNNOOPPSSIISS
7     ##iinncclluuddee ""rrlliisstt..hh""
8
9     _v_o_i_d
10     rrlliisstt__ffrreeee(_s_t_r_u_c_t _r_l_i_s_t **_r_l_p, _u_n_s_i_g_n_e_d _s_t_a_r_t, _u_n_s_i_g_n_e_d _e_n_d)
11
12     _i_n_t
13     rrlliisstt__aalllloocc(_s_t_r_u_c_t _r_l_i_s_t **_r_l_p, _u_n_s_i_g_n_e_d _s_i_z_e, _u_n_s_i_g_n_e_d *_l_o_c)
14
15     _v_o_i_d
16     rrlliisstt__ddeessttrrooyy(_s_t_r_u_c_t _r_l_i_s_t **_r_l_p)
17
18DDEESSCCRRIIPPTTIIOONN
19     Resource lists are a sparse data abstraction used to record the use of
20     real and abstract resources employed by the kernel program. Resource
21     lists rely on dynamic memory (see malloc(9) ) to avoid compile-time
22     scaling of space to hold fragmentation. Since resources may need to be
23     allocated during interrupt level, or during times when memory can't be
24     allocated (like when reclaiming memory pages), resource lists must be
25     allocated without blocking (however, they may block on the free of
26     resource).
27
28     Each resource list is denoted by a head pointer, which initially points
29     to a null list, and filled with resource by "freeing" space into it that
30     can be allocated subsequently. If the resource list itself must be
31     reclaimed, it must be destroyed by the service employing the resource.
32
33     The rrlliisstt__aalllloocc() function allocates a segment of resource of a requested
34     size if available.  The rrlliisstt__ffrreeee() function assigns resource for use in
35     the list, possibly blocking.  The rrlliisstt__ddeessttrrooyy() function is used to
36     reclaim the storage used in implementing the resource list itself.
37
38RREETTUURRNN VVAALLUUEESS
39     The rrlliisstt__aalllloocc() function returns a success or failure indication on
40     return.
41
42SSEEEE AALLSSOO
43     malloc(9)
44
45386BSD Release 1.0              August 29, 1994                              1
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67