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

Conversation

raulMrello
Copy link
Contributor

Added functionality to clear consumed signal flags on thread waiting. Example of use:

Thread * _th;
// .....
// .....
// Waits for signal flag 1 or 2... 
for(;;){
  osEvent oe = _th->signal_wait((1 | 2), 0);
  if(oe.status == osEventSignal && (oe.value.signals & 1) != 0){
      _th->signal_clr(1);
     // add handling code for signal flag 1
  }
  if(oe.status == osEventSignal && (oe.value.signals & 2) != 0){
      _th->signal_clr(2);
     // add handling code for signal flag 2
  }

}

0xc0170 added a commit that referenced this pull request May 5, 2015
Updated Thread.cpp|.h to support signal clear
@0xc0170 0xc0170 merged commit 16156f5 into ARMmbed:master May 5, 2015
@raulMrello raulMrello deleted the thread_signal_clr branch May 5, 2015 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants