]> begriffs open source - cmsis/blob - main/RTOS2/html/os2Migration.html
Update documentation for branch main
[cmsis] / main / RTOS2 / html / os2Migration.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: Migration from API v1 to API v2</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</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 <script type="text/javascript">
83   writeSubComponentTabs.call(this);
84 </script>
85 <!-- Generated by Doxygen 1.9.6 -->
86 <script type="text/javascript">
87 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
88 var searchBox = new SearchBox("searchBox", "search/",'.html');
89 /* @license-end */
90 </script>
91 </div><!-- top -->
92 <div id="side-nav" class="ui-resizable side-nav-resizable">
93   <div id="nav-tree">
94     <div id="nav-tree-contents">
95       <div id="nav-sync" class="sync"></div>
96     </div>
97   </div>
98   <div id="splitbar" style="-moz-user-select:none;" 
99        class="ui-resizable-handle">
100   </div>
101 </div>
102 <script type="text/javascript">
103 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
104 $(document).ready(function(){initNavTree('os2Migration.html',''); initResizable(); });
105 /* @license-end */
106 </script>
107 <div id="doc-content">
108 <!-- window showing the filter options -->
109 <div id="MSearchSelectWindow"
110      onmouseover="return searchBox.OnSearchSelectShow()"
111      onmouseout="return searchBox.OnSearchSelectHide()"
112      onkeydown="return searchBox.OnSearchSelectKey(event)">
113 </div>
114
115 <!-- iframe showing the search results (closed by default) -->
116 <div id="MSearchResultsWindow">
117 <div id="MSearchResults">
118 <div class="SRPage">
119 <div id="SRIndex">
120 <div id="SRResults"></div>
121 <div class="SRStatus" id="Loading">Loading...</div>
122 <div class="SRStatus" id="Searching">Searching...</div>
123 <div class="SRStatus" id="NoMatches">No Matches</div>
124 </div>
125 </div>
126 </div>
127 </div>
128
129 <div><div class="header">
130   <div class="headertitle"><div class="title">Migration from API v1 to API v2 </div></div>
131 </div><!--header-->
132 <div class="contents">
133 <div class="textblock"><p>This page 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>
134 <ul>
135 <li>RTOS API v2 function prototype</li>
136 <li>RTOS API v1 function prototype that is equivalent or provides similar functionality</li>
137 <li>Brief description of the RTOS v2 function.</li>
138 <li>Description of the difference.</li>
139 </ul>
140 <p>The background color indicates:</p><ul>
141 <li><div class="new">Green: New functions in API v2 that are not available in API v1 </div></li>
142 <li><div class="mod">Amber: Functions that are modified or replaced in API v2 compared to API v1 </div></li>
143 <li><div class="del">Red: Functions in API v1 that are deprecated in API v2 </div></li>
144 </ul>
145 <h1><a class="anchor" id="mig_kernel"></a>
146 Kernel Information and Control</h1>
147 <hr  />
148 <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  />
149  <em>none</em> <br  />
150  <br  />
151   Get RTOS Kernel Information.   <br  />
152  New function <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga6f7764e7250c5c5364c00c45a5d1d199" title="Get RTOS Kernel Information.">osKernelGetInfo</a>. </div><hr  />
153 <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  />
154  <code>int32_t &#160; &#160; &#160; &#160; osKernelRunning (void)</code> <br  />
155  <br  />
156   Get the current RTOS Kernel state.   <br  />
157 <ul>
158 <li>The function <b>osKernelGetState</b> replaces the RTOS v1 function <b>osKernelRunning</b>.</li>
159 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga08326469274b668140ca934b168a5ad4">osKernelState_t</a>.</li>
160 </ul>
161 </div><div class="mod"> </div><hr  />
162 <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  />
163  <em>none</em> <br  />
164  <br  />
165   Get the RTOS kernel tick count.   <br  />
166  New function. </div><hr  />
167 <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  />
168  <em>none</em> <br  />
169  <br  />
170   Get the RTOS kernel tick frequency.   <br  />
171 <ul>
172 <li>The function <b>osKernelGetTickFreq</b> replaces the RTOS v1 macro <b>osKernelTickMicroSec</b>.</li>
173 </ul>
174 </div><div class="new"> </div><hr  />
175 <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  />
176  <code>uint32_t osKernelSysTick (void)</code> <br  />
177  <br  />
178   Get the RTOS kernel system timer count.   <br  />
179 <ul>
180 <li>The function <b>osKernelGetSysTimerCount</b> replaces the RTOS v1 function <b>osKernelSysTick</b>.</li>
181 </ul>
182 </div><div class="mod"> </div><hr  />
183 <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  />
184  <em>none</em> <br  />
185  <br  />
186   Get the RTOS kernel system timer frequency.   <br  />
187  New function. </div><hr  />
188 <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  />
189  <code>osStatus &#160; osKernelInitialize (void)</code> <br  />
190  <br  />
191   Initialize the RTOS Kernel.   <br  />
192 <ul>
193 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
194 </ul>
195 </div><div class="mod"> </div><hr  />
196 <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  />
197  <em>none</em> <br  />
198  <br  />
199   Lock the RTOS Kernel scheduler.   <br  />
200  New function. </div><hr  />
201 <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  />
202  <em>none</em> <br  />
203  <br  />
204   Unlock the RTOS Kernel scheduler.   <br  />
205  New function. </div><hr  />
206 <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  />
207  <em>none</em> <br  />
208  <br  />
209   Restore the RTOS Kernel scheduler lock state.   <br  />
210  New function. </div><hr  />
211 <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  />
212  <code>osStatus &#160; osKernelStart (void)</code> <br  />
213  <br  />
214   Start the RTOS Kernel scheduler.   <br  />
215 <ul>
216 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
217 </ul>
218 </div><div class="mod"> </div><hr  />
219 <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  />
220  <em>none</em> <br  />
221  <br  />
222   Suspend the RTOS Kernel scheduler.   <br  />
223  New function. </div><hr  />
224 <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  />
225  <em>none</em> <br  />
226  <br  />
227   Resume the RTOS Kernel scheduler.   <br  />
228  New function. </div><h1><a class="anchor" id="mig_threadMgmt"></a>
229 Thread Management</h1>
230 <hr  />
231 <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  />
232  <em>none</em> <br  />
233  <br  />
234   Detach a thread (thread storage can be reclaimed when thread terminates).   <br  />
235  New function. </div><hr  />
236 <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  />
237  <em>none</em> <br  />
238  <br  />
239   Enumerate active threads.   <br  />
240  New function. </div><hr  />
241 <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  />
242  <em>none</em> <br  />
243  <br  />
244   Terminate execution of current running thread.   <br  />
245  New function. </div><hr  />
246 <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  />
247  <em>none</em> <br  />
248  <br  />
249   Get number of active threads.   <br  />
250  New function. </div><hr  />
251 <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  />
252  <em>none</em> <br  />
253  <br  />
254   Get name of a thread.   <br  />
255  New function. </div><hr  />
256 <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  />
257  <code>osThreadId &#160; osThreadGetId (void)</code> <br  />
258  <br  />
259   Return the thread ID of the current running thread.   <br  />
260 <ul>
261 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a>.</li>
262 </ul>
263 </div><div class="mod"> </div><hr  />
264 <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  />
265  <code>osPriority &#160; osThreadGetPriority (osThreadId thread_id)</code> <br  />
266  <br  />
267   Get current priority of a thread.   <br  />
268 <ul>
269 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gad4e3e0971b41f2d17584a8c6837342ec" title="Priority values.">osPriority_t</a>.</li>
270 <li>Parameter type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a>.</li>
271 </ul>
272 </div><div class="mod"> </div><hr  />
273 <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  />
274  <em>none</em> <br  />
275  <br  />
276   Get stack size of a thread.   <br  />
277  New function. </div><hr  />
278 <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  />
279  <em>none</em> <br  />
280  <br  />
281   Get available stack space of a thread based on stack watermark recording during execution.   <br  />
282  New function. </div><hr  />
283 <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  />
284  <em>none</em> <br  />
285  <br  />
286   Get current thread state of a thread.   <br  />
287  New function. </div><hr  />
288 <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  />
289  <em>none</em> <br  />
290  <br  />
291   Wait for specified thread to terminate.   <br  />
292  New function. </div><hr  />
293 <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  />
294  <code>osThreadId &#160; osThreadCreate (const osThreadDef_t *thread_def, void *argument)</code> <br  />
295  <br  />
296   Create a thread and add it to Active Threads.   <br  />
297 <ul>
298 <li>The function <b>osThreadNew</b> replaces the RTOS v1 function <b>osThreadCreate</b>.</li>
299 <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>
300 <li>New function prototype is <code>void func (void *arg)</code>, before: <code>void func (const void *arg)</code>.</li>
301 </ul>
302 </div><div class="mod"> </div><hr  />
303 <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  />
304  <em>none</em> <br  />
305  <br  />
306   Resume execution of a thread.   <br  />
307  New function. </div><hr  />
308 <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  />
309  <code>osStatus &#160; osThreadSetPriority (osThreadId thread_id, osPriority priority)</code> <br  />
310  <br  />
311   Change priority of a thread.   <br  />
312 <ul>
313 <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>
314 <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>
315 </ul>
316 </div><div class="mod"> </div><hr  />
317 <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  />
318  <em>none</em> <br  />
319  <br  />
320   Suspend execution of a thread.   <br  />
321  New function. </div><hr  />
322 <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  />
323  <code>osStatus &#160; osThreadTerminate (osThreadId thread_id)</code> <br  />
324  <br  />
325   Terminate execution of a thread.   <br  />
326 <ul>
327 <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>
328 <li>Parameter type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a>.</li>
329 </ul>
330 </div><div class="mod"> </div><hr  />
331 <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  />
332  <code>osStatus &#160; osThreadYield (void)</code> <br  />
333  <br  />
334   Pass control to next thread that is in state <b>READY</b>.   <br  />
335 <ul>
336 <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>
337 </ul>
338 </div><div class="mod"> </div><h1><a class="anchor" id="mig_threadFlags"></a>
339 Thread Flags</h1>
340 <p>New section to synchronize threads using flags. Thread flags and the more flexible <a class="el" href="os2Migration.html#mig_eventFlags">Event Flags</a> are replacing the RTOS v1 <b>Signal Events</b>. Refer to <a class="el" href="os2Migration.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>
341 <hr  />
342 <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  />
343  <em>none</em> <br  />
344  <br  />
345   Set the specified Thread Flags of a thread.   <br  />
346  New function. </div><hr  />
347 <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  />
348  <em>none</em> <br  />
349  <br  />
350   Clear the specified Thread Flags of current running thread.   <br  />
351  New function. </div><hr  />
352 <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  />
353  <em>none</em> <br  />
354  <br  />
355   Get the current Thread Flags of current running thread.   <br  />
356  New function. </div><hr  />
357 <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  />
358  <em>none</em> <br  />
359  <br  />
360   Wait for one or more Thread Flags of the current running thread to become signaled.   <br  />
361  New function. </div><h1><a class="anchor" id="mig_eventFlags"></a>
362 Event Flags</h1>
363 <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="os2Migration.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>
364 <hr  />
365 <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  />
366  <em>none</em> <br  />
367  <br  />
368   Clear the specified Event Flags.   <br  />
369  New function. </div><hr  />
370 <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  />
371  <em>none</em> <br  />
372  <br  />
373   Get name of an Event Flags object.   <br  />
374  New function. </div><hr  />
375 <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  />
376  <em>none</em> <br  />
377  <br  />
378   Delete an Event Flags object.   <br  />
379  New function. </div><hr  />
380 <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  />
381  <em>none</em> <br  />
382  <br  />
383   Get the current Event Flags.   <br  />
384  New function. </div><hr  />
385 <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  />
386  <em>none</em> <br  />
387  <br  />
388   Create and Initialize an Event Flags object.   <br  />
389  New function. </div><hr  />
390 <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  />
391  <em>none</em> <br  />
392  <br  />
393   Set the specified Event Flags.   <br  />
394  New function. </div><hr  />
395 <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  />
396  <em>none</em> <br  />
397  <br  />
398   Wait for one or more Event Flags to become signaled.   <br  />
399  New function. </div><h1><a class="anchor" id="mig_wait"></a>
400 Generic Wait Functions</h1>
401 <p>Refer to <a class="el" href="group__CMSIS__RTOS__Wait.html">Generic Wait Functions</a> for details.</p>
402 <hr  />
403 <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  />
404  <code>osStatus &#160; osDelay (uint32_t timeout)</code> <br  />
405  <br  />
406   Wait for Timeout (Time Delay).   <br  />
407 <ul>
408 <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>
409 </ul>
410 </div><div class="mod"> </div><hr  />
411 <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  />
412  <em>none</em> <br  />
413  <br  />
414   Wait until specified time.   <br  />
415  New function. </div><hr  />
416 <div class="del"> <em>none</em> <br  />
417  <code>osEvent osWait (uint32_t millisec)</code> <br  />
418  <br  />
419 Deprecated. </div><h1><a class="anchor" id="mig_timer"></a>
420 Timer Management</h1>
421 <p>Refer to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html">Timer Management</a> for details.</p>
422 <hr  />
423 <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  />
424  <code>osStatus &#160; osTimerDelete (osTimerId timer_id)</code> <br  />
425  <br  />
426   Delete a timer.   <br  />
427 <ul>
428 <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>
429 <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
430 </ul>
431 </div><div class="mod"> </div><hr  />
432 <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  />
433  <em>none</em> <br  />
434  <br  />
435   Get name of a timer.   <br  />
436  New function. </div><hr  />
437 <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  />
438  <em>none</em> <br  />
439  <br  />
440   Check if a timer is running.   <br  />
441  New function. </div><hr  />
442 <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  />
443  <code>osTimerId &#160; osTimerCreate (const osTimerDef_t *timer_def, os_timer_type type, void *argument)</code> <br  />
444  <br  />
445   Create and Initialize a timer.   <br  />
446 <ul>
447 <li>The function <b>osTimerNew</b> replaces the RTOS v1 function <b>osTimerCreate</b>.</li>
448 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
449 <li>The parameter list and types have changed.</li>
450 </ul>
451 </div><div class="mod"> </div><hr  />
452 <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  />
453  <code>osStatus &#160; osTimerStart (osTimerId timer_id, uint32_t timeout)</code> <br  />
454  <br  />
455   Start or restart a timer.   <br  />
456 <ul>
457 <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>
458 <li>The first parameter type has changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
459 </ul>
460 </div><div class="mod"> </div><hr  />
461 <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  />
462  <code>osStatus &#160; osTimerStop (osTimerId timer_id)</code> <br  />
463  <br  />
464   Stop a timer.   <br  />
465 <ul>
466 <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>
467 <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
468 </ul>
469 </div><div class="mod"> </div><h1><a class="anchor" id="mig_mutex"></a>
470 Mutexes</h1>
471 <p>Refer to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html">Mutex Management</a> for details.</p>
472 <hr  />
473 <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  />
474  <code>osStatus &#160; osMutexWait (osMutexId mutex_id, uint32_t timeout)</code> <br  />
475  <br  />
476   Acquire a Mutex or timeout if it is locked.   <br  />
477 <ul>
478 <li>The function <b>osMutexAcquire</b> replaces the RTOS v1 function <b>osMutexWait</b>.</li>
479 <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
480 <li>First parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
481 </ul>
482 </div><div class="mod"> </div><hr  />
483 <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  />
484  <code>osStatus &#160; osMutexDelete (osMutexId mutex_id)</code> <br  />
485  <br  />
486   Delete a Mutex object.   <br  />
487 <ul>
488 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
489 <li>The parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
490 </ul>
491 </div><div class="mod"> </div><hr  />
492 <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  />
493  <em>none</em> <br  />
494  <br  />
495   Get name of a Mutex object.   <br  />
496  New function. </div><hr  />
497 <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  />
498  <em>none</em> <br  />
499  <br  />
500   Get Thread which owns a Mutex object.   <br  />
501  New function. </div><hr  />
502 <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  />
503  <code>osMutexId &#160; osMutexCreate (const osMutexDef_t *mutex_def)</code> <br  />
504  <br  />
505   Create and Initialize a Mutex object.   <br  />
506 <ul>
507 <li>The function <b>osMutexNew</b> replaces the RTOS v1 function <b>osMutexCreate</b>.</li>
508 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
509 <li>The parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#structosMutexAttr__t">osMutexAttr_t</a>.</li>
510 </ul>
511 </div><div class="mod"> </div><hr  />
512 <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  />
513  <code>osStatus &#160; osMutexRelease (osMutexId mutex_id)</code> <br  />
514  <br  />
515   Release a Mutex that was acquired by <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#gabc54686ea0fc281823b1763422d2a924">osMutexAcquire</a>.   <br  />
516 <ul>
517 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
518 <li>The parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
519 </ul>
520 </div><div class="mod"> </div><h1><a class="anchor" id="mig_sem"></a>
521 Semaphores</h1>
522 <p>Refer to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html">Semaphores</a> for details.</p>
523 <hr  />
524 <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  />
525  <em>none</em> <br  />
526  <br  />
527   Acquire a Semaphore token or timeout if no tokens are available.   <br  />
528  New function. Replaces <code>osSemaphoreWait</code>. </div><hr  />
529 <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  />
530  <code>osStatus &#160; osSemaphoreDelete (osSemaphoreId semaphore_id)</code> <br  />
531  <br  />
532   Delete a Semaphore object.   <br  />
533 <ul>
534 <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>
535 <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga6e1c1c4b04175bb92b013c8f37249f40">osSemaphoreId_t</a>.</li>
536 </ul>
537 </div><div class="mod"> </div><hr  />
538 <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  />
539  <em>none</em> <br  />
540  <br  />
541   Get current Semaphore token count.   <br  />
542  New function. </div><hr  />
543 <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  />
544  <em>none</em> <br  />
545  <br  />
546   Get name of a Semaphore object.   <br  />
547  New function. </div><hr  />
548 <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  />
549  <code>osSemaphoreId &#160; osSemaphoreCreate (const osSemaphoreDef_t *semaphore_def, int32_t count)</code> <br  />
550  <br  />
551   Create and Initialize a Semaphore object.   <br  />
552 <ul>
553 <li>The function <b>osSemaphoreNew</b> replaces the RTOS v1 function <b>osSemaphoreCreate</b>.</li>
554 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga6e1c1c4b04175bb92b013c8f37249f40">osSemaphoreId_t</a>.</li>
555 <li>The parameter list and types have changed.</li>
556 </ul>
557 </div><div class="mod"> </div><hr  />
558 <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  />
559  <code>osStatus &#160; osSemaphoreRelease (osSemaphoreId semaphore_id)</code> <br  />
560  <br  />
561   Release a Semaphore token up to the initial maximum count.   <br  />
562 <ul>
563 <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>
564 <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga6e1c1c4b04175bb92b013c8f37249f40">osSemaphoreId_t</a>.</li>
565 </ul>
566 </div><div class="mod"> </div><hr  />
567 <div class="del"> <em>none</em> <br  />
568  <code>int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t timeout)</code> <br  />
569  <br  />
570 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>
571 Memory Pool</h1>
572 <hr  />
573 <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  />
574  <code>void * osPoolAlloc &#160;(osPoolId pool_id)</code> <br  />
575  <br  />
576   Allocate a memory block from a Memory Pool.   <br  />
577 <ul>
578 <li>The function <b>osMemoryPoolAlloc</b> replaces both RTOS v1 functions <b>osPoolAlloc</b>.</li>
579 <li>The parameter list and types changed.</li>
580 </ul>
581 </div><div class="mod"> </div><hr  />
582 <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  />
583  <em>none</em> <br  />
584  <br  />
585   Delete a Memory Pool object.   <br  />
586  New function. </div><hr  />
587 <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  />
588  <code>osStatus &#160; osPoolFree (osPoolId pool_id, void * block)</code> <br  />
589  <br  />
590   Return an allocated memory block back to a Memory Pool.   <br  />
591 <ul>
592 <li>The function <b>osMemoryPoolFree</b> replaces the RTOS v1 function <b>osPoolFree</b>.</li>
593 <li>The first parameter type <b>osMemoryPoolId_t</b> replaces the ROTS v1 type <b>osPoolId</b>.</li>
594 </ul>
595 </div><div class="mod"> </div><hr  />
596 <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  />
597  <em>none</em> <br  />
598  <br  />
599   Get memory block size in a Memory Pool.   <br  />
600  New function. </div><hr  />
601 <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  />
602  <em>none</em> <br  />
603  <br  />
604   Get maximum number of memory blocks in a Memory Pool.   <br  />
605  New function. </div><hr  />
606 <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  />
607  <em>none</em> <br  />
608  <br  />
609   Get number of memory blocks used in a Memory Pool.   <br  />
610  New function. </div><hr  />
611 <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  />
612  <em>none</em> <br  />
613  <br  />
614   Get name of a Memory Pool object.   <br  />
615  New function. </div><hr  />
616 <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  />
617  <em>none</em> <br  />
618  <br  />
619   Get number of memory blocks available in a Memory Pool.   <br  />
620  New function. </div><hr  />
621 <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  />
622  <code>osPoolId &#160; &#160; &#160; &#160; osPoolCreate (const osPoolDef_t * pool_def)</code> <br  />
623  <br  />
624   Get number of memory blocks available in a Memory Pool.   <br  />
625 <ul>
626 <li>The function <b>osMemoryPoolNew</b> replaces the RTOS v1 function <b>osPoolCreate</b>.</li>
627 <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga2e44473caf338266f56800960294f960">osMemoryPoolId_t</a>.</li>
628 <li>Parameter list and parameter types have changed.</li>
629 </ul>
630 </div><div class="mod"> </div><h1><a class="anchor" id="mig_msgQueue"></a>
631 Message Queue</h1>
632 <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>
633 <hr  />
634 <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  />
635  <em>none</em> <br  />
636  <br  />
637   Delete a Message Queue object.   <br  />
638  New function. </div><hr  />
639 <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  />
640  <code>osEvent &#160;&#160; osMessageGet (osMessageQId queue_id, uint32_t timeout)</code> <br  />
641  <br  />
642   Get a Message from a Queue or timeout if Queue is empty.   <br  />
643 <ul>
644 <li>The function <b>osMessageQueueGet</b> replaces the RTOS v1 function <b>osMessageGet</b>.</li>
645 <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>
646 <li>The parameter list and parameter types have changed.</li>
647 </ul>
648 </div><div class="mod"> </div><hr  />
649 <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  />
650  <em>none</em> <br  />
651  <br  />
652   Get maximum number of messages in a Message Queue.   <br  />
653  New function. </div><hr  />
654 <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  />
655  <em>none</em> <br  />
656  <br  />
657   Get number of queued messages in a Message Queue.   <br  />
658  New function. </div><hr  />
659 <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  />
660  <em>none</em> <br  />
661  <br  />
662   Get maximum message size in a Message Queue.   <br  />
663  New function. </div><hr  />
664 <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  />
665  <em>none</em> <br  />
666  <br  />
667   Get name of a Message Queue object.   <br  />
668  New function. </div><hr  />
669 <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  />
670  <em>none</em> <br  />
671  <br  />
672   Get number of available slots for messages in a Message Queue.   <br  />
673  New function. </div><hr  />
674 <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  />
675  <code>osMessageQId &#160; &#160; &#160; osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id)</code> <br  />
676  <br  />
677   Create and Initialize a Message Queue object.   <br  />
678 <ul>
679 <li>The function <b>osMessageQueueNew</b> replaces the RTOS v1 function <b>osMessageCreate</b>.</li>
680 <li>The return type changed to <a class="el" href="cmsis__os2_8h.html#a206dbc05367e03c39fc6d4d1ebcff317">osMessageQueueId_t</a>.</li>
681 <li>The parameter list and parameter types have changed.</li>
682 </ul>
683 </div><div class="mod"> </div><hr  />
684 <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  />
685  <code>osStatus &#160; osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t timeout)</code> <br  />
686  <br  />
687   Put a Message into a Queue or timeout if Queue is full.   <br  />
688 <ul>
689 <li>The function <b>osMessageQueuePut</b> replaces the RTOS v1 function <b>osMessagePut</b>.</li>
690 <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>
691 <li>The parameter list and parameter types have changed.</li>
692 </ul>
693 </div><div class="mod"> </div><hr  />
694 <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  />
695  <em>none</em> <br  />
696  <br  />
697   Reset a Message Queue to initial empty state.   <br  />
698  New function. </div><h1><a class="anchor" id="mig_mailQueue"></a>
699 Mail Queue</h1>
700 <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="os2Migration.html#mig_msgQueue">Message Queue</a>.</p>
701 <hr  />
702 <div class="del"> <em>none</em> <br  />
703  <code>void * osMailAlloc (osMailQId queue_id, uint32_t timeout)</code> <br  />
704  <br  />
705 Deprecated. </div><hr  />
706 <div class="del"> <em>none</em> <br  />
707  <code>void * osMailCAlloc (osMailQId queue_id, uint32_t timeout)</code> <br  />
708  <br  />
709 Deprecated. </div><hr  />
710 <div class="del"> <em>none</em> <br  />
711  <code>osMailQId osMailCreate (const osMailQDef_t *queue_def, osThreadId thread_id)</code> <br  />
712  <br  />
713 Deprecated. </div><hr  />
714 <div class="del"> <em>none</em> <br  />
715  <code>osStatus osMailFree (osMailQId queue_id, void *mail)</code> <br  />
716  <br  />
717 Deprecated. </div><hr  />
718 <div class="del"> <em>none</em> <br  />
719  <code>osEvent osMailGet (osMailQId queue_id, uint32_t timeout)</code> <br  />
720  <br  />
721 Deprecated. </div><hr  />
722 <div class="del"> <em>none</em> <br  />
723  <code>osStatus osMailPut (osMailQId queue_id, void *mail)</code> <br  />
724  <br  />
725 Deprecated. </div><h1><a class="anchor" id="mig_signalEvents"></a>
726 Signal Events</h1>
727 <p>The section RTOS v1 <b>Signal Events</b> has been deprecated. Use the functions listed under <a class="el" href="os2Migration.html#mig_threadFlags">Thread Flags</a> instead.</p>
728 <hr  />
729 <div class="del"> <em>none</em> <br  />
730  <code>int32_t osSignalClear (osThreadId thread_id, int32_t signals)</code> <br  />
731  <br  />
732 Deprecated. </div><hr  />
733 <div class="del"> <em>none</em> <br  />
734  <code>int32_t osSignalSet (osThreadId thread_id, int32_t signals)</code> <br  />
735  <br  />
736 Deprecated. </div><hr  />
737 <div class="del"> <em>none</em> <br  />
738  <code>osEvent osSignalWait (int32_t signals, uint32_t timeout)</code> <br  />
739  <br  />
740 Deprecated. </div> </div></div><!-- contents -->
741 </div><!-- PageDoc -->
742 </div><!-- doc-content -->
743 <!-- start footer part -->
744 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
745   <ul>
746     <li class="footer">
747       <script type="text/javascript">
748         <!--
749         writeFooter.call(this);
750         //-->
751       </script> 
752     </li>
753   </ul>
754 </div>
755 </body>
756 </html>