[processor-sdk/performance-audio-sr.git] / ipc_3_43_00_00_eng / docs / cdoc / ti / sdo / ipc / gates / GateHWSem.html
1 <html>
2 <head>
3 <title>module ti.sdo.ipc.gates.GateHWSem</title>
4 <meta name="description" content="Multiprocessor gate that utilizes hardware semaphores">
5 <link rel="stylesheet" type="text/css" href="../../../../xdoc.css" />
6 </head>
7 <body><div id="xdocWrapper"><div id="xdocContent">
8 <table class="xdocHdr"><tr>
9 <td class="xdocHdrTitle"><span class="xdoc-kw1">module</span> <span class="xdoc-id">ti.sdo.ipc.gates.</span><span class="xdoc-id">GateHWSem</span></td>
10 <td class="xdocHdrArrow">
11 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateAAMonitor.html" title="module GateAAMonitor"><img class="xdocHdrArrow" src="../../../../Arrow_left.png"/></a></td>
12 <td class="xdocHdrArrow">
13 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/package.html" title="package ti.sdo.ipc.gates"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
14 <td class="xdocHdrArrow">
15 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSpinlock.html" title="module GateHWSpinlock"><img class="xdocHdrArrow" src="../../../../Arrow_right.png"/></a></td>
16 </table>
17 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html">index URL</a></div>
18 <p class="xdocHdrSummary">Multiprocessor gate that utilizes hardware semaphores</p>
19 <ul class="xdocToc">
20 <li class="xdocToc"><a class="xdocToc" href="#targ-synop">C synopsis</a></li>
21 <li class="xdocToc2"><a class="xdocToc" href="#xdocElems">Individual elements</a></li>
22 <li class="xdocToc"><a class="xdocToc" href="#meta-synop">Configuration settings</a></li>
23 <li class="xdocToc2"><a class="xdocToc" href="#xdocMetaElems">Individual elements</a></li>
24 </ul>
25 <span id='targ-synop'></span>
26 <table class="xdocLabel"><tr>
27 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2">C</span></tt> synopsis</td>
28 <td class="xdocLabelCenter">target-domain</td>
29 <td class="xdocLabelRight">sourced in <a class="xdocLink" href="../../../../ti/sdo/ipc/gates/GateHWSem-src.html"><span class="xdocLabelFile">ti/sdo/ipc/gates/GateHWSem.xdc</span></a></td>
30 </tr></table>
31 <div class="xdocSynT">
32 <div class="xdocSynCode">
33 <tt></tt><span class="xdoc-kw3">#include</span> <span class="xdoc-id"><ti/sdo/ipc/gates/GateHWSem.h></span>
34 </div>
35 <table cellspacing="0" cellpadding="0" border="0">
36 <tr><td colspan='2'><div class='xdocSynTblHdr'>Functions</div></td></tr>
38 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw2">Void</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#per-instance_creation"><span class="xdoc-id">GateHWSem_construct</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Initialize a new instance object inside the provided structure</span></span></a>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Struct">GateHWSem_Struct</a> *structP, <a class="xdoc-link" href="../../../../xdc/runtime/IGateProvider.html#per-instance_object_types" title="xdc.runtime.IGateProvider.Handle">IGateProvider_Handle</a> <span class="xdoc-id">localGate</span>, <span class="xdoc-kw1">const</span> <a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters" title="ti.sdo.ipc.gates.GateHWSem.Params">GateHWSem_Params</a> *params);</div></td></tr>
39 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#per-instance_creation"><span class="xdoc-id">GateHWSem_create</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Allocate and initialize a new instance object and return its handle</span></span></a>(<a class="xdoc-link" href="../../../../xdc/runtime/IGateProvider.html#per-instance_object_types" title="xdc.runtime.IGateProvider.Handle">IGateProvider_Handle</a> <span class="xdoc-id">localGate</span>, <span class="xdoc-kw1">const</span> <a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters" title="ti.sdo.ipc.gates.GateHWSem.Params">GateHWSem_Params</a> *params, <a class="xdoc-link" href="../../../../xdc/runtime/Error.html#.Block" title="xdc.runtime.Error.Block">Error_Block</a> *eb);</div></td></tr>
40 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw2">Void</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#per-instance_deletion"><span class="xdoc-id">GateHWSem_delete</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Finalize and free this previously allocated instance object, setting the referenced handle to NULL</span></span></a>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> *handleP);</div></td></tr>
41 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw2">Void</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#per-instance_deletion"><span class="xdoc-id">GateHWSem_destruct</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Finalize the instance object inside the provided structure</span></span></a>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Struct">GateHWSem_Struct</a> *structP);</div></td></tr>
42 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw2">Void</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#per-instance_config_parameters"><span class="xdoc-id">GateHWSem_Params_init</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Initialize this config-params structure with supplier-specified defaults before instance creation</span></span></a>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters" title="ti.sdo.ipc.gates.GateHWSem.Params">GateHWSem_Params</a> *params);</div></td></tr>
43 <tr><td colspan="2"><div class="xdocSynFxnCat">Functions common to all IGateProvider modules</div></td></tr>
45 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw2">Bool</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#query"><span class="xdoc-id">GateHWSem_query</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Runtime test for a particular gate quality</span></span></a>(<span class="xdoc-kw2">Int</span> <span class="xdoc-id">qual</span>);</div></td></tr>
46 <tr><td colspan="2"><div class="xdocSynFxnCat">Functions common to all IGateMPSupport modules</div></td></tr>
48 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw2">SizeT</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#shared.Mem.Req"><span class="xdoc-id">GateHWSem_sharedMemReq</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Amount of shared memory required for creation of each instance</span></span></a>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/interfaces/IGateMPSupport.html#per-instance_config_parameters" title="ti.sdo.ipc.interfaces.IGateMPSupport.Params">IGateMPSupport_Params</a> *<span class="xdoc-id">params</span>);</div></td></tr>
49 <tr><td class="xdocSynFxnCat" colspan="2"><div class="xdocSynFxnCat">Functions common to all target instances</div></td></tr>
51 <tr>
52 <td></td>
53 <td>
54 <div class="xdocSynTblPack">
55 <a class="xdocSynGo" href="#per-instance_object_types"><span class="xdoc-id">GateHWSem_handle</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Convert this instance structure pointer into an instance handle</span></span></a>,
56 <a class="xdocSynGo" href="#per-instance_convertors"><span class="xdoc-id">GateHWSem_Handle_downCast</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// conditionally move one level down the inheritance hierarchy; NULL upon failure</span></span></a>,
57 <a class="xdocSynGo" href="#per-instance_convertors"><span class="xdoc-id">GateHWSem_Handle_downCast2</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// conditionally move 2 levels down the inheritance hierarchy; NULL upon failure</span></span></a>,
58 <a class="xdocSynGo" href="#per-instance_built-ins"><span class="xdoc-id">GateHWSem_Handle_label</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// The label associated with this instance object</span></span></a>,
59 <a class="xdocSynGo" href="#per-instance_built-ins"><span class="xdoc-id">GateHWSem_Handle_name</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// The name of this instance object</span></span></a>,
60 <a class="xdocSynGo" href="#per-instance_convertors"><span class="xdoc-id">GateHWSem_Handle_upCast</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// unconditionally move one level up the inheritance hierarchy</span></span></a>,
61 <a class="xdocSynGo" href="#per-instance_convertors"><span class="xdoc-id">GateHWSem_Handle_upCast2</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// unconditionally move 2 levels up the inheritance hierarchy</span></span></a>,
62 <a class="xdocSynGo" href="#per-instance_built-ins"><span class="xdoc-id">GateHWSem_Object_count</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// The number of statically-created instance objects</span></span></a>,
63 <a class="xdocSynGo" href="#per-instance_built-ins"><span class="xdoc-id">GateHWSem_Object_first</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// The handle of the first dynamically-created instance object, or NULL</span></span></a>,
64 <a class="xdocSynGo" href="#per-instance_built-ins"><span class="xdoc-id">GateHWSem_Object_get</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// The handle of the i-th statically-created instance object (array == NULL)</span></span></a>,
65 <a class="xdocSynGo" href="#per-instance_built-ins"><span class="xdoc-id">GateHWSem_Object_heap</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// The heap used to allocate dynamically-created instance objects</span></span></a>,
66 <a class="xdocSynGo" href="#per-instance_built-ins"><span class="xdoc-id">GateHWSem_Object_next</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// The handle of the next dynamically-created instance object, or NULL</span></span></a>,
67 <a class="xdocSynGo" href="#per-instance_object_types"><span class="xdoc-id">GateHWSem_struct</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Convert this instance handle into an instance structure pointer</span></span></a>
68 </div>
69 </td>
70 </tr>
71 <tr><td class="xdocSynFxnCat" colspan="2"><div class="xdocSynFxnCat">Functions common to all target modules</div></td></tr>
73 <tr>
74 <td></td>
75 <td>
76 <div class="xdocSynTblPack">
77 <a class="xdocSynGo" href="#module-wide_built-ins"><span class="xdoc-id">GateHWSem_Module_getMask</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Returns the diagnostics mask for this module</span></span></a>,
78 <a class="xdocSynGo" href="#module-wide_built-ins"><span class="xdoc-id">GateHWSem_Module_hasMask</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Test whether this module has a diagnostics mask</span></span></a>,
79 <a class="xdocSynGo" href="#module-wide_built-ins"><span class="xdoc-id">GateHWSem_Module_heap</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// The heap from which this module allocates memory</span></span></a>,
80 <a class="xdocSynGo" href="#module-wide_built-ins"><span class="xdoc-id">GateHWSem_Module_id</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Get this module's unique id</span></span></a>,
81 <a class="xdocSynGo" href="#module-wide_built-ins"><span class="xdoc-id">GateHWSem_Module_setMask</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Set the diagnostics mask for this module</span></span></a>,
82 <a class="xdocSynGo" href="#module-wide_built-ins"><span class="xdoc-id">GateHWSem_Module_startupDone</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Test if this module has completed startup</span></span></a>
83 </div>
84 </td>
85 </tr>
86 <tr><td colspan='2'><div class='xdocSynTblHdr'>Defines</div></td></tr>
88 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw3">#define</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#.Q_.B.L.O.C.K.I.N.G"><span class="xdoc-id">GateHWSem_Q_BLOCKING</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Blocking quality</span></span></a> (<i><span class="xdoc-kw2">Int</span></i>)1</div></td></tr>
89 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw3">#define</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#.Q_.P.R.E.E.M.P.T.I.N.G"><span class="xdoc-id">GateHWSem_Q_PREEMPTING</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Preempting quality</span></span></a> (<i><span class="xdoc-kw2">Int</span></i>)2</div></td></tr>
90 <tr><td colspan='2'><div class='xdocSynTblHdr'>Typedefs</div></td></tr>
92 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw1">typedef</span> <a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Object">GateHWSem_Object</a> *</div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#per-instance_object_types"><span class="xdoc-id">GateHWSem_Handle</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Client reference to an instance object</span></span></a>;</div></td></tr>
93 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw1">typedef</span> <span class="xdoc-kw1">struct</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#per-instance_object_types"><span class="xdoc-id">GateHWSem_Object</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Opaque internal representation of an instance object</span></span></a> <span class="xdoc-id">GateHWSem_Object</span>;</div></td></tr>
94 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw1">typedef</span> <span class="xdoc-kw1">struct</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#per-instance_config_parameters"><span class="xdoc-id">GateHWSem_Params</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Instance config-params structure</span></span></a> ...</div></td></tr>
95 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw1">typedef</span> <span class="xdoc-kw1">struct</span> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#per-instance_object_types"><span class="xdoc-id">GateHWSem_Struct</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Opaque client structure large enough to hold an instance object</span></span></a> <span class="xdoc-id">GateHWSem_Struct</span>;</div></td></tr>
96 <tr><td colspan='2'><div class='xdocSynTblHdr'>Constants</div></td></tr>
98 <tr valign="top"><td class="xdocSynDecl" nowrap><div class="xdocSynTblType"><tt></tt><span class="xdoc-kw1">extern const</span> <a class="xdoc-link" href="../../../../xdc/runtime/Assert.html#.Id" title="xdc.runtime.Assert.Id">Assert_Id</a> </div></td><td class="xdocSynDecl"><div class="xdocSynTblDecl"><a class="xdocSynGo" href="#.A_inv.Sem.Num"><span class="xdoc-id">GateHWSem_A_invSemNum</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Asserted when supplied semNum is invalid for the relevant device</span></span></a>;</div></td></tr>
99 </table>
100 <div class="xdocSynSpacer"> </div>
101 </div>
102 <div id="xdocSep">
103 </div>
104 <div id="xdocElems">
105 <div class="xdocSynSpacer"> </div>
106 <a class="xdocAnchor" id=".Q_.B.L.O.C.K.I.N.G"></a>
107 <table class="xdocHdr"><tr>
108 <td class="xdocHdrTitle"><span class="xdoc-kw1">const</span> <span class="xdoc-id">GateHWSem_</span><span class="xdoc-id">Q_BLOCKING</span></td>
109 <td class="xdocHdrArrow">
110 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
111 </table>
112 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#.Q_.B.L.O.C.K.I.N.G">index URL</a></div>
113 <p class="xdocHdrSummaryDcl">Blocking quality</p>
114 <span id='targ-synop'></span>
115 <table class="xdocLabel"><tr>
116 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
117 <td class="xdocLabelRight">target-domain</td>
118 </tr></table>
119 <div class="xdocSynTdcl">
120 <div class="xdocSynCode">
121 <tt></tt><tt></tt><span class="xdoc-kw3">#define</span> <span class="xdoc-id">GateHWSem_Q_BLOCKING</span> (<i><span class="xdoc-kw2">Int</span></i>)1
122 </div>
123 </div>
124 <div class="xdocSynSpacer"> </div>
125 <span id="xdoc-sect-1"></span>
126 <div class="xdocSect">DETAILS</div>
127 <div class="xdocText">Gates with this "quality" may cause the calling thread to block;
128 i.e., suspend execution until another thread leaves the gate.</div>
129 <div class="xdocSynSpacer"> </div>
130 <a class="xdocAnchor" id=".Q_.P.R.E.E.M.P.T.I.N.G"></a>
131 <table class="xdocHdr"><tr>
132 <td class="xdocHdrTitle"><span class="xdoc-kw1">const</span> <span class="xdoc-id">GateHWSem_</span><span class="xdoc-id">Q_PREEMPTING</span></td>
133 <td class="xdocHdrArrow">
134 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
135 </table>
136 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#.Q_.P.R.E.E.M.P.T.I.N.G">index URL</a></div>
137 <p class="xdocHdrSummaryDcl">Preempting quality</p>
138 <span id='targ-synop'></span>
139 <table class="xdocLabel"><tr>
140 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
141 <td class="xdocLabelRight">target-domain</td>
142 </tr></table>
143 <div class="xdocSynTdcl">
144 <div class="xdocSynCode">
145 <tt></tt><tt></tt><span class="xdoc-kw3">#define</span> <span class="xdoc-id">GateHWSem_Q_PREEMPTING</span> (<i><span class="xdoc-kw2">Int</span></i>)2
146 </div>
147 </div>
148 <div class="xdocSynSpacer"> </div>
149 <span id="xdoc-sect-1"></span>
150 <div class="xdocSect">DETAILS</div>
151 <div class="xdocText">Gates with this "quality" allow other threads to preempt the thread
152 that has already entered the gate.</div>
153 <div class="xdocSynSpacer"> </div>
154 <a class="xdocAnchor" id=".A_inv.Sem.Num"></a>
155 <table class="xdocHdr"><tr>
156 <td class="xdocHdrTitle"><span class="xdoc-kw1">config</span> <span class="xdoc-id">GateHWSem_</span><span class="xdoc-id">A_invSemNum</span> <small><span class="xdocSynSum">// module-wide</span></small></td>
157 <td class="xdocHdrArrow">
158 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
159 </table>
160 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#.A_inv.Sem.Num">index URL</a></div>
161 <p class="xdocHdrSummaryDcl">Asserted when supplied semNum is invalid for the relevant device</p>
162 <span id='targ-synop'></span>
163 <table class="xdocLabel"><tr>
164 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
165 <td class="xdocLabelRight">target-domain</td>
166 </tr></table>
167 <div class="xdocSynTdcl">
168 <div class="xdocSynCode">
169 <tt></tt><tt></tt><span class="xdoc-kw1">extern const</span> <a class="xdoc-link" href="../../../../xdc/runtime/Assert.html#.Id" title="xdc.runtime.Assert.Id">Assert_Id</a> <span class="xdoc-id">GateHWSem_A_invSemNum</span>;
170 </div>
171 </div>
172 <div class="xdocSynSpacer"> </div>
173 <div class="xdocSynSpacer"> </div>
174 <a class="xdocAnchor" id="query"></a>
175 <table class="xdocHdr"><tr>
176 <td class="xdocHdrTitle"><span class="xdoc-id">GateHWSem_</span><span class="xdoc-id">query</span>() <small><span class="xdocSynSum">// module-wide</span></small></td>
177 <td class="xdocHdrArrow">
178 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
179 </table>
180 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#query">index URL</a></div>
181 <p class="xdocHdrSummaryDcl">Runtime test for a particular gate quality</p>
182 <span id='targ-synop'></span>
183 <table class="xdocLabel"><tr>
184 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
185 <td class="xdocLabelRight">target-domain</td>
186 </tr></table>
187 <div class="xdocSynTdcl">
188 <div class="xdocSynCode">
189 <tt></tt><tt></tt><span class="xdoc-kw2">Bool</span> <span class="xdoc-id">GateHWSem_query</span>(<span class="xdoc-kw2">Int</span> <span class="xdoc-id">qual</span>);
190 </div>
191 </div>
192 <div class="xdocSynSpacer"> </div>
193 <span id="xdoc-sect-1"></span>
194 <div class="xdocSect">ARGUMENTS</div>
195 <div class="xdocChild"><span class="xdocChildId">qual</span>
196 <span class="xdocChildSum">— constant describing a quality</span>
197 </div>
198 <span id="xdoc-sect-2"></span>
199 <div class="xdocSect">RETURNS</div>
200 <div class="xdocText">Returns <tt>TRUE</tt> if the gate has the given quality,
201 and <tt>FALSE</tt> otherwise, which includes the case when the gate does not
202 recognize the constant describing the quality.</div>
203 <div class="xdocSynSpacer"> </div>
204 <a class="xdocAnchor" id="shared.Mem.Req"></a>
205 <table class="xdocHdr"><tr>
206 <td class="xdocHdrTitle"><span class="xdoc-id">GateHWSem_</span><span class="xdoc-id">sharedMemReq</span>() <small><span class="xdocSynSum">// module-wide</span></small></td>
207 <td class="xdocHdrArrow">
208 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
209 </table>
210 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#shared.Mem.Req">index URL</a></div>
211 <p class="xdocHdrSummaryDcl">Amount of shared memory required for creation of each instance</p>
212 <span id='targ-synop'></span>
213 <table class="xdocLabel"><tr>
214 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
215 <td class="xdocLabelRight">target-domain</td>
216 </tr></table>
217 <div class="xdocSynTdcl">
218 <div class="xdocSynCode">
219 <tt></tt><tt></tt><span class="xdoc-kw2">SizeT</span> <span class="xdoc-id">GateHWSem_sharedMemReq</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/interfaces/IGateMPSupport.html#per-instance_config_parameters" title="ti.sdo.ipc.interfaces.IGateMPSupport.Params">IGateMPSupport_Params</a> *<span class="xdoc-id">params</span>);
220 </div>
221 </div>
222 <div class="xdocSynSpacer"> </div>
223 <span id="xdoc-sect-1"></span>
224 <div class="xdocSect">ARGUMENTS</div>
225 <div class="xdocChild"><span class="xdocChildId">params</span>
226 <span class="xdocChildSum">— Pointer to the parameters that will be used in
227 the create.</span>
228 </div>
229 <span id="xdoc-sect-2"></span>
230 <div class="xdocSect">DETAILS</div>
231 <div class="xdocText">The value returned by this function may depend on the cache alignment
232 requirements for the shared region from which memory will be used.</div>
233 <span id="xdoc-sect-3"></span>
234 <div class="xdocSect">RETURNS</div>
235 <div class="xdocText">Number of MAUs needed to create the instance.</div>
236 <a class="xdocAnchor" id="module-wide_built-ins"></a>
237 <table class="xdocHdr"><tr>
238 <td class="xdocHdrTitle"><span class="xdocSynSum">Module-Wide Built-Ins</span></td>
239 <td class="xdocHdrArrow">
240 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
241 </table>
242 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#module-wide_built-ins">index URL</a></div>
243 <p class="xdocHdrSummary"></p>
244 <span id='targ-synop'></span>
245 <table class="xdocLabel"><tr>
246 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
247 <td class="xdocLabelRight">target-domain</td>
248 </tr></table>
249 <div class="xdocSynTdcl">
250 <div class="xdocSynCode">
251 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../xdc/runtime/Types.html#.Module.Id" title="xdc.runtime.Types.ModuleId">Types_ModuleId</a> <span class="xdoc-id">GateHWSem_Module_id</span>();
252 </div>
253 <div class='xdocSynSum'><tt></tt><tt></tt>// Get this module's unique id</div>
254 <div class="xdocSynSpacer"> </div>
255 <div class="xdocSynCode">
256 <tt></tt><tt></tt><span class="xdoc-kw2">Bool</span> <span class="xdoc-id">GateHWSem_Module_startupDone</span>();
257 </div>
258 <div class='xdocSynSum'><tt></tt><tt></tt>// Test if this module has completed startup</div>
259 <div class="xdocSynSpacer"> </div>
260 <div class="xdocSynCode">
261 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../xdc/runtime/IHeap.html#per-instance_object_types" title="xdc.runtime.IHeap.Handle">IHeap_Handle</a> <span class="xdoc-id">GateHWSem_Module_heap</span>();
262 </div>
263 <div class='xdocSynSum'><tt></tt><tt></tt>// The heap from which this module allocates memory</div>
264 <div class="xdocSynSpacer"> </div>
265 <div class="xdocSynCode">
266 <tt></tt><tt></tt><span class="xdoc-kw2">Bool</span> <span class="xdoc-id">GateHWSem_Module_hasMask</span>();
267 </div>
268 <div class='xdocSynSum'><tt></tt><tt></tt>// Test whether this module has a diagnostics mask</div>
269 <div class="xdocSynSpacer"> </div>
270 <div class="xdocSynCode">
271 <tt></tt><tt></tt><span class="xdoc-kw2">Bits16</span> <span class="xdoc-id">GateHWSem_Module_getMask</span>();
272 </div>
273 <div class='xdocSynSum'><tt></tt><tt></tt>// Returns the diagnostics mask for this module</div>
274 <div class="xdocSynSpacer"> </div>
275 <div class="xdocSynCode">
276 <tt></tt><tt></tt><span class="xdoc-kw2">Void</span> <span class="xdoc-id">GateHWSem_Module_setMask</span>(<span class="xdoc-kw2">Bits16</span> <span class="xdoc-id">mask</span>);
277 </div>
278 <div class='xdocSynSum'><tt></tt><tt></tt>// Set the diagnostics mask for this module</div>
279 </div>
280 <a class="xdocAnchor" id="per-instance_object_types"></a>
281 <table class="xdocHdr"><tr>
282 <td class="xdocHdrTitle"><span class="xdocSynSum">Instance Object Types</span></td>
283 <td class="xdocHdrArrow">
284 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
285 </table>
286 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types">index URL</a></div>
287 <p class="xdocHdrSummary"></p>
288 <span id='targ-synop'></span>
289 <table class="xdocLabel"><tr>
290 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
291 <td class="xdocLabelRight">target-domain</td>
292 </tr></table>
293 <div class="xdocSynTdcl">
294 <div class="xdocSynCode">
295 <tt></tt><tt></tt><span class="xdoc-kw1">typedef</span> <span class="xdoc-kw1">struct</span> <span class="xdoc-id">GateHWSem_Object</span> <span class="xdoc-id">GateHWSem_Object</span>;
296 </div>
297 <div class='xdocSynSum'><tt></tt><tt></tt>// Opaque internal representation of an instance object</div>
298 <div class="xdocSynSpacer"> </div>
299 <div class="xdocSynCode">
300 <tt></tt><tt></tt><span class="xdoc-kw1">typedef</span> <a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Object">GateHWSem_Object</a> *<span class="xdoc-id">GateHWSem_Handle</span>;
301 </div>
302 <div class='xdocSynSum'><tt></tt><tt></tt>// Client reference to an instance object</div>
303 <div class="xdocSynSpacer"> </div>
304 <div class="xdocSynCode">
305 <tt></tt><tt></tt><span class="xdoc-kw1">typedef</span> <span class="xdoc-kw1">struct</span> <span class="xdoc-id">GateHWSem_Struct</span> <span class="xdoc-id">GateHWSem_Struct</span>;
306 </div>
307 <div class='xdocSynSum'><tt></tt><tt></tt>// Opaque client structure large enough to hold an instance object</div>
308 <div class="xdocSynSpacer"> </div>
309 <div class="xdocSynCode">
310 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> <span class="xdoc-id">GateHWSem_handle</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Struct">GateHWSem_Struct</a> *structP);
311 </div>
312 <div class='xdocSynSum'><tt></tt><tt></tt>// Convert this instance structure pointer into an instance handle</div>
313 <div class="xdocSynSpacer"> </div>
314 <div class="xdocSynCode">
315 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Struct">GateHWSem_Struct</a> *<span class="xdoc-id">GateHWSem_struct</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> handle);
316 </div>
317 <div class='xdocSynSum'><tt></tt><tt></tt>// Convert this instance handle into an instance structure pointer</div>
318 </div>
319 <a class="xdocAnchor" id="per-instance_config_parameters"></a>
320 <table class="xdocHdr"><tr>
321 <td class="xdocHdrTitle"><span class="xdocSynSum">Instance Config Parameters</span></td>
322 <td class="xdocHdrArrow">
323 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
324 </table>
325 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters">index URL</a></div>
326 <p class="xdocHdrSummary"></p>
327 <span id='targ-synop'></span>
328 <table class="xdocLabel"><tr>
329 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
330 <td class="xdocLabelRight">target-domain</td>
331 </tr></table>
332 <div class="xdocSynTdcl">
333 <div class="xdocSynCode">
334 <tt></tt><tt></tt><span class="xdoc-kw1">typedef</span> <span class="xdoc-kw1">struct</span> <span class="xdoc-id">GateHWSem_Params</span> {
335 </div>
336 <div class='xdocSynSum'><tt></tt><tt></tt>// Instance config-params structure</div>
337 <div class="xdocSynCode">
338 <tt></tt><tt> </tt><a class="xdoc-link" href="../../../../xdc/runtime/IInstance.html#per-instance_config_parameters" title="xdc.runtime.IInstance.Params">IInstance_Params</a> *instance;
339 </div>
340 <div class='xdocSynSum'><tt></tt><tt> </tt>// Common per-instance configs</div>
341 <div class="xdocSynCode">
342 <tt></tt><tt> </tt><span class="xdoc-kw2">UInt</span> <span class="xdoc-id">resourceId</span>;
343 </div>
344 <div class='xdocSynSum'><tt></tt><tt> </tt>// Logical resource id</div>
345 <div class="xdocSynCode">
346 <tt></tt><tt> </tt><span class="xdoc-kw2">Ptr</span> <span class="xdoc-id">sharedAddr</span>;
347 </div>
348 <div class='xdocSynSum'><tt></tt><tt> </tt>// Physical address of the shared memory</div>
349 <div class="xdocSynCode">
350 <tt></tt><tt></tt>} <span class="xdoc-id">GateHWSem_Params</span>;
351 </div>
352 <div class="xdocSynSpacer"> </div>
353 <div class="xdocSynCode">
354 <tt></tt><tt></tt><span class="xdoc-kw2">Void</span> <span class="xdoc-id">GateHWSem_Params_init</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters" title="ti.sdo.ipc.gates.GateHWSem.Params">GateHWSem_Params</a> *params);
355 </div>
356 <div class='xdocSynSum'><tt></tt><tt></tt>// Initialize this config-params structure with supplier-specified defaults before instance creation</div>
357 </div>
358 <div class="xdocSynSpacer"> </div>
359 <a class="xdocAnchor" id="resource.Id"></a>
360 <table class="xdocHdr"><tr>
361 <td class="xdocHdrTitle"><span class="xdoc-kw1">config</span> <span class="xdoc-id">GateHWSem_Params.</span><span class="xdoc-id">resourceId</span> <small><span class="xdocSynSum">// instance</span></small></td>
362 <td class="xdocHdrArrow">
363 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
364 </table>
365 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#resource.Id">index URL</a></div>
366 <p class="xdocHdrSummaryDcl">Logical resource id</p>
367 <span id='targ-synop'></span>
368 <table class="xdocLabel"><tr>
369 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
370 <td class="xdocLabelRight">target-domain</td>
371 </tr></table>
372 <div class="xdocSynTdcl">
373 <div class="xdocSynCode">
374 <tt></tt><tt></tt><span class="xdoc-kw1">struct</span> <a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters" title="ti.sdo.ipc.gates.GateHWSem.Params">GateHWSem_Params</a> {
375 </div>
376 <div class="xdocSynCode">
377 <tt></tt><tt> </tt><b> ...</b>
378 </div>
379 <div class="xdocSynCode">
380 <tt></tt><tt> </tt><span class="xdoc-kw2">UInt</span> <span class="xdoc-id">resourceId</span>;
381 </div>
382 </div>
383 <div class="xdocSynSpacer"> </div>
384 <div class="xdocSynSpacer"> </div>
385 <a class="xdocAnchor" id="shared.Addr"></a>
386 <table class="xdocHdr"><tr>
387 <td class="xdocHdrTitle"><span class="xdoc-kw1">config</span> <span class="xdoc-id">GateHWSem_Params.</span><span class="xdoc-id">sharedAddr</span> <small><span class="xdocSynSum">// instance</span></small></td>
388 <td class="xdocHdrArrow">
389 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
390 </table>
391 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#shared.Addr">index URL</a></div>
392 <p class="xdocHdrSummaryDcl">Physical address of the shared memory</p>
393 <span id='targ-synop'></span>
394 <table class="xdocLabel"><tr>
395 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
396 <td class="xdocLabelRight">target-domain</td>
397 </tr></table>
398 <div class="xdocSynTdcl">
399 <div class="xdocSynCode">
400 <tt></tt><tt></tt><span class="xdoc-kw1">struct</span> <a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters" title="ti.sdo.ipc.gates.GateHWSem.Params">GateHWSem_Params</a> {
401 </div>
402 <div class="xdocSynCode">
403 <tt></tt><tt> </tt><b> ...</b>
404 </div>
405 <div class="xdocSynCode">
406 <tt></tt><tt> </tt><span class="xdoc-kw2">Ptr</span> <span class="xdoc-id">sharedAddr</span>;
407 </div>
408 </div>
409 <div class="xdocSynSpacer"> </div>
410 <span id="xdoc-sect-1"></span>
411 <div class="xdocSect">DETAILS</div>
412 <div class="xdocText">This parameter is only used by GateMP delegates that use shared memory</div>
413 <a class="xdocAnchor" id="per-instance_creation"></a>
414 <table class="xdocHdr"><tr>
415 <td class="xdocHdrTitle"><span class="xdocSynSum">Runtime Instance Creation</span></td>
416 <td class="xdocHdrArrow">
417 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
418 </table>
419 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#per-instance_creation">index URL</a></div>
420 <p class="xdocHdrSummary"></p>
421 <span id='targ-synop'></span>
422 <table class="xdocLabel"><tr>
423 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
424 <td class="xdocLabelRight">target-domain</td>
425 </tr></table>
426 <div class="xdocSynTdcl">
427 <div class="xdocSynCode">
428 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> <span class="xdoc-id">GateHWSem_create</span>(<a class="xdoc-link" href="../../../../xdc/runtime/IGateProvider.html#per-instance_object_types" title="xdc.runtime.IGateProvider.Handle">IGateProvider_Handle</a> <span class="xdoc-id">localGate</span>, <span class="xdoc-kw1">const</span> <a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters" title="ti.sdo.ipc.gates.GateHWSem.Params">GateHWSem_Params</a> *params, <a class="xdoc-link" href="../../../../xdc/runtime/Error.html#.Block" title="xdc.runtime.Error.Block">Error_Block</a> *eb);
429 </div>
430 <div class='xdocSynSum'><tt></tt><tt></tt>// Allocate and initialize a new instance object and return its handle</div>
431 <div class="xdocSynSpacer"> </div>
432 <div class="xdocSynCode">
433 <tt></tt><tt></tt><span class="xdoc-kw2">Void</span> <span class="xdoc-id">GateHWSem_construct</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Struct">GateHWSem_Struct</a> *structP, <a class="xdoc-link" href="../../../../xdc/runtime/IGateProvider.html#per-instance_object_types" title="xdc.runtime.IGateProvider.Handle">IGateProvider_Handle</a> <span class="xdoc-id">localGate</span>, <span class="xdoc-kw1">const</span> <a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters" title="ti.sdo.ipc.gates.GateHWSem.Params">GateHWSem_Params</a> *params);
434 </div>
435 <div class='xdocSynSum'><tt></tt><tt></tt>// Initialize a new instance object inside the provided structure</div>
436 </div>
437 <span id="xdoc-sect-1"></span>
438 <div class="xdocSect">ARGUMENTS</div>
439 <div class="xdocChild"><span class="xdocChildId">localGate</span>
440 <span class="xdocChildSum">— Gate to use for local protection.</span>
441 </div>
442 <div class="xdocChild"><span class="xdocChildId">params</span>
443 <span class="xdocChildSum">— per-instance config params, or <tt>NULL</tt> to select default values (target-domain only)</span>
444 </div>
445 <div class="xdocChild"><span class="xdocChildId">eb</span>
446 <span class="xdocChildSum">— active error-handling block, or <tt>NULL</tt> to select default policy (target-domain only)</span>
447 </div>
448 <span id="xdoc-sect-2"></span>
449 <div class="xdocSect">DETAILS</div>
450 <div class="xdocText">A Non-NULL gate for local protection must be passed to the create
451 call. If no local protection is desired, a
452 <a class="xdoc-link" href="../../../../xdc/runtime/GateNull.html" title="xdc.runtime.GateNull">xdc.runtime.GateNull</a> handle must be passed in.</div>
453 <a class="xdocAnchor" id="per-instance_deletion"></a>
454 <table class="xdocHdr"><tr>
455 <td class="xdocHdrTitle"><span class="xdocSynSum">Instance Deletion</span></td>
456 <td class="xdocHdrArrow">
457 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
458 </table>
459 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#per-instance_deletion">index URL</a></div>
460 <p class="xdocHdrSummary"></p>
461 <span id='targ-synop'></span>
462 <table class="xdocLabel"><tr>
463 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
464 <td class="xdocLabelRight">target-domain</td>
465 </tr></table>
466 <div class="xdocSynTdcl">
467 <div class="xdocSynCode">
468 <tt></tt><tt></tt><span class="xdoc-kw2">Void</span> <span class="xdoc-id">GateHWSem_delete</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> *handleP);
469 </div>
470 <div class='xdocSynSum'><tt></tt><tt></tt>// Finalize and free this previously allocated instance object, setting the referenced handle to NULL</div>
471 <div class="xdocSynSpacer"> </div>
472 <div class="xdocSynCode">
473 <tt></tt><tt></tt><span class="xdoc-kw2">Void</span> <span class="xdoc-id">GateHWSem_destruct</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Struct">GateHWSem_Struct</a> *structP);
474 </div>
475 <div class='xdocSynSum'><tt></tt><tt></tt>// Finalize the instance object inside the provided structure</div>
476 </div>
477 <a class="xdocAnchor" id="per-instance_convertors"></a>
478 <table class="xdocHdr"><tr>
479 <td class="xdocHdrTitle"><span class="xdocSynSum">Instance Convertors</span></td>
480 <td class="xdocHdrArrow">
481 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
482 </table>
483 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#per-instance_convertors">index URL</a></div>
484 <p class="xdocHdrSummary"></p>
485 <span id='targ-synop'></span>
486 <table class="xdocLabel"><tr>
487 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
488 <td class="xdocLabelRight">target-domain</td>
489 </tr></table>
490 <div class="xdocSynTdcl">
491 <div class="xdocSynCode">
492 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/interfaces/IGateMPSupport.html#per-instance_object_types" title="ti.sdo.ipc.interfaces.IGateMPSupport.Handle">IGateMPSupport_Handle</a> <span class="xdoc-id">GateHWSem_Handle_upCast</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> handle);
493 </div>
494 <div class='xdocSynSum'><tt></tt><tt></tt>// unconditionally move one level up the inheritance hierarchy</div>
495 <div class="xdocSynSpacer"> </div>
496 <div class="xdocSynCode">
497 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> <span class="xdoc-id">GateHWSem_Handle_downCast</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/interfaces/IGateMPSupport.html#per-instance_object_types" title="ti.sdo.ipc.interfaces.IGateMPSupport.Handle">IGateMPSupport_Handle</a> handle);
498 </div>
499 <div class='xdocSynSum'><tt></tt><tt></tt>// conditionally move one level down the inheritance hierarchy; NULL upon failure</div>
500 <div class="xdocSynSpacer"> </div>
501 <div class="xdocSynCode">
502 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../xdc/runtime/IGateProvider.html#per-instance_object_types" title="xdc.runtime.IGateProvider.Handle">IGateProvider_Handle</a> <span class="xdoc-id">GateHWSem_Handle_upCast2</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> handle);
503 </div>
504 <div class='xdocSynSum'><tt></tt><tt></tt>// unconditionally move 2 levels up the inheritance hierarchy</div>
505 <div class="xdocSynSpacer"> </div>
506 <div class="xdocSynCode">
507 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> <span class="xdoc-id">GateHWSem_Handle_downCast2</span>(<a class="xdoc-link" href="../../../../xdc/runtime/IGateProvider.html#per-instance_object_types" title="xdc.runtime.IGateProvider.Handle">IGateProvider_Handle</a> handle);
508 </div>
509 <div class='xdocSynSum'><tt></tt><tt></tt>// conditionally move 2 levels down the inheritance hierarchy; NULL upon failure</div>
510 </div>
511 <a class="xdocAnchor" id="per-instance_built-ins"></a>
512 <table class="xdocHdr"><tr>
513 <td class="xdocHdrTitle"><span class="xdocSynSum">Instance Built-Ins</span></td>
514 <td class="xdocHdrArrow">
515 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
516 </table>
517 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#per-instance_built-ins">index URL</a></div>
518 <p class="xdocHdrSummary"></p>
519 <span id='targ-synop'></span>
520 <table class="xdocLabel"><tr>
521 <td class="xdocLabelLeft"><tt><span class="xdoc-id-targ2dcl">C</span></tt> synopsis</td>
522 <td class="xdocLabelRight">target-domain</td>
523 </tr></table>
524 <div class="xdocSynTdcl">
525 <div class="xdocSynCode">
526 <tt></tt><tt></tt><span class="xdoc-kw2">Int</span> <span class="xdoc-id">GateHWSem_Object_count</span>();
527 </div>
528 <div class='xdocSynSum'><tt></tt><tt></tt>// The number of statically-created instance objects</div>
529 <div class="xdocSynSpacer"> </div>
530 <div class="xdocSynCode">
531 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> <span class="xdoc-id">GateHWSem_Object_get</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Object">GateHWSem_Object</a> *array, <span class="xdoc-kw2">Int</span> i);
532 </div>
533 <div class='xdocSynSum'><tt></tt><tt></tt>// The handle of the i-th statically-created instance object (array == NULL)</div>
534 <div class="xdocSynSpacer"> </div>
535 <div class="xdocSynCode">
536 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> <span class="xdoc-id">GateHWSem_Object_first</span>();
537 </div>
538 <div class='xdocSynSum'><tt></tt><tt></tt>// The handle of the first dynamically-created instance object, or NULL</div>
539 <div class="xdocSynSpacer"> </div>
540 <div class="xdocSynCode">
541 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> <span class="xdoc-id">GateHWSem_Object_next</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> handle);
542 </div>
543 <div class='xdocSynSum'><tt></tt><tt></tt>// The handle of the next dynamically-created instance object, or NULL</div>
544 <div class="xdocSynSpacer"> </div>
545 <div class="xdocSynCode">
546 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../xdc/runtime/IHeap.html#per-instance_object_types" title="xdc.runtime.IHeap.Handle">IHeap_Handle</a> <span class="xdoc-id">GateHWSem_Object_heap</span>();
547 </div>
548 <div class='xdocSynSum'><tt></tt><tt></tt>// The heap used to allocate dynamically-created instance objects</div>
549 <div class="xdocSynSpacer"> </div>
550 <div class="xdocSynCode">
551 <tt></tt><tt></tt><a class="xdoc-link" href="../../../../xdc/runtime/Types.html#.Label" title="xdc.runtime.Types.Label">Types_Label</a> *<span class="xdoc-id">GateHWSem_Handle_label</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> handle, <a class="xdoc-link" href="../../../../xdc/runtime/Types.html#.Label" title="xdc.runtime.Types.Label">Types_Label</a> *buf);
552 </div>
553 <div class='xdocSynSum'><tt></tt><tt></tt>// The label associated with this instance object</div>
554 <div class="xdocSynSpacer"> </div>
555 <div class="xdocSynCode">
556 <tt></tt><tt></tt><span class="xdoc-kw2">String</span> <span class="xdoc-id">GateHWSem_Handle_name</span>(<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#per-instance_object_types" title="ti.sdo.ipc.gates.GateHWSem.Handle">GateHWSem_Handle</a> handle);
557 </div>
558 <div class='xdocSynSum'><tt></tt><tt></tt>// The name of this instance object</div>
559 </div>
560 </div>
561 <div class="xdocSynSpacer"> </div>
562 <span id='meta-synop'></span>
563 <table class="xdocLabel"><tr>
564 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2"></span></tt>Configuration settings</td>
565 <td class="xdocLabelRight">sourced in <a class="xdocLink" href="../../../../ti/sdo/ipc/gates/GateHWSem-src.html"><span class="xdocLabelFile">ti/sdo/ipc/gates/GateHWSem.xdc</span></a></td>
566 </tr></table>
567 <div class="xdocSynM">
568 <div class="xdocSynCode">
569 <tt></tt><span class="xdoc-kw1">var</span> GateHWSem = <span class="xdoc-kw3">xdc.useModule</span>(<span class="xdoc-id">'ti.sdo.ipc.gates.GateHWSem'</span>);
570 </div>
571 <div class='xdocSynHdr'>module-wide constants & types</div>
573 <div class="xdocSynCode">
574 <tt> </tt><tt></tt><span class="xdoc-kw1">const</span> <a class="xdocSynGo" href="#meta.Q_.B.L.O.C.K.I.N.G">GateHWSem.<span class="xdoc-id">Q_BLOCKING</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Blocking quality</span></span></a> = 1;
575 </div>
576 <div class="xdocSynCode">
577 <tt> </tt><tt></tt><span class="xdoc-kw1">const</span> <a class="xdocSynGo" href="#meta.Q_.P.R.E.E.M.P.T.I.N.G">GateHWSem.<span class="xdoc-id">Q_PREEMPTING</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Preempting quality</span></span></a> = 2;
578 </div>
579 <div class='xdocSynHdr'>module-wide config parameters</div>
581 <div class="xdocSynCode">
582 <tt> </tt><tt></tt><a class="xdocSynGo" href="#meta.A_inv.Sem.Num">GateHWSem.<span class="xdoc-id">A_invSemNum</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Asserted when supplied semNum is invalid for the relevant device</span></span></a> = <i><a class="xdoc-link" href="../../../../xdc/runtime/Assert.html#.Desc" title="xdc.runtime.Assert.Desc">Assert.Desc</a></i> {
583 </div>
584 <div class="xdocSynCode">
585 <tt> </tt><tt> </tt>msg: "A_invSemNum: Invalid hardware semaphore number"
586 </div>
587 <div class="xdocSynCode">
588 <tt> </tt><tt></tt>};
589 </div>
590 <div class="xdocSynSpacer"> </div>
591 <div class="xdocSynCode">
592 <tt> </tt><tt></tt><a class="xdocSynGo" href="#common$">GateHWSem.<span class="xdoc-id">common$</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Common module configuration parameters</span></span></a> = <i><a class="xdoc-link" href="../../../../xdc/runtime/Types.html#.Common$" title="xdc.runtime.Types.Common$">Types.Common$</a></i> <span class="xdoc-kw2">undefined</span>;
593 </div>
594 <div class='xdocSynHdr'>module-wide functions</div>
596 <div class="xdocSynCode">
597 <tt> </tt><tt></tt><a class="xdocSynGo" href="#get.Num.Resources">GateHWSem.<span class="xdoc-id">getNumResources</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Returns the number of resources offered by the GateMP delegate</span></span></a>() <i>returns</i> <i><span class="xdoc-kw2">UInt</span></i>
598 </div>
599 <div class="xdocSynCode">
600 <tt> </tt><tt></tt><a class="xdocSynGo" href="#query.Meta">GateHWSem.<span class="xdoc-id">queryMeta</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Configuration time test for a particular gate quality</span></span></a>(<i><span class="xdoc-kw2">Int</span></i> <span class="xdoc-id">qual</span>) <i>returns</i> <i><span class="xdoc-kw2">Bool</span></i>
601 </div>
602 <div class="xdocSynCode">
603 <tt> </tt><tt></tt><a class="xdocSynGo" href="#set.Reserved">GateHWSem.<span class="xdoc-id">setReserved</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Reserve a HW sempahore for use outside of IPC</span></span></a>(<i><span class="xdoc-kw2">UInt</span></i> <span class="xdoc-id">semNum</span>) <i>returns</i> <i><span class="xdoc-kw2">Void</span></i>
604 </div>
605 <div class='xdocSynHdr'>per-instance config parameters</div>
607 <div class="xdocSynCode">
608 <tt> </tt><tt></tt><span class="xdoc-kw1">var</span> params = <span class="xdoc-kw1">new</span> GateHWSem.<a class="xdocSynGo" href="#metaper-instance_config_parameters"><span class="xdoc-id">Params</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Instance config-params object</span></span></a>;
609 </div>
610 <div class="xdocSynCode">
611 <tt> </tt><tt> </tt>params.<a class="xdocSynGo" href="#metaresource.Id"><span class="xdoc-id">resourceId</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Logical resource id</span></span></a> = <i><span class="xdoc-kw2">UInt</span></i> 0;
612 </div>
613 <div class="xdocSynCode">
614 <tt> </tt><tt> </tt>params.<a class="xdocSynGo" href="#metashared.Addr"><span class="xdoc-id">sharedAddr</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Physical address of the shared memory</span></span></a> = <i><span class="xdoc-kw2">Ptr</span></i> <span class="xdoc-kw2">null</span>;
615 </div>
616 <div class='xdocSynHdr'>per-instance creation</div>
618 <div class="xdocSynCode">
619 <tt> </tt><tt></tt><span class="xdoc-kw1">var</span> inst = GateHWSem.<a class="xdocSynGo" href="#metaper-instance_creation"><span class="xdoc-id">create</span><span class="xdocSynHoverShadow"><span class="xdocSynHover">// Create an instance-object</span></span></a>(<i><a class="xdoc-link" href="../../../../xdc/runtime/IGateProvider.html#per-instance_object_types" title="xdc.runtime.IGateProvider.Handle">IGateProvider.Handle</a></i> <span class="xdoc-id">localGate</span>, params);
620 </div>
621 <div class="xdocSynSpacer"> </div>
622 </div>
623 <div id="xdocSep">
624 </div>
625 <div id="xdocMetaElems">
626 <div class="xdocSynSpacer"> </div>
627 <a class="xdocAnchor" id="meta.Q_.B.L.O.C.K.I.N.G"></a>
628 <table class="xdocHdr"><tr>
629 <td class="xdocHdrTitle"><span class="xdoc-kw1">const</span> <span class="xdoc-id">GateHWSem.</span><span class="xdoc-id">Q_BLOCKING</span></td>
630 <td class="xdocHdrArrow">
631 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
632 </table>
633 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#.Q_.B.L.O.C.K.I.N.G">index URL</a></div>
634 <p class="xdocHdrSummaryDcl">Blocking quality</p>
635 <span id='meta-synop'></span>
636 <table class="xdocLabel"><tr>
637 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
638 <td class="xdocLabelRight"></td>
639 </tr></table>
640 <div class="xdocSynMdcl">
641 <div class="xdocSynCode">
642 <tt></tt><tt></tt><span class="xdoc-kw1">const</span> GateHWSem.<span class="xdoc-id">Q_BLOCKING</span> = 1;
643 </div>
644 </div>
645 <div class="xdocSynSpacer"> </div>
646 <span id="xdoc-sect-1"></span>
647 <div class="xdocSect">DETAILS</div>
648 <div class="xdocText">Gates with this "quality" may cause the calling thread to block;
649 i.e., suspend execution until another thread leaves the gate.</div>
650 <div class="xdocSect">C SYNOPSIS</div>
651 <div class="xdocText"><a class="xdoc-link" href="#.Q_.B.L.O.C.K.I.N.G" title="GateHWSem_Q_BLOCKING">GateHWSem_Q_BLOCKING</a></div>
652 <div class="xdocSynSpacer"> </div>
653 <a class="xdocAnchor" id="meta.Q_.P.R.E.E.M.P.T.I.N.G"></a>
654 <table class="xdocHdr"><tr>
655 <td class="xdocHdrTitle"><span class="xdoc-kw1">const</span> <span class="xdoc-id">GateHWSem.</span><span class="xdoc-id">Q_PREEMPTING</span></td>
656 <td class="xdocHdrArrow">
657 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
658 </table>
659 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#.Q_.P.R.E.E.M.P.T.I.N.G">index URL</a></div>
660 <p class="xdocHdrSummaryDcl">Preempting quality</p>
661 <span id='meta-synop'></span>
662 <table class="xdocLabel"><tr>
663 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
664 <td class="xdocLabelRight"></td>
665 </tr></table>
666 <div class="xdocSynMdcl">
667 <div class="xdocSynCode">
668 <tt></tt><tt></tt><span class="xdoc-kw1">const</span> GateHWSem.<span class="xdoc-id">Q_PREEMPTING</span> = 2;
669 </div>
670 </div>
671 <div class="xdocSynSpacer"> </div>
672 <span id="xdoc-sect-1"></span>
673 <div class="xdocSect">DETAILS</div>
674 <div class="xdocText">Gates with this "quality" allow other threads to preempt the thread
675 that has already entered the gate.</div>
676 <div class="xdocSect">C SYNOPSIS</div>
677 <div class="xdocText"><a class="xdoc-link" href="#.Q_.P.R.E.E.M.P.T.I.N.G" title="GateHWSem_Q_PREEMPTING">GateHWSem_Q_PREEMPTING</a></div>
678 <div class="xdocSynSpacer"> </div>
679 <a class="xdocAnchor" id="meta.A_inv.Sem.Num"></a>
680 <table class="xdocHdr"><tr>
681 <td class="xdocHdrTitle"><span class="xdoc-kw1">config</span> <span class="xdoc-id">GateHWSem.</span><span class="xdoc-id">A_invSemNum</span> <small><span class="xdocSynSum">// module-wide</span></small></td>
682 <td class="xdocHdrArrow">
683 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
684 </table>
685 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#.A_inv.Sem.Num">index URL</a></div>
686 <p class="xdocHdrSummaryDcl">Asserted when supplied semNum is invalid for the relevant device</p>
687 <span id='meta-synop'></span>
688 <table class="xdocLabel"><tr>
689 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
690 <td class="xdocLabelRight"></td>
691 </tr></table>
692 <div class="xdocSynMdcl">
693 <div class="xdocSynCode">
694 <tt></tt><tt></tt>GateHWSem.<span class="xdoc-id">A_invSemNum</span> = <i><a class="xdoc-link" href="../../../../xdc/runtime/Assert.html#.Desc" title="xdc.runtime.Assert.Desc">Assert.Desc</a></i> {
695 </div>
696 <div class="xdocSynCode">
697 <tt></tt><tt> </tt>msg: "A_invSemNum: Invalid hardware semaphore number"
698 </div>
699 <div class="xdocSynCode">
700 <tt></tt><tt></tt>};
701 </div>
702 </div>
703 <div class="xdocSynSpacer"> </div>
704 <div class="xdocSect">C SYNOPSIS</div>
705 <div class="xdocText"><a class="xdoc-link" href="#.A_inv.Sem.Num" title="GateHWSem_A_invSemNum">GateHWSem_A_invSemNum</a></div>
706 <div class="xdocSynSpacer"> </div>
707 <a class="xdocAnchor" id="common$"></a>
708 <table class="xdocHdr"><tr>
709 <td class="xdocHdrTitle"><span class="xdoc-kw1">metaonly </span><span class="xdoc-kw1">config</span> <span class="xdoc-id">GateHWSem.</span><span class="xdoc-id">common$</span> <small><span class="xdocSynSum">// module-wide</span></small></td>
710 <td class="xdocHdrArrow">
711 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
712 </table>
713 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#common$">index URL</a></div>
714 <p class="xdocHdrSummaryDcl">Common module configuration parameters</p>
715 <span id='meta-synop'></span>
716 <table class="xdocLabel"><tr>
717 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
718 <td class="xdocLabelRight"></td>
719 </tr></table>
720 <div class="xdocSynMdcl">
721 <div class="xdocSynCode">
722 <tt></tt><tt></tt>GateHWSem.<span class="xdoc-id">common$</span> = <i><a class="xdoc-link" href="../../../../xdc/runtime/Types.html#.Common$" title="xdc.runtime.Types.Common$">Types.Common$</a></i> <span class="xdoc-kw2">undefined</span>;
723 </div>
724 </div>
725 <div class="xdocSynSpacer"> </div>
726 <span id="xdoc-sect-1"></span>
727 <div class="xdocSect">DETAILS</div>
728 <div class="xdocText">All modules have this configuration parameter. Its name
729 contains the '$' character to ensure it does not conflict with
730 configuration parameters declared by the module. This allows
731 new configuration parameters to be added in the future without
732 any chance of breaking existing modules.</div>
733 <div class="xdocSynSpacer"> </div>
734 <a class="xdocAnchor" id="get.Num.Resources"></a>
735 <table class="xdocHdr"><tr>
736 <td class="xdocHdrTitle"><span class="xdoc-kw1">metaonly </span><span class="xdoc-id">GateHWSem.</span><span class="xdoc-id">getNumResources</span>() <small><span class="xdocSynSum">// module-wide</span></small></td>
737 <td class="xdocHdrArrow">
738 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
739 </table>
740 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#get.Num.Resources">index URL</a></div>
741 <p class="xdocHdrSummaryDcl">Returns the number of resources offered by the GateMP delegate</p>
742 <span id='meta-synop'></span>
743 <table class="xdocLabel"><tr>
744 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
745 <td class="xdocLabelRight"></td>
746 </tr></table>
747 <div class="xdocSynMdcl">
748 <div class="xdocSynCode">
749 <tt></tt><tt></tt>GateHWSem.<span class="xdoc-id">getNumResources</span>() <i>returns</i> <i><span class="xdoc-kw2">UInt</span></i>
750 </div>
751 </div>
752 <div class="xdocSynSpacer"> </div>
753 <div class="xdocSynSpacer"> </div>
754 <a class="xdocAnchor" id="query.Meta"></a>
755 <table class="xdocHdr"><tr>
756 <td class="xdocHdrTitle"><span class="xdoc-kw1">metaonly </span><span class="xdoc-id">GateHWSem.</span><span class="xdoc-id">queryMeta</span>() <small><span class="xdocSynSum">// module-wide</span></small></td>
757 <td class="xdocHdrArrow">
758 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
759 </table>
760 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#query.Meta">index URL</a></div>
761 <p class="xdocHdrSummaryDcl">Configuration time test for a particular gate quality</p>
762 <span id='meta-synop'></span>
763 <table class="xdocLabel"><tr>
764 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
765 <td class="xdocLabelRight"></td>
766 </tr></table>
767 <div class="xdocSynMdcl">
768 <div class="xdocSynCode">
769 <tt></tt><tt></tt>GateHWSem.<span class="xdoc-id">queryMeta</span>(<i><span class="xdoc-kw2">Int</span></i> <span class="xdoc-id">qual</span>) <i>returns</i> <i><span class="xdoc-kw2">Bool</span></i>
770 </div>
771 </div>
772 <div class="xdocSynSpacer"> </div>
773 <span id="xdoc-sect-1"></span>
774 <div class="xdocSect">ARGUMENTS</div>
775 <div class="xdocChild"><span class="xdocChildId">qual</span>
776 <span class="xdocChildSum">— constant describing a quality</span>
777 </div>
778 <span id="xdoc-sect-2"></span>
779 <div class="xdocSect">RETURNS</div>
780 <div class="xdocText">Returns <tt>TRUE</tt> if the gate has the given quality,
781 and <tt>FALSE</tt> otherwise, which includes the case when the gate does not
782 recognize the constant describing the quality.</div>
783 <div class="xdocSynSpacer"> </div>
784 <a class="xdocAnchor" id="set.Reserved"></a>
785 <table class="xdocHdr"><tr>
786 <td class="xdocHdrTitle"><span class="xdoc-kw1">metaonly </span><span class="xdoc-id">GateHWSem.</span><span class="xdoc-id">setReserved</span>() <small><span class="xdocSynSum">// module-wide</span></small></td>
787 <td class="xdocHdrArrow">
788 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
789 </table>
790 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#set.Reserved">index URL</a></div>
791 <p class="xdocHdrSummaryDcl">Reserve a HW sempahore for use outside of IPC</p>
792 <span id='meta-synop'></span>
793 <table class="xdocLabel"><tr>
794 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
795 <td class="xdocLabelRight"></td>
796 </tr></table>
797 <div class="xdocSynMdcl">
798 <div class="xdocSynCode">
799 <tt></tt><tt></tt>GateHWSem.<span class="xdoc-id">setReserved</span>(<i><span class="xdoc-kw2">UInt</span></i> <span class="xdoc-id">semNum</span>) <i>returns</i> <i><span class="xdoc-kw2">Void</span></i>
800 </div>
801 </div>
802 <div class="xdocSynSpacer"> </div>
803 <span id="xdoc-sect-1"></span>
804 <div class="xdocSect">ARGUMENTS</div>
805 <div class="xdocChild"><span class="xdocChildId">semNum</span>
806 <span class="xdocChildSum">— HW semaphore number to reserve</span>
807 </div>
808 <span id="xdoc-sect-2"></span>
809 <div class="xdocSect">DETAILS</div>
810 <div class="xdocText">GateMP will, by default, manage all HW semaphores on the device unless
811 this API is used to set aside specific HW semaphores for use outside
812 of IPC.</div>
813 <a class="xdocAnchor" id="metaper-instance_config_parameters"></a>
814 <table class="xdocHdr"><tr>
815 <td class="xdocHdrTitle"><span class="xdocSynSum">Instance Config Parameters</span></td>
816 <td class="xdocHdrArrow">
817 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
818 </table>
819 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#per-instance_config_parameters">index URL</a></div>
820 <p class="xdocHdrSummary"></p>
821 <span id='meta-synop'></span>
822 <table class="xdocLabel"><tr>
823 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
824 <td class="xdocLabelRight"></td>
825 </tr></table>
826 <div class="xdocSynMdcl">
827 <div class="xdocSynCode">
828 <tt></tt><tt></tt><span class="xdoc-kw1">var</span> params = <span class="xdoc-kw1">new</span> GateHWSem.<span class="xdoc-id">Params</span>;
829 </div>
830 <div class='xdocSynSum'><tt></tt><tt></tt>// Instance config-params object</div>
831 <div class="xdocSynCode">
832 <tt></tt><tt> </tt>params.<span class="xdoc-id">resourceId</span> = <i><span class="xdoc-kw2">UInt</span></i> 0;
833 </div>
834 <div class='xdocSynSum'><tt></tt><tt> </tt>// Logical resource id</div>
835 <div class="xdocSynCode">
836 <tt></tt><tt> </tt>params.<span class="xdoc-id">sharedAddr</span> = <i><span class="xdoc-kw2">Ptr</span></i> <span class="xdoc-kw2">null</span>;
837 </div>
838 <div class='xdocSynSum'><tt></tt><tt> </tt>// Physical address of the shared memory</div>
839 </div>
840 <div class="xdocSynSpacer"> </div>
841 <a class="xdocAnchor" id="metaresource.Id"></a>
842 <table class="xdocHdr"><tr>
843 <td class="xdocHdrTitle"><span class="xdoc-kw1">config</span> <span class="xdoc-id">GateHWSem.Params.</span><span class="xdoc-id">resourceId</span> <small><span class="xdocSynSum">// instance</span></small></td>
844 <td class="xdocHdrArrow">
845 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
846 </table>
847 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#resource.Id">index URL</a></div>
848 <p class="xdocHdrSummaryDcl">Logical resource id</p>
849 <span id='meta-synop'></span>
850 <table class="xdocLabel"><tr>
851 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
852 <td class="xdocLabelRight"></td>
853 </tr></table>
854 <div class="xdocSynMdcl">
855 <div class="xdocSynCode">
856 <tt></tt><tt></tt><span class="xdoc-kw1">var</span> params = <span class="xdoc-kw1">new</span> GateHWSem.<span class="xdoc-id">Params</span>;
857 </div>
858 <div class="xdocSynCode">
859 <tt></tt><tt></tt><b> ...</b>
860 </div>
861 <div class="xdocSynCode">
862 <tt></tt><tt></tt>params.<span class="xdoc-id">resourceId</span> = <i><span class="xdoc-kw2">UInt</span></i> 0;
863 </div>
864 </div>
865 <div class="xdocSynSpacer"> </div>
866 <div class="xdocSect">C SYNOPSIS</div>
867 <div class="xdocText"><a class="xdoc-link" href="#resource.Id" title="GateHWSem_Params.resourceId">GateHWSem_Params.resourceId</a></div>
868 <div class="xdocSynSpacer"> </div>
869 <a class="xdocAnchor" id="metashared.Addr"></a>
870 <table class="xdocHdr"><tr>
871 <td class="xdocHdrTitle"><span class="xdoc-kw1">config</span> <span class="xdoc-id">GateHWSem.Params.</span><span class="xdoc-id">sharedAddr</span> <small><span class="xdocSynSum">// instance</span></small></td>
872 <td class="xdocHdrArrow">
873 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
874 </table>
875 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#shared.Addr">index URL</a></div>
876 <p class="xdocHdrSummaryDcl">Physical address of the shared memory</p>
877 <span id='meta-synop'></span>
878 <table class="xdocLabel"><tr>
879 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
880 <td class="xdocLabelRight"></td>
881 </tr></table>
882 <div class="xdocSynMdcl">
883 <div class="xdocSynCode">
884 <tt></tt><tt></tt><span class="xdoc-kw1">var</span> params = <span class="xdoc-kw1">new</span> GateHWSem.<span class="xdoc-id">Params</span>;
885 </div>
886 <div class="xdocSynCode">
887 <tt></tt><tt></tt><b> ...</b>
888 </div>
889 <div class="xdocSynCode">
890 <tt></tt><tt></tt>params.<span class="xdoc-id">sharedAddr</span> = <i><span class="xdoc-kw2">Ptr</span></i> <span class="xdoc-kw2">null</span>;
891 </div>
892 </div>
893 <div class="xdocSynSpacer"> </div>
894 <span id="xdoc-sect-1"></span>
895 <div class="xdocSect">DETAILS</div>
896 <div class="xdocText">This parameter is only used by GateMP delegates that use shared memory</div>
897 <div class="xdocSect">C SYNOPSIS</div>
898 <div class="xdocText"><a class="xdoc-link" href="#shared.Addr" title="GateHWSem_Params.sharedAddr">GateHWSem_Params.sharedAddr</a></div>
899 <a class="xdocAnchor" id="metaper-instance_creation"></a>
900 <table class="xdocHdr"><tr>
901 <td class="xdocHdrTitle"><span class="xdocSynSum">Static Instance Creation</span></td>
902 <td class="xdocHdrArrow">
903 <a class="xdocHdrLink" href="../../../../ti/sdo/ipc/gates/GateHWSem.html" title="module GateHWSem"><img class="xdocHdrArrow" src="../../../../Arrow_up.png"/></a></td>
904 </table>
905 <div class=xdocHdrIndex><a class=xdocHdrIndex title="right-click to capture" href="../../../../index.html#ti/sdo/ipc/gates/GateHWSem.html#per-instance_creation">index URL</a></div>
906 <p class="xdocHdrSummary"></p>
907 <span id='meta-synop'></span>
908 <table class="xdocLabel"><tr>
909 <td class="xdocLabelLeft"><tt><span class="xdoc-id-meta2dcl"></span></tt>Configuration settings</td>
910 <td class="xdocLabelRight"></td>
911 </tr></table>
912 <div class="xdocSynMdcl">
913 <div class="xdocSynCode">
914 <tt></tt><tt></tt><span class="xdoc-kw1">var</span> params = <span class="xdoc-kw1">new</span> GateHWSem.<a class="xdoc-link" href="../../../../ti/sdo/ipc/gates/GateHWSem.html#metaper-instance_config_parameters" title="ti.sdo.ipc.gates.GateHWSem.Params">Params</a>;
915 </div>
916 <div class='xdocSynSum'><tt></tt><tt></tt>// Allocate instance config-params</div>
917 <div class="xdocSynCode">
918 <tt></tt><tt></tt>params.<i>config</i> = <b> ...</b>
919 </div>
920 <div class='xdocSynSum'><tt></tt><tt></tt>// Assign individual configs</div>
921 <div class="xdocSynSpacer"> </div>
922 <div class="xdocSynCode">
923 <tt></tt><tt></tt><span class="xdoc-kw1">var</span> inst = GateHWSem.<span class="xdoc-id">create</span>(<i><a class="xdoc-link" href="../../../../xdc/runtime/IGateProvider.html#per-instance_object_types" title="xdc.runtime.IGateProvider.Handle">IGateProvider.Handle</a></i> <span class="xdoc-id">localGate</span>, params);
924 </div>
925 <div class='xdocSynSum'><tt></tt><tt></tt>// Create an instance-object</div>
926 </div>
927 <span id="xdoc-sect-1"></span>
928 <div class="xdocSect">ARGUMENTS</div>
929 <div class="xdocChild"><span class="xdocChildId">localGate</span>
930 <span class="xdocChildSum">— Gate to use for local protection.</span>
931 </div>
932 <div class="xdocChild"><span class="xdocChildId">params</span>
933 <span class="xdocChildSum">— per-instance config params, or <tt>NULL</tt> to select default values (target-domain only)</span>
934 </div>
935 <div class="xdocChild"><span class="xdocChildId">eb</span>
936 <span class="xdocChildSum">— active error-handling block, or <tt>NULL</tt> to select default policy (target-domain only)</span>
937 </div>
938 <span id="xdoc-sect-2"></span>
939 <div class="xdocSect">DETAILS</div>
940 <div class="xdocText">A Non-NULL gate for local protection must be passed to the create
941 call. If no local protection is desired, a
942 <a class="xdoc-link" href="../../../../xdc/runtime/GateNull.html" title="xdc.runtime.GateNull">xdc.runtime.GateNull</a> handle must be passed in.</div>
943 </div>
944 <div id="xdocDate">generated on Mon, 23 May 2016 14:31:20 GMT</div>
945 </div></div></body>
946 </html>