hw: fix in signal-ack handling in kernel

ref #574
This commit is contained in:
Martin Stein 2013-08-22 18:59:50 +02:00 committed by Norman Feske
parent fa047f4dda
commit cbd1464ee3

View File

@ -584,6 +584,15 @@ namespace Kernel
*/ */
void _deliver(); void _deliver();
/**
* Called by receiver when all submits have been delivered
*/
void _delivered()
{
_submits = 0;
_await_ack = 1;
}
public: public:
/** /**
@ -654,9 +663,7 @@ namespace Kernel
c->_submits); c->_submits);
*(Signal::Data *)t->phys_utcb()->base() = data; *(Signal::Data *)t->phys_utcb()->base() = data;
t->received_signal(); t->received_signal();
c->_delivered();
/* reset context */
c->_submits = 0;
} }
} }
@ -1623,12 +1630,12 @@ void Signal_context::_deliver()
{ {
if (!_submits) return; if (!_submits) return;
_receiver->deliver(this); _receiver->deliver(this);
_await_ack = 1;
} }
void Signal_context::ack() void Signal_context::ack()
{ {
assert(_await_ack);
_await_ack = 0; _await_ack = 0;
if (!_killer) { if (!_killer) {
_deliver(); _deliver();