12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
- <title>PTE: Projects/pthreads/pte_generic_osal.h File Reference</title>
- <link href="doxygen.css" rel="stylesheet" type="text/css">
- <link href="tabs.css" rel="stylesheet" type="text/css">
- </head><body>
- <!-- Generated by Doxygen 1.5.3 -->
- <div class="tabs">
- <ul>
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li class="current"><a href="files.html"><span>Files</span></a></li>
- </ul>
- </div>
- <h1>Projects/pthreads/pte_generic_osal.h File Reference</h1>
- <p>
- <a href="pte__generic__osal_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
- <tr><td></td></tr>
- <tr><td colspan="2"><br><h2>Misc</h2></td></tr>
- <tr><td colspan="2"><br><br></td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> { <br>
- <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b542c92113747d4c2f01ac0392346ef9a">PTE_OS_OK</a> = 0,
- <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b917a061effd9af41eb78f673e1a1f992">PTE_OS_NO_RESOURCES</a>,
- <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16bf245545c0574e66f040218ec4724c823">PTE_OS_GENERAL_FAILURE</a>,
- <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16bced54c5db0dc4c60fdfae17ed6b44eed">PTE_OS_TIMEOUT</a>,
- <br>
- <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16baabab6adc711b3215f4a45d1944b48d3">PTE_OS_INTERRUPTED</a>,
- <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b75103b48643227172eb796f2aa5938cc">PTE_OS_INVALID_PARAM</a>
- <br>
- }</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#182cfe699774da3b514e11ca9c7a9beb">pte_osInit</a> (void)</td></tr>
- <tr><td colspan="2"><br><h2>Threads</h2></td></tr>
- <tr><td colspan="2"><br><br></td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#351fe193de41b62d05e1aa19a3bf1a45">pte_osThreadEntryPoint</a> )(void *params)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#ab292e786c9b96e80daf8ae9dc983a72">pte_osThreadStart</a> (pte_osThreadHandle osThreadHandle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#efffdffc7923dbbdb5b930cd24c852d1">pte_osThreadExit</a> ()</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#0bcce6dc9b22691f914b07894394ee38">pte_osThreadWaitForEnd</a> (pte_osThreadHandle threadHandle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">pte_osThreadHandle </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#8e8f80b5c86e1357ce0b40d8333ec969">pte_osThreadGetHandle</a> (void)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#54fce783cb811dc6458ea118ab8f7f1d">pte_osThreadGetPriority</a> (pte_osThreadHandle threadHandle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#685d89f40949c634169c4a7d13de4ee0">pte_osThreadDelete</a> (pte_osThreadHandle handle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#cdbcc3abdb03e1a0f6475d5c0759dac7">pte_osThreadExitAndDelete</a> (pte_osThreadHandle handle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#28ea17c5ecaaebf7f9b195a91a709e77">pte_osThreadCancel</a> (pte_osThreadHandle threadHandle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#5b5034f6f2a2b2f124991728096a8f5d">pte_osThreadCheckCancel</a> (pte_osThreadHandle threadHandle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#5c722b6d1840babcdf9dd1d343eab839">pte_osThreadSleep</a> (unsigned int msecs)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#18cd3561b14611ae16682cbbbf674980">pte_osThreadGetMaxPriority</a> ()</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#913badc3cfa6b2a817c2b501d45548fc">pte_osThreadGetMinPriority</a> ()</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#b07cacaf7670707cc2741f5d9746571b">pte_osThreadGetDefaultPriority</a> ()</td></tr>
- <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
- <tr><td colspan="2"><div class="groupHeader">Mutexes</div></td></tr>
- <tr><td colspan="2"><div class="groupText"><br><br></div></td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#76af3c11297593ebd698c206176b649b">pte_osMutexCreate</a> (pte_osMutexHandle *pHandle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#48aa456b2215aaddfaca11189be8dcd6">pte_osMutexDelete</a> (pte_osMutexHandle handle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#299605cd2506cc0d7977c41ab3fd0e80">pte_osMutexLock</a> (pte_osMutexHandle handle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#f202c5379b5fb1799c6054916bb2cf3f">pte_osMutexUnlock</a> (pte_osMutexHandle handle)</td></tr>
- <tr><td colspan="2"><div class="groupHeader">Semaphores</div></td></tr>
- <tr><td colspan="2"><div class="groupText"><br><br></div></td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#868f71ff8dfb927393da6620398097ed">pte_osSemaphoreDelete</a> (pte_osSemaphoreHandle handle)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </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>
- <tr><td colspan="2"><div class="groupHeader">Thread Local Storage</div></td></tr>
- <tr><td colspan="2"><div class="groupText"><br><br></div></td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#44051eabc72d953a731c7c559d9c99c7">pte_osTlsGetValue</a> (unsigned int key)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#4369875ed4b8d89a72a9b14a811af3ad">pte_osTlsInit</a> (void)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#851a24e2dc4fe5c61e00c9dc7105d607">pte_osTlsAlloc</a> (unsigned int *pKey)</td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#a96a7e24fee6ba3c37c13d8429044a58">pte_osTlsFree</a> (unsigned int key)</td></tr>
- <tr><td colspan="2"><div class="groupHeader">Atomic operations</div></td></tr>
- <tr><td colspan="2"><div class="groupText"><br><br></div></td></tr>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">int </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">int </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">int </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>
- <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pte__generic__osal_8h.html#7b52fa2a4a05b2308e116040e379f532">pte_osAtomicDecrement</a> (int *pdest)</td></tr>
- </table>
- <hr><h2>Typedef Documentation</h2>
- <a class="anchor" name="351fe193de41b62d05e1aa19a3bf1a45"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadEntryPoint" ref="351fe193de41b62d05e1aa19a3bf1a45" args=")(void *params)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">typedef int(* <a class="el" href="pte__generic__osal_8h.html#351fe193de41b62d05e1aa19a3bf1a45">pte_osThreadEntryPoint</a>)(void *params) </td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- </div>
- </div><p>
- <hr><h2>Enumeration Type Documentation</h2>
- <a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16b"></a><!-- doxytag: member="pte_generic_osal.h::pte_osResult" ref="8434ef5479b09bf1d5d1bf2eb078e16b" args="" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">enum <a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> </td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- <dl compact><dt><b>Enumerator: </b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><em><a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16b542c92113747d4c2f01ac0392346ef9a"></a><!-- doxytag: member="PTE_OS_OK" ref="8434ef5479b09bf1d5d1bf2eb078e16b542c92113747d4c2f01ac0392346ef9a" args="" -->PTE_OS_OK</em> </td><td>
- Operation completed successfully </td></tr>
- <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> </td><td>
- Operation failed because there insufficient resources </td></tr>
- <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> </td><td>
- Operation failed due to a general failure </td></tr>
- <tr><td valign="top"><em><a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16bced54c5db0dc4c60fdfae17ed6b44eed"></a><!-- doxytag: member="PTE_OS_TIMEOUT" ref="8434ef5479b09bf1d5d1bf2eb078e16bced54c5db0dc4c60fdfae17ed6b44eed" args="" -->PTE_OS_TIMEOUT</em> </td><td>
- Operation did not complete because a user specified timeout expired. </td></tr>
- <tr><td valign="top"><em><a class="anchor" name="8434ef5479b09bf1d5d1bf2eb078e16baabab6adc711b3215f4a45d1944b48d3"></a><!-- doxytag: member="PTE_OS_INTERRUPTED" ref="8434ef5479b09bf1d5d1bf2eb078e16baabab6adc711b3215f4a45d1944b48d3" args="" -->PTE_OS_INTERRUPTED</em> </td><td>
- The operation was interrupted before it could complete. </td></tr>
- <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> </td><td>
- An invalid parameter was specified </td></tr>
- </table>
- </dl>
- </div>
- </div><p>
- <hr><h2>Function Documentation</h2>
- <a class="anchor" name="26ba7b2e8dd5e78bfb6fdea89953fe81"></a><!-- doxytag: member="pte_generic_osal.h::pte_osAtomicCompareExchange" ref="26ba7b2e8dd5e78bfb6fdea89953fe81" args="(int *pdest, int exchange, int comp)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int pte_osAtomicCompareExchange </td>
- <td>(</td>
- <td class="paramtype">int * </td>
- <td class="paramname"> <em>pdest</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>exchange</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>comp</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Performs an atomic compare-and-exchange oepration on the specified value. That is:<p>
- <div class="fragment"><pre class="fragment"> origVal = *pdest
- <span class="keywordflow">if</span> (*pdest == comp)
- then *pdest = exchange
- <span class="keywordflow">return</span> origVal
- </pre></div><p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>pdest</em> </td><td>Pointer to the destination value. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>exchange</em> </td><td>Exchange value (value to set destination to if destination == comparand) </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>comp</em> </td><td>The value to compare to destination.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>Original value of destination </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="7b52fa2a4a05b2308e116040e379f532"></a><!-- doxytag: member="pte_generic_osal.h::pte_osAtomicDecrement" ref="7b52fa2a4a05b2308e116040e379f532" args="(int *pdest)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int pte_osAtomicDecrement </td>
- <td>(</td>
- <td class="paramtype">int * </td>
- <td class="paramname"> <em>pdest</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Decrements the destination.<p>
- <div class="fragment"><pre class="fragment"> origVal = *pdest
- *pdest++
- <span class="keywordflow">return</span> origVal
- </pre></div><p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>pdest</em> </td><td>Destination value to decrement</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>Original destination value </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="6dc6f01fe801019dacc76222feb4c6ad"></a><!-- doxytag: member="pte_generic_osal.h::pte_osAtomicExchange" ref="6dc6f01fe801019dacc76222feb4c6ad" args="(int *pTarg, int val)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int pte_osAtomicExchange </td>
- <td>(</td>
- <td class="paramtype">int * </td>
- <td class="paramname"> <em>pTarg</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>val</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Sets the target to the specified value as an atomic operation.<p>
- <div class="fragment"><pre class="fragment"> origVal = *ptarg
- *ptarg = val
- <span class="keywordflow">return</span> origVal
- </pre></div><p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>pTarg</em> </td><td>Pointer to the value to be exchanged. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>val</em> </td><td>Value to be exchanged</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>original value of destination </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="58bb5aa2308e9518159521ca6ea93b5c"></a><!-- doxytag: member="pte_generic_osal.h::pte_osAtomicExchangeAdd" ref="58bb5aa2308e9518159521ca6ea93b5c" args="(int volatile *pdest, int value)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int pte_osAtomicExchangeAdd </td>
- <td>(</td>
- <td class="paramtype">int volatile * </td>
- <td class="paramname"> <em>pdest</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>value</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Adds the value to target as an atomic operation<p>
- <div class="fragment"><pre class="fragment"> origVal = *pdest
- *pAddend += value
- <span class="keywordflow">return</span> origVal
- </pre></div><p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>pdest</em> </td><td>Pointer to the variable to be updated. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Value to be added to the variable.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>Original value of destination </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="182cfe699774da3b514e11ca9c7a9beb"></a><!-- doxytag: member="pte_generic_osal.h::pte_osInit" ref="182cfe699774da3b514e11ca9c7a9beb" args="(void)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osInit </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Provides a hook for the OSAL to implement any OS specific initialization. This is guaranteed to be called before any other OSAL function.
- </div>
- </div><p>
- <a class="anchor" name="76af3c11297593ebd698c206176b649b"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexCreate" ref="76af3c11297593ebd698c206176b649b" args="(pte_osMutexHandle *pHandle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexCreate </td>
- <td>(</td>
- <td class="paramtype">pte_osMutexHandle * </td>
- <td class="paramname"> <em>pHandle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Creates a mutex<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>pHandle</em> </td><td>Set to the handle of the newly created mutex.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully created <p>
- PTE_OS_NO_RESOURCESs - Insufficient resources to create mutex </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="48aa456b2215aaddfaca11189be8dcd6"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexDelete" ref="48aa456b2215aaddfaca11189be8dcd6" args="(pte_osMutexHandle handle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexDelete </td>
- <td>(</td>
- <td class="paramtype">pte_osMutexHandle </td>
- <td class="paramname"> <em>handle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Deletes a mutex and frees any associated resources.<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>handle</em> </td><td>Handle of mutex to delete.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully deleted. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="299605cd2506cc0d7977c41ab3fd0e80"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexLock" ref="299605cd2506cc0d7977c41ab3fd0e80" args="(pte_osMutexHandle handle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexLock </td>
- <td>(</td>
- <td class="paramtype">pte_osMutexHandle </td>
- <td class="paramname"> <em>handle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Locks the mutex<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>handle</em> </td><td>Handle of mutex to lock.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully locked. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="04a769a4b8d2e2ee75f775f7a9d9291e"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexTimedLock" ref="04a769a4b8d2e2ee75f775f7a9d9291e" args="(pte_osMutexHandle handle, unsigned int timeoutMsecs)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexTimedLock </td>
- <td>(</td>
- <td class="paramtype">pte_osMutexHandle </td>
- <td class="paramname"> <em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned int </td>
- <td class="paramname"> <em>timeoutMsecs</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- 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>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>handle</em> </td><td>Handle of mutex to lock. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>timeoutMsecs</em> </td><td>Number of milliseconds to wait for resource before returning.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully locked. <p>
- PTE_OS_TIMEOUT - Timeout expired before lock was obtained. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="f202c5379b5fb1799c6054916bb2cf3f"></a><!-- doxytag: member="pte_generic_osal.h::pte_osMutexUnlock" ref="f202c5379b5fb1799c6054916bb2cf3f" args="(pte_osMutexHandle handle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osMutexUnlock </td>
- <td>(</td>
- <td class="paramtype">pte_osMutexHandle </td>
- <td class="paramname"> <em>handle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Unlocks the mutex<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>handle</em> </td><td>Handle of mutex to unlock</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Mutex successfully unlocked. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="4a39bc9845ae936e01627ff67b166c47"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphoreCancellablePend" ref="4a39bc9845ae936e01627ff67b166c47" args="(pte_osSemaphoreHandle handle, unsigned int *pTimeout)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphoreCancellablePend </td>
- <td>(</td>
- <td class="paramtype">pte_osSemaphoreHandle </td>
- <td class="paramname"> <em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned int * </td>
- <td class="paramname"> <em>pTimeout</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- 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>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>handle</em> </td><td>Handle of semaphore to acquire. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>pTimeout</em> </td><td>Pointer to the number of milliseconds to wait to acquire the semaphore before returning. If set to NULL, wait forever.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Semaphore successfully acquired. <p>
- PTE_OS_TIMEOUT - Timeout expired before semaphore was obtained. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="cd102e0dbc375040016bde75f94f207f"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphoreCreate" ref="cd102e0dbc375040016bde75f94f207f" args="(int initialValue, pte_osSemaphoreHandle *pHandle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphoreCreate </td>
- <td>(</td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>initialValue</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">pte_osSemaphoreHandle * </td>
- <td class="paramname"> <em>pHandle</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Creates a semaphore<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>initialValue</em> </td><td>Initial value of the semaphore </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>pHandle</em> </td><td>Set to the handle of the newly created semaphore.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Semaphore successfully created <p>
- PTE_OS_NO_RESOURCESs - Insufficient resources to create semaphore </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="868f71ff8dfb927393da6620398097ed"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphoreDelete" ref="868f71ff8dfb927393da6620398097ed" args="(pte_osSemaphoreHandle handle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphoreDelete </td>
- <td>(</td>
- <td class="paramtype">pte_osSemaphoreHandle </td>
- <td class="paramname"> <em>handle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Deletes a semaphore and frees any associated resources.<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>handle</em> </td><td>Handle of semaphore to delete.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Semaphore successfully deleted. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="faf21b36d98f19bd780b95f475cb0a1a"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphorePend" ref="faf21b36d98f19bd780b95f475cb0a1a" args="(pte_osSemaphoreHandle handle, unsigned int *pTimeout)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphorePend </td>
- <td>(</td>
- <td class="paramtype">pte_osSemaphoreHandle </td>
- <td class="paramname"> <em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned int * </td>
- <td class="paramname"> <em>pTimeout</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- 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>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>handle</em> </td><td>Handle of semaphore to acquire. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>pTimeout</em> </td><td>Pointer to the number of milliseconds to wait to acquire the semaphore before returning. If set to NULL, wait forever.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Semaphore successfully acquired. <p>
- PTE_OS_TIMEOUT - Timeout expired before semaphore was obtained. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="8aa3a131d541de9815ec636e30eb4a3a"></a><!-- doxytag: member="pte_generic_osal.h::pte_osSemaphorePost" ref="8aa3a131d541de9815ec636e30eb4a3a" args="(pte_osSemaphoreHandle handle, int count)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osSemaphorePost </td>
- <td>(</td>
- <td class="paramtype">pte_osSemaphoreHandle </td>
- <td class="paramname"> <em>handle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>count</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Posts to the semaphore<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>handle</em> </td><td>Semaphore to release </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>Amount to increment the semaphore by.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - semaphore successfully released. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="28ea17c5ecaaebf7f9b195a91a709e77"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadCancel" ref="28ea17c5ecaaebf7f9b195a91a709e77" args="(pte_osThreadHandle threadHandle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadCancel </td>
- <td>(</td>
- <td class="paramtype">pte_osThreadHandle </td>
- <td class="paramname"> <em>threadHandle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- 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>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>threadHandle</em> </td><td>handle to the thread to cancel.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>Thread successfully canceled. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="5b5034f6f2a2b2f124991728096a8f5d"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadCheckCancel" ref="5b5034f6f2a2b2f124991728096a8f5d" args="(pte_osThreadHandle threadHandle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadCheckCancel </td>
- <td>(</td>
- <td class="paramtype">pte_osThreadHandle </td>
- <td class="paramname"> <em>threadHandle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Check if <a class="el" href="pte__generic__osal_8h.html#28ea17c5ecaaebf7f9b195a91a709e77">pte_osThreadCancel()</a> has been called on the specified thread.<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>threadHandle</em> </td><td>handle of thread to check the state of.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - Thread has not been cancelled <p>
- PTE_OS_INTERRUPTED - Thread has been cancelled. </dd></dl>
- </div>
- </div><p>
- <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)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadCreate </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="pte__generic__osal_8h.html#351fe193de41b62d05e1aa19a3bf1a45">pte_osThreadEntryPoint</a> </td>
- <td class="paramname"> <em>entryPoint</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>stackSize</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>initialPriority</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"> <em>argv</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">pte_osThreadHandle * </td>
- <td class="paramname"> <em>ppte_osThreadHandle</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- 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>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>entryPoint</em> </td><td>Entry point to the new thread. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>stackSize</em> </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>
- <tr><td valign="top"></td><td valign="top"><em>initialPriority</em> </td><td>The priority that the new thread should be initially set to. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>argv</em> </td><td>Parameter to pass to the new thread. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>ppte_osThreadHandle</em> </td><td>set to the handle of the new thread.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - New thread successfully created. <p>
- PTE_OS_NO_RESOURCESs - Insufficient resources to create thread </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="685d89f40949c634169c4a7d13de4ee0"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadDelete" ref="685d89f40949c634169c4a7d13de4ee0" args="(pte_osThreadHandle handle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadDelete </td>
- <td>(</td>
- <td class="paramtype">pte_osThreadHandle </td>
- <td class="paramname"> <em>handle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- 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.
- </div>
- </div><p>
- <a class="anchor" name="efffdffc7923dbbdb5b930cd24c852d1"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadExit" ref="efffdffc7923dbbdb5b930cd24c852d1" args="()" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void pte_osThreadExit </td>
- <td>(</td>
- <td class="paramname"> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Causes the current thread to stop executing.<p>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>Never returns (thread terminated) </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="cdbcc3abdb03e1a0f6475d5c0759dac7"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadExitAndDelete" ref="cdbcc3abdb03e1a0f6475d5c0759dac7" args="(pte_osThreadHandle handle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadExitAndDelete </td>
- <td>(</td>
- <td class="paramtype">pte_osThreadHandle </td>
- <td class="paramname"> <em>handle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- 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.
- </div>
- </div><p>
- <a class="anchor" name="b07cacaf7670707cc2741f5d9746571b"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetDefaultPriority" ref="b07cacaf7670707cc2741f5d9746571b" args="()" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int pte_osThreadGetDefaultPriority </td>
- <td>(</td>
- <td class="paramname"> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Returns the priority that should be used if the caller to pthread_create doesn't explicitly set one.
- </div>
- </div><p>
- <a class="anchor" name="8e8f80b5c86e1357ce0b40d8333ec969"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetHandle" ref="8e8f80b5c86e1357ce0b40d8333ec969" args="(void)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">pte_osThreadHandle pte_osThreadGetHandle </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Returns the handle of the currently executing thread.
- </div>
- </div><p>
- <a class="anchor" name="18cd3561b14611ae16682cbbbf674980"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetMaxPriority" ref="18cd3561b14611ae16682cbbbf674980" args="()" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int pte_osThreadGetMaxPriority </td>
- <td>(</td>
- <td class="paramname"> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Returns the maximum allowable priority
- </div>
- </div><p>
- <a class="anchor" name="913badc3cfa6b2a817c2b501d45548fc"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetMinPriority" ref="913badc3cfa6b2a817c2b501d45548fc" args="()" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int pte_osThreadGetMinPriority </td>
- <td>(</td>
- <td class="paramname"> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Returns the minimum allowable priority
- </div>
- </div><p>
- <a class="anchor" name="54fce783cb811dc6458ea118ab8f7f1d"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadGetPriority" ref="54fce783cb811dc6458ea118ab8f7f1d" args="(pte_osThreadHandle threadHandle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int pte_osThreadGetPriority </td>
- <td>(</td>
- <td class="paramtype">pte_osThreadHandle </td>
- <td class="paramname"> <em>threadHandle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Returns the priority of the specified thread.
- </div>
- </div><p>
- <a class="anchor" name="6782a421eb6c2eb9aa60f3b7ccca1f99"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadSetPriority" ref="6782a421eb6c2eb9aa60f3b7ccca1f99" args="(pte_osThreadHandle threadHandle, int newPriority)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadSetPriority </td>
- <td>(</td>
- <td class="paramtype">pte_osThreadHandle </td>
- <td class="paramname"> <em>threadHandle</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>newPriority</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Sets the priority of the specified thread.<p>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - thread priority successfully set </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="5c722b6d1840babcdf9dd1d343eab839"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadSleep" ref="5c722b6d1840babcdf9dd1d343eab839" args="(unsigned int msecs)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void pte_osThreadSleep </td>
- <td>(</td>
- <td class="paramtype">unsigned int </td>
- <td class="paramname"> <em>msecs</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Causes the current thread to sleep for the specified number of milliseconds.
- </div>
- </div><p>
- <a class="anchor" name="ab292e786c9b96e80daf8ae9dc983a72"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadStart" ref="ab292e786c9b96e80daf8ae9dc983a72" args="(pte_osThreadHandle osThreadHandle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadStart </td>
- <td>(</td>
- <td class="paramtype">pte_osThreadHandle </td>
- <td class="paramname"> <em>osThreadHandle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Starts executing the specified thread.<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>osThreadHandle</em> </td><td>handle of the thread to start.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - thread successfully started. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="0bcce6dc9b22691f914b07894394ee38"></a><!-- doxytag: member="pte_generic_osal.h::pte_osThreadWaitForEnd" ref="0bcce6dc9b22691f914b07894394ee38" args="(pte_osThreadHandle threadHandle)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osThreadWaitForEnd </td>
- <td>(</td>
- <td class="paramtype">pte_osThreadHandle </td>
- <td class="paramname"> <em>threadHandle</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Waits for the specified thread to end. If the thread has already terminated, this returns immediately.<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>threadHandle</em> </td><td>Handle fo thread to wait for.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - specified thread terminated. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="851a24e2dc4fe5c61e00c9dc7105d607"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsAlloc" ref="851a24e2dc4fe5c61e00c9dc7105d607" args="(unsigned int *pKey)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osTlsAlloc </td>
- <td>(</td>
- <td class="paramtype">unsigned int * </td>
- <td class="paramname"> <em>pKey</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Allocates a new TLS key.<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>pKey</em> </td><td>On success will be set to the newly allocated key.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - TLS key successfully allocated. <p>
- PTE_OS_NO_RESOURCESs - Insufficient resources to allocate key (e.g. maximum number of keys reached). </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="a96a7e24fee6ba3c37c13d8429044a58"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsFree" ref="a96a7e24fee6ba3c37c13d8429044a58" args="(unsigned int key)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osTlsFree </td>
- <td>(</td>
- <td class="paramtype">unsigned int </td>
- <td class="paramname"> <em>key</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Frees the specified TLS key.<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>index</em> </td><td>TLS key to free</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>PTE_OS_OK - TLS key was successfully freed. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="44051eabc72d953a731c7c559d9c99c7"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsGetValue" ref="44051eabc72d953a731c7c559d9c99c7" args="(unsigned int key)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void* pte_osTlsGetValue </td>
- <td>(</td>
- <td class="paramtype">unsigned int </td>
- <td class="paramname"> <em>key</em> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- 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>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>index</em> </td><td>The TLS key for the value.</td></tr>
- </table>
- </dl>
- <dl class="return" compact><dt><b>Returns:</b></dt><dd>The value associated with <code>key</code> for the current thread. </dd></dl>
- </div>
- </div><p>
- <a class="anchor" name="4369875ed4b8d89a72a9b14a811af3ad"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsInit" ref="4369875ed4b8d89a72a9b14a811af3ad" args="(void)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void pte_osTlsInit </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"> </td>
- <td> ) </td>
- <td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Initializes the OS TLS support. This is called by the PTE library prior to performing ANY TLS operation.
- </div>
- </div><p>
- <a class="anchor" name="875ea911d219532ca4da65430e73d22e"></a><!-- doxytag: member="pte_generic_osal.h::pte_osTlsSetValue" ref="875ea911d219532ca4da65430e73d22e" args="(unsigned int key, void *value)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="pte__generic__osal_8h.html#8434ef5479b09bf1d5d1bf2eb078e16b">pte_osResult</a> pte_osTlsSetValue </td>
- <td>(</td>
- <td class="paramtype">unsigned int </td>
- <td class="paramname"> <em>key</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"> <em>value</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td width="100%"></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>
- Sets the thread specific value for the specified key for the currently executing thread.<p>
- <dl compact><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>index</em> </td><td>The TLS key for the value. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>The value to save </td></tr>
- </table>
- </dl>
- </div>
- </div><p>
- <hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 7 21:56:48 2008 for PTE by
- <a href="http://www.doxygen.org/index.html">
- <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
- </body>
- </html>
|