diff options
Diffstat (limited to 'static/netbsd/man9/roundup.9 3.html')
| -rw-r--r-- | static/netbsd/man9/roundup.9 3.html | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/static/netbsd/man9/roundup.9 3.html b/static/netbsd/man9/roundup.9 3.html deleted file mode 100644 index a0cfeb99..00000000 --- a/static/netbsd/man9/roundup.9 3.html +++ /dev/null @@ -1,100 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">ROUNDUP(9)</td> - <td class="head-vol">Kernel Developer's Manual</td> - <td class="head-rtitle">ROUNDUP(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">roundup</code> — <span class="Nd">macros - for counting and rounding</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></p> -<p class="Pp"><var class="Ft">size</var> - <br/> - <code class="Fn">howmany</code>(<var class="Fa" style="white-space: nowrap;">x</var>, - <var class="Fa" style="white-space: nowrap;">size</var>);</p> -<p class="Pp"><var class="Ft">size</var> - <br/> - <code class="Fn">roundup</code>(<var class="Fa" style="white-space: nowrap;">x</var>, - <var class="Fa" style="white-space: nowrap;">size</var>);</p> -<p class="Pp"><var class="Ft">size</var> - <br/> - <code class="Fn">rounddown</code>(<var class="Fa" style="white-space: nowrap;">x</var>, - <var class="Fa" style="white-space: nowrap;">size</var>);</p> -<p class="Pp"><var class="Ft">size</var> - <br/> - <code class="Fn">roundup2</code>(<var class="Fa" style="white-space: nowrap;">x</var>, - <var class="Fa" style="white-space: nowrap;">size</var>);</p> -<p class="Pp"><var class="Ft">size</var> - <br/> - <code class="Fn">rounddown2</code>(<var class="Fa" style="white-space: nowrap;">x</var>, - <var class="Fa" style="white-space: nowrap;">size</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">powerof2</code>(<var class="Fa" style="white-space: nowrap;">x</var>);</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> -<p class="Pp">The - <a class="permalink" href="#roundup"><code class="Fn" id="roundup">roundup</code></a>() - and - <a class="permalink" href="#rounddown"><code class="Fn" id="rounddown">rounddown</code></a>() - macros return an integer from rounding <var class="Fa">x</var> up and down, - respectively, to the next <var class="Fa">size</var>. The - <a class="permalink" href="#howmany"><code class="Fn" id="howmany">howmany</code></a>() - macro in turn reveals how many times <var class="Fa">size</var> fits into - <var class="Fa">x</var>, rounding the residual up.</p> -<p class="Pp" id="roundup2">The - <a class="permalink" href="#roundup2"><code class="Fn">roundup2</code></a>() - and - <a class="permalink" href="#rounddown2"><code class="Fn" id="rounddown2">rounddown2</code></a>() - macros also round up and down, respectively, but with the assumption that - <var class="Fa">size</var> is a power of two. If <var class="Fa">x</var> is - indeed a power of two, - <a class="permalink" href="#powerof2"><code class="Fn" id="powerof2">powerof2</code></a>() - return 1.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN - VALUES</a></h1> -<p class="Pp">The return value is an integer from the respective operation. If - <var class="Fa">x</var> is 0, all macros except - <code class="Fn">powerof2</code>() return 0. The behavior is undefined if - <var class="Fa">size</var> is 0.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1> -<p class="Pp">The following example rounds the variable <var class="Va">rx</var> - to a 32-bit boundary:</p> -<div class="Bd Pp Bd-indent Li"> -<pre>uint16_t rx; - -... - -rx = roundup2(rx, sizeof(uint32_t));</pre> -</div> -</section> -<section class="Sh"> -<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE - ALSO</a></h1> -<p class="Pp"><a class="Xr">ilog2(3)</a>, <a class="Xr">param(3)</a>, - <a class="Xr">imax(9)</a></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h1> -<p class="Pp">All described macros make no assumptions about the type of the - parameters. These are implicitly assumed to be unsigned integers.</p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">October 2, 2019</td> - <td class="foot-os">NetBSD 10.1</td> - </tr> -</table> |
