arch_2arm_2include_2asm_2xenomai_2machine_8h_source.html 13.3 KB
Newer Older
Philippe Gerum's avatar
Philippe Gerum committed
1 2 3 4 5
<!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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Philippe Gerum's avatar
Philippe Gerum committed
6
<meta name="generator" content="Doxygen 1.8.9.1"/>
Philippe Gerum's avatar
Philippe Gerum committed
7 8 9 10 11 12
<title>Xenomai: kernel/cobalt/arch/arm/include/asm/xenomai/machine.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
Philippe Gerum's avatar
Philippe Gerum committed
13
<script type="text/javascript" src="navtreedata.js"></script>
Philippe Gerum's avatar
Philippe Gerum committed
14 15 16 17 18 19 20 21 22 23 24 25
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() {
    if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }
  });
</script>
Philippe Gerum's avatar
Philippe Gerum committed
26
<link rel="search" href="search_opensearch.php?v=opensearch.xml" type="application/opensearchdescription+xml" title="Xenomai"/>
Philippe Gerum's avatar
Philippe Gerum committed
27 28 29 30 31 32 33 34 35 36
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Xenomai
Philippe Gerum's avatar
Philippe Gerum committed
37
   &#160;<span id="projectnumber">3.0-rc7</span>
Philippe Gerum's avatar
Philippe Gerum committed
38 39 40 41 42 43 44
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
Philippe Gerum's avatar
Philippe Gerum committed
45
<!-- Generated by Doxygen 1.8.9.1 -->
Philippe Gerum's avatar
Philippe Gerum committed
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 89 90 91 92 93 94 95 96 97 98
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <div class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </div><div class="right"></div>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('arch_2arm_2include_2asm_2xenomai_2machine_8h_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">machine.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef _COBALT_ARM_ASM_MACHINE_H</span></div>
Philippe Gerum's avatar
Philippe Gerum committed
99 100
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define _COBALT_ARM_ASM_MACHINE_H</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
Philippe Gerum's avatar
Philippe Gerum committed
101 102 103 104
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;linux/version.h&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;asm/byteorder.h&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#define XNARCH_HOST_TICK_IRQ __ipipe_hrtimer_irq</span></div>
Philippe Gerum's avatar
Philippe Gerum committed
105 106 107 108 109 110 111 112 113 114 115 116 117 118
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;asm/barrier.h&gt;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;asm/compiler.h&gt;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;asm/cmpxchg.h&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;asm/switch_to.h&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;asm/system_info.h&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &lt;asm/system_misc.h&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;asm/timex.h&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &lt;asm/processor.h&gt;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &lt;asm/ipipe.h&gt;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &lt;asm/mach/irq.h&gt;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &lt;asm/cacheflush.h&gt;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#define xnarch_cache_aliasing() cache_is_vivt()</span></div>
Philippe Gerum's avatar
Philippe Gerum committed
119
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
Philippe Gerum's avatar
Philippe Gerum committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#if __LINUX_ARM_ARCH__ &lt; 5</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> __attribute_const__ <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ffnz(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> x)</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;{</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keywordtype">int</span> r = 0;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordflow">if</span> (!x)</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <span class="keywordflow">if</span> (!(x &amp; 0xffff)) {</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                x &gt;&gt;= 16;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                r += 16;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        }</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keywordflow">if</span> (!(x &amp; 0xff)) {</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                x &gt;&gt;= 8;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;                r += 8;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        }</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordflow">if</span> (!(x &amp; 0xf)) {</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                x &gt;&gt;= 4;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                r += 4;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        }</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <span class="keywordflow">if</span> (!(x &amp; 3)) {</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                x &gt;&gt;= 2;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                r += 2;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        }</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordflow">if</span> (!(x &amp; 1)) {</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                x &gt;&gt;= 1;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                r += 1;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        }</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordflow">return</span> r;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;}</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> __attribute_const__ <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ffnz(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ul)</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;{</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordtype">int</span> __r;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        __asm__(<span class="stringliteral">&quot;clz\t%0, %1&quot;</span> : <span class="stringliteral">&quot;=r&quot;</span> (__r) : <span class="stringliteral">&quot;r&quot;</span>(ul &amp; (-ul)) : <span class="stringliteral">&quot;cc&quot;</span>);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="keywordflow">return</span> 31 - __r;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;}</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">#include &lt;asm-generic/xenomai/machine.h&gt;</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* !_COBALT_ARM_ASM_MACHINE_H */</span><span class="preprocessor"></span></div>
Philippe Gerum's avatar
Philippe Gerum committed
161 162 163 164 165
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
Philippe Gerum's avatar
Philippe Gerum committed
166
    <li class="navelem"><a class="el" href="dir_8b78405b740e5bdbd92488e46bcf1f2c.html">kernel</a></li><li class="navelem"><a class="el" href="dir_b3be2d7afe8b01522a793317a09a296c.html">cobalt</a></li><li class="navelem"><a class="el" href="dir_443493556012e525cacaf512a8b70d84.html">arch</a></li><li class="navelem"><a class="el" href="dir_6a40f876f93c277f35ffecd4692e7977.html">arm</a></li><li class="navelem"><a class="el" href="dir_94801efe0e3fee7a37a118e019449c4b.html">include</a></li><li class="navelem"><a class="el" href="dir_7f10b7ba5b27032b8f2195e85e3560c7.html">asm</a></li><li class="navelem"><a class="el" href="dir_05f47ef036ac7e56ccef0646c945eafe.html">xenomai</a></li><li class="navelem"><b>machine.h</b></li>
Philippe Gerum's avatar
Philippe Gerum committed
167 168
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
Philippe Gerum's avatar
Philippe Gerum committed
169
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
Philippe Gerum's avatar
Philippe Gerum committed
170 171 172 173
  </ul>
</div>
</body>
</html>