os2MigrationFunctions.html 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <title>Detailed API Function Differences</title>
  7. <title>CMSIS-RTOS2: Detailed API Function Differences</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <link href="cmsis.css" rel="stylesheet" type="text/css" />
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <script type="text/javascript" src="printComponentTabs.js"></script>
  13. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  14. <script type="text/javascript" src="resize.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(initResizable);
  18. $(window).load(resizeHeight);
  19. </script>
  20. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  21. <script type="text/javascript" src="search/search.js"></script>
  22. <script type="text/javascript">
  23. $(document).ready(function() { searchBox.OnSelectItem(0); });
  24. </script>
  25. </head>
  26. <body>
  27. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  28. <div id="titlearea">
  29. <table cellspacing="0" cellpadding="0">
  30. <tbody>
  31. <tr style="height: 46px;">
  32. <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  33. <td style="padding-left: 0.5em;">
  34. <div id="projectname">CMSIS-RTOS2
  35. &#160;<span id="projectnumber">Version 2.1.3</span>
  36. </div>
  37. <div id="projectbrief">Real-Time Operating System: API and RTX Reference Implementation</div>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. <!-- end header part -->
  44. <div id="CMSISnav" class="tabs1">
  45. <ul class="tablist">
  46. <script type="text/javascript">
  47. <!--
  48. writeComponentTabs.call(this);
  49. //-->
  50. </script>
  51. </ul>
  52. </div>
  53. <!-- Generated by Doxygen 1.8.6 -->
  54. <script type="text/javascript">
  55. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  56. </script>
  57. <div id="navrow1" class="tabs">
  58. <ul class="tablist">
  59. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  60. <li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
  61. <li><a href="modules.html"><span>Reference</span></a></li>
  62. <li>
  63. <div id="MSearchBox" class="MSearchBoxInactive">
  64. <span class="left">
  65. <img id="MSearchSelect" src="search/mag_sel.png"
  66. onmouseover="return searchBox.OnSearchSelectShow()"
  67. onmouseout="return searchBox.OnSearchSelectHide()"
  68. alt=""/>
  69. <input type="text" id="MSearchField" value="Search" accesskey="S"
  70. onfocus="searchBox.OnSearchFieldFocus(true)"
  71. onblur="searchBox.OnSearchFieldFocus(false)"
  72. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  73. </span><span class="right">
  74. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  75. </span>
  76. </div>
  77. </li>
  78. </ul>
  79. </div>
  80. </div><!-- top -->
  81. <div id="side-nav" class="ui-resizable side-nav-resizable">
  82. <div id="nav-tree">
  83. <div id="nav-tree-contents">
  84. <div id="nav-sync" class="sync"></div>
  85. </div>
  86. </div>
  87. <div id="splitbar" style="-moz-user-select:none;"
  88. class="ui-resizable-handle">
  89. </div>
  90. </div>
  91. <script type="text/javascript">
  92. $(document).ready(function(){initNavTree('os2MigrationFunctions.html','');});
  93. </script>
  94. <div id="doc-content">
  95. <!-- window showing the filter options -->
  96. <div id="MSearchSelectWindow"
  97. onmouseover="return searchBox.OnSearchSelectShow()"
  98. onmouseout="return searchBox.OnSearchSelectHide()"
  99. onkeydown="return searchBox.OnSearchSelectKey(event)">
  100. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  101. <!-- iframe showing the search results (closed by default) -->
  102. <div id="MSearchResultsWindow">
  103. <iframe src="javascript:void(0)" frameborder="0"
  104. name="MSearchResults" id="MSearchResults">
  105. </iframe>
  106. </div>
  107. <div class="header">
  108. <div class="headertitle">
  109. <div class="title">Detailed API Function Differences </div> </div>
  110. </div><!--header-->
  111. <div class="contents">
  112. <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>
  113. <ul>
  114. <li>RTOS API v2 function prototype</li>
  115. <li>RTOS API v1 function prototype that is equivalent or provides similar functionality</li>
  116. <li>Brief description of the RTOS v2 function.</li>
  117. <li>Description of the difference.</li>
  118. </ul>
  119. <p>The background color indicates:</p>
  120. <ul>
  121. <li><div class="new">Green: New functions in API v2 that are not available in API v1 </div></li>
  122. <li><div class="mod">Amber: Functions that are modified or replaced in API v2 compared to API v1 </div></li>
  123. <li><div class="del">Red: Functions in API v1 that are deprecated in API v2 </div></li>
  124. </ul>
  125. <h1><a class="anchor" id="mig_kernel"></a>
  126. Kernel Information and Control</h1>
  127. <hr/>
  128. <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/>
  129. <em>none</em> <br/>
  130. <br/>
  131. Get RTOS Kernel Information. <br/>
  132. New function <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga6f7764e7250c5c5364c00c45a5d1d199" title="Get RTOS Kernel Information. ">osKernelGetInfo</a>. </div><hr/>
  133. <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/>
  134. <code>int32_t &#160; &#160; &#160; &#160; osKernelRunning (void)</code> <br/>
  135. <br/>
  136. Get the current RTOS Kernel state. <br/>
  137. </p>
  138. <ul>
  139. <li>The function <b>osKernelGetState</b> replaces the RTOS v1 function <b>osKernelRunning</b>.</li>
  140. <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga08326469274b668140ca934b168a5ad4">osKernelState_t</a>.</li>
  141. </ul>
  142. </div><div class="mod"> </div><hr/>
  143. <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/>
  144. <em>none</em> <br/>
  145. <br/>
  146. Get the RTOS kernel tick count. <br/>
  147. New function. </div><hr/>
  148. <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/>
  149. <em>none</em> <br/>
  150. <br/>
  151. Get the RTOS kernel tick frequency. <br/>
  152. </p>
  153. <ul>
  154. <li>The function <b>osKernelGetTickFreq</b> replaces the RTOS v1 macro <b>osKernelTickMicroSec</b>.</li>
  155. </ul>
  156. </div><div class="new"> </div><hr/>
  157. <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/>
  158. <code>uint32_t osKernelSysTick (void)</code> <br/>
  159. <br/>
  160. Get the RTOS kernel system timer count. <br/>
  161. </p>
  162. <ul>
  163. <li>The function <b>osKernelGetSysTimerCount</b> replaces the RTOS v1 function <b>osKernelSysTick</b>.</li>
  164. </ul>
  165. </div><div class="mod"> </div><hr/>
  166. <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/>
  167. <em>none</em> <br/>
  168. <br/>
  169. Get the RTOS kernel system timer frequency. <br/>
  170. New function. </div><hr/>
  171. <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/>
  172. <code>osStatus &#160; osKernelInitialize (void)</code> <br/>
  173. <br/>
  174. Initialize the RTOS Kernel. <br/>
  175. </p>
  176. <ul>
  177. <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
  178. </ul>
  179. </div><div class="mod"> </div><hr/>
  180. <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/>
  181. <em>none</em> <br/>
  182. <br/>
  183. Lock the RTOS Kernel scheduler. <br/>
  184. New function. </div><hr/>
  185. <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/>
  186. <em>none</em> <br/>
  187. <br/>
  188. Unlock the RTOS Kernel scheduler. <br/>
  189. New function. </div><hr/>
  190. <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/>
  191. <em>none</em> <br/>
  192. <br/>
  193. Restore the RTOS Kernel scheduler lock state. <br/>
  194. New function. </div><hr/>
  195. <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/>
  196. <code>osStatus &#160; osKernelStart (void)</code> <br/>
  197. <br/>
  198. Start the RTOS Kernel scheduler. <br/>
  199. </p>
  200. <ul>
  201. <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
  202. </ul>
  203. </div><div class="mod"> </div><hr/>
  204. <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/>
  205. <em>none</em> <br/>
  206. <br/>
  207. Suspend the RTOS Kernel scheduler. <br/>
  208. New function. </div><hr/>
  209. <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/>
  210. <em>none</em> <br/>
  211. <br/>
  212. Resume the RTOS Kernel scheduler. <br/>
  213. New function. </div><h1><a class="anchor" id="mig_threadMgmt"></a>
  214. Thread Management</h1>
  215. <hr/>
  216. <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/>
  217. <em>none</em> <br/>
  218. <br/>
  219. Detach a thread (thread storage can be reclaimed when thread terminates). <br/>
  220. New function. </div><hr/>
  221. <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/>
  222. <em>none</em> <br/>
  223. <br/>
  224. Enumerate active threads. <br/>
  225. New function. </div><hr/>
  226. <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/>
  227. <em>none</em> <br/>
  228. <br/>
  229. Terminate execution of current running thread. <br/>
  230. New function. </div><hr/>
  231. <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/>
  232. <em>none</em> <br/>
  233. <br/>
  234. Get number of active threads. <br/>
  235. New function. </div><hr/>
  236. <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/>
  237. <em>none</em> <br/>
  238. <br/>
  239. Get name of a thread. <br/>
  240. New function. </div><hr/>
  241. <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/>
  242. <code>osThreadId &#160; osThreadGetId (void)</code> <br/>
  243. <br/>
  244. Return the thread ID of the current running thread. <br/>
  245. </p>
  246. <ul>
  247. <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a>.</li>
  248. </ul>
  249. </div><div class="mod"> </div><hr/>
  250. <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/>
  251. <code>osPriority &#160; osThreadGetPriority (osThreadId thread_id)</code> <br/>
  252. <br/>
  253. Get current priority of a thread. <br/>
  254. </p>
  255. <ul>
  256. <li>Return type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gad4e3e0971b41f2d17584a8c6837342ec" title="Priority values. ">osPriority_t</a>.</li>
  257. <li>Parameter type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a>.</li>
  258. </ul>
  259. </div><div class="mod"> </div><hr/>
  260. <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/>
  261. <em>none</em> <br/>
  262. <br/>
  263. Get stack size of a thread. <br/>
  264. New function. </div><hr/>
  265. <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/>
  266. <em>none</em> <br/>
  267. <br/>
  268. Get available stack space of a thread based on stack watermark recording during execution. <br/>
  269. New function. </div><hr/>
  270. <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/>
  271. <em>none</em> <br/>
  272. <br/>
  273. Get current thread state of a thread. <br/>
  274. New function. </div><hr/>
  275. <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/>
  276. <em>none</em> <br/>
  277. <br/>
  278. Wait for specified thread to terminate. <br/>
  279. New function. </div><hr/>
  280. <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/>
  281. <code>osThreadId &#160; osThreadCreate (const osThreadDef_t *thread_def, void *argument)</code> <br/>
  282. <br/>
  283. Create a thread and add it to Active Threads. <br/>
  284. </p>
  285. <ul>
  286. <li>The function <b>osThreadNew</b> replaces the RTOS v1 function <b>osThreadCreate</b>.</li>
  287. <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>
  288. <li>New function prototype is <code>void func (void *arg)</code>, before: <code>void func (const void *arg)</code>.</li>
  289. </ul>
  290. </div><div class="mod"> </div><hr/>
  291. <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/>
  292. <em>none</em> <br/>
  293. <br/>
  294. Resume execution of a thread. <br/>
  295. New function. </div><hr/>
  296. <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/>
  297. <code>osStatus &#160; osThreadSetPriority (osThreadId thread_id, osPriority priority)</code> <br/>
  298. <br/>
  299. Change priority of a thread. <br/>
  300. </p>
  301. <ul>
  302. <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>
  303. <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>
  304. </ul>
  305. </div><div class="mod"> </div><hr/>
  306. <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/>
  307. <em>none</em> <br/>
  308. <br/>
  309. Suspend execution of a thread. <br/>
  310. New function. </div><hr/>
  311. <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/>
  312. <code>osStatus &#160; osThreadTerminate (osThreadId thread_id)</code> <br/>
  313. <br/>
  314. Terminate execution of a thread. <br/>
  315. </p>
  316. <ul>
  317. <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>
  318. <li>Parameter type changed to <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a>.</li>
  319. </ul>
  320. </div><div class="mod"> </div><hr/>
  321. <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/>
  322. <code>osStatus &#160; osThreadYield (void)</code> <br/>
  323. <br/>
  324. Pass control to next thread that is in state <b>READY</b>. <br/>
  325. </p>
  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. </ul>
  329. </div><div class="mod"> </div><h1><a class="anchor" id="mig_threadFlags"></a>
  330. Thread Flags</h1>
  331. <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>
  332. <hr/>
  333. <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/>
  334. <em>none</em> <br/>
  335. <br/>
  336. Set the specified Thread Flags of a thread. <br/>
  337. New function. </div><hr/>
  338. <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/>
  339. <em>none</em> <br/>
  340. <br/>
  341. Clear the specified Thread Flags of current running thread. <br/>
  342. New function. </div><hr/>
  343. <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/>
  344. <em>none</em> <br/>
  345. <br/>
  346. Get the current Thread Flags of current running thread. <br/>
  347. New function. </div><hr/>
  348. <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/>
  349. <em>none</em> <br/>
  350. <br/>
  351. Wait for one or more Thread Flags of the current running thread to become signaled. <br/>
  352. New function. </div><h1><a class="anchor" id="mig_eventFlags"></a>
  353. Event Flags</h1>
  354. <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>
  355. <hr/>
  356. <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/>
  357. <em>none</em> <br/>
  358. <br/>
  359. Clear the specified Event Flags. <br/>
  360. New function. </div><hr/>
  361. <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/>
  362. <em>none</em> <br/>
  363. <br/>
  364. Get name of an Event Flags object. <br/>
  365. New function. </div><hr/>
  366. <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/>
  367. <em>none</em> <br/>
  368. <br/>
  369. Delete an Event Flags object. <br/>
  370. New function. </div><hr/>
  371. <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/>
  372. <em>none</em> <br/>
  373. <br/>
  374. Get the current Event Flags. <br/>
  375. New function. </div><hr/>
  376. <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/>
  377. <em>none</em> <br/>
  378. <br/>
  379. Create and Initialize an Event Flags object. <br/>
  380. New function. </div><hr/>
  381. <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/>
  382. <em>none</em> <br/>
  383. <br/>
  384. Set the specified Event Flags. <br/>
  385. New function. </div><hr/>
  386. <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/>
  387. <em>none</em> <br/>
  388. <br/>
  389. Wait for one or more Event Flags to become signaled. <br/>
  390. New function. </div><h1><a class="anchor" id="mig_wait"></a>
  391. Generic Wait Functions</h1>
  392. <p>Refer to <a class="el" href="group__CMSIS__RTOS__Wait.html">Generic Wait Functions</a> for details.</p>
  393. <hr/>
  394. <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/>
  395. <code>osStatus &#160; osDelay (uint32_t timeout)</code> <br/>
  396. <br/>
  397. Wait for Timeout (Time Delay). <br/>
  398. </p>
  399. <ul>
  400. <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>
  401. </ul>
  402. </div><div class="mod"> </div><hr/>
  403. <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/>
  404. <em>none</em> <br/>
  405. <br/>
  406. Wait until specified time. <br/>
  407. New function. </div><hr/>
  408. <div class="del"> <em>none</em> <br/>
  409. <code>osEvent osWait (uint32_t millisec)</code> <br/>
  410. <br/>
  411. Deprecated. </div><h1><a class="anchor" id="mig_timer"></a>
  412. Timer Management</h1>
  413. <p>Refer to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html">Timer Management</a> for details.</p>
  414. <hr/>
  415. <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/>
  416. <code>osStatus &#160; osTimerDelete (osTimerId timer_id)</code> <br/>
  417. <br/>
  418. Delete a timer. <br/>
  419. </p>
  420. <ul>
  421. <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>
  422. <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
  423. </ul>
  424. </div><div class="mod"> </div><hr/>
  425. <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/>
  426. <em>none</em> <br/>
  427. <br/>
  428. Get name of a timer. <br/>
  429. New function. </div><hr/>
  430. <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/>
  431. <em>none</em> <br/>
  432. <br/>
  433. Check if a timer is running. <br/>
  434. New function. </div><hr/>
  435. <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/>
  436. <code>osTimerId &#160; osTimerCreate (const osTimerDef_t *timer_def, os_timer_type type, void *argument)</code> <br/>
  437. <br/>
  438. Create and Initialize a timer. <br/>
  439. </p>
  440. <ul>
  441. <li>The function <b>osTimerNew</b> replaces the RTOS v1 function <b>osTimerCreate</b>.</li>
  442. <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
  443. <li>The parameter list and types have changed.</li>
  444. </ul>
  445. </div><div class="mod"> </div><hr/>
  446. <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/>
  447. <code>osStatus &#160; osTimerStart (osTimerId timer_id, uint32_t timeout)</code> <br/>
  448. <br/>
  449. Start or restart a timer. <br/>
  450. </p>
  451. <ul>
  452. <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>
  453. <li>The first parameter type has changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
  454. </ul>
  455. </div><div class="mod"> </div><hr/>
  456. <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/>
  457. <code>osStatus &#160; osTimerStop (osTimerId timer_id)</code> <br/>
  458. <br/>
  459. Stop a timer. <br/>
  460. </p>
  461. <ul>
  462. <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>
  463. <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaad5409379689ee27bb0a0b56ea4a4b34">osTimerId_t</a>.</li>
  464. </ul>
  465. </div><div class="mod"> </div><h1><a class="anchor" id="mig_mutex"></a>
  466. Mutexes</h1>
  467. <p>Refer to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html">Mutex Management</a> for details.</p>
  468. <hr/>
  469. <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/>
  470. <code>osStatus &#160; osMutexWait (osMutexId mutex_id, uint32_t timeout)</code> <br/>
  471. <br/>
  472. Acquire a Mutex or timeout if it is locked. <br/>
  473. </p>
  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. </p>
  485. <ul>
  486. <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__Definitions.html#ga6c0dbe6069e4e7f47bb4cd32ae2b813e">osStatus_t</a>.</li>
  487. <li>The parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
  488. </ul>
  489. </div><div class="mod"> </div><hr/>
  490. <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/>
  491. <em>none</em> <br/>
  492. <br/>
  493. Get name of a Mutex object. <br/>
  494. New function. </div><hr/>
  495. <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/>
  496. <em>none</em> <br/>
  497. <br/>
  498. Get Thread which owns a Mutex object. <br/>
  499. New function. </div><hr/>
  500. <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/>
  501. <code>osMutexId &#160; osMutexCreate (const osMutexDef_t *mutex_def)</code> <br/>
  502. <br/>
  503. Create and Initialize a Mutex object. <br/>
  504. </p>
  505. <ul>
  506. <li>The function <b>osMutexNew</b> replaces the RTOS v1 function <b>osMutexCreate</b>.</li>
  507. <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga313801836c62deb23055efb55a420e42">osMutexId_t</a>.</li>
  508. <li>The parameter type changed to <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#structosMutexAttr__t">osMutexAttr_t</a>.</li>
  509. </ul>
  510. </div><div class="mod"> </div><hr/>
  511. <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/>
  512. <code>osStatus &#160; osMutexRelease (osMutexId mutex_id)</code> <br/>
  513. <br/>
  514. Release a Mutex that was acquired by <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#gabc54686ea0fc281823b1763422d2a924">osMutexAcquire</a>. <br/>
  515. </p>
  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. </p>
  534. <ul>
  535. <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>
  536. <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga6e1c1c4b04175bb92b013c8f37249f40">osSemaphoreId_t</a>.</li>
  537. </ul>
  538. </div><div class="mod"> </div><hr/>
  539. <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/>
  540. <em>none</em> <br/>
  541. <br/>
  542. Get current Semaphore token count. <br/>
  543. New function. </div><hr/>
  544. <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/>
  545. <em>none</em> <br/>
  546. <br/>
  547. Get name of a Semaphore object. <br/>
  548. New function. </div><hr/>
  549. <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/>
  550. <code>osSemaphoreId &#160; osSemaphoreCreate (const osSemaphoreDef_t *semaphore_def, int32_t count)</code> <br/>
  551. <br/>
  552. Create and Initialize a Semaphore object. <br/>
  553. </p>
  554. <ul>
  555. <li>The function <b>osSemaphoreNew</b> replaces the RTOS v1 function <b>osSemaphoreCreate</b>.</li>
  556. <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga6e1c1c4b04175bb92b013c8f37249f40">osSemaphoreId_t</a>.</li>
  557. <li>The parameter list and types have changed.</li>
  558. </ul>
  559. </div><div class="mod"> </div><hr/>
  560. <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/>
  561. <code>osStatus &#160; osSemaphoreRelease (osSemaphoreId semaphore_id)</code> <br/>
  562. <br/>
  563. Release a Semaphore token up to the initial maximum count. <br/>
  564. </p>
  565. <ul>
  566. <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>
  567. <li>The parameter type has changed to <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga6e1c1c4b04175bb92b013c8f37249f40">osSemaphoreId_t</a>.</li>
  568. </ul>
  569. </div><div class="mod"> </div><hr/>
  570. <div class="del"> <em>none</em> <br/>
  571. <code>int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t timeout)</code> <br/>
  572. <br/>
  573. 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>
  574. Memory Pool</h1>
  575. <hr/>
  576. <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/>
  577. <code>void * osPoolAlloc &#160;(osPoolId pool_id)</code> <br/>
  578. <br/>
  579. Allocate a memory block from a Memory Pool. <br/>
  580. </p>
  581. <ul>
  582. <li>The function <b>osMemoryPoolAlloc</b> replaces both RTOS v1 functions <b>osPoolAlloc</b>.</li>
  583. <li>The parameter list and types changed.</li>
  584. </ul>
  585. </div><div class="mod"> </div><hr/>
  586. <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/>
  587. <em>none</em> <br/>
  588. <br/>
  589. Delete a Memory Pool object. <br/>
  590. New function. </div><hr/>
  591. <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/>
  592. <code>osStatus &#160; osPoolFree (osPoolId pool_id, void * block)</code> <br/>
  593. <br/>
  594. Return an allocated memory block back to a Memory Pool. <br/>
  595. </p>
  596. <ul>
  597. <li>The function <b>osMemoryPoolFree</b> replaces the RTOS v1 function <b>osPoolFree</b>.</li>
  598. <li>The first parameter type <b>osMemoryPoolId_t</b> replaces the ROTS v1 type <b>osPoolId</b>.</li>
  599. </ul>
  600. </div><div class="mod"> </div><hr/>
  601. <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/>
  602. <em>none</em> <br/>
  603. <br/>
  604. Get memory block size 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#gad696e94bfbe28f0b6613f9303fdf6a37" title="Get maximum number of memory blocks in a Memory Pool. ">osMemoryPoolGetCapacity</a> (osMemoryPoolId_t mp_id)</code> <br/>
  607. <em>none</em> <br/>
  608. <br/>
  609. Get maximum number of memory blocks in a Memory Pool. <br/>
  610. New function. </div><hr/>
  611. <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/>
  612. <em>none</em> <br/>
  613. <br/>
  614. Get number of memory blocks used in a Memory Pool. <br/>
  615. New function. </div><hr/>
  616. <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/>
  617. <em>none</em> <br/>
  618. <br/>
  619. Get name of a Memory Pool object. <br/>
  620. New function. </div><hr/>
  621. <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/>
  622. <em>none</em> <br/>
  623. <br/>
  624. Get number of memory blocks available in a Memory Pool. <br/>
  625. New function. </div><hr/>
  626. <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/>
  627. <code>osPoolId &#160; &#160; &#160; &#160; osPoolCreate (const osPoolDef_t * pool_def)</code> <br/>
  628. <br/>
  629. Get number of memory blocks available in a Memory Pool. <br/>
  630. </p>
  631. <ul>
  632. <li>The function <b>osMemoryPoolNew</b> replaces the RTOS v1 function <b>osPoolCreate</b>.</li>
  633. <li>The return type changed to <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga2e44473caf338266f56800960294f960">osMemoryPoolId_t</a>.</li>
  634. <li>Parameter list and parameter types have changed.</li>
  635. </ul>
  636. </div><div class="mod"> </div><h1><a class="anchor" id="mig_msgQueue"></a>
  637. Message Queue</h1>
  638. <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>
  639. <hr/>
  640. <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/>
  641. <em>none</em> <br/>
  642. <br/>
  643. Delete a Message Queue object. <br/>
  644. New function. </div><hr/>
  645. <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/>
  646. <code>osEvent &#160;&#160; osMessageGet (osMessageQId queue_id, uint32_t timeout)</code> <br/>
  647. <br/>
  648. Get a Message from a Queue or timeout if Queue is empty. <br/>
  649. </p>
  650. <ul>
  651. <li>The function <b>osMessageQueueGet</b> replaces the RTOS v1 function <b>osMessageGet</b>.</li>
  652. <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>
  653. <li>The parameter list and parameter types have changed.</li>
  654. </ul>
  655. </div><div class="mod"> </div><hr/>
  656. <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/>
  657. <em>none</em> <br/>
  658. <br/>
  659. Get maximum number of messages in a Message Queue. <br/>
  660. New function. </div><hr/>
  661. <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/>
  662. <em>none</em> <br/>
  663. <br/>
  664. Get number of queued messages in a Message Queue. <br/>
  665. New function. </div><hr/>
  666. <div class="new"> <code>uint32_t <a class="el" href="group__CMSIS__RTOS__Message.html#ga96d3d84069b20359de48109e28a1a89e" title="Get maximum message size in a Memory Pool. ">osMessageQueueGetMsgSize</a> (osMessageQueueId_t mq_id)</code> <br/>
  667. <em>none</em> <br/>
  668. <br/>
  669. Get maximum message size in a Memory Pool. <br/>
  670. New function. </div><hr/>
  671. <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/>
  672. <em>none</em> <br/>
  673. <br/>
  674. Get name of a Message Queue object. <br/>
  675. New function. </div><hr/>
  676. <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/>
  677. <em>none</em> <br/>
  678. <br/>
  679. Get number of available slots for messages in a Message Queue. <br/>
  680. New function. </div><hr/>
  681. <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/>
  682. <code>osMessageQId &#160; &#160; &#160; osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id)</code> <br/>
  683. <br/>
  684. Create and Initialize a Message Queue object. <br/>
  685. </p>
  686. <ul>
  687. <li>The function <b>osMessageQueueNew</b> replaces the RTOS v1 function <b>osMessageCreate</b>.</li>
  688. <li>The return type changed to <a class="el" href="cmsis__os2_8h.html#a206dbc05367e03c39fc6d4d1ebcff317">osMessageQueueId_t</a>.</li>
  689. <li>The parameter list and parameter types have changed.</li>
  690. </ul>
  691. </div><div class="mod"> </div><hr/>
  692. <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/>
  693. <code>osStatus &#160; osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t timeout)</code> <br/>
  694. <br/>
  695. Put a Message into a Queue or timeout if Queue is full. <br/>
  696. </p>
  697. <ul>
  698. <li>The function <b>osMessageQueuePut</b> replaces the RTOS v1 function <b>osMessagePut</b>.</li>
  699. <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>
  700. <li>The parameter list and parameter types have changed.</li>
  701. </ul>
  702. </div><div class="mod"> </div><hr/>
  703. <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/>
  704. <em>none</em> <br/>
  705. <br/>
  706. Reset a Message Queue to initial empty state. <br/>
  707. New function. </div><h1><a class="anchor" id="mig_mailQueue"></a>
  708. Mail Queue</h1>
  709. <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>
  710. <hr/>
  711. <div class="del"> <em>none</em> <br/>
  712. <code>void * osMailAlloc (osMailQId queue_id, uint32_t timeout)</code> <br/>
  713. <br/>
  714. Deprecated. </div><hr/>
  715. <div class="del"> <em>none</em> <br/>
  716. <code>void * osMailCAlloc (osMailQId queue_id, uint32_t timeout)</code> <br/>
  717. <br/>
  718. Deprecated. </div><hr/>
  719. <div class="del"> <em>none</em> <br/>
  720. <code>osMailQId osMailCreate (const osMailQDef_t *queue_def, osThreadId thread_id)</code> <br/>
  721. <br/>
  722. Deprecated. </div><hr/>
  723. <div class="del"> <em>none</em> <br/>
  724. <code>osStatus osMailFree (osMailQId queue_id, void *mail)</code> <br/>
  725. <br/>
  726. Deprecated. </div><hr/>
  727. <div class="del"> <em>none</em> <br/>
  728. <code>osEvent osMailGet (osMailQId queue_id, uint32_t timeout)</code> <br/>
  729. <br/>
  730. Deprecated. </div><hr/>
  731. <div class="del"> <em>none</em> <br/>
  732. <code>osStatus osMailPut (osMailQId queue_id, void *mail)</code> <br/>
  733. <br/>
  734. Deprecated. </div><h1><a class="anchor" id="mig_signalEvents"></a>
  735. Signal Events</h1>
  736. <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>
  737. <hr/>
  738. <div class="del"> <em>none</em> <br/>
  739. <code>int32_t osSignalClear (osThreadId thread_id, int32_t signals)</code> <br/>
  740. <br/>
  741. Deprecated. </div><hr/>
  742. <div class="del"> <em>none</em> <br/>
  743. <code>int32_t osSignalSet (osThreadId thread_id, int32_t signals)</code> <br/>
  744. <br/>
  745. Deprecated. </div><hr/>
  746. <div class="del"> <em>none</em> <br/>
  747. <code>osEvent osSignalWait (int32_t signals, uint32_t timeout)</code> <br/>
  748. <br/>
  749. Deprecated. </div> </div></div><!-- contents -->
  750. </div><!-- doc-content -->
  751. <!-- start footer part -->
  752. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  753. <ul>
  754. <li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="os2Migration.html">Migration from API v1 to API v2</a></li>
  755. <li class="footer">Generated on Thu Apr 9 2020 15:49:59 for CMSIS-RTOS2 Version 2.1.3 by Arm Ltd. All rights reserved.
  756. <!--
  757. <a href="http://www.doxygen.org/index.html">
  758. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
  759. -->
  760. </li>
  761. </ul>
  762. </div>
  763. </body>
  764. </html>