hw: fix bug in cancellation of 'await_signal'

There were two bugs. First, the caller of Kernel::await_signal wasn't
re-activated for scheduling. Second, the caller did not memorize that he
doesn't wait on a receiver anymore which had bad side effects on further
signal handling.

Fix #1459
This commit is contained in:
Martin Stein 2015-03-18 17:42:02 +01:00 committed by Christian Helmuth
parent 60e392f0c0
commit 70aa98d837
2 changed files with 6 additions and 1 deletions

View File

@ -33,7 +33,10 @@ Signal_ack_handler::~Signal_ack_handler()
void Signal_handler::_cancel_waiting()
{
if (_receiver) { _receiver->_handler_cancelled(this); }
if (_receiver) {
_receiver->_handler_cancelled(this);
_receiver = 0;
}
}

View File

@ -114,6 +114,8 @@ bool Thread::_resume()
return true;
case AWAITS_SIGNAL:
Signal_handler::cancel_waiting();
user_arg_0(-1);
_become_active();
return true;
case AWAITS_SIGNAL_CONTEXT_KILL:
Signal_context_killer::cancel_waiting();