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