Skip to content

Commit 16156f5

Browse files
committed
Merge pull request #1090 from raulMrello/thread_signal_clr
Updated Thread.cpp|.h to support signal clear
2 parents 4ba4c0d + a73ee5c commit 16156f5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libraries/rtos/rtos/Thread.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ int32_t Thread::signal_set(int32_t signals) {
6262
return osSignalSet(_tid, signals);
6363
}
6464

65+
int32_t Thread::signal_clr(int32_t signals) {
66+
return osSignalClear(_tid, signals);
67+
}
68+
6569
Thread::State Thread::get_state() {
6670
#ifndef __MBED_CMSIS_RTOS_CA9
6771
return ((State)_thread_def.tcb.state);

libraries/rtos/rtos/Thread.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ class Thread {
6464
*/
6565
int32_t signal_set(int32_t signals);
6666

67+
/** Clears the specified Signal Flags of an active thread.
68+
@param signals specifies the signal flags of the thread that should be cleared.
69+
@return resultant signal flags of the specified thread or 0x80000000 in case of incorrect parameters.
70+
*/
71+
int32_t signal_clr(int32_t signals);
72+
6773
/** State of the Thread */
6874
enum State {
6975
Inactive, /**< Not created or terminated */

0 commit comments

Comments
 (0)