Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 1541

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>bitmap_remap</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="The Linux Kernel API" /><link rel="up" href="ch03.html#id2630756" title="Bitmap Operations" /><link rel="prev" href="re109.html" title="bitmap_parselist" /><link rel="next" href="re111.html" title="bitmap_bitremap" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>bitmap_remap</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re109.html">Prev</a>&#160;</td><th width="60%" align="center">Bitmap Operations</th><td width="20%" align="right">&#160;<a accesskey="n" href="re111.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="bitmap_remap"><a id="API-bitmap-remap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bitmap_remap &#8212; 
     Apply map defined by a pair of bitmaps to another bitmap
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">bitmap_remap </b>(</code></td><td>unsigned long * <var class="pdparam">dst</var>, </td></tr><tr><td>&#160;</td><td>const unsigned long * <var class="pdparam">src</var>, </td></tr><tr><td>&#160;</td><td>const unsigned long * <var class="pdparam">old</var>, </td></tr><tr><td>&#160;</td><td>const unsigned long * <var class="pdparam">new</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">bits</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1" title="Arguments"><a id="id2632250"></a><h2>Arguments</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>dst</code></em></span></dt><dd><p>
     remapped result
    </p></dd><dt><span class="term"><em class="parameter"><code>src</code></em></span></dt><dd><p>
     subset to be remapped
    </p></dd><dt><span class="term"><em class="parameter"><code>old</code></em></span></dt><dd><p>
     defines domain of map
    </p></dd><dt><span class="term"><em class="parameter"><code>new</code></em></span></dt><dd><p>
     defines range of map
    </p></dd><dt><span class="term"><em class="parameter"><code>bits</code></em></span></dt><dd><p>
     number of bits in each of these bitmaps
    </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2632344"></a><h2>Description</h2><p>
   Let <em class="parameter"><code>old</code></em> and <em class="parameter"><code>new</code></em> define a mapping of bit positions, such that
   whatever position is held by the n-th set bit in <em class="parameter"><code>old</code></em> is mapped
   to the n-th set bit in <em class="parameter"><code>new</code></em>.  In the more general case, allowing
   for the possibility that the weight 'w' of <em class="parameter"><code>new</code></em> is less than the
   weight of <em class="parameter"><code>old</code></em>, map the position of the n-th set bit in <em class="parameter"><code>old</code></em> to
   the position of the m-th set bit in <em class="parameter"><code>new</code></em>, where m == n % w.
   </p><p>

   If either of the <em class="parameter"><code>old</code></em> and <em class="parameter"><code>new</code></em> bitmaps are empty, or if <em class="parameter"><code>src</code></em> and
   <em class="parameter"><code>dst</code></em> point to the same location, then this routine copies <em class="parameter"><code>src</code></em>
   to <em class="parameter"><code>dst</code></em>.
   </p><p>

   The positions of unset bits in <em class="parameter"><code>old</code></em> are mapped to themselves
   (the identify map).
   </p><p>

   Apply the above specified mapping to <em class="parameter"><code>src</code></em>, placing the result in
   <em class="parameter"><code>dst</code></em>, clearing any bits previously set in <em class="parameter"><code>dst</code></em>.
   </p><p>

   For example, lets say that <em class="parameter"><code>old</code></em> has bits 4 through 7 set, and
   <em class="parameter"><code>new</code></em> has bits 12 through 15 set.  This defines the mapping of bit
   position 4 to 12, 5 to 13, 6 to 14 and 7 to 15, and of all other
   bit positions unchanged.  So if say <em class="parameter"><code>src</code></em> comes into this routine
   with bits 1, 5 and 7 set, then <em class="parameter"><code>dst</code></em> should leave with bits 1,
   13 and 15 set.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re109.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch03.html#id2630756">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re111.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>bitmap_parselist</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span>bitmap_bitremap</span></td></tr></table></div></body></html>