[PATCH] handle rumpuser_clock_sleep() failure gracefully

  • From: Robert Millan <rmh@xxxxxxxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Sun, 16 Aug 2015 02:36:58 +0200


Hi,

The calls made by rumpuser_clock_sleep() have a few error conditions (see my
previous mail). IMHO it would be better to inform about them rather than just
assert.

--
Robert Millan
Index: rumpkernel-0~20150715/buildrump.sh/src/sys/rump/librump/rumpkern/intr.c
===================================================================
---
rumpkernel-0~20150715.orig/buildrump.sh/src/sys/rump/librump/rumpkern/intr.c
2015-08-16 00:48:12.866524593 +0200
+++ rumpkernel-0~20150715/buildrump.sh/src/sys/rump/librump/rumpkern/intr.c
2015-08-16 00:50:35.624333621 +0200
@@ -127,7 +127,8 @@

error = rumpuser_clock_sleep(RUMPUSER_CLOCK_ABSMONO,
curclock.tv_sec, curclock.tv_nsec);
- KASSERT(!error);
+ if (error)
+ panic("rumpuser_clock_sleep failed with error %d",
error);
timespecadd(&curclock, &thetick, &curclock);
}
}

Other related posts:

  • » [PATCH] handle rumpuser_clock_sleep() failure gracefully - Robert Millan