diff options
author | rihab kouki <rihab.kouki@st.com> | 2020-07-28 11:24:49 +0100 |
---|---|---|
committer | rihab kouki <rihab.kouki@st.com> | 2020-07-28 11:24:49 +0100 |
commit | 96d6da4e252b06dcfdc041e7df23e86161c33007 (patch) | |
tree | a262f59bb1db7ec7819acae435f5049cbe5e2354 /docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html | |
parent | 9f95ff5b6ba01db09552b84a0ab79607060a2666 (diff) | |
download | st-cmsis-core-lowfat-master.tar.gz st-cmsis-core-lowfat-master.tar.bz2 st-cmsis-core-lowfat-master.zip |
Diffstat (limited to 'docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html')
-rw-r--r-- | docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html b/docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html index 5c25af2..03f3622 100644 --- a/docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html +++ b/docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html @@ -212,9 +212,9 @@ Functions</h2></td></tr> <p>The function <b>osThreadFlagsSet</b> sets the thread flags for a thread specified by parameter <em>thread_id</em>. It returns the flags set, or an error code if highest bit is set (refer to <a class="el" href="group__flags__error__codes.html">Flags Functions Error Codes</a>). This function may be used also within interrupt service routines. Threads waiting for a flag to be set will resume from <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ThreadStates">BLOCKED</a> state.</p> <p>Possible <a class="el" href="group__flags__error__codes.html">Flags Functions Error Codes</a> return values:</p> <ul> -<li><em>osFlagsErrorUnknown:</em> Unspecified error.</li> -<li><em>osFlagsErrorResource:</em> Thread specified by parameter <em>thread_id</em> is not active to receive flags.</li> -<li><em>osFlagsErrorParameter:</em> Parameter <em>thread_id</em> is not a valid thread or <em>flags</em> has highest bit set.</li> +<li><em>osFlagsErrorUnknown:</em> unspecified error.</li> +<li><em>osFlagsErrorParameter:</em> parameter <em>thread_id</em> is not a valid thread or <em>flags</em> has highest bit set.</li> +<li><em>osFlagsErrorResource:</em> the thread is in invalid state.</li> </ul> <dl class="section note"><dt>Note</dt><dd>This function may be called from <a class="el" href="theory_of_operation.html#CMSIS_RTOS_ISR_Calls">Interrupt Service Routines</a>.</dd></dl> <p><b>Code</b> <b>Example</b> </p> @@ -222,12 +222,12 @@ Functions</h2></td></tr> <div class="line"><span class="comment"> * Function 'signal_func' called from multiple threads</span></div> <div class="line"><span class="comment"> *---------------------------------------------------------------------------*/</span></div> <div class="line"><span class="keywordtype">void</span> signal_func (<a class="code" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa6c32fe2a3e0a2e01f212d55b02e51c7">osThreadId_t</a> tid) {</div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#ga6f89ef9caded1d9963c7b12b0f6412c9">osThreadFlagsSet</a>(tid_clock, 0x0100); <span class="comment">/* set signal to clock thread */</span></div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__Wait.html#gaf6055a51390ef65b6b6edc28bf47322e">osDelay</a>(500); <span class="comment">/* delay 500ms */</span></div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#ga6f89ef9caded1d9963c7b12b0f6412c9">osThreadFlagsSet</a>(tid_clock, 0x0100); <span class="comment">/* set signal to clock thread */</span></div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__Wait.html#gaf6055a51390ef65b6b6edc28bf47322e">osDelay</a>(500); <span class="comment">/* delay 500ms */</span></div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#ga6f89ef9caded1d9963c7b12b0f6412c9">osThreadFlagsSet</a>(tid, 0x0001); <span class="comment">/* set signal to thread 'thread' */</span></div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__Wait.html#gaf6055a51390ef65b6b6edc28bf47322e">osDelay</a>(500); <span class="comment">/* delay 500ms */</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#ga6f89ef9caded1d9963c7b12b0f6412c9">osThreadFlagsSet</a>(tid_clock, 0x0100U); <span class="comment">/* set signal to clock thread */</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__Wait.html#gaf6055a51390ef65b6b6edc28bf47322e">osDelay</a>(500U); <span class="comment">/* delay 500ms */</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#ga6f89ef9caded1d9963c7b12b0f6412c9">osThreadFlagsSet</a>(tid_clock, 0x0100U); <span class="comment">/* set signal to clock thread */</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__Wait.html#gaf6055a51390ef65b6b6edc28bf47322e">osDelay</a>(500U); <span class="comment">/* delay 500ms */</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#ga6f89ef9caded1d9963c7b12b0f6412c9">osThreadFlagsSet</a>(tid, 0x0001U); <span class="comment">/* set signal to thread 'thread' */</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__Wait.html#gaf6055a51390ef65b6b6edc28bf47322e">osDelay</a>(500U); <span class="comment">/* delay 500ms */</span></div> <div class="line">}</div> </div><!-- fragment --> </div> @@ -255,9 +255,8 @@ Functions</h2></td></tr> <p>The function <b>osThreadFlagsClear</b> clears the specified flags for the currently running thread. It returns the flags before clearing, or an error code if highest bit is set (refer to <a class="el" href="group__flags__error__codes.html">Flags Functions Error Codes</a>).</p> <p>Possible <a class="el" href="group__flags__error__codes.html">Flags Functions Error Codes</a> return values:</p> <ul> -<li><em>osFlagsErrorUnknown:</em> Unspecified error, i.e. not called from a running threads context.</li> -<li><em>osFlagsErrorResource:</em> Running thread is not active to receive flags.</li> -<li><em>osFlagsErrorParameter:</em> Parameter <em>flags</em> has highest bit set.</li> +<li><em>osFlagsErrorUnknown:</em> unspecified error, i.e. not called from a running threads context.</li> +<li><em>osFlagsErrorParameter:</em> parameter <em>flags</em> has highest bit set.</li> </ul> <dl class="section note"><dt>Note</dt><dd>This function <b>cannot</b> be called from <a class="el" href="theory_of_operation.html#CMSIS_RTOS_ISR_Calls">Interrupt Service Routines</a>. </dd></dl> @@ -337,9 +336,9 @@ Functions</h2></td></tr> <p>The function returns the flags before clearing, or an error code if highest bit is set (refer to <a class="el" href="group__flags__error__codes.html">Flags Functions Error Codes</a>).</p> <p>Possible <a class="el" href="group__flags__error__codes.html">Flags Functions Error Codes</a> return values:</p> <ul> -<li><em>osFlagsErrorUnknown:</em> Unspecified error, i.e. not called from a running threads context.</li> -<li><em>osFlagsErrorTimeout:</em> The awaited flags has not been set during given timeout.</li> -<li><em>osFlagsErrorResource:</em> Running thread is not active to receive flags.</li> +<li><em>osFlagsErrorUnknown:</em> unspecified error, i.e. not called from a running threads context.</li> +<li><em>osFlagsErrorTimeout:</em> awaited flags have not been set in the given time.</li> +<li><em>osFlagsErrorResource:</em> awaited flags have not been set when no <em>timeout</em> was specified.</li> <li><em>osFlagsErrorParameter:</em> Parameter <em>flags</em> has highest bit set.</li> </ul> <dl class="section note"><dt>Note</dt><dd>This function <b>cannot</b> be called from <a class="el" href="theory_of_operation.html#CMSIS_RTOS_ISR_Calls">Interrupt Service Routines</a>.</dd></dl> @@ -348,13 +347,13 @@ Functions</h2></td></tr> <div class="line"> </div> <div class="line"><span class="keywordtype">void</span> Thread (<span class="keywordtype">void</span>* arg) {</div> <div class="line"> ;</div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#gac11542ad6300b600f872fc96e340ec2b">osThreadFlagsWait</a> (0x00000001U, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga18e63587b8450d5b8798b6f6ec04e012">osFlagsWaitAny</a>, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga9eb9a7a797a42e4b55eb171ecc609ddb">osWaitForever</a>); <span class="comment">// Wait forever until thread flag 1 is set.</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#gac11542ad6300b600f872fc96e340ec2b">osThreadFlagsWait</a>(0x00000001U, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga18e63587b8450d5b8798b6f6ec04e012">osFlagsWaitAny</a>, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga9eb9a7a797a42e4b55eb171ecc609ddb">osWaitForever</a>); <span class="comment">// Wait forever until thread flag 1 is set.</span></div> <div class="line"> ;</div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#gac11542ad6300b600f872fc96e340ec2b">osThreadFlagsWait</a> (0x00000003U, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga18e63587b8450d5b8798b6f6ec04e012">osFlagsWaitAny</a>, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga9eb9a7a797a42e4b55eb171ecc609ddb">osWaitForever</a>); <span class="comment">// Wait forever until either thread flag 0 or 1 is set.</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#gac11542ad6300b600f872fc96e340ec2b">osThreadFlagsWait</a>(0x00000003U, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga18e63587b8450d5b8798b6f6ec04e012">osFlagsWaitAny</a>, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga9eb9a7a797a42e4b55eb171ecc609ddb">osWaitForever</a>); <span class="comment">// Wait forever until either thread flag 0 or 1 is set.</span></div> <div class="line"> ;</div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#gac11542ad6300b600f872fc96e340ec2b">osThreadFlagsWait</a> (0x00000003U, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga8b6f562736fbfb5428940e0c017dec24">osFlagsWaitAll</a>, 10); <span class="comment">// Wait for 10 timer ticks until thread flags 0 and 1 are set. Timeout afterwards.</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#gac11542ad6300b600f872fc96e340ec2b">osThreadFlagsWait</a>(0x00000003U, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga8b6f562736fbfb5428940e0c017dec24">osFlagsWaitAll</a>, 10U); <span class="comment">// Wait for 10 timer ticks until thread flags 0 and 1 are set. Timeout afterwards.</span></div> <div class="line"> ;</div> -<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#gac11542ad6300b600f872fc96e340ec2b">osThreadFlagsWait</a> (0x00000003U, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga8b6f562736fbfb5428940e0c017dec24">osFlagsWaitAll</a> | <a class="code" href="group__CMSIS__RTOS__Definitions.html#gaade844a42237d8c37569d4d9b16b9f1c">osFlagsNoClear</a>, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga9eb9a7a797a42e4b55eb171ecc609ddb">osWaitForever</a>); <span class="comment">// Same as the above, but the flags will not be cleared.</span></div> +<div class="line"> <a class="code" href="group__CMSIS__RTOS__ThreadFlagsMgmt.html#gac11542ad6300b600f872fc96e340ec2b">osThreadFlagsWait</a>(0x00000003U, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga8b6f562736fbfb5428940e0c017dec24">osFlagsWaitAll</a> | <a class="code" href="group__CMSIS__RTOS__Definitions.html#gaade844a42237d8c37569d4d9b16b9f1c">osFlagsNoClear</a>, <a class="code" href="group__CMSIS__RTOS__Definitions.html#ga9eb9a7a797a42e4b55eb171ecc609ddb">osWaitForever</a>); <span class="comment">// Same as the above, but the flags will not be cleared.</span></div> <div class="line">}</div> </div><!-- fragment --> </div> @@ -364,7 +363,7 @@ Functions</h2></td></tr> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> - <li class="footer">Generated on Wed Aug 1 2018 17:12:45 for CMSIS-RTOS2 by Arm Ltd. All rights reserved. + <li class="footer">Generated on Wed Jul 10 2019 15:21:04 for CMSIS-RTOS2 Version 2.1.3 by Arm Ltd. All rights reserved. <!-- <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 |