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:
parent
60e392f0c0
commit
70aa98d837
|
@ -33,7 +33,10 @@ Signal_ack_handler::~Signal_ack_handler()
|
||||||
|
|
||||||
void Signal_handler::_cancel_waiting()
|
void Signal_handler::_cancel_waiting()
|
||||||
{
|
{
|
||||||
if (_receiver) { _receiver->_handler_cancelled(this); }
|
if (_receiver) {
|
||||||
|
_receiver->_handler_cancelled(this);
|
||||||
|
_receiver = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,8 @@ bool Thread::_resume()
|
||||||
return true;
|
return true;
|
||||||
case AWAITS_SIGNAL:
|
case AWAITS_SIGNAL:
|
||||||
Signal_handler::cancel_waiting();
|
Signal_handler::cancel_waiting();
|
||||||
|
user_arg_0(-1);
|
||||||
|
_become_active();
|
||||||
return true;
|
return true;
|
||||||
case AWAITS_SIGNAL_CONTEXT_KILL:
|
case AWAITS_SIGNAL_CONTEXT_KILL:
|
||||||
Signal_context_killer::cancel_waiting();
|
Signal_context_killer::cancel_waiting();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user