changeset 749e3799e532 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=749e3799e532
description:
kvm: Add handling of EAGAIN when creating timers
timer_create can apparently return -1 and set errno to EAGAIN if the
kernel suffered a temporary failure when allocating a timer. This
happens from time to time, so we need to handle it.
diffstat:
src/cpu/kvm/timer.cc | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r 9d85dfa4696c -r 749e3799e532 src/cpu/kvm/timer.cc
--- a/src/cpu/kvm/timer.cc Mon Jun 03 13:21:21 2013 +0200
+++ b/src/cpu/kvm/timer.cc Mon Jun 03 13:38:59 2013 +0200
@@ -59,8 +59,11 @@
sev.sigev_notify = SIGEV_SIGNAL;
sev.sigev_signo = signo;
sev.sigev_value.sival_ptr = NULL;
- if (timer_create(clockID, &sev, &timer) == -1)
- panic("timer_create");
+
+ while (timer_create(clockID, &sev, &timer) == -1) {
+ if (errno != EAGAIN)
+ panic("timer_create: %i", errno);
+ }
}
PosixKvmTimer::~PosixKvmTimer()
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev