Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpuser assert that clock_gettime() does not fail
details: https://anonhg.NetBSD.org/src/rev/ea39e115b4d4
branches: trunk
changeset: 803605:ea39e115b4d4
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Nov 05 01:39:40 2014 +0000
description:
assert that clock_gettime() does not fail
diffstat:
lib/librumpuser/rumpfiber.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r a75ef80eeea0 -r ea39e115b4d4 lib/librumpuser/rumpfiber.c
--- a/lib/librumpuser/rumpfiber.c Wed Nov 05 01:37:27 2014 +0000
+++ b/lib/librumpuser/rumpfiber.c Wed Nov 05 01:39:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpfiber.c,v 1.4 2014/08/24 14:37:31 pooka Exp $ */
+/* $NetBSD: rumpfiber.c,v 1.5 2014/11/05 01:39:40 pooka Exp $ */
/*
* Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved.
@@ -68,7 +68,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
-__RCSID("$NetBSD: rumpfiber.c,v 1.4 2014/08/24 14:37:31 pooka Exp $");
+__RCSID("$NetBSD: rumpfiber.c,v 1.5 2014/11/05 01:39:40 pooka Exp $");
#endif /* !lint */
#include <sys/ioctl.h>
@@ -119,8 +119,10 @@
now(void)
{
struct timespec ts;
+ int rv;
- clock_gettime(CLOCK_MONOTONIC, &ts);
+ rv = clock_gettime(CLOCK_MONOTONIC, &ts);
+ assert(rv == 0);
return (ts.tv_sec * 1000LL) + (ts.tv_nsec / 1000000LL);
}
Home |
Main Index |
Thread Index |
Old Index