blob: 42f090f98b482d53a3e49388cb407bceb84d1736 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
<table class="head">
<tr>
<td class="head-ltitle">UIDINFO(9)</td>
<td class="head-vol">Kernel Developer's Manual</td>
<td class="head-rtitle">UIDINFO(9)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">uidinfo</code>,
<code class="Nm">uihashinit</code>, <code class="Nm">uifind</code>,
<code class="Nm">uihold</code>, <code class="Nm">uifree</code> —
<span class="Nd">functions for managing UID information</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
<<a class="In">sys/param.h</a>></code>
<br/>
<code class="In">#include <<a class="In">sys/proc.h</a>></code>
<br/>
<code class="In">#include
<<a class="In">sys/resourcevar.h</a>></code></p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">uihashinit</code>(<var class="Fa" style="white-space: nowrap;">void</var>);</p>
<p class="Pp"><var class="Ft">struct uidinfo *</var>
<br/>
<code class="Fn">uifind</code>(<var class="Fa" style="white-space: nowrap;">uid_t
uid</var>);</p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">uihold</code>(<var class="Fa" style="white-space: nowrap;">struct
uidinfo *uip</var>);</p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">uifree</code>(<var class="Fa" style="white-space: nowrap;">struct
uidinfo *uip</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">uidinfo</code> family of functions is used to
manage <var class="Vt">uidinfo</var> structures. Each
<var class="Vt">uidinfo</var> structure maintains per uid resource
consumption counts, including the process count and socket buffer space
usage.</p>
<p class="Pp" id="uihashinit">The
<a class="permalink" href="#uihashinit"><code class="Fn">uihashinit</code></a>()
function initializes the <var class="Vt">uidinfo</var> hash table and its
mutex. This function should only be called during system initialization.</p>
<p class="Pp" id="uifind">The
<a class="permalink" href="#uifind"><code class="Fn">uifind</code></a>()
function looks up and returns the <var class="Vt">uidinfo</var> structure
for <var class="Fa">uid</var>. If no <var class="Vt">uidinfo</var> structure
exists for <var class="Fa">uid</var>, a new structure will be allocated and
initialized. The <code class="Nm">uidinfo</code> hash mutex is acquired and
released.</p>
<p class="Pp" id="uihold">The
<a class="permalink" href="#uihold"><code class="Fn">uihold</code></a>()
function increases the reference count on <var class="Fa">uip</var>.
<var class="Fa">uip</var>'s lock is acquired and released.</p>
<p class="Pp" id="uifree">The
<a class="permalink" href="#uifree"><code class="Fn">uifree</code></a>()
function decreases the reference count on <var class="Fa">uip</var>, and if
the count reaches 0 <var class="Fa">uip</var> is freed.
<var class="Fa">uip</var>'s lock is acquired and release and the uidinfo
hash mutex may be acquired and released.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
<p class="Pp"><code class="Fn">uifind</code>() returns a pointer to an
initialized <var class="Vt">uidinfo</var> structure, and should not
fail.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page was written by <span class="An">Chad David</span>
<<a class="Mt" href="mailto:davidc@acns.ab.ca">davidc@acns.ab.ca</a>>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">July 10, 2001</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|