summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sim/syscall_emul.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index dcd6b5d99..295598c52 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -1431,8 +1431,11 @@ cloneFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc)
return -EINVAL;
ThreadContext *ctc;
- if (!(ctc = p->findFreeContext()))
- fatal("clone: no spare thread context in system");
+ if (!(ctc = p->findFreeContext())) {
+ DPRINTF_SYSCALL(Verbose, "clone: no spare thread context in system"
+ "[cpu %d, thread %d]", tc->cpuId(), tc->threadId());
+ return -EAGAIN;
+ }
/**
* Note that ProcessParams is generated by swig and there are no other