mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-19 00:27:21 +00:00
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
repos/base-hw/src/core/kernel
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user