base-hw: Fix bug in 'thread_resume' syscall.

This commit is contained in:
Martin Stein 2012-11-19 16:26:08 +01:00 committed by Norman Feske
parent b7c1404fbf
commit 1b73f80350
1 changed files with 4 additions and 1 deletions

View File

@ -1202,7 +1202,10 @@ namespace Kernel
*/
int resume()
{
assert (_state == AWAIT_RESUMPTION || _state == ACTIVE)
if (_state != AWAIT_RESUMPTION && _state != ACTIVE) {
PDBG("Unexpected thread state");
return -1;
}
cpu_scheduler()->insert(this);
if (_state == ACTIVE) return 1;
_state = ACTIVE;