libctru/ipc_8h_source.html
2024-11-03 20:36:34 +00:00

215 lines
30 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libctru: include/3ds/ipc.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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
&#160;<span id="projectnumber">v2.4.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d475325f6a9fe3bfc3a495c72a9e475e.html">3ds</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">ipc.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="ipc_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * @file ipc.h</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * @brief Inter Process Communication helpers</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="types_8h.html">3ds/types.h</a>&gt;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">/// IPC buffer access rights.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783"> 10</a></span>&#160;<span class="comment"></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;{</div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783aa8137b3b700afc9926ead9fcffaff34f"> 12</a></span>&#160; <a class="code" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783aa8137b3b700afc9926ead9fcffaff34f">IPC_BUFFER_R</a> = <a class="code" href="types_8h.html#a3a8ea58898cb58fc96013383d39f482c">BIT</a>(1), <span class="comment">///&lt; Readable</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783a121e561528ed18b70a5fd5a927d82e43"> 13</a></span>&#160; <a class="code" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783a121e561528ed18b70a5fd5a927d82e43">IPC_BUFFER_W</a> = <a class="code" href="types_8h.html#a3a8ea58898cb58fc96013383d39f482c">BIT</a>(2), <span class="comment">///&lt; Writable</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; <a class="code" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783a9052ab0f3610999bf1b79e277ba9b4a0">IPC_BUFFER_RW</a> = <a class="code" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783aa8137b3b700afc9926ead9fcffaff34f">IPC_BUFFER_R</a> | <a class="code" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783a121e561528ed18b70a5fd5a927d82e43">IPC_BUFFER_W</a> <span class="comment">///&lt; Readable and Writable</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783a9052ab0f3610999bf1b79e277ba9b4a0"> 15</a></span>&#160;} <a class="code" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783">IPC_BufferRights</a>;</div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * @brief Creates a command header to be used for IPC</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * @param command_id ID of the command to create a header for.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * @param normal_params Size of the normal parameters in words. Up to 63.</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * @param translate_params Size of the translate parameters in words. Up to 63.</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * @return The created IPC header.</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * Normal parameters are sent directly to the process while the translate parameters might go through modifications and checks by the kernel.</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> * The translate parameters are described by headers generated with the IPC_Desc_* functions.</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * @note While #normal_params is equivalent to the number of normal parameters, #translate_params includes the size occupied by the translate parameters headers.</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="ipc_8h.html#a5fab7f34fb1ec8651bc8645930eeb432"> 29</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> <a class="code" href="ipc_8h.html#a5fab7f34fb1ec8651bc8645930eeb432">IPC_MakeHeader</a>(<a class="code" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> command_id, <span class="keywordtype">unsigned</span> normal_params, <span class="keywordtype">unsigned</span> translate_params)</div>
<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="keywordflow">return</span> ((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>) command_id &lt;&lt; 16) | (((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>) normal_params &amp; 0x3F) &lt;&lt; 6) | (((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>) translate_params &amp; 0x3F) &lt;&lt; 0);</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;}</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="comment"> * @brief Creates a header to share handles</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="comment"> * @param number The number of handles following this header. Max 64.</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="comment"> * @return The created shared handles header.</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment"> * The #number next values are handles that will be shared between the two processes.</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="comment"> * @note Zero values will have no effect.</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="ipc_8h.html#a0b7ef8528054a032da9d91b79ab5dd2f"> 43</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> <a class="code" href="ipc_8h.html#a0b7ef8528054a032da9d91b79ab5dd2f">IPC_Desc_SharedHandles</a>(<span class="keywordtype">unsigned</span> number)</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;{</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keywordflow">return</span> ((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>)(number - 1) &lt;&lt; 26);</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;}</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="comment"> * @brief Creates the header to transfer handle ownership</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment"> * @param number The number of handles following this header. Max 64.</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="comment"> * @return The created handle transfer header.</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="comment"> * The #number next values are handles that will be duplicated and closed by the other process.</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="comment"> * @note Zero values will have no effect.</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="ipc_8h.html#a17bec8eebca6a31b5561637b63bfcc51"> 57</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> <a class="code" href="ipc_8h.html#a17bec8eebca6a31b5561637b63bfcc51">IPC_Desc_MoveHandles</a>(<span class="keywordtype">unsigned</span> number)</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;{</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keywordflow">return</span> ((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>)(number - 1) &lt;&lt; 26) | 0x10;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;}</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="comment"> * @brief Returns the code to ask the kernel to fill the handle with the current process ID.</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="comment"> * @return The code to request the current process ID.</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<span class="comment"> * The next value is a placeholder that will be replaced by the current process ID by the kernel.</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="ipc_8h.html#a41e3037b6f035d4bc441dae38517366c"> 68</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> <a class="code" href="ipc_8h.html#a41e3037b6f035d4bc441dae38517366c">IPC_Desc_CurProcessId</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;{</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordflow">return</span> 0x20;</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; </div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="types_8h.html#a22a95c6b9c6cb449bd02bf919f01896f">CTR_DEPRECATED</a> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> IPC_Desc_CurProcessHandle(<span class="keywordtype">void</span>)</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;{</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keywordflow">return</span> <a class="code" href="ipc_8h.html#a41e3037b6f035d4bc441dae38517366c">IPC_Desc_CurProcessId</a>();</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="comment"></span> </div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;<span class="comment"> * @brief Creates a header describing a static buffer.</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<span class="comment"> * @param size Size of the buffer. Max ?0x03FFFF?.</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<span class="comment"> * @param buffer_id The Id of the buffer. Max 0xF.</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="comment"> * @return The created static buffer header.</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="comment"> * The next value is a pointer to the buffer. It will be copied to TLS offset 0x180 + static_buffer_id*8.</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="ipc_8h.html#a173742ba4cc19c4bb4f588e2afdd8d46"> 86</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> <a class="code" href="ipc_8h.html#a173742ba4cc19c4bb4f588e2afdd8d46">IPC_Desc_StaticBuffer</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">unsigned</span> buffer_id)</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;{</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordflow">return</span> (size &lt;&lt; 14) | ((buffer_id &amp; 0xF) &lt;&lt; 10) | 0x2;</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;}</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;<span class="comment"> * @brief Creates a header describing a buffer to be sent over PXI.</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<span class="comment"> * @param size Size of the buffer. Max 0x00FFFFFF.</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;<span class="comment"> * @param buffer_id The Id of the buffer. Max 0xF.</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;<span class="comment"> * @param is_read_only true if the buffer is read-only. If false, the buffer is considered to have read-write access.</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;<span class="comment"> * @return The created PXI buffer header.</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<span class="comment"> * The next value is a phys-address of a table located in the BASE memregion.</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="ipc_8h.html#ae1337c1e25042c4e50f1491747354a41"> 100</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> <a class="code" href="ipc_8h.html#ae1337c1e25042c4e50f1491747354a41">IPC_Desc_PXIBuffer</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">unsigned</span> buffer_id, <span class="keywordtype">bool</span> is_read_only)</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;{</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> type = 0x4;</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">if</span>(is_read_only)type = 0x6;</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keywordflow">return</span> (size &lt;&lt; 8) | ((buffer_id &amp; 0xF) &lt;&lt; 4) | type;</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;}</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="comment"> * @brief Creates a header describing a buffer from the main memory.</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;<span class="comment"> * @param size Size of the buffer. Max 0x0FFFFFFF.</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;<span class="comment"> * @param rights The rights of the buffer for the destination process.</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;<span class="comment"> * @return The created buffer header.</span></div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;<span class="comment"> * The next value is a pointer to the buffer.</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="ipc_8h.html#a950aa9372b06df242eac7f4225ef6f94"> 115</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> <a class="code" href="ipc_8h.html#a950aa9372b06df242eac7f4225ef6f94">IPC_Desc_Buffer</a>(<span class="keywordtype">size_t</span> size, <a class="code" href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783">IPC_BufferRights</a> rights)</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;{</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordflow">return</span> (size &lt;&lt; 4) | 0x8 | rights;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;}</div>
<div class="ttc" id="aipc_8h_html_a0b7ef8528054a032da9d91b79ab5dd2f"><div class="ttname"><a href="ipc_8h.html#a0b7ef8528054a032da9d91b79ab5dd2f">IPC_Desc_SharedHandles</a></div><div class="ttdeci">static u32 IPC_Desc_SharedHandles(unsigned number)</div><div class="ttdoc">Creates a header to share handles.</div><div class="ttdef"><b>Definition:</b> ipc.h:43</div></div>
<div class="ttc" id="aipc_8h_html_a173742ba4cc19c4bb4f588e2afdd8d46"><div class="ttname"><a href="ipc_8h.html#a173742ba4cc19c4bb4f588e2afdd8d46">IPC_Desc_StaticBuffer</a></div><div class="ttdeci">static u32 IPC_Desc_StaticBuffer(size_t size, unsigned buffer_id)</div><div class="ttdoc">Creates a header describing a static buffer.</div><div class="ttdef"><b>Definition:</b> ipc.h:86</div></div>
<div class="ttc" id="aipc_8h_html_a17bec8eebca6a31b5561637b63bfcc51"><div class="ttname"><a href="ipc_8h.html#a17bec8eebca6a31b5561637b63bfcc51">IPC_Desc_MoveHandles</a></div><div class="ttdeci">static u32 IPC_Desc_MoveHandles(unsigned number)</div><div class="ttdoc">Creates the header to transfer handle ownership.</div><div class="ttdef"><b>Definition:</b> ipc.h:57</div></div>
<div class="ttc" id="aipc_8h_html_a41e3037b6f035d4bc441dae38517366c"><div class="ttname"><a href="ipc_8h.html#a41e3037b6f035d4bc441dae38517366c">IPC_Desc_CurProcessId</a></div><div class="ttdeci">static u32 IPC_Desc_CurProcessId(void)</div><div class="ttdoc">Returns the code to ask the kernel to fill the handle with the current process ID.</div><div class="ttdef"><b>Definition:</b> ipc.h:68</div></div>
<div class="ttc" id="aipc_8h_html_a5fab7f34fb1ec8651bc8645930eeb432"><div class="ttname"><a href="ipc_8h.html#a5fab7f34fb1ec8651bc8645930eeb432">IPC_MakeHeader</a></div><div class="ttdeci">static u32 IPC_MakeHeader(u16 command_id, unsigned normal_params, unsigned translate_params)</div><div class="ttdoc">Creates a command header to be used for IPC.</div><div class="ttdef"><b>Definition:</b> ipc.h:29</div></div>
<div class="ttc" id="aipc_8h_html_a950aa9372b06df242eac7f4225ef6f94"><div class="ttname"><a href="ipc_8h.html#a950aa9372b06df242eac7f4225ef6f94">IPC_Desc_Buffer</a></div><div class="ttdeci">static u32 IPC_Desc_Buffer(size_t size, IPC_BufferRights rights)</div><div class="ttdoc">Creates a header describing a buffer from the main memory.</div><div class="ttdef"><b>Definition:</b> ipc.h:115</div></div>
<div class="ttc" id="aipc_8h_html_ae0ccf9e363a4bd3b070762b57ffc8783"><div class="ttname"><a href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783">IPC_BufferRights</a></div><div class="ttdeci">IPC_BufferRights</div><div class="ttdoc">IPC buffer access rights.</div><div class="ttdef"><b>Definition:</b> ipc.h:11</div></div>
<div class="ttc" id="aipc_8h_html_ae0ccf9e363a4bd3b070762b57ffc8783a121e561528ed18b70a5fd5a927d82e43"><div class="ttname"><a href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783a121e561528ed18b70a5fd5a927d82e43">IPC_BUFFER_W</a></div><div class="ttdeci">@ IPC_BUFFER_W</div><div class="ttdoc">Writable.</div><div class="ttdef"><b>Definition:</b> ipc.h:13</div></div>
<div class="ttc" id="aipc_8h_html_ae0ccf9e363a4bd3b070762b57ffc8783a9052ab0f3610999bf1b79e277ba9b4a0"><div class="ttname"><a href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783a9052ab0f3610999bf1b79e277ba9b4a0">IPC_BUFFER_RW</a></div><div class="ttdeci">@ IPC_BUFFER_RW</div><div class="ttdoc">Readable and Writable.</div><div class="ttdef"><b>Definition:</b> ipc.h:14</div></div>
<div class="ttc" id="aipc_8h_html_ae0ccf9e363a4bd3b070762b57ffc8783aa8137b3b700afc9926ead9fcffaff34f"><div class="ttname"><a href="ipc_8h.html#ae0ccf9e363a4bd3b070762b57ffc8783aa8137b3b700afc9926ead9fcffaff34f">IPC_BUFFER_R</a></div><div class="ttdeci">@ IPC_BUFFER_R</div><div class="ttdoc">Readable.</div><div class="ttdef"><b>Definition:</b> ipc.h:12</div></div>
<div class="ttc" id="aipc_8h_html_ae1337c1e25042c4e50f1491747354a41"><div class="ttname"><a href="ipc_8h.html#ae1337c1e25042c4e50f1491747354a41">IPC_Desc_PXIBuffer</a></div><div class="ttdeci">static u32 IPC_Desc_PXIBuffer(size_t size, unsigned buffer_id, bool is_read_only)</div><div class="ttdoc">Creates a header describing a buffer to be sent over PXI.</div><div class="ttdef"><b>Definition:</b> ipc.h:100</div></div>
<div class="ttc" id="atypes_8h_html"><div class="ttname"><a href="types_8h.html">types.h</a></div><div class="ttdoc">Various system types.</div></div>
<div class="ttc" id="atypes_8h_html_a22a95c6b9c6cb449bd02bf919f01896f"><div class="ttname"><a href="types_8h.html#a22a95c6b9c6cb449bd02bf919f01896f">CTR_DEPRECATED</a></div><div class="ttdeci">#define CTR_DEPRECATED</div><div class="ttdoc">Flags a function as deprecated.</div><div class="ttdef"><b>Definition:</b> types.h:56</div></div>
<div class="ttc" id="atypes_8h_html_a3a8ea58898cb58fc96013383d39f482c"><div class="ttname"><a href="types_8h.html#a3a8ea58898cb58fc96013383d39f482c">BIT</a></div><div class="ttdeci">#define BIT(n)</div><div class="ttdoc">Creates a bitmask from a bit number.</div><div class="ttdef"><b>Definition:</b> types.h:47</div></div>
<div class="ttc" id="atypes_8h_html_a92c50087ca0e64fa93fc59402c55f8ca"><div class="ttname"><a href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a></div><div class="ttdeci">uint8_t u8</div><div class="ttdoc">would be nice if newlib had this already</div><div class="ttdef"><b>Definition:</b> types.h:21</div></div>
<div class="ttc" id="atypes_8h_html_ace9d960e74685e2cd84b36132dbbf8aa"><div class="ttname"><a href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a></div><div class="ttdeci">uint16_t u16</div><div class="ttdoc">16-bit unsigned integer</div><div class="ttdef"><b>Definition:</b> types.h:22</div></div>
<div class="ttc" id="atypes_8h_html_afaa62991928fb9fb18ff0db62a040aba"><div class="ttname"><a href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a></div><div class="ttdeci">uint32_t u32</div><div class="ttdoc">32-bit unsigned integer</div><div class="ttdef"><b>Definition:</b> types.h:23</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>