pte_osal_api.html 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
  3. <title>PTE: Projects/pthreads/pte_generic_osal.h File Reference</title>
  4. <link href="doxygen.css" rel="stylesheet" type="text/css">
  5. <link href="tabs.css" rel="stylesheet" type="text/css">
  6. </head><body>
  7. <!-- Generated by Doxygen 1.5.3 -->
  8. <div class="tabs">
  9. <ul>
  10. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  11. <li class="current"><a href="files.html"><span>Files</span></a></li>
  12. </ul>
  13. </div>
  14. <h1>Projects/pthreads/pte_generic_osal.h File Reference</h1>
  15. <p>
  16. <a href="pte__generic__osal_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
  17. <tr><td></td></tr>
  18. <tr><td colspan="2"><br><h2>Misc</h2></td></tr>
  19. <tr><td colspan="2"><br><br></td></tr>
  20. <tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> { <br>
  21. &nbsp;&nbsp;<a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b542c92113747d4c2f01ac0392346ef9a">PTE_OS_OK</a> = 0,
  22. <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b917a061effd9af41eb78f673e1a1f992">PTE_OS_NO_RESOURCES</a>,
  23. <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16bf245545c0574e66f040218ec4724c823">PTE_OS_GENERAL_FAILURE</a>,
  24. <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16bced54c5db0dc4c60fdfae17ed6b44eed">PTE_OS_TIMEOUT</a>,
  25. <br>
  26. &nbsp;&nbsp;<a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16baabab6adc711b3215f4a45d1944b48d3">PTE_OS_INTERRUPTED</a>,
  27. <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b75103b48643227172eb796f2aa5938cc">PTE_OS_INVALID_PARAM</a>
  28. <br>
  29. }</td></tr>
  30. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#182cfe699774da3b514e11ca9c7a9beb">pte_osInit</a> (void)</td></tr>
  31. <tr><td colspan="2"><br><h2>Threads</h2></td></tr>
  32. <tr><td colspan="2"><br><br></td></tr>
  33. <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#351fe193de41b62d05e1aa19a3bf1a45">pte_osThreadEntryPoint</a> )(void *params)</td></tr>
  34. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#d1dafbe4855b28a472af00b693338a44">pte_osThreadCreate</a> (<a class="el" href="pte__generic__osal_8h.html#351fe193de41b62d05e1aa19a3bf1a45">pte_osThreadEntryPoint</a> entryPoint, int stackSize, int initialPriority, void *argv, pte_osThreadHandle *ppte_osThreadHandle)</td></tr>
  35. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#ab292e786c9b96e80daf8ae9dc983a72">pte_osThreadStart</a> (pte_osThreadHandle osThreadHandle)</td></tr>
  36. <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#efffdffc7923dbbdb5b930cd24c852d1">pte_osThreadExit</a> ()</td></tr>
  37. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#0bcce6dc9b22691f914b07894394ee38">pte_osThreadWaitForEnd</a> (pte_osThreadHandle threadHandle)</td></tr>
  38. <tr><td class="memItemLeft" nowrap align="right" valign="top">pte_osThreadHandle&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#8e8f80b5c86e1357ce0b40d8333ec969">pte_osThreadGetHandle</a> (void)</td></tr>
  39. <tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#54fce783cb811dc6458ea118ab8f7f1d">pte_osThreadGetPriority</a> (pte_osThreadHandle threadHandle)</td></tr>
  40. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#6782a421eb6c2eb9aa60f3b7ccca1f99">pte_osThreadSetPriority</a> (pte_osThreadHandle threadHandle, int newPriority)</td></tr>
  41. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#685d89f40949c634169c4a7d13de4ee0">pte_osThreadDelete</a> (pte_osThreadHandle handle)</td></tr>
  42. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#cdbcc3abdb03e1a0f6475d5c0759dac7">pte_osThreadExitAndDelete</a> (pte_osThreadHandle handle)</td></tr>
  43. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#28ea17c5ecaaebf7f9b195a91a709e77">pte_osThreadCancel</a> (pte_osThreadHandle threadHandle)</td></tr>
  44. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#5b5034f6f2a2b2f124991728096a8f5d">pte_osThreadCheckCancel</a> (pte_osThreadHandle threadHandle)</td></tr>
  45. <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#5c722b6d1840babcdf9dd1d343eab839">pte_osThreadSleep</a> (unsigned int msecs)</td></tr>
  46. <tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#18cd3561b14611ae16682cbbbf674980">pte_osThreadGetMaxPriority</a> ()</td></tr>
  47. <tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#913badc3cfa6b2a817c2b501d45548fc">pte_osThreadGetMinPriority</a> ()</td></tr>
  48. <tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#b07cacaf7670707cc2741f5d9746571b">pte_osThreadGetDefaultPriority</a> ()</td></tr>
  49. <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
  50. <tr><td colspan="2"><div class="groupHeader">Mutexes</div></td></tr>
  51. <tr><td colspan="2"><div class="groupText"><br><br></div></td></tr>
  52. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#76af3c11297593ebd698c206176b649b">pte_osMutexCreate</a> (pte_osMutexHandle *pHandle)</td></tr>
  53. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#48aa456b2215aaddfaca11189be8dcd6">pte_osMutexDelete</a> (pte_osMutexHandle handle)</td></tr>
  54. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#299605cd2506cc0d7977c41ab3fd0e80">pte_osMutexLock</a> (pte_osMutexHandle handle)</td></tr>
  55. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#04a769a4b8d2e2ee75f775f7a9d9291e">pte_osMutexTimedLock</a> (pte_osMutexHandle handle, unsigned int timeoutMsecs)</td></tr>
  56. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#f202c5379b5fb1799c6054916bb2cf3f">pte_osMutexUnlock</a> (pte_osMutexHandle handle)</td></tr>
  57. <tr><td colspan="2"><div class="groupHeader">Semaphores</div></td></tr>
  58. <tr><td colspan="2"><div class="groupText"><br><br></div></td></tr>
  59. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#cd102e0dbc375040016bde75f94f207f">pte_osSemaphoreCreate</a> (int initialValue, pte_osSemaphoreHandle *pHandle)</td></tr>
  60. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#868f71ff8dfb927393da6620398097ed">pte_osSemaphoreDelete</a> (pte_osSemaphoreHandle handle)</td></tr>
  61. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#8aa3a131d541de9815ec636e30eb4a3a">pte_osSemaphorePost</a> (pte_osSemaphoreHandle handle, int count)</td></tr>
  62. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#faf21b36d98f19bd780b95f475cb0a1a">pte_osSemaphorePend</a> (pte_osSemaphoreHandle handle, unsigned int *pTimeout)</td></tr>
  63. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#4a39bc9845ae936e01627ff67b166c47">pte_osSemaphoreCancellablePend</a> (pte_osSemaphoreHandle handle, unsigned int *pTimeout)</td></tr>
  64. <tr><td colspan="2"><div class="groupHeader">Thread Local Storage</div></td></tr>
  65. <tr><td colspan="2"><div class="groupText"><br><br></div></td></tr>
  66. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#875ea911d219532ca4da65430e73d22e">pte_osTlsSetValue</a> (unsigned int key, void *value)</td></tr>
  67. <tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#44051eabc72d953a731c7c559d9c99c7">pte_osTlsGetValue</a> (unsigned int key)</td></tr>
  68. <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#4369875ed4b8d89a72a9b14a811af3ad">pte_osTlsInit</a> (void)</td></tr>
  69. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#851a24e2dc4fe5c61e00c9dc7105d607">pte_osTlsAlloc</a> (unsigned int *pKey)</td></tr>
  70. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#a96a7e24fee6ba3c37c13d8429044a58">pte_osTlsFree</a> (unsigned int key)</td></tr>
  71. <tr><td colspan="2"><div class="groupHeader">Atomic operations</div></td></tr>
  72. <tr><td colspan="2"><div class="groupText"><br><br></div></td></tr>
  73. <tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#6dc6f01fe801019dacc76222feb4c6ad">pte_osAtomicExchange</a> (int *pTarg, int val)</td></tr>
  74. <tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#26ba7b2e8dd5e78bfb6fdea89953fe81">pte_osAtomicCompareExchange</a> (int *pdest, int exchange, int comp)</td></tr>
  75. <tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#58bb5aa2308e9518159521ca6ea93b5c">pte_osAtomicExchangeAdd</a> (int volatile *pdest, int value)</td></tr>
  76. <tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#7b52fa2a4a05b2308e116040e379f532">pte_osAtomicDecrement</a> (int *pdest)</td></tr>
  77. </table>
  78. <hr><h2>Typedef Documentation</h2>
  79. <a class="anchor" name="351fe193de41b62d05e1aa19a3bf1a45"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadEntryPoint" ref="351fe193de41b62d05e1aa19a3bf1a45" args=")(void *params)" -->
  80. <div class="memitem">
  81. <div class="memproto">
  82. <table class="memname">
  83. <tr>
  84. <td class="memname">typedef int(* <a class="el" href="pte__generic__osal_8h.html#351fe193de41b62d05e1aa19a3bf1a45">pte_osThreadEntryPoint</a>)(void *params) </td>
  85. </tr>
  86. </table>
  87. </div>
  88. <div class="memdoc">
  89. <p>
  90. </div>
  91. </div><p>
  92. <hr><h2>Enumeration Type Documentation</h2>
  93. <a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16b"></a><!-- doxytag: member="pte_generic_osal.h::pte_osResult" ref="8434ef5479b09bf1d5d1bf2eb078e16b" args="" -->
  94. <div class="memitem">
  95. <div class="memproto">
  96. <table class="memname">
  97. <tr>
  98. <td class="memname">enum <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td>
  99. </tr>
  100. </table>
  101. </div>
  102. <div class="memdoc">
  103. <p>
  104. <dl compact><dt><b>Enumerator: </b></dt><dd>
  105. <table border="0" cellspacing="2" cellpadding="0">
  106. <tr><td valign="top"><em><a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16b542c92113747d4c2f01ac0392346ef9a"></a><!-- doxytag: member="PTE_OS_OK" ref="8434ef5479b09bf1d5d1bf2eb078e16b542c92113747d4c2f01ac0392346ef9a" args="" -->PTE_OS_OK</em>&nbsp;</td><td>
  107. Operation completed successfully </td></tr>
  108. <tr><td valign="top"><em><a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16b917a061effd9af41eb78f673e1a1f992"></a><!-- doxytag: member="PTE_OS_NO_RESOURCES" ref="8434ef5479b09bf1d5d1bf2eb078e16b917a061effd9af41eb78f673e1a1f992" args="" -->PTE_OS_NO_RESOURCES</em>&nbsp;</td><td>
  109. Operation failed because there insufficient resources </td></tr>
  110. <tr><td valign="top"><em><a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16bf245545c0574e66f040218ec4724c823"></a><!-- doxytag: member="PTE_OS_GENERAL_FAILURE" ref="8434ef5479b09bf1d5d1bf2eb078e16bf245545c0574e66f040218ec4724c823" args="" -->PTE_OS_GENERAL_FAILURE</em>&nbsp;</td><td>
  111. Operation failed due to a general failure </td></tr>
  112. <tr><td valign="top"><em><a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16bced54c5db0dc4c60fdfae17ed6b44eed"></a><!-- doxytag: member="PTE_OS_TIMEOUT" ref="8434ef5479b09bf1d5d1bf2eb078e16bced54c5db0dc4c60fdfae17ed6b44eed" args="" -->PTE_OS_TIMEOUT</em>&nbsp;</td><td>
  113. Operation did not complete because a user specified timeout expired. </td></tr>
  114. <tr><td valign="top"><em><a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16baabab6adc711b3215f4a45d1944b48d3"></a><!-- doxytag: member="PTE_OS_INTERRUPTED" ref="8434ef5479b09bf1d5d1bf2eb078e16baabab6adc711b3215f4a45d1944b48d3" args="" -->PTE_OS_INTERRUPTED</em>&nbsp;</td><td>
  115. The operation was interrupted before it could complete. </td></tr>
  116. <tr><td valign="top"><em><a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16b75103b48643227172eb796f2aa5938cc"></a><!-- doxytag: member="PTE_OS_INVALID_PARAM" ref="8434ef5479b09bf1d5d1bf2eb078e16b75103b48643227172eb796f2aa5938cc" args="" -->PTE_OS_INVALID_PARAM</em>&nbsp;</td><td>
  117. An invalid parameter was specified </td></tr>
  118. </table>
  119. </dl>
  120. </div>
  121. </div><p>
  122. <hr><h2>Function Documentation</h2>
  123. <a class="anchor" name="26ba7b2e8dd5e78bfb6fdea89953fe81"></a><!-- doxytag: member="pte_generic_osal.h::pte_osAtomicCompareExchange" ref="26ba7b2e8dd5e78bfb6fdea89953fe81" args="(int *pdest, int exchange, int comp)" -->
  124. <div class="memitem">
  125. <div class="memproto">
  126. <table class="memname">
  127. <tr>
  128. <td class="memname">int pte_osAtomicCompareExchange </td>
  129. <td>(</td>
  130. <td class="paramtype">int *&nbsp;</td>
  131. <td class="paramname"> <em>pdest</em>, </td>
  132. </tr>
  133. <tr>
  134. <td class="paramkey"></td>
  135. <td></td>
  136. <td class="paramtype">int&nbsp;</td>
  137. <td class="paramname"> <em>exchange</em>, </td>
  138. </tr>
  139. <tr>
  140. <td class="paramkey"></td>
  141. <td></td>
  142. <td class="paramtype">int&nbsp;</td>
  143. <td class="paramname"> <em>comp</em></td><td>&nbsp;</td>
  144. </tr>
  145. <tr>
  146. <td></td>
  147. <td>)</td>
  148. <td></td><td></td><td width="100%"></td>
  149. </tr>
  150. </table>
  151. </div>
  152. <div class="memdoc">
  153. <p>
  154. Performs an atomic compare-and-exchange oepration on the specified value. That is:<p>
  155. <div class="fragment"><pre class="fragment"> origVal = *pdest
  156. <span class="keywordflow">if</span> (*pdest == comp)
  157. then *pdest = exchange
  158. <span class="keywordflow">return</span> origVal
  159. </pre></div><p>
  160. <dl compact><dt><b>Parameters:</b></dt><dd>
  161. <table border="0" cellspacing="2" cellpadding="0">
  162. <tr><td valign="top"></td><td valign="top"><em>pdest</em>&nbsp;</td><td>Pointer to the destination value. </td></tr>
  163. <tr><td valign="top"></td><td valign="top"><em>exchange</em>&nbsp;</td><td>Exchange value (value to set destination to if destination == comparand) </td></tr>
  164. <tr><td valign="top"></td><td valign="top"><em>comp</em>&nbsp;</td><td>The value to compare to destination.</td></tr>
  165. </table>
  166. </dl>
  167. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Original value of destination </dd></dl>
  168. </div>
  169. </div><p>
  170. <a class="anchor" name="7b52fa2a4a05b2308e116040e379f532"></a><!-- doxytag: member="pte_generic_osal.h::pte_osAtomicDecrement" ref="7b52fa2a4a05b2308e116040e379f532" args="(int *pdest)" -->
  171. <div class="memitem">
  172. <div class="memproto">
  173. <table class="memname">
  174. <tr>
  175. <td class="memname">int pte_osAtomicDecrement </td>
  176. <td>(</td>
  177. <td class="paramtype">int *&nbsp;</td>
  178. <td class="paramname"> <em>pdest</em> </td>
  179. <td>&nbsp;)&nbsp;</td>
  180. <td width="100%"></td>
  181. </tr>
  182. </table>
  183. </div>
  184. <div class="memdoc">
  185. <p>
  186. Decrements the destination.<p>
  187. <div class="fragment"><pre class="fragment"> origVal = *pdest
  188. *pdest++
  189. <span class="keywordflow">return</span> origVal
  190. </pre></div><p>
  191. <dl compact><dt><b>Parameters:</b></dt><dd>
  192. <table border="0" cellspacing="2" cellpadding="0">
  193. <tr><td valign="top"></td><td valign="top"><em>pdest</em>&nbsp;</td><td>Destination value to decrement</td></tr>
  194. </table>
  195. </dl>
  196. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Original destination value </dd></dl>
  197. </div>
  198. </div><p>
  199. <a class="anchor" name="6dc6f01fe801019dacc76222feb4c6ad"></a><!-- doxytag: member="pte_generic_osal.h::pte_osAtomicExchange" ref="6dc6f01fe801019dacc76222feb4c6ad" args="(int *pTarg, int val)" -->
  200. <div class="memitem">
  201. <div class="memproto">
  202. <table class="memname">
  203. <tr>
  204. <td class="memname">int pte_osAtomicExchange </td>
  205. <td>(</td>
  206. <td class="paramtype">int *&nbsp;</td>
  207. <td class="paramname"> <em>pTarg</em>, </td>
  208. </tr>
  209. <tr>
  210. <td class="paramkey"></td>
  211. <td></td>
  212. <td class="paramtype">int&nbsp;</td>
  213. <td class="paramname"> <em>val</em></td><td>&nbsp;</td>
  214. </tr>
  215. <tr>
  216. <td></td>
  217. <td>)</td>
  218. <td></td><td></td><td width="100%"></td>
  219. </tr>
  220. </table>
  221. </div>
  222. <div class="memdoc">
  223. <p>
  224. Sets the target to the specified value as an atomic operation.<p>
  225. <div class="fragment"><pre class="fragment"> origVal = *ptarg
  226. *ptarg = val
  227. <span class="keywordflow">return</span> origVal
  228. </pre></div><p>
  229. <dl compact><dt><b>Parameters:</b></dt><dd>
  230. <table border="0" cellspacing="2" cellpadding="0">
  231. <tr><td valign="top"></td><td valign="top"><em>pTarg</em>&nbsp;</td><td>Pointer to the value to be exchanged. </td></tr>
  232. <tr><td valign="top"></td><td valign="top"><em>val</em>&nbsp;</td><td>Value to be exchanged</td></tr>
  233. </table>
  234. </dl>
  235. <dl class="return" compact><dt><b>Returns:</b></dt><dd>original value of destination </dd></dl>
  236. </div>
  237. </div><p>
  238. <a class="anchor" name="58bb5aa2308e9518159521ca6ea93b5c"></a><!-- doxytag: member="pte_generic_osal.h::pte_osAtomicExchangeAdd" ref="58bb5aa2308e9518159521ca6ea93b5c" args="(int volatile *pdest, int value)" -->
  239. <div class="memitem">
  240. <div class="memproto">
  241. <table class="memname">
  242. <tr>
  243. <td class="memname">int pte_osAtomicExchangeAdd </td>
  244. <td>(</td>
  245. <td class="paramtype">int volatile *&nbsp;</td>
  246. <td class="paramname"> <em>pdest</em>, </td>
  247. </tr>
  248. <tr>
  249. <td class="paramkey"></td>
  250. <td></td>
  251. <td class="paramtype">int&nbsp;</td>
  252. <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
  253. </tr>
  254. <tr>
  255. <td></td>
  256. <td>)</td>
  257. <td></td><td></td><td width="100%"></td>
  258. </tr>
  259. </table>
  260. </div>
  261. <div class="memdoc">
  262. <p>
  263. Adds the value to target as an atomic operation<p>
  264. <div class="fragment"><pre class="fragment"> origVal = *pdest
  265. *pAddend += value
  266. <span class="keywordflow">return</span> origVal
  267. </pre></div><p>
  268. <dl compact><dt><b>Parameters:</b></dt><dd>
  269. <table border="0" cellspacing="2" cellpadding="0">
  270. <tr><td valign="top"></td><td valign="top"><em>pdest</em>&nbsp;</td><td>Pointer to the variable to be updated. </td></tr>
  271. <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>Value to be added to the variable.</td></tr>
  272. </table>
  273. </dl>
  274. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Original value of destination </dd></dl>
  275. </div>
  276. </div><p>
  277. <a class="anchor" name="182cfe699774da3b514e11ca9c7a9beb"></a><!-- doxytag: member="pte_generic_osal.h::pte_osInit" ref="182cfe699774da3b514e11ca9c7a9beb" args="(void)" -->
  278. <div class="memitem">
  279. <div class="memproto">
  280. <table class="memname">
  281. <tr>
  282. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osInit </td>
  283. <td>(</td>
  284. <td class="paramtype">void&nbsp;</td>
  285. <td class="paramname"> </td>
  286. <td>&nbsp;)&nbsp;</td>
  287. <td width="100%"></td>
  288. </tr>
  289. </table>
  290. </div>
  291. <div class="memdoc">
  292. <p>
  293. Provides a hook for the OSAL to implement any OS specific initialization. This is guaranteed to be called before any other OSAL function.
  294. </div>
  295. </div><p>
  296. <a class="anchor" name="76af3c11297593ebd698c206176b649b"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexCreate" ref="76af3c11297593ebd698c206176b649b" args="(pte_osMutexHandle *pHandle)" -->
  297. <div class="memitem">
  298. <div class="memproto">
  299. <table class="memname">
  300. <tr>
  301. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexCreate </td>
  302. <td>(</td>
  303. <td class="paramtype">pte_osMutexHandle *&nbsp;</td>
  304. <td class="paramname"> <em>pHandle</em> </td>
  305. <td>&nbsp;)&nbsp;</td>
  306. <td width="100%"></td>
  307. </tr>
  308. </table>
  309. </div>
  310. <div class="memdoc">
  311. <p>
  312. Creates a mutex<p>
  313. <dl compact><dt><b>Parameters:</b></dt><dd>
  314. <table border="0" cellspacing="2" cellpadding="0">
  315. <tr><td valign="top"></td><td valign="top"><em>pHandle</em>&nbsp;</td><td>Set to the handle of the newly created mutex.</td></tr>
  316. </table>
  317. </dl>
  318. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully created <p>
  319. PTE_OS_NO_RESOURCESs - Insufficient resources to create mutex </dd></dl>
  320. </div>
  321. </div><p>
  322. <a class="anchor" name="48aa456b2215aaddfaca11189be8dcd6"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexDelete" ref="48aa456b2215aaddfaca11189be8dcd6" args="(pte_osMutexHandle handle)" -->
  323. <div class="memitem">
  324. <div class="memproto">
  325. <table class="memname">
  326. <tr>
  327. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexDelete </td>
  328. <td>(</td>
  329. <td class="paramtype">pte_osMutexHandle&nbsp;</td>
  330. <td class="paramname"> <em>handle</em> </td>
  331. <td>&nbsp;)&nbsp;</td>
  332. <td width="100%"></td>
  333. </tr>
  334. </table>
  335. </div>
  336. <div class="memdoc">
  337. <p>
  338. Deletes a mutex and frees any associated resources.<p>
  339. <dl compact><dt><b>Parameters:</b></dt><dd>
  340. <table border="0" cellspacing="2" cellpadding="0">
  341. <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>Handle of mutex to delete.</td></tr>
  342. </table>
  343. </dl>
  344. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully deleted. </dd></dl>
  345. </div>
  346. </div><p>
  347. <a class="anchor" name="299605cd2506cc0d7977c41ab3fd0e80"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexLock" ref="299605cd2506cc0d7977c41ab3fd0e80" args="(pte_osMutexHandle handle)" -->
  348. <div class="memitem">
  349. <div class="memproto">
  350. <table class="memname">
  351. <tr>
  352. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexLock </td>
  353. <td>(</td>
  354. <td class="paramtype">pte_osMutexHandle&nbsp;</td>
  355. <td class="paramname"> <em>handle</em> </td>
  356. <td>&nbsp;)&nbsp;</td>
  357. <td width="100%"></td>
  358. </tr>
  359. </table>
  360. </div>
  361. <div class="memdoc">
  362. <p>
  363. Locks the mutex<p>
  364. <dl compact><dt><b>Parameters:</b></dt><dd>
  365. <table border="0" cellspacing="2" cellpadding="0">
  366. <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>Handle of mutex to lock.</td></tr>
  367. </table>
  368. </dl>
  369. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully locked. </dd></dl>
  370. </div>
  371. </div><p>
  372. <a class="anchor" name="04a769a4b8d2e2ee75f775f7a9d9291e"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexTimedLock" ref="04a769a4b8d2e2ee75f775f7a9d9291e" args="(pte_osMutexHandle handle, unsigned int timeoutMsecs)" -->
  373. <div class="memitem">
  374. <div class="memproto">
  375. <table class="memname">
  376. <tr>
  377. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexTimedLock </td>
  378. <td>(</td>
  379. <td class="paramtype">pte_osMutexHandle&nbsp;</td>
  380. <td class="paramname"> <em>handle</em>, </td>
  381. </tr>
  382. <tr>
  383. <td class="paramkey"></td>
  384. <td></td>
  385. <td class="paramtype">unsigned int&nbsp;</td>
  386. <td class="paramname"> <em>timeoutMsecs</em></td><td>&nbsp;</td>
  387. </tr>
  388. <tr>
  389. <td></td>
  390. <td>)</td>
  391. <td></td><td></td><td width="100%"></td>
  392. </tr>
  393. </table>
  394. </div>
  395. <div class="memdoc">
  396. <p>
  397. Locks the mutex, returning after <code>timeoutMsecs</code> if the resources is not available. Can be used for polling mutex by using <code>timeoutMsecs</code> of zero.<p>
  398. <dl compact><dt><b>Parameters:</b></dt><dd>
  399. <table border="0" cellspacing="2" cellpadding="0">
  400. <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>Handle of mutex to lock. </td></tr>
  401. <tr><td valign="top"></td><td valign="top"><em>timeoutMsecs</em>&nbsp;</td><td>Number of milliseconds to wait for resource before returning.</td></tr>
  402. </table>
  403. </dl>
  404. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully locked. <p>
  405. PTE_OS_TIMEOUT - Timeout expired before lock was obtained. </dd></dl>
  406. </div>
  407. </div><p>
  408. <a class="anchor" name="f202c5379b5fb1799c6054916bb2cf3f"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexUnlock" ref="f202c5379b5fb1799c6054916bb2cf3f" args="(pte_osMutexHandle handle)" -->
  409. <div class="memitem">
  410. <div class="memproto">
  411. <table class="memname">
  412. <tr>
  413. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexUnlock </td>
  414. <td>(</td>
  415. <td class="paramtype">pte_osMutexHandle&nbsp;</td>
  416. <td class="paramname"> <em>handle</em> </td>
  417. <td>&nbsp;)&nbsp;</td>
  418. <td width="100%"></td>
  419. </tr>
  420. </table>
  421. </div>
  422. <div class="memdoc">
  423. <p>
  424. Unlocks the mutex<p>
  425. <dl compact><dt><b>Parameters:</b></dt><dd>
  426. <table border="0" cellspacing="2" cellpadding="0">
  427. <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>Handle of mutex to unlock</td></tr>
  428. </table>
  429. </dl>
  430. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully unlocked. </dd></dl>
  431. </div>
  432. </div><p>
  433. <a class="anchor" name="4a39bc9845ae936e01627ff67b166c47"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphoreCancellablePend" ref="4a39bc9845ae936e01627ff67b166c47" args="(pte_osSemaphoreHandle handle, unsigned int *pTimeout)" -->
  434. <div class="memitem">
  435. <div class="memproto">
  436. <table class="memname">
  437. <tr>
  438. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphoreCancellablePend </td>
  439. <td>(</td>
  440. <td class="paramtype">pte_osSemaphoreHandle&nbsp;</td>
  441. <td class="paramname"> <em>handle</em>, </td>
  442. </tr>
  443. <tr>
  444. <td class="paramkey"></td>
  445. <td></td>
  446. <td class="paramtype">unsigned int *&nbsp;</td>
  447. <td class="paramname"> <em>pTimeout</em></td><td>&nbsp;</td>
  448. </tr>
  449. <tr>
  450. <td></td>
  451. <td>)</td>
  452. <td></td><td></td><td width="100%"></td>
  453. </tr>
  454. </table>
  455. </div>
  456. <div class="memdoc">
  457. <p>
  458. Acquire a semaphore, returning after <code>timeoutMsecs</code> if the semaphore is not available. Can be used for polling a semaphore by using <code>timeoutMsecs</code> of zero. Call must return immediately if <a class="el" href="pte__generic__osal_8h.html#28ea17c5ecaaebf7f9b195a91a709e77">pte_osThreadCancel()</a> is called on the thread waiting for the semaphore.<p>
  459. <dl compact><dt><b>Parameters:</b></dt><dd>
  460. <table border="0" cellspacing="2" cellpadding="0">
  461. <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>Handle of semaphore to acquire. </td></tr>
  462. <tr><td valign="top"></td><td valign="top"><em>pTimeout</em>&nbsp;</td><td>Pointer to the number of milliseconds to wait to acquire the semaphore before returning. If set to NULL, wait forever.</td></tr>
  463. </table>
  464. </dl>
  465. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Semaphore successfully acquired. <p>
  466. PTE_OS_TIMEOUT - Timeout expired before semaphore was obtained. </dd></dl>
  467. </div>
  468. </div><p>
  469. <a class="anchor" name="cd102e0dbc375040016bde75f94f207f"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphoreCreate" ref="cd102e0dbc375040016bde75f94f207f" args="(int initialValue, pte_osSemaphoreHandle *pHandle)" -->
  470. <div class="memitem">
  471. <div class="memproto">
  472. <table class="memname">
  473. <tr>
  474. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphoreCreate </td>
  475. <td>(</td>
  476. <td class="paramtype">int&nbsp;</td>
  477. <td class="paramname"> <em>initialValue</em>, </td>
  478. </tr>
  479. <tr>
  480. <td class="paramkey"></td>
  481. <td></td>
  482. <td class="paramtype">pte_osSemaphoreHandle *&nbsp;</td>
  483. <td class="paramname"> <em>pHandle</em></td><td>&nbsp;</td>
  484. </tr>
  485. <tr>
  486. <td></td>
  487. <td>)</td>
  488. <td></td><td></td><td width="100%"></td>
  489. </tr>
  490. </table>
  491. </div>
  492. <div class="memdoc">
  493. <p>
  494. Creates a semaphore<p>
  495. <dl compact><dt><b>Parameters:</b></dt><dd>
  496. <table border="0" cellspacing="2" cellpadding="0">
  497. <tr><td valign="top"></td><td valign="top"><em>initialValue</em>&nbsp;</td><td>Initial value of the semaphore </td></tr>
  498. <tr><td valign="top"></td><td valign="top"><em>pHandle</em>&nbsp;</td><td>Set to the handle of the newly created semaphore.</td></tr>
  499. </table>
  500. </dl>
  501. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Semaphore successfully created <p>
  502. PTE_OS_NO_RESOURCESs - Insufficient resources to create semaphore </dd></dl>
  503. </div>
  504. </div><p>
  505. <a class="anchor" name="868f71ff8dfb927393da6620398097ed"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphoreDelete" ref="868f71ff8dfb927393da6620398097ed" args="(pte_osSemaphoreHandle handle)" -->
  506. <div class="memitem">
  507. <div class="memproto">
  508. <table class="memname">
  509. <tr>
  510. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphoreDelete </td>
  511. <td>(</td>
  512. <td class="paramtype">pte_osSemaphoreHandle&nbsp;</td>
  513. <td class="paramname"> <em>handle</em> </td>
  514. <td>&nbsp;)&nbsp;</td>
  515. <td width="100%"></td>
  516. </tr>
  517. </table>
  518. </div>
  519. <div class="memdoc">
  520. <p>
  521. Deletes a semaphore and frees any associated resources.<p>
  522. <dl compact><dt><b>Parameters:</b></dt><dd>
  523. <table border="0" cellspacing="2" cellpadding="0">
  524. <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>Handle of semaphore to delete.</td></tr>
  525. </table>
  526. </dl>
  527. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Semaphore successfully deleted. </dd></dl>
  528. </div>
  529. </div><p>
  530. <a class="anchor" name="faf21b36d98f19bd780b95f475cb0a1a"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphorePend" ref="faf21b36d98f19bd780b95f475cb0a1a" args="(pte_osSemaphoreHandle handle, unsigned int *pTimeout)" -->
  531. <div class="memitem">
  532. <div class="memproto">
  533. <table class="memname">
  534. <tr>
  535. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphorePend </td>
  536. <td>(</td>
  537. <td class="paramtype">pte_osSemaphoreHandle&nbsp;</td>
  538. <td class="paramname"> <em>handle</em>, </td>
  539. </tr>
  540. <tr>
  541. <td class="paramkey"></td>
  542. <td></td>
  543. <td class="paramtype">unsigned int *&nbsp;</td>
  544. <td class="paramname"> <em>pTimeout</em></td><td>&nbsp;</td>
  545. </tr>
  546. <tr>
  547. <td></td>
  548. <td>)</td>
  549. <td></td><td></td><td width="100%"></td>
  550. </tr>
  551. </table>
  552. </div>
  553. <div class="memdoc">
  554. <p>
  555. Acquire a semaphore, returning after <code>timeoutMsecs</code> if the semaphore is not available. Can be used for polling a semaphore by using <code>timeoutMsecs</code> of zero.<p>
  556. <dl compact><dt><b>Parameters:</b></dt><dd>
  557. <table border="0" cellspacing="2" cellpadding="0">
  558. <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>Handle of semaphore to acquire. </td></tr>
  559. <tr><td valign="top"></td><td valign="top"><em>pTimeout</em>&nbsp;</td><td>Pointer to the number of milliseconds to wait to acquire the semaphore before returning. If set to NULL, wait forever.</td></tr>
  560. </table>
  561. </dl>
  562. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Semaphore successfully acquired. <p>
  563. PTE_OS_TIMEOUT - Timeout expired before semaphore was obtained. </dd></dl>
  564. </div>
  565. </div><p>
  566. <a class="anchor" name="8aa3a131d541de9815ec636e30eb4a3a"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphorePost" ref="8aa3a131d541de9815ec636e30eb4a3a" args="(pte_osSemaphoreHandle handle, int count)" -->
  567. <div class="memitem">
  568. <div class="memproto">
  569. <table class="memname">
  570. <tr>
  571. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphorePost </td>
  572. <td>(</td>
  573. <td class="paramtype">pte_osSemaphoreHandle&nbsp;</td>
  574. <td class="paramname"> <em>handle</em>, </td>
  575. </tr>
  576. <tr>
  577. <td class="paramkey"></td>
  578. <td></td>
  579. <td class="paramtype">int&nbsp;</td>
  580. <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
  581. </tr>
  582. <tr>
  583. <td></td>
  584. <td>)</td>
  585. <td></td><td></td><td width="100%"></td>
  586. </tr>
  587. </table>
  588. </div>
  589. <div class="memdoc">
  590. <p>
  591. Posts to the semaphore<p>
  592. <dl compact><dt><b>Parameters:</b></dt><dd>
  593. <table border="0" cellspacing="2" cellpadding="0">
  594. <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>Semaphore to release </td></tr>
  595. <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>Amount to increment the semaphore by.</td></tr>
  596. </table>
  597. </dl>
  598. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - semaphore successfully released. </dd></dl>
  599. </div>
  600. </div><p>
  601. <a class="anchor" name="28ea17c5ecaaebf7f9b195a91a709e77"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadCancel" ref="28ea17c5ecaaebf7f9b195a91a709e77" args="(pte_osThreadHandle threadHandle)" -->
  602. <div class="memitem">
  603. <div class="memproto">
  604. <table class="memname">
  605. <tr>
  606. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadCancel </td>
  607. <td>(</td>
  608. <td class="paramtype">pte_osThreadHandle&nbsp;</td>
  609. <td class="paramname"> <em>threadHandle</em> </td>
  610. <td>&nbsp;)&nbsp;</td>
  611. <td width="100%"></td>
  612. </tr>
  613. </table>
  614. </div>
  615. <div class="memdoc">
  616. <p>
  617. Cancels the specified thread. This should cause <a class="el" href="pte__generic__osal_8h.html#4a39bc9845ae936e01627ff67b166c47">pte_osSemaphoreCancellablePend()</a> and for <a class="el" href="pte__generic__osal_8h.html#5b5034f6f2a2b2f124991728096a8f5d">pte_osThreadCheckCancel()</a> to return <code>PTE_OS_INTERRUPTED</code>.<p>
  618. <dl compact><dt><b>Parameters:</b></dt><dd>
  619. <table border="0" cellspacing="2" cellpadding="0">
  620. <tr><td valign="top"></td><td valign="top"><em>threadHandle</em>&nbsp;</td><td>handle to the thread to cancel.</td></tr>
  621. </table>
  622. </dl>
  623. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Thread successfully canceled. </dd></dl>
  624. </div>
  625. </div><p>
  626. <a class="anchor" name="5b5034f6f2a2b2f124991728096a8f5d"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadCheckCancel" ref="5b5034f6f2a2b2f124991728096a8f5d" args="(pte_osThreadHandle threadHandle)" -->
  627. <div class="memitem">
  628. <div class="memproto">
  629. <table class="memname">
  630. <tr>
  631. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadCheckCancel </td>
  632. <td>(</td>
  633. <td class="paramtype">pte_osThreadHandle&nbsp;</td>
  634. <td class="paramname"> <em>threadHandle</em> </td>
  635. <td>&nbsp;)&nbsp;</td>
  636. <td width="100%"></td>
  637. </tr>
  638. </table>
  639. </div>
  640. <div class="memdoc">
  641. <p>
  642. Check if <a class="el" href="pte__generic__osal_8h.html#28ea17c5ecaaebf7f9b195a91a709e77">pte_osThreadCancel()</a> has been called on the specified thread.<p>
  643. <dl compact><dt><b>Parameters:</b></dt><dd>
  644. <table border="0" cellspacing="2" cellpadding="0">
  645. <tr><td valign="top"></td><td valign="top"><em>threadHandle</em>&nbsp;</td><td>handle of thread to check the state of.</td></tr>
  646. </table>
  647. </dl>
  648. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Thread has not been cancelled <p>
  649. PTE_OS_INTERRUPTED - Thread has been cancelled. </dd></dl>
  650. </div>
  651. </div><p>
  652. <a class="anchor" name="d1dafbe4855b28a472af00b693338a44"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadCreate" ref="d1dafbe4855b28a472af00b693338a44" args="(pte_osThreadEntryPoint entryPoint, int stackSize, int initialPriority, void *argv, pte_osThreadHandle *ppte_osThreadHandle)" -->
  653. <div class="memitem">
  654. <div class="memproto">
  655. <table class="memname">
  656. <tr>
  657. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadCreate </td>
  658. <td>(</td>
  659. <td class="paramtype"><a class="el" href="pte__generic__osal_8h.html#351fe193de41b62d05e1aa19a3bf1a45">pte_osThreadEntryPoint</a>&nbsp;</td>
  660. <td class="paramname"> <em>entryPoint</em>, </td>
  661. </tr>
  662. <tr>
  663. <td class="paramkey"></td>
  664. <td></td>
  665. <td class="paramtype">int&nbsp;</td>
  666. <td class="paramname"> <em>stackSize</em>, </td>
  667. </tr>
  668. <tr>
  669. <td class="paramkey"></td>
  670. <td></td>
  671. <td class="paramtype">int&nbsp;</td>
  672. <td class="paramname"> <em>initialPriority</em>, </td>
  673. </tr>
  674. <tr>
  675. <td class="paramkey"></td>
  676. <td></td>
  677. <td class="paramtype">void *&nbsp;</td>
  678. <td class="paramname"> <em>argv</em>, </td>
  679. </tr>
  680. <tr>
  681. <td class="paramkey"></td>
  682. <td></td>
  683. <td class="paramtype">pte_osThreadHandle *&nbsp;</td>
  684. <td class="paramname"> <em>ppte_osThreadHandle</em></td><td>&nbsp;</td>
  685. </tr>
  686. <tr>
  687. <td></td>
  688. <td>)</td>
  689. <td></td><td></td><td width="100%"></td>
  690. </tr>
  691. </table>
  692. </div>
  693. <div class="memdoc">
  694. <p>
  695. Creates a new thread. The thread must be started in a suspended state - it will be explicitly started when <a class="el" href="pte__generic__osal_8h.html#ab292e786c9b96e80daf8ae9dc983a72">pte_osThreadStart()</a> is called.<p>
  696. <dl compact><dt><b>Parameters:</b></dt><dd>
  697. <table border="0" cellspacing="2" cellpadding="0">
  698. <tr><td valign="top"></td><td valign="top"><em>entryPoint</em>&nbsp;</td><td>Entry point to the new thread. </td></tr>
  699. <tr><td valign="top"></td><td valign="top"><em>stackSize</em>&nbsp;</td><td>The initial stack size, in bytes. Note that this can be considered a minimum - for instance if the OS requires a larger stack space than what the caller specified. </td></tr>
  700. <tr><td valign="top"></td><td valign="top"><em>initialPriority</em>&nbsp;</td><td>The priority that the new thread should be initially set to. </td></tr>
  701. <tr><td valign="top"></td><td valign="top"><em>argv</em>&nbsp;</td><td>Parameter to pass to the new thread. </td></tr>
  702. <tr><td valign="top"></td><td valign="top"><em>ppte_osThreadHandle</em>&nbsp;</td><td>set to the handle of the new thread.</td></tr>
  703. </table>
  704. </dl>
  705. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - New thread successfully created. <p>
  706. PTE_OS_NO_RESOURCESs - Insufficient resources to create thread </dd></dl>
  707. </div>
  708. </div><p>
  709. <a class="anchor" name="685d89f40949c634169c4a7d13de4ee0"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadDelete" ref="685d89f40949c634169c4a7d13de4ee0" args="(pte_osThreadHandle handle)" -->
  710. <div class="memitem">
  711. <div class="memproto">
  712. <table class="memname">
  713. <tr>
  714. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadDelete </td>
  715. <td>(</td>
  716. <td class="paramtype">pte_osThreadHandle&nbsp;</td>
  717. <td class="paramname"> <em>handle</em> </td>
  718. <td>&nbsp;)&nbsp;</td>
  719. <td width="100%"></td>
  720. </tr>
  721. </table>
  722. </div>
  723. <div class="memdoc">
  724. <p>
  725. Frees resources associated with the specified thread. This is called after the thread has terminated and is no longer needed (e.g. after pthread_join returns). This call will always be made from a different context than that of the target thread.
  726. </div>
  727. </div><p>
  728. <a class="anchor" name="efffdffc7923dbbdb5b930cd24c852d1"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadExit" ref="efffdffc7923dbbdb5b930cd24c852d1" args="()" -->
  729. <div class="memitem">
  730. <div class="memproto">
  731. <table class="memname">
  732. <tr>
  733. <td class="memname">void pte_osThreadExit </td>
  734. <td>(</td>
  735. <td class="paramname"> </td>
  736. <td>&nbsp;)&nbsp;</td>
  737. <td width="100%"></td>
  738. </tr>
  739. </table>
  740. </div>
  741. <div class="memdoc">
  742. <p>
  743. Causes the current thread to stop executing.<p>
  744. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Never returns (thread terminated) </dd></dl>
  745. </div>
  746. </div><p>
  747. <a class="anchor" name="cdbcc3abdb03e1a0f6475d5c0759dac7"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadExitAndDelete" ref="cdbcc3abdb03e1a0f6475d5c0759dac7" args="(pte_osThreadHandle handle)" -->
  748. <div class="memitem">
  749. <div class="memproto">
  750. <table class="memname">
  751. <tr>
  752. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadExitAndDelete </td>
  753. <td>(</td>
  754. <td class="paramtype">pte_osThreadHandle&nbsp;</td>
  755. <td class="paramname"> <em>handle</em> </td>
  756. <td>&nbsp;)&nbsp;</td>
  757. <td width="100%"></td>
  758. </tr>
  759. </table>
  760. </div>
  761. <div class="memdoc">
  762. <p>
  763. Frees resources associated with the specified thread and then causes the thread to exit. This is called after the thread has terminated and is no longer needed (e.g. after pthread_join returns). This call will always be made from the context of the target thread.
  764. </div>
  765. </div><p>
  766. <a class="anchor" name="b07cacaf7670707cc2741f5d9746571b"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetDefaultPriority" ref="b07cacaf7670707cc2741f5d9746571b" args="()" -->
  767. <div class="memitem">
  768. <div class="memproto">
  769. <table class="memname">
  770. <tr>
  771. <td class="memname">int pte_osThreadGetDefaultPriority </td>
  772. <td>(</td>
  773. <td class="paramname"> </td>
  774. <td>&nbsp;)&nbsp;</td>
  775. <td width="100%"></td>
  776. </tr>
  777. </table>
  778. </div>
  779. <div class="memdoc">
  780. <p>
  781. Returns the priority that should be used if the caller to pthread_create doesn't explicitly set one.
  782. </div>
  783. </div><p>
  784. <a class="anchor" name="8e8f80b5c86e1357ce0b40d8333ec969"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetHandle" ref="8e8f80b5c86e1357ce0b40d8333ec969" args="(void)" -->
  785. <div class="memitem">
  786. <div class="memproto">
  787. <table class="memname">
  788. <tr>
  789. <td class="memname">pte_osThreadHandle pte_osThreadGetHandle </td>
  790. <td>(</td>
  791. <td class="paramtype">void&nbsp;</td>
  792. <td class="paramname"> </td>
  793. <td>&nbsp;)&nbsp;</td>
  794. <td width="100%"></td>
  795. </tr>
  796. </table>
  797. </div>
  798. <div class="memdoc">
  799. <p>
  800. Returns the handle of the currently executing thread.
  801. </div>
  802. </div><p>
  803. <a class="anchor" name="18cd3561b14611ae16682cbbbf674980"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetMaxPriority" ref="18cd3561b14611ae16682cbbbf674980" args="()" -->
  804. <div class="memitem">
  805. <div class="memproto">
  806. <table class="memname">
  807. <tr>
  808. <td class="memname">int pte_osThreadGetMaxPriority </td>
  809. <td>(</td>
  810. <td class="paramname"> </td>
  811. <td>&nbsp;)&nbsp;</td>
  812. <td width="100%"></td>
  813. </tr>
  814. </table>
  815. </div>
  816. <div class="memdoc">
  817. <p>
  818. Returns the maximum allowable priority
  819. </div>
  820. </div><p>
  821. <a class="anchor" name="913badc3cfa6b2a817c2b501d45548fc"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetMinPriority" ref="913badc3cfa6b2a817c2b501d45548fc" args="()" -->
  822. <div class="memitem">
  823. <div class="memproto">
  824. <table class="memname">
  825. <tr>
  826. <td class="memname">int pte_osThreadGetMinPriority </td>
  827. <td>(</td>
  828. <td class="paramname"> </td>
  829. <td>&nbsp;)&nbsp;</td>
  830. <td width="100%"></td>
  831. </tr>
  832. </table>
  833. </div>
  834. <div class="memdoc">
  835. <p>
  836. Returns the minimum allowable priority
  837. </div>
  838. </div><p>
  839. <a class="anchor" name="54fce783cb811dc6458ea118ab8f7f1d"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetPriority" ref="54fce783cb811dc6458ea118ab8f7f1d" args="(pte_osThreadHandle threadHandle)" -->
  840. <div class="memitem">
  841. <div class="memproto">
  842. <table class="memname">
  843. <tr>
  844. <td class="memname">int pte_osThreadGetPriority </td>
  845. <td>(</td>
  846. <td class="paramtype">pte_osThreadHandle&nbsp;</td>
  847. <td class="paramname"> <em>threadHandle</em> </td>
  848. <td>&nbsp;)&nbsp;</td>
  849. <td width="100%"></td>
  850. </tr>
  851. </table>
  852. </div>
  853. <div class="memdoc">
  854. <p>
  855. Returns the priority of the specified thread.
  856. </div>
  857. </div><p>
  858. <a class="anchor" name="6782a421eb6c2eb9aa60f3b7ccca1f99"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadSetPriority" ref="6782a421eb6c2eb9aa60f3b7ccca1f99" args="(pte_osThreadHandle threadHandle, int newPriority)" -->
  859. <div class="memitem">
  860. <div class="memproto">
  861. <table class="memname">
  862. <tr>
  863. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadSetPriority </td>
  864. <td>(</td>
  865. <td class="paramtype">pte_osThreadHandle&nbsp;</td>
  866. <td class="paramname"> <em>threadHandle</em>, </td>
  867. </tr>
  868. <tr>
  869. <td class="paramkey"></td>
  870. <td></td>
  871. <td class="paramtype">int&nbsp;</td>
  872. <td class="paramname"> <em>newPriority</em></td><td>&nbsp;</td>
  873. </tr>
  874. <tr>
  875. <td></td>
  876. <td>)</td>
  877. <td></td><td></td><td width="100%"></td>
  878. </tr>
  879. </table>
  880. </div>
  881. <div class="memdoc">
  882. <p>
  883. Sets the priority of the specified thread.<p>
  884. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - thread priority successfully set </dd></dl>
  885. </div>
  886. </div><p>
  887. <a class="anchor" name="5c722b6d1840babcdf9dd1d343eab839"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadSleep" ref="5c722b6d1840babcdf9dd1d343eab839" args="(unsigned int msecs)" -->
  888. <div class="memitem">
  889. <div class="memproto">
  890. <table class="memname">
  891. <tr>
  892. <td class="memname">void pte_osThreadSleep </td>
  893. <td>(</td>
  894. <td class="paramtype">unsigned int&nbsp;</td>
  895. <td class="paramname"> <em>msecs</em> </td>
  896. <td>&nbsp;)&nbsp;</td>
  897. <td width="100%"></td>
  898. </tr>
  899. </table>
  900. </div>
  901. <div class="memdoc">
  902. <p>
  903. Causes the current thread to sleep for the specified number of milliseconds.
  904. </div>
  905. </div><p>
  906. <a class="anchor" name="ab292e786c9b96e80daf8ae9dc983a72"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadStart" ref="ab292e786c9b96e80daf8ae9dc983a72" args="(pte_osThreadHandle osThreadHandle)" -->
  907. <div class="memitem">
  908. <div class="memproto">
  909. <table class="memname">
  910. <tr>
  911. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadStart </td>
  912. <td>(</td>
  913. <td class="paramtype">pte_osThreadHandle&nbsp;</td>
  914. <td class="paramname"> <em>osThreadHandle</em> </td>
  915. <td>&nbsp;)&nbsp;</td>
  916. <td width="100%"></td>
  917. </tr>
  918. </table>
  919. </div>
  920. <div class="memdoc">
  921. <p>
  922. Starts executing the specified thread.<p>
  923. <dl compact><dt><b>Parameters:</b></dt><dd>
  924. <table border="0" cellspacing="2" cellpadding="0">
  925. <tr><td valign="top"></td><td valign="top"><em>osThreadHandle</em>&nbsp;</td><td>handle of the thread to start.</td></tr>
  926. </table>
  927. </dl>
  928. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - thread successfully started. </dd></dl>
  929. </div>
  930. </div><p>
  931. <a class="anchor" name="0bcce6dc9b22691f914b07894394ee38"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadWaitForEnd" ref="0bcce6dc9b22691f914b07894394ee38" args="(pte_osThreadHandle threadHandle)" -->
  932. <div class="memitem">
  933. <div class="memproto">
  934. <table class="memname">
  935. <tr>
  936. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadWaitForEnd </td>
  937. <td>(</td>
  938. <td class="paramtype">pte_osThreadHandle&nbsp;</td>
  939. <td class="paramname"> <em>threadHandle</em> </td>
  940. <td>&nbsp;)&nbsp;</td>
  941. <td width="100%"></td>
  942. </tr>
  943. </table>
  944. </div>
  945. <div class="memdoc">
  946. <p>
  947. Waits for the specified thread to end. If the thread has already terminated, this returns immediately.<p>
  948. <dl compact><dt><b>Parameters:</b></dt><dd>
  949. <table border="0" cellspacing="2" cellpadding="0">
  950. <tr><td valign="top"></td><td valign="top"><em>threadHandle</em>&nbsp;</td><td>Handle fo thread to wait for.</td></tr>
  951. </table>
  952. </dl>
  953. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - specified thread terminated. </dd></dl>
  954. </div>
  955. </div><p>
  956. <a class="anchor" name="851a24e2dc4fe5c61e00c9dc7105d607"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsAlloc" ref="851a24e2dc4fe5c61e00c9dc7105d607" args="(unsigned int *pKey)" -->
  957. <div class="memitem">
  958. <div class="memproto">
  959. <table class="memname">
  960. <tr>
  961. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osTlsAlloc </td>
  962. <td>(</td>
  963. <td class="paramtype">unsigned int *&nbsp;</td>
  964. <td class="paramname"> <em>pKey</em> </td>
  965. <td>&nbsp;)&nbsp;</td>
  966. <td width="100%"></td>
  967. </tr>
  968. </table>
  969. </div>
  970. <div class="memdoc">
  971. <p>
  972. Allocates a new TLS key.<p>
  973. <dl compact><dt><b>Parameters:</b></dt><dd>
  974. <table border="0" cellspacing="2" cellpadding="0">
  975. <tr><td valign="top"></td><td valign="top"><em>pKey</em>&nbsp;</td><td>On success will be set to the newly allocated key.</td></tr>
  976. </table>
  977. </dl>
  978. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - TLS key successfully allocated. <p>
  979. PTE_OS_NO_RESOURCESs - Insufficient resources to allocate key (e.g. maximum number of keys reached). </dd></dl>
  980. </div>
  981. </div><p>
  982. <a class="anchor" name="a96a7e24fee6ba3c37c13d8429044a58"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsFree" ref="a96a7e24fee6ba3c37c13d8429044a58" args="(unsigned int key)" -->
  983. <div class="memitem">
  984. <div class="memproto">
  985. <table class="memname">
  986. <tr>
  987. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osTlsFree </td>
  988. <td>(</td>
  989. <td class="paramtype">unsigned int&nbsp;</td>
  990. <td class="paramname"> <em>key</em> </td>
  991. <td>&nbsp;)&nbsp;</td>
  992. <td width="100%"></td>
  993. </tr>
  994. </table>
  995. </div>
  996. <div class="memdoc">
  997. <p>
  998. Frees the specified TLS key.<p>
  999. <dl compact><dt><b>Parameters:</b></dt><dd>
  1000. <table border="0" cellspacing="2" cellpadding="0">
  1001. <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>TLS key to free</td></tr>
  1002. </table>
  1003. </dl>
  1004. <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - TLS key was successfully freed. </dd></dl>
  1005. </div>
  1006. </div><p>
  1007. <a class="anchor" name="44051eabc72d953a731c7c559d9c99c7"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsGetValue" ref="44051eabc72d953a731c7c559d9c99c7" args="(unsigned int key)" -->
  1008. <div class="memitem">
  1009. <div class="memproto">
  1010. <table class="memname">
  1011. <tr>
  1012. <td class="memname">void* pte_osTlsGetValue </td>
  1013. <td>(</td>
  1014. <td class="paramtype">unsigned int&nbsp;</td>
  1015. <td class="paramname"> <em>key</em> </td>
  1016. <td>&nbsp;)&nbsp;</td>
  1017. <td width="100%"></td>
  1018. </tr>
  1019. </table>
  1020. </div>
  1021. <div class="memdoc">
  1022. <p>
  1023. Retrieves the thread specific value for the specified key for the currently executing thread. If a value has not been set for this key, NULL should be returned (i.e. TLS values default to NULL).<p>
  1024. <dl compact><dt><b>Parameters:</b></dt><dd>
  1025. <table border="0" cellspacing="2" cellpadding="0">
  1026. <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>The TLS key for the value.</td></tr>
  1027. </table>
  1028. </dl>
  1029. <dl class="return" compact><dt><b>Returns:</b></dt><dd>The value associated with <code>key</code> for the current thread. </dd></dl>
  1030. </div>
  1031. </div><p>
  1032. <a class="anchor" name="4369875ed4b8d89a72a9b14a811af3ad"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsInit" ref="4369875ed4b8d89a72a9b14a811af3ad" args="(void)" -->
  1033. <div class="memitem">
  1034. <div class="memproto">
  1035. <table class="memname">
  1036. <tr>
  1037. <td class="memname">void pte_osTlsInit </td>
  1038. <td>(</td>
  1039. <td class="paramtype">void&nbsp;</td>
  1040. <td class="paramname"> </td>
  1041. <td>&nbsp;)&nbsp;</td>
  1042. <td width="100%"></td>
  1043. </tr>
  1044. </table>
  1045. </div>
  1046. <div class="memdoc">
  1047. <p>
  1048. Initializes the OS TLS support. This is called by the PTE library prior to performing ANY TLS operation.
  1049. </div>
  1050. </div><p>
  1051. <a class="anchor" name="875ea911d219532ca4da65430e73d22e"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsSetValue" ref="875ea911d219532ca4da65430e73d22e" args="(unsigned int key, void *value)" -->
  1052. <div class="memitem">
  1053. <div class="memproto">
  1054. <table class="memname">
  1055. <tr>
  1056. <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osTlsSetValue </td>
  1057. <td>(</td>
  1058. <td class="paramtype">unsigned int&nbsp;</td>
  1059. <td class="paramname"> <em>key</em>, </td>
  1060. </tr>
  1061. <tr>
  1062. <td class="paramkey"></td>
  1063. <td></td>
  1064. <td class="paramtype">void *&nbsp;</td>
  1065. <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
  1066. </tr>
  1067. <tr>
  1068. <td></td>
  1069. <td>)</td>
  1070. <td></td><td></td><td width="100%"></td>
  1071. </tr>
  1072. </table>
  1073. </div>
  1074. <div class="memdoc">
  1075. <p>
  1076. Sets the thread specific value for the specified key for the currently executing thread.<p>
  1077. <dl compact><dt><b>Parameters:</b></dt><dd>
  1078. <table border="0" cellspacing="2" cellpadding="0">
  1079. <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>The TLS key for the value. </td></tr>
  1080. <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>The value to save </td></tr>
  1081. </table>
  1082. </dl>
  1083. </div>
  1084. </div><p>
  1085. <hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 7 21:56:48 2008 for PTE by&nbsp;
  1086. <a href="http://www.doxygen.org/index.html">
  1087. <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
  1088. </body>
  1089. </html>