Updated Thread.cpp|.h to support signal clear

pull/1090/head
raulMrello 2015-05-04 09:35:58 +02:00
parent d50b62d49f
commit a73ee5c3d6
2 changed files with 10 additions and 0 deletions

View File

@ -62,6 +62,10 @@ int32_t Thread::signal_set(int32_t signals) {
return osSignalSet(_tid, signals);
}
int32_t Thread::signal_clr(int32_t signals) {
return osSignalClear(_tid, signals);
}
Thread::State Thread::get_state() {
#ifndef __MBED_CMSIS_RTOS_CA9
return ((State)_thread_def.tcb.state);

View File

@ -64,6 +64,12 @@ public:
*/
int32_t signal_set(int32_t signals);
/** Clears the specified Signal Flags of an active thread.
@param signals specifies the signal flags of the thread that should be cleared.
@return resultant signal flags of the specified thread or 0x80000000 in case of incorrect parameters.
*/
int32_t signal_clr(int32_t signals);
/** State of the Thread */
enum State {
Inactive, /**< Not created or terminated */