Initial commit.

This commit is contained in:
2017-10-26 19:57:24 +02:00
commit 9ce8b5485d
1090 changed files with 47036 additions and 0 deletions
@@ -0,0 +1,61 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPI On Cell (Documentation): src/noarch/internal/communication/imoc_get_free_entry.c Source File</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>src/noarch/internal/communication/imoc_get_free_entry.c</h1><a href="../../df/d20/imoc__get__free__entry_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;<a class="code" href="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#ifdef __SPU__</span>
<a name="l00004"></a>00004 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="../../d9/d00/imoc__core__spu_8h.html">internal/spu/imoc_core_spu.h</a>&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#else</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="../../d6/d09/imoc__core__ppu_8h.html">internal/ppu/imoc_core_ppu.h</a>&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#endif</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span>
<a name="l00009"></a><a class="code" href="../../d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750">00009</a> <span class="keywordtype">int</span> <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message-queue (a local copy of the message-queue has to be...">IMOC_getFreeEntry</a>(<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>* pqueue, uint8_t tag,
<a name="l00010"></a>00010 <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <span class="keywordtype">int</span> isSpecial, <span class="keywordtype">int</span>* index)
<a name="l00011"></a>00011 {
<a name="l00012"></a>00012 <span class="keywordtype">int</span> t, temp = -1;
<a name="l00013"></a>00013 <span class="keywordflow">for</span> (t = <a class="code" href="../../dd/df8/group__internal__core.html#geed5a271d50368d3cf9a858c4f57c895" title="Information each node knowns about himself and the world.">node_handle</a>.<a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</a> - 1; t &gt;= 0; t--)
<a name="l00014"></a>00014 {
<a name="l00015"></a>00015 <span class="keywordflow">if</span> (!pqueue[t].flags.<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html#5538e79854840d3caf08b90b5409e16b" title="flag-struct">bits</a>.valid)
<a name="l00016"></a>00016 temp = t;
<a name="l00017"></a>00017 <span class="keywordflow">else</span>
<a name="l00018"></a>00018 <span class="keywordflow">if</span> (!isSpecial)
<a name="l00019"></a>00019 {
<a name="l00020"></a>00020 <span class="keywordflow">if</span> (pqueue[t].tag == tag &amp;&amp; pqueue[t].communicator == comm
<a name="l00021"></a>00021 &amp;&amp; !pqueue[t].flags.<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html#5538e79854840d3caf08b90b5409e16b" title="flag-struct">bits</a>.special)
<a name="l00022"></a>00022 <span class="keywordflow">break</span>;
<a name="l00023"></a>00023 }
<a name="l00024"></a>00024 <span class="keywordflow">else</span>
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026 <span class="keywordflow">if</span> (pqueue[t].flags.<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html#5538e79854840d3caf08b90b5409e16b" title="flag-struct">bits</a>.special)
<a name="l00027"></a>00027 <span class="keywordflow">break</span>;
<a name="l00028"></a>00028 }
<a name="l00029"></a>00029 }
<a name="l00030"></a>00030 <span class="keywordflow">if</span> (temp &gt;= 0)
<a name="l00031"></a>00031 {
<a name="l00032"></a>00032 *index = temp;
<a name="l00033"></a>00033 <span class="keywordflow">return</span> 0;
<a name="l00034"></a>00034 }
<a name="l00035"></a>00035 <span class="keywordflow">else</span>
<a name="l00036"></a>00036 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g5a536510d86dbad4f4bacf1dc3f08c47" title="No further messages possible.">MOC_ERR_MESSAGE_EXHAUSTED</a>;
<a name="l00037"></a>00037 <span class="keywordflow">return</span> 0;
<a name="l00038"></a>00038 }
<a name="l00039"></a>00039
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:49:47 2009 for MPI On Cell (Documentation) by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>