Skip to content

Updated Thread.cpp|.h to support signal clear #1090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libraries/rtos/rtos/Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions libraries/rtos/rtos/Thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ class Thread {
*/
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 */
Expand Down