]> begriffs open source - cmsis/blob - main/RTOS2/html/os2MigrationFunctions.html
Initial contribution
[cmsis] / main / RTOS2 / html / os2MigrationFunctions.html
1 <!-- HTML header for doxygen 1.9.6-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
4 <head>
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=11"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>CMSIS-RTOS2: Detailed API Function Differences</title>
9 <link href="doxygen.css" rel="stylesheet" type="text/css"/>
10 <link href="tabs.css" rel="stylesheet" type="text/css"/>
11 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
12 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
13 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="jquery.js"></script>
15 <script type="text/javascript" src="dynsections.js"></script>
16 <script type="text/javascript" src="printComponentTabs.js"></script>
17 <script type="text/javascript" src="footer.js"></script>
18 <script type="text/javascript" src="navtree.js"></script>
19 <link href="navtree.css" rel="stylesheet" type="text/css"/>
20 <script type="text/javascript" src="resize.js"></script>
21 <script type="text/javascript" src="navtreedata.js"></script>
22 <script type="text/javascript" src="navtree.js"></script>
23 <link href="search/search.css" rel="stylesheet" type="text/css"/>
24 <script type="text/javascript" src="search/searchdata.js"></script>
25 <script type="text/javascript" src="search/search.js"></script>
26 <script type="text/javascript">
27 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
28   $(document).ready(function() { init_search(); });
29 /* @license-end */
30 </script>
31 <script type="text/javascript" src="darkmode_toggle.js"></script>
32 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
33 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
34 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
35 <link href="version.css" rel="stylesheet" type="text/css" />
36 <script type="text/javascript" src="../../version.js"></script>
37 </head>
38 <body>
39 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
40 <div id="titlearea">
41 <table cellspacing="0" cellpadding="0">
42  <tbody>
43  <tr style="height: 55px;">
44   <td id="projectlogo" style="padding: 1.5em;"><img alt="Logo" src="cmsis_logo_white_small.png"/></td>
45   <td style="padding-left: 1em; padding-bottom: 1em;padding-top: 1em;">
46    <div id="projectname">CMSIS-RTOS2
47    &#160;<span id="projectnumber"><script type="text/javascript">
48      <!--
49      writeHeader.call(this);
50      writeVersionDropdown.call(this, "CMSIS-RTOS2");
51      //-->
52     </script>
53    </span>
54    </div>
55    <div id="projectbrief">Real-Time Operating System: API and RTX Reference Implementation</div>
56   </td>
57    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
58         <span class="left">
59           <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
60           <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
61                onfocus="searchBox.OnSearchFieldFocus(true)" 
62                onblur="searchBox.OnSearchFieldFocus(false)" 
63                onkeyup="searchBox.OnSearchFieldChange(event)"/>
64           </span><span class="right">
65             <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
66           </span>
67         </div>
68 </td>
69   <!--END !PROJECT_NAME-->
70  </tr>
71  </tbody>
72 </table>
73 </div>
74 <!-- end header part -->
75 <div id="CMSISnav" class="tabs1">
76   <ul class="tablist">
77     <script type="text/javascript">
78       writeComponentTabs.call(this);
79     </script>
80   </ul>
81 </div>
82 <!-- Generated by Doxygen 1.9.6 -->
83 <script type="text/javascript">
84 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
85 var searchBox = new SearchBox("searchBox", "search/",'.html');
86 /* @license-end */
87 </script>
88 </div><!-- top -->
89 <div id="side-nav" class="ui-resizable side-nav-resizable">
90   <div id="nav-tree">
91     <div id="nav-tree-contents">
92       <div id="nav-sync" class="sync"></div>
93     </div>
94   </div>
95   <div id="splitbar" style="-moz-user-select:none;" 
96        class="ui-resizable-handle">
97   </div>
98 </div>
99 <script type="text/javascript">
100 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
101 $(document).ready(function(){initNavTree('os2MigrationFunctions.html',''); initResizable(); });
102 /* @license-end */
103 </script>
104 <div id="doc-content">
105 <!-- window showing the filter options -->
106 <div id="MSearchSelectWindow"
107      onmouseover="return searchBox.OnSearchSelectShow()"
108      onmouseout="return searchBox.OnSearchSelectHide()"
109      onkeydown="return searchBox.OnSearchSelectKey(event)">
110 </div>
111
112 <!-- iframe showing the search results (closed by default) -->
113 <div id="MSearchResultsWindow">
114 <div id="MSearchResults">
115 <div class="SRPage">
116 <div id="SRIndex">
117 <div id="SRResults"></div>
118 <div class="SRStatus" id="Loading">Loading...</div>
119 <div class="SRStatus" id="Searching">Searching...</div>
120 <div class="SRStatus" id="NoMatches">No Matches</div>
121 </div>
122 </div>
123 </div>
124 </div>
125
126 <div><div class="header">
127   <div class="headertitle"><div class="title">Detailed API Function Differences </div></div>
128 </div><!--header-->
129 <div class="contents">
130 <div class="textblock"><p>This section lists the CMSIS-RTOS API v1 and API v2 functions along with the differences in functionality. The list is sorted alphabetically by API v2 function names and is structured the following way:</p>
131 <ul>
132 <li>RTOS API v2 function prototype</li>
133 <li>RTOS API v1 function prototype that is equivalent or provides similar functionality</li>
134 <li>Brief description of the RTOS v2 function.</li>
135 <li>Description of the difference.</li>
136 </ul>
137 <p>The background color indicates:</p><ul>
138 <li><div class="new">Green: New functions in API v2 that are not available in API v1 </div></li>
139 <li><div class="mod">Amber: Functions that are modified or replaced in API v2 compared to API v1 </div></li>
140 <li><div class="del">Red: Functions in API v1 that are deprecated in API v2 </div></li>
141 </ul>
142 <h1><a class="anchor" id="mig_kernel"></a>
143 Kernel Information and Control</h1>
144 <hr  />
145 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga6f7764e7250c5c5364c00c45a5d1d199" title="Get RTOS Kernel Information.">osKernelGetInfo</a> (osVersion_t* version, char* id_buf, uint32_t id_size)</code> <br  />
146  <em>none</em> <br  />
147  <br  />
148   Get RTOS Kernel Information.   <br  />
149  New function <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga6f7764e7250c5c5364c00c45a5d1d199" title="Get RTOS Kernel Information.">osKernelGetInfo</a>. </div><hr  />
150 <div class="mod"> <code>osKernelState_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga48b69b81012fce051f639be288b243ba" title="Get the current RTOS Kernel state.">osKernelGetState</a> (void)</code> <br  />
151  <code>int32_t &#160; &#160; &#160; &#160; osKernelRunning (void)</code> <br  />
152  <br  />
153   Get the current RTOS Kernel state.   <br  />
154 <ul>
155 <li>The function <b>osKernelGetState</b> replaces the RTOS v1 function <b>osKernelRunning</b>.</li>
156 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga08326469274b668140ca934b168a5ad4">osKernelState_t</a>.</li>
157 </ul>
158 </div><div class="mod"> </div><hr  />
159 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga84bcdbf2fb76b10c8df4e439f0c7e11b" title="Get the RTOS kernel tick count.">osKernelGetTickCount</a> (void)</code> <br  />
160  <em>none</em> <br  />
161  <br  />
162   Get the RTOS kernel tick count.   <br  />
163  New function. </div><hr  />
164 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga7a8d7bd927eaaa58999f91d7d6310cee" title="Get the RTOS kernel tick frequency.">osKernelGetTickFreq</a> (void)</code> <br  />
165  <em>none</em> <br  />
166  <br  />
167   Get the RTOS kernel tick frequency.   <br  />
168 <ul>
169 <li>The function <b>osKernelGetTickFreq</b> replaces the RTOS v1 macro <b>osKernelTickMicroSec</b>.</li>
170 </ul>
171 </div><div class="new"> </div><hr  />
172 <div class="mod"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gae0fcaff6cecfb4013bb556c87afcd7d2" title="Get the RTOS kernel system timer count.">osKernelGetSysTimerCount</a> (void)</code> <br  />
173  <code>uint32_t osKernelSysTick (void)</code> <br  />
174  <br  />
175   Get the RTOS kernel system timer count.   <br  />
176 <ul>
177 <li>The function <b>osKernelGetSysTimerCount</b> replaces the RTOS v1 function <b>osKernelSysTick</b>.</li>
178 </ul>
179 </div><div class="mod"> </div><hr  />
180 <div class="new"> <code>uint64_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga4d69215a93220f72be3684cad582f16a" title="Get the RTOS kernel system timer frequency.">osKernelGetSysTimerFreq</a> (void)</code> <br  />
181  <em>none</em> <br  />
182  <br  />
183   Get the RTOS kernel system timer frequency.   <br  />
184  New function. </div><hr  />
185 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gae818f6611d25ba3140bede410a52d659" title="Initialize the RTOS Kernel.">osKernelInitialize</a> (void)</code> <br  />
186  <code>osStatus &#160; osKernelInitialize (void)</code> <br  />
187  <br  />
188   Initialize the RTOS Kernel.   <br  />
189 <ul>
190 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
191 </ul>
192 </div><div class="mod"> </div><hr  />
193 <div class="new"> <code>int32_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga948609ee930d9b38336b9e1c2a4dfe12" title="Lock the RTOS Kernel scheduler.">osKernelLock</a> (void)</code> <br  />
194  <em>none</em> <br  />
195  <br  />
196   Lock the RTOS Kernel scheduler.   <br  />
197  New function. </div><hr  />
198 <div class="new"> <code>int32_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gaf401728b4657456198c33fe75f8d6720" title="Unlock the RTOS Kernel scheduler.">osKernelUnlock</a> (void)</code> <br  />
199  <em>none</em> <br  />
200  <br  />
201   Unlock the RTOS Kernel scheduler.   <br  />
202  New function. </div><hr  />
203 <div class="new"> <code>void <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gae7d0a71b9586cbbb49fcbdf6a04f0289" title="Restore the RTOS Kernel scheduler lock state.">osKernelRestoreLock</a> (void)</code> <br  />
204  <em>none</em> <br  />
205  <br  />
206   Restore the RTOS Kernel scheduler lock state.   <br  />
207  New function. </div><hr  />
208 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga9ae2cc00f0d89d7b6a307bba942b5221" title="Start the RTOS Kernel scheduler.">osKernelStart</a> (void)</code> <br  />
209  <code>osStatus &#160; osKernelStart (void)</code> <br  />
210  <br  />
211   Start the RTOS Kernel scheduler.   <br  />
212 <ul>
213 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
214 </ul>
215 </div><div class="mod"> </div><hr  />
216 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gae26683e1606ec633354a2876c68f0c1f" title="Suspend the RTOS Kernel scheduler.">osKernelSuspend</a> (void)</code> <br  />
217  <em>none</em> <br  />
218  <br  />
219   Suspend the RTOS Kernel scheduler.   <br  />
220  New function. </div><hr  />
221 <div class="new"> <code>void <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga8c4b4d7ed34cab73c001665d9176aced" title="Resume the RTOS Kernel scheduler.">osKernelResume</a> (uint32_t sleep_time)</code> <br  />
222  <em>none</em> <br  />
223  <br  />
224   Resume the RTOS Kernel scheduler.   <br  />
225  New function. </div><h1><a class="anchor" id="mig_threadMgmt"></a>
226 Thread Management</h1>
227 <hr  />
228 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaaad14cd9547341ea8109dc4e8540f1dc" title="Detach a thread (thread storage can be reclaimed when thread terminates).">osThreadDetach</a> (osThreadId_t thread_id)</code> <br  />
229  <em>none</em> <br  />
230  <br  />
231   Detach a thread (thread storage can be reclaimed when thread terminates).   <br  />
232  New function. </div><hr  />
233 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga5606604d56e21ece1a654664be877439" title="Enumerate active threads.">osThreadEnumerate</a> (osThreadId_t *thread_array, uint32_t array_items)</code> <br  />
234  <em>none</em> <br  />
235  <br  />
236   Enumerate active threads.   <br  />
237  New function. </div><hr  />
238 <div class="new"> <code>__NO_RETURN void <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaddaa452dd7610e4096647a566d3556fc" title="Terminate execution of current running thread.">osThreadExit</a> (void)</code> <br  />
239  <em>none</em> <br  />
240  <br  />
241   Terminate execution of current running thread.   <br  />
242  New function. </div><hr  />
243 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga495b3f812224e7301f23a691793765db" title="Get number of active threads.">osThreadGetCount</a> (osThreadId_t thread_id)</code> <br  />
244  <em>none</em> <br  />
245  <br  />
246   Get number of active threads.   <br  />
247  New function. </div><hr  />
248 <div class="new"> <code>const char *<a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gac3230f3a55a297514b013ebf38f27e0a" title="Get name of a thread.">osThreadGetName</a> (osThreadId_t thread_id)</code> <br  />
249  <em>none</em> <br  />
250  <br  />
251   Get name of a thread.   <br  />
252  New function. </div><hr  />
253 <div class="mod"> <code>osThreadId_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga8df03548e89fbc56402a5cd584a505da" title="Return the thread ID of the current running thread.">osThreadGetId</a> (void)</code> <br  />
254  <code>osThreadId &#160; osThreadGetId (void)</code> <br  />
255  <br  />
256   Return the thread ID of the current running thread.   <br  />
257 <ul>
258 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a>.</li>
259 </ul>
260 </div><div class="mod"> </div><hr  />
261 <div class="mod"> <code>osPriority_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga0aeaf349604f456e68e78f9d3b42e44b" title="Get current priority of a thread.">osThreadGetPriority</a> (osThreadId_t thread_id)</code> <br  />
262  <code>osPriority &#160; osThreadGetPriority (osThreadId thread_id)</code> <br  />
263  <br  />
264   Get current priority of a thread.   <br  />
265 <ul>
266 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gad4e3e0971b41f2d17584a8c6837342ec" title="Priority values.">osPriority_t</a>.</li>
267 <li>Parameter type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a>.</li>
268 </ul>
269 </div><div class="mod"> </div><hr  />
270 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gab9f8bd715d671c6ee27644867bc1bf65" title="Get stack size of a thread.">osThreadGetStackSize</a> (osThreadId_t thread_id)</code> <br  />
271  <em>none</em> <br  />
272  <br  />
273   Get stack size of a thread.   <br  />
274  New function. </div><hr  />
275 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga9c83bd5dd8de329701775d6ef7012720" title="Get available stack space of a thread based on stack watermark recording during execution.">osThreadGetStackSpace</a> (osThreadId_t thread_id)</code> <br  />
276  <em>none</em> <br  />
277  <br  />
278   Get available stack space of a thread based on stack watermark recording during execution.   <br  />
279  New function. </div><hr  />
280 <div class="new"> <code>osThreadState_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gacc0a98b42f0a5928e12dc91dc76866b9" title="Get current thread state of a thread.">osThreadGetState</a> (osThreadId_t thread_id)</code> <br  />
281  <em>none</em> <br  />
282  <br  />
283   Get current thread state of a thread.   <br  />
284  New function. </div><hr  />
285 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga3fca90fb0679afeb968aa8c3d5874487" title="Wait for specified thread to terminate.">osThreadJoin</a> (osThreadId_t thread_id)</code> <br  />
286  <em>none</em> <br  />
287  <br  />
288   Wait for specified thread to terminate.   <br  />
289  New function. </div><hr  />
290 <div class="mod"> <code>osThreadId_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga48d68b8666d99d28fa646ee1d2182b8f" title="Create a thread and add it to Active Threads.">osThreadNew</a> (osThreadFunc_t function, void *argument, const <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#structosThreadAttr__t" title="Attributes structure for thread.">osThreadAttr_t</a> *attr)</code> <br  />
291  <code>osThreadId &#160; osThreadCreate (const osThreadDef_t *thread_def, void *argument)</code> <br  />
292  <br  />
293   Create a thread and add it to Active Threads.   <br  />
294 <ul>
295 <li>The function <b>osThreadNew</b> replaces the RTOS v1 function <b>osThreadCreate</b>.</li>
296 <li>Options are now passed using a <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#structosThreadAttr__t">osThreadAttr_t</a> struct, replacing the <b>osThreadDef</b> macro.</li>
297 <li>New function prototype is <code>void func (void *arg)</code>, before: <code>void func (const void *arg)</code>.</li>
298 </ul>
299 </div><div class="mod"> </div><hr  />
300 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga3dbad90eff394b02de76a452c84c5d80" title="Resume execution of a thread.">osThreadResume</a> (osThreadId_t thread_id)</code> <br  />
301  <em>none</em> <br  />
302  <br  />
303   Resume execution of a thread.   <br  />
304  New function. </div><hr  />
305 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga861a420fb2d643115b06622903fb3bfb" title="Change priority of a thread.">osThreadSetPriority</a> (osThreadId_t thread_id, osPriority_t priority)</code> <br  />
306  <code>osStatus &#160; osThreadSetPriority (osThreadId thread_id, osPriority priority)</code> <br  />
307  <br  />
308   Change priority of a thread.   <br  />
309 <ul>
310 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
311 <li>Parameter types changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a> and <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gad4e3e0971b41f2d17584a8c6837342ec" title="Priority values.">osPriority_t</a>.</li>
312 </ul>
313 </div><div class="mod"> </div><hr  />
314 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa9de419d0152bf77e9bbcd1f369fb990" title="Suspend execution of a thread.">osThreadSuspend</a> (osThreadId_t thread_id)</code> <br  />
315  <em>none</em> <br  />
316  <br  />
317   Suspend execution of a thread.   <br  />
318  New function. </div><hr  />
319 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga2f8ba6dba6e9c065a6e236ffd410d74a" title="Terminate execution of a thread.">osThreadTerminate</a> (osThreadId_t thread_id)</code> <br  />
320  <code>osStatus &#160; osThreadTerminate (osThreadId thread_id)</code> <br  />
321  <br  />
322   Terminate execution of a thread.   <br  />
323 <ul>
324 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
325 <li>Parameter type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a>.</li>
326 </ul>
327 </div><div class="mod"> </div><hr  />
328 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gad01c7ec26535b1de6b018bb9466720e2" title="Pass control to next thread that is in state READY.">osThreadYield</a> (void)</code> <br  />
329  <code>osStatus &#160; osThreadYield (void)</code> <br  />
330  <br  />
331   Pass control to next thread that is in state <b>READY</b>.   <br  />
332 <ul>
333 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
334 </ul>
335 </div><div class="mod"> </div><h1><a class="anchor" id="mig_threadFlags"></a>
336 Thread Flags</h1>
337 <p>New section to synchronize threads using flags. Thread flags and the more flexible <a class="el" href="os2MigrationFunctions.html#mig_eventFlags">Event Flags</a> are replacing the RTOS v1 <b>Signal Events</b>. Refer to <a class="el" href="os2MigrationFunctions.html#mig_signalEvents">Signal Events</a> for a list of deprecated functions. Refer to <a class="el" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html">Thread Flags</a> for details.</p>
338 <hr  />
339 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#ga6f89ef9caded1d9963c7b12b0f6412c9" title="Set the specified Thread Flags of a thread.">osThreadFlagsSet</a> (osThreadId_t thread_id, uint32_t flags)</code> <br  />
340  <em>none</em> <br  />
341  <br  />
342   Set the specified Thread Flags of a thread.   <br  />
343  New function. </div><hr  />
344 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#ga656abc1c862c5b9a2b13584c42cc0bfa" title="Clear the specified Thread Flags of current running thread.">osThreadFlagsClear</a> (uint32_t flags)</code> <br  />
345  <em>none</em> <br  />
346  <br  />
347   Clear the specified Thread Flags of current running thread.   <br  />
348  New function. </div><hr  />
349 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#ga85c8d2c89466e25abbcb545d9ddd71ba" title="Get the current Thread Flags of current running thread.">osThreadFlagsGet</a> (void)</code> <br  />
350  <em>none</em> <br  />
351  <br  />
352   Get the current Thread Flags of current running thread.   <br  />
353  New function. </div><hr  />
354 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#gac11542ad6300b600f872fc96e340ec2b" title="Wait for one or more Thread Flags of the current running thread to become signaled.">osThreadFlagsWait</a> (uint32_t flags, uint32_t options, uint32_t timeout)</code> <br  />
355  <em>none</em> <br  />
356  <br  />
357   Wait for one or more Thread Flags of the current running thread to become signaled.   <br  />
358  New function. </div><h1><a class="anchor" id="mig_eventFlags"></a>
359 Event Flags</h1>
360 <p>New section to synchronize events using flags. Event flags and thread flags are replacing the RTOS v1 <b>Signal Events</b>. All functions listed in the RTOS v1 <b>Signal Events</b> have been deprecated. Refer to <a class="el" href="os2MigrationFunctions.html#mig_signalEvents">Signal Events</a> for a list of deprecated functions. Refer to <a class="el" href="group__CMSIS__RTOS__EventFlags.html">Event Flags</a> for details about the new function.</p>
361 <hr  />
362 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__EventFlags.html#ga93bf258ca0007c6641fbe8e4f2b8a1e5" title="Clear the specified Event Flags.">osEventFlagsClear</a> (osEventFlagsId_t ef_id, uint32_t flags)</code> <br  />
363  <em>none</em> <br  />
364  <br  />
365   Clear the specified Event Flags.   <br  />
366  New function. </div><hr  />
367 <div class="new"> <code>const char *<a class="el" href="group__CMSIS__RTOS__EventFlags.html#ga59f4ddf0ee8c395b1672bb978d1cfc88" title="Get name of an Event Flags object.">osEventFlagsGetName</a> (osEventFlagsId_t ef_id)</code> <br  />
368  <em>none</em> <br  />
369  <br  />
370   Get name of an Event Flags object.   <br  />
371  New function. </div><hr  />
372 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__EventFlags.html#ga7c4acf2fb0d506ec82905dee53fb5435" title="Delete an Event Flags object.">osEventFlagsDelete</a> (osEventFlagsId_t ef_id)</code> <br  />
373  <em>none</em> <br  />
374  <br  />
375   Delete an Event Flags object.   <br  />
376  New function. </div><hr  />
377 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__EventFlags.html#ga8bda3185f46bfd278cea8a6cf357677d" title="Get the current Event Flags.">osEventFlagsGet</a> (osEventFlagsId_t ef_id)</code> <br  />
378  <em>none</em> <br  />
379  <br  />
380   Get the current Event Flags.   <br  />
381  New function. </div><hr  />
382 <div class="new"> <code>osEventFlagsId_t <a class="el" href="group__CMSIS__RTOS__EventFlags.html#gab14b1caeb12ffa42cce1bfe889cd07df" title="Create and Initialize an Event Flags object.">osEventFlagsNew</a> (const <a class="el" href="group__CMSIS__RTOS__EventFlags.html#structosEventFlagsAttr__t" title="Attributes structure for event flags.">osEventFlagsAttr_t</a> *attr)</code> <br  />
383  <em>none</em> <br  />
384  <br  />
385   Create and Initialize an Event Flags object.   <br  />
386  New function. </div><hr  />
387 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__EventFlags.html#ga33b71d14cecf90b4e72639dd19f23a5e" title="Set the specified Event Flags.">osEventFlagsSet</a> (osEventFlagsId_t ef_id, uint32_t flags)</code> <br  />
388  <em>none</em> <br  />
389  <br  />
390   Set the specified Event Flags.   <br  />
391  New function. </div><hr  />
392 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__EventFlags.html#ga52acb34a8322e58020227344fe662b4e" title="Wait for one or more Event Flags to become signaled.">osEventFlagsWait</a> (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout)</code> <br  />
393  <em>none</em> <br  />
394  <br  />
395   Wait for one or more Event Flags to become signaled.   <br  />
396  New function. </div><h1><a class="anchor" id="mig_wait"></a>
397 Generic Wait Functions</h1>
398 <p>Refer to <a class="el" href="group__CMSIS__RTOS__Wait.html">Generic Wait Functions</a> for details.</p>
399 <hr  />
400 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__Wait.html#gaf6055a51390ef65b6b6edc28bf47322e" title="Wait for Timeout (Time Delay).">osDelay</a> (uint32_t ticks)</code> <br  />
401  <code>osStatus &#160; osDelay (uint32_t timeout)</code> <br  />
402  <br  />
403   Wait for Timeout (Time Delay).   <br  />
404 <ul>
405 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
406 </ul>
407 </div><div class="mod"> </div><hr  />
408 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__Wait.html#ga3c807924c2d6d43bc2ffb49da3f7f3a1" title="Wait until specified time.">osDelayUntil</a> (uint32_t ticks)</code> <br  />
409  <em>none</em> <br  />
410  <br  />
411   Wait until specified time.   <br  />
412  New function. </div><hr  />
413 <div class="del"> <em>none</em> <br  />
414  <code>osEvent osWait (uint32_t millisec)</code> <br  />
415  <br  />
416 Deprecated. </div><h1><a class="anchor" id="mig_timer"></a>
417 Timer Management</h1>
418 <p>Refer to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html">Timer Management</a> for details.</p>
419 <hr  />
420 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gad0001dd74721ab461789324806db2453" title="Delete a timer.">osTimerDelete</a> (osTimerId_t timer_id)</code> <br  />
421  <code>osStatus &#160; osTimerDelete (osTimerId timer_id)</code> <br  />
422  <br  />
423   Delete a timer.   <br  />
424 <ul>
425 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
426 <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
427 </ul>
428 </div><div class="mod"> </div><hr  />
429 <div class="new"> <code>const char *<a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#ga4f82a98eee4d9ea79507e44340d3d319" title="Get name of a timer.">osTimerGetName</a> (osTimerId_t timer_id)</code> <br  />
430  <em>none</em> <br  />
431  <br  />
432   Get name of a timer.   <br  />
433  New function. </div><hr  />
434 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#ga69d3589f54194022c30dd01e45ec6741" title="Check if a timer is running.">osTimerIsRunning</a> (osTimerId_t timer_id)</code> <br  />
435  <em>none</em> <br  />
436  <br  />
437   Check if a timer is running.   <br  />
438  New function. </div><hr  />
439 <div class="mod"> <code>osTimerId_t <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gad4e7f785c5f700a509f55a3bf6a62bec" title="Create and Initialize a timer.">osTimerNew</a> (osTimerFunc_t func, osTimerType_t type, void *argument, const <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#structosTimerAttr__t" title="Attributes structure for timer.">osTimerAttr_t</a> *attr)</code> <br  />
440  <code>osTimerId &#160; osTimerCreate (const osTimerDef_t *timer_def, os_timer_type type, void *argument)</code> <br  />
441  <br  />
442   Create and Initialize a timer.   <br  />
443 <ul>
444 <li>The function <b>osTimerNew</b> replaces the RTOS v1 function <b>osTimerCreate</b>.</li>
445 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
446 <li>The parameter list and types have changed.</li>
447 </ul>
448 </div><div class="mod"> </div><hr  />
449 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gab6ee2859ea657641b7adfac599b8121d" title="Start or restart a timer.">osTimerStart</a> (osTimerId_t timer_id, uint32_t ticks)</code> <br  />
450  <code>osStatus &#160; osTimerStart (osTimerId timer_id, uint32_t timeout)</code> <br  />
451  <br  />
452   Start or restart a timer.   <br  />
453 <ul>
454 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
455 <li>The first parameter type has changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
456 </ul>
457 </div><div class="mod"> </div><hr  />
458 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gabd7a89356da7717293eb0bc5d87b8ac9" title="Stop a timer.">osTimerStop</a> (osTimerId_t timer_id)</code> <br  />
459  <code>osStatus &#160; osTimerStop (osTimerId timer_id)</code> <br  />
460  <br  />
461   Stop a timer.   <br  />
462 <ul>
463 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
464 <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
465 </ul>
466 </div><div class="mod"> </div><h1><a class="anchor" id="mig_mutex"></a>
467 Mutexes</h1>
468 <p>Refer to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html">Mutex Management</a> for details.</p>
469 <hr  />
470 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#gabc54686ea0fc281823b1763422d2a924" title="Acquire a Mutex or timeout if it is locked.">osMutexAcquire</a> (osMutexId_t mutex_id, uint32_t timeout)</code> <br  />
471  <code>osStatus &#160; osMutexWait (osMutexId mutex_id, uint32_t timeout)</code> <br  />
472  <br  />
473   Acquire a Mutex or timeout if it is locked.   <br  />
474 <ul>
475 <li>The function <b>osMutexAcquire</b> replaces the RTOS v1 function <b>osMutexWait</b>.</li>
476 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
477 <li>First parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
478 </ul>
479 </div><div class="mod"> </div><hr  />
480 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#gabee73ad227ba4587d3db12ef9bd582bc" title="Delete a Mutex object.">osMutexDelete</a> (osMutexId_t mutex_id)</code> <br  />
481  <code>osStatus &#160; osMutexDelete (osMutexId mutex_id)</code> <br  />
482  <br  />
483   Delete a Mutex object.   <br  />
484 <ul>
485 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
486 <li>The parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
487 </ul>
488 </div><div class="mod"> </div><hr  />
489 <div class="new"> <code>const char *<a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga00b5e58cd247a412d1afd18732d8b752" title="Get name of a Mutex object.">osMutexGetName</a> (osMutexId_t mutex_id)</code> <br  />
490  <em>none</em> <br  />
491  <br  />
492   Get name of a Mutex object.   <br  />
493  New function. </div><hr  />
494 <div class="new"> <code>osThreadId_t <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga7f9a7666df0978738cd570cb700b83fb" title="Get Thread which owns a Mutex object.">osMutexGetOwner</a> (osMutexId_t mutex_id)</code> <br  />
495  <em>none</em> <br  />
496  <br  />
497   Get Thread which owns a Mutex object.   <br  />
498  New function. </div><hr  />
499 <div class="mod"> <code>osMutexId_t <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#gab90920022ab944296821368ef6bb52f8" title="Create and Initialize a Mutex object.">osMutexNew</a> (const <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#structosMutexAttr__t" title="Attributes structure for mutex.">osMutexAttr_t</a> *attr)</code> <br  />
500  <code>osMutexId &#160; osMutexCreate (const osMutexDef_t *mutex_def)</code> <br  />
501  <br  />
502   Create and Initialize a Mutex object.   <br  />
503 <ul>
504 <li>The function <b>osMutexNew</b> replaces the RTOS v1 function <b>osMutexCreate</b>.</li>
505 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
506 <li>The parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#structosMutexAttr__t">osMutexAttr_t</a>.</li>
507 </ul>
508 </div><div class="mod"> </div><hr  />
509 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#gaea629705703580ff58776bf73c8db915" title="Release a Mutex that was acquired by osMutexAcquire.">osMutexRelease</a> (osMutexId_t mutex_id)</code> <br  />
510  <code>osStatus &#160; osMutexRelease (osMutexId mutex_id)</code> <br  />
511  <br  />
512   Release a Mutex that was acquired by <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#gabc54686ea0fc281823b1763422d2a924">osMutexAcquire</a>.   <br  />
513 <ul>
514 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
515 <li>The parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
516 </ul>
517 </div><div class="mod"> </div><h1><a class="anchor" id="mig_sem"></a>
518 Semaphores</h1>
519 <p>Refer to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html">Semaphores</a> for details.</p>
520 <hr  />
521 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga7e94c8b242a0c81f2cc79ec22895c87b" title="Acquire a Semaphore token or timeout if no tokens are available.">osSemaphoreAcquire</a> (osSemaphoreId_t semaphore_id, uint32_t timeout)</code> <br  />
522  <em>none</em> <br  />
523  <br  />
524   Acquire a Semaphore token or timeout if no tokens are available.   <br  />
525  New function. Replaces <code>osSemaphoreWait</code>. </div><hr  />
526 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga81258ce9c67fa89f07cc49d2e136cd88" title="Delete a Semaphore object.">osSemaphoreDelete</a> (osSemaphoreId_t semaphore_id)</code> <br  />
527  <code>osStatus &#160; osSemaphoreDelete (osSemaphoreId semaphore_id)</code> <br  />
528  <br  />
529   Delete a Semaphore object.   <br  />
530 <ul>
531 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
532 <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga6e1c1c4b04175bb92b013c8f37249f40">osSemaphoreId_t</a>.</li>
533 </ul>
534 </div><div class="mod"> </div><hr  />
535 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga7559d4dff3cda9992fc5ab5de3e74c70" title="Get current Semaphore token count.">osSemaphoreGetCount</a> (osSemaphoreId_t semaphore_id)</code> <br  />
536  <em>none</em> <br  />
537  <br  />
538   Get current Semaphore token count.   <br  />
539  New function. </div><hr  />
540 <div class="new"> <code>const char *<a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga9586952051f00285f1482dbe6695bbc4" title="Get name of a Semaphore object.">osSemaphoreGetName</a> (osSemaphoreId_t semaphore_id)</code> <br  />
541  <em>none</em> <br  />
542  <br  />
543   Get name of a Semaphore object.   <br  />
544  New function. </div><hr  />
545 <div class="mod"> <code>osSemaphoreId_t <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga2a39806ace781a0008a4374ca701b14a" title="Create and Initialize a Semaphore object.">osSemaphoreNew</a> (uint32_t max_count, uint32_t initial_count, const <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#structosSemaphoreAttr__t" title="Attributes structure for semaphore.">osSemaphoreAttr_t</a> *attr)</code> <br  />
546  <code>osSemaphoreId &#160; osSemaphoreCreate (const osSemaphoreDef_t *semaphore_def, int32_t count)</code> <br  />
547  <br  />
548   Create and Initialize a Semaphore object.   <br  />
549 <ul>
550 <li>The function <b>osSemaphoreNew</b> replaces the RTOS v1 function <b>osSemaphoreCreate</b>.</li>
551 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga6e1c1c4b04175bb92b013c8f37249f40">osSemaphoreId_t</a>.</li>
552 <li>The parameter list and types have changed.</li>
553 </ul>
554 </div><div class="mod"> </div><hr  />
555 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga0abcee1b5449d7a6928fb9248c690bb6" title="Release a Semaphore token up to the initial maximum count.">osSemaphoreRelease</a> (osSemaphoreId_t semaphore_id)</code> <br  />
556  <code>osStatus &#160; osSemaphoreRelease (osSemaphoreId semaphore_id)</code> <br  />
557  <br  />
558   Release a Semaphore token up to the initial maximum count.   <br  />
559 <ul>
560 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
561 <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga6e1c1c4b04175bb92b013c8f37249f40">osSemaphoreId_t</a>.</li>
562 </ul>
563 </div><div class="mod"> </div><hr  />
564 <div class="del"> <em>none</em> <br  />
565  <code>int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t timeout)</code> <br  />
566  <br  />
567 Deprecated. Replaced by <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga7e94c8b242a0c81f2cc79ec22895c87b" title="Acquire a Semaphore token or timeout if no tokens are available.">osSemaphoreAcquire</a>. </div><h1><a class="anchor" id="mig_memPool"></a>
568 Memory Pool</h1>
569 <hr  />
570 <div class="mod"> <code>void * <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga8ead54e99ccb8f112356c88f99d38fbe" title="Allocate a memory block from a Memory Pool.">osMemoryPoolAlloc</a> (osMemoryPoolId_t mp_id, uint32_t timeout)</code> <br  />
571  <code>void * osPoolAlloc &#160;(osPoolId pool_id)</code> <br  />
572  <br  />
573   Allocate a memory block from a Memory Pool.   <br  />
574 <ul>
575 <li>The function <b>osMemoryPoolAlloc</b> replaces both RTOS v1 functions <b>osPoolAlloc</b>.</li>
576 <li>The parameter list and types changed.</li>
577 </ul>
578 </div><div class="mod"> </div><hr  />
579 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga8c39e7e5cd2b9eda907466808e59d62e" title="Delete a Memory Pool object.">osMemoryPoolDelete</a> (osMemoryPoolId_t mp_id)</code> <br  />
580  <em>none</em> <br  />
581  <br  />
582   Delete a Memory Pool object.   <br  />
583  New function. </div><hr  />
584 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#gabb4f4560daa6d1f8c8789082ee186d16" title="Return an allocated memory block back to a Memory Pool.">osMemoryPoolFree</a> (osMemoryPoolId_t mp_id, void * block)</code> <br  />
585  <code>osStatus &#160; osPoolFree (osPoolId pool_id, void * block)</code> <br  />
586  <br  />
587   Return an allocated memory block back to a Memory Pool.   <br  />
588 <ul>
589 <li>The function <b>osMemoryPoolFree</b> replaces the RTOS v1 function <b>osPoolFree</b>.</li>
590 <li>The first parameter type <b>osMemoryPoolId_t</b> replaces the ROTS v1 type <b>osPoolId</b>.</li>
591 </ul>
592 </div><div class="mod"> </div><hr  />
593 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#gab2bf059b7fa7679c3cccdaeec60b6c0e" title="Get memory block size in a Memory Pool.">osMemoryPoolGetBlockSize</a> (osMemoryPoolId_t mp_id)</code> <br  />
594  <em>none</em> <br  />
595  <br  />
596   Get memory block size in a Memory Pool.   <br  />
597  New function. </div><hr  />
598 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#gad696e94bfbe28f0b6613f9303fdf6a37" title="Get maximum number of memory blocks in a Memory Pool.">osMemoryPoolGetCapacity</a> (osMemoryPoolId_t mp_id)</code> <br  />
599  <em>none</em> <br  />
600  <br  />
601   Get maximum number of memory blocks in a Memory Pool.   <br  />
602  New function. </div><hr  />
603 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga958a9449bff8c95ce213de98eef5739d" title="Get number of memory blocks used in a Memory Pool.">osMemoryPoolGetCount</a> (osMemoryPoolId_t mp_id)</code> <br  />
604  <em>none</em> <br  />
605  <br  />
606   Get number of memory blocks used in a Memory Pool.   <br  />
607  New function. </div><hr  />
608 <div class="new"> <code>const char *<a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#gab414a1e138205a55820acfa277c8f386" title="Get name of a Memory Pool object.">osMemoryPoolGetName</a> (osMemoryPoolId_t mp_id)</code> <br  />
609  <em>none</em> <br  />
610  <br  />
611   Get name of a Memory Pool object.   <br  />
612  New function. </div><hr  />
613 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga0394cffa9479a7994e3b03c79c1cb909" title="Get number of memory blocks available in a Memory Pool.">osMemoryPoolGetSpace</a> (osMemoryPoolId_t mp_id)</code> <br  />
614  <em>none</em> <br  />
615  <br  />
616   Get number of memory blocks available in a Memory Pool.   <br  />
617  New function. </div><hr  />
618 <div class="mod"> <code>osMemoryPoolId_t <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga497ced5d72dc5cd405c4c418516220dc" title="Create and Initialize a Memory Pool object.">osMemoryPoolNew</a> (uint32_t block_count, uint32_t block_size, const <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#structosMemoryPoolAttr__t" title="Attributes structure for memory pool.">osMemoryPoolAttr_t</a> *attr)</code> <br  />
619  <code>osPoolId &#160; &#160; &#160; &#160; osPoolCreate (const osPoolDef_t * pool_def)</code> <br  />
620  <br  />
621   Get number of memory blocks available in a Memory Pool.   <br  />
622 <ul>
623 <li>The function <b>osMemoryPoolNew</b> replaces the RTOS v1 function <b>osPoolCreate</b>.</li>
624 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga2e44473caf338266f56800960294f960">osMemoryPoolId_t</a>.</li>
625 <li>Parameter list and parameter types have changed.</li>
626 </ul>
627 </div><div class="mod"> </div><h1><a class="anchor" id="mig_msgQueue"></a>
628 Message Queue</h1>
629 <p>In general, messages are now using fixed size memory instead of being 32-bit values. Refer to <a class="el" href="group__CMSIS__RTOS__Message.html">Message Queue</a> for details.</p>
630 <hr  />
631 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__Message.html#gaba987f665444e0d83fa6a3a68bc72abe" title="Delete a Message Queue object.">osMessageQueueDelete</a> (osMessageQueueId_t mq_id)</code> <br  />
632  <em>none</em> <br  />
633  <br  />
634   Delete a Message Queue object.   <br  />
635  New function. </div><hr  />
636 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__Message.html#gad90d4959466a7a65105061da8256ab9e" title="Get a Message from a Queue or timeout if Queue is empty.">osMessageQueueGet</a> (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout)</code> <br  />
637  <code>osEvent &#160;&#160; osMessageGet (osMessageQId queue_id, uint32_t timeout)</code> <br  />
638  <br  />
639   Get a Message from a Queue or timeout if Queue is empty.   <br  />
640 <ul>
641 <li>The function <b>osMessageQueueGet</b> replaces the RTOS v1 function <b>osMessageGet</b>.</li>
642 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
643 <li>The parameter list and parameter types have changed.</li>
644 </ul>
645 </div><div class="mod"> </div><hr  />
646 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__Message.html#gac24f87d4f395e9e9c900c320e45ade8a" title="Get maximum number of messages in a Message Queue.">osMessageQueueGetCapacity</a> (osMessageQueueId_t mq_id)</code> <br  />
647  <em>none</em> <br  />
648  <br  />
649   Get maximum number of messages in a Message Queue.   <br  />
650  New function. </div><hr  />
651 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__Message.html#ga6a32ac394fcff568b251c160cc3014b2" title="Get number of queued messages in a Message Queue.">osMessageQueueGetCount</a> (osMessageQueueId_t mq_id)</code> <br  />
652  <em>none</em> <br  />
653  <br  />
654   Get number of queued messages in a Message Queue.   <br  />
655  New function. </div><hr  />
656 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__Message.html#ga96d3d84069b20359de48109e28a1a89e" title="Get maximum message size in a Message Queue.">osMessageQueueGetMsgSize</a> (osMessageQueueId_t mq_id)</code> <br  />
657  <em>none</em> <br  />
658  <br  />
659   Get maximum message size in a Message Queue.   <br  />
660  New function. </div><hr  />
661 <div class="new"> <code>const char *<a class="el" href="group__CMSIS__RTOS__Message.html#gae7cf7bf2b97a5ae481fb60fcce99247a" title="Get name of a Message Queue object.">osMessageQueueGetName</a> (osMessageQueueId_t mq_id)</code> <br  />
662  <em>none</em> <br  />
663  <br  />
664   Get name of a Message Queue object.   <br  />
665  New function. </div><hr  />
666 <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__Message.html#gaddf0904427436dd3880d46263c2dc9fa" title="Get number of available slots for messages in a Message Queue.">osMessageQueueGetSpace</a> (osMessageQueueId_t mq_id)</code> <br  />
667  <em>none</em> <br  />
668  <br  />
669   Get number of available slots for messages in a Message Queue.   <br  />
670  New function. </div><hr  />
671 <div class="mod"> <code>osMessageQueueId_t <a class="el" href="group__CMSIS__RTOS__Message.html#ga24e895a00f9d484db33aaf784c57bfed" title="Create and Initialize a Message Queue object.">osMessageQueueNew</a> (uint32_t msg_count, uint32_t msg_size, const <a class="el" href="group__CMSIS__RTOS__Message.html#structosMessageQueueAttr__t" title="Attributes structure for message queue.">osMessageQueueAttr_t</a> *attr)</code> <br  />
672  <code>osMessageQId &#160; &#160; &#160; osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id)</code> <br  />
673  <br  />
674   Create and Initialize a Message Queue object.   <br  />
675 <ul>
676 <li>The function <b>osMessageQueueNew</b> replaces the RTOS v1 function <b>osMessageCreate</b>.</li>
677 <li>The return type changed to <a class="el" href="cmsis__os2_8h.html#a206dbc05367e03c39fc6d4d1ebcff317">osMessageQueueId_t</a>.</li>
678 <li>The parameter list and parameter types have changed.</li>
679 </ul>
680 </div><div class="mod"> </div><hr  />
681 <div class="mod"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__Message.html#gaa515fc8b956f721a8f72b2c505813bfc" title="Put a Message into a Queue or timeout if Queue is full.">osMessageQueuePut</a> (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout)</code> <br  />
682  <code>osStatus &#160; osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t timeout)</code> <br  />
683  <br  />
684   Put a Message into a Queue or timeout if Queue is full.   <br  />
685 <ul>
686 <li>The function <b>osMessageQueuePut</b> replaces the RTOS v1 function <b>osMessagePut</b>.</li>
687 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e" title="Status code values returned by CMSIS-RTOS functions.">osStatus_t</a>.</li>
688 <li>The parameter list and parameter types have changed.</li>
689 </ul>
690 </div><div class="mod"> </div><hr  />
691 <div class="new"> <code>osStatus_t <a class="el" href="group__CMSIS__RTOS__Message.html#gac6dce7f9ad132d266292c2e979d861b4" title="Reset a Message Queue to initial empty state.">osMessageQueueReset</a> (osMessageQueueId_t mq_id)</code> <br  />
692  <em>none</em> <br  />
693  <br  />
694   Reset a Message Queue to initial empty state.   <br  />
695  New function. </div><h1><a class="anchor" id="mig_mailQueue"></a>
696 Mail Queue</h1>
697 <p>The <b>Mail Queue</b> RTOS v1 functions have been deprecated. Use the functionality of the <a class="el" href="group__CMSIS__RTOS__Message.html">Message Queue</a> instead. Differences are listed under <a class="el" href="os2MigrationFunctions.html#mig_msgQueue">Message Queue</a>.</p>
698 <hr  />
699 <div class="del"> <em>none</em> <br  />
700  <code>void * osMailAlloc (osMailQId queue_id, uint32_t timeout)</code> <br  />
701  <br  />
702 Deprecated. </div><hr  />
703 <div class="del"> <em>none</em> <br  />
704  <code>void * osMailCAlloc (osMailQId queue_id, uint32_t timeout)</code> <br  />
705  <br  />
706 Deprecated. </div><hr  />
707 <div class="del"> <em>none</em> <br  />
708  <code>osMailQId osMailCreate (const osMailQDef_t *queue_def, osThreadId thread_id)</code> <br  />
709  <br  />
710 Deprecated. </div><hr  />
711 <div class="del"> <em>none</em> <br  />
712  <code>osStatus osMailFree (osMailQId queue_id, void *mail)</code> <br  />
713  <br  />
714 Deprecated. </div><hr  />
715 <div class="del"> <em>none</em> <br  />
716  <code>osEvent osMailGet (osMailQId queue_id, uint32_t timeout)</code> <br  />
717  <br  />
718 Deprecated. </div><hr  />
719 <div class="del"> <em>none</em> <br  />
720  <code>osStatus osMailPut (osMailQId queue_id, void *mail)</code> <br  />
721  <br  />
722 Deprecated. </div><h1><a class="anchor" id="mig_signalEvents"></a>
723 Signal Events</h1>
724 <p>The section RTOS v1 <b>Signal Events</b> has been deprecated. Use the functions listed under <a class="el" href="os2MigrationFunctions.html#mig_threadFlags">Thread Flags</a> instead.</p>
725 <hr  />
726 <div class="del"> <em>none</em> <br  />
727  <code>int32_t osSignalClear (osThreadId thread_id, int32_t signals)</code> <br  />
728  <br  />
729 Deprecated. </div><hr  />
730 <div class="del"> <em>none</em> <br  />
731  <code>int32_t osSignalSet (osThreadId thread_id, int32_t signals)</code> <br  />
732  <br  />
733 Deprecated. </div><hr  />
734 <div class="del"> <em>none</em> <br  />
735  <code>osEvent osSignalWait (int32_t signals, uint32_t timeout)</code> <br  />
736  <br  />
737 Deprecated. </div> </div></div><!-- contents -->
738 </div><!-- PageDoc -->
739 </div><!-- doc-content -->
740 <!-- start footer part -->
741 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
742   <ul>
743     <li class="footer">
744       <script type="text/javascript">
745         <!--
746         writeFooter.call(this);
747         //-->
748       </script> 
749     </li>
750   </ul>
751 </div>
752 </body>
753 </html>