Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern always return immediately on error, and if we passe...
details: https://anonhg.NetBSD.org/src/rev/596dd6c3ce39
branches: trunk
changeset: 785826:596dd6c3ce39
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 31 16:45:06 2013 +0000
description:
always return immediately on error, and if we passed negative seconds,
return with 0.
diffstat:
sys/kern/kern_time.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r a04e57e44b22 -r 596dd6c3ce39 sys/kern/kern_time.c
--- a/sys/kern/kern_time.c Sun Mar 31 11:38:36 2013 +0000
+++ b/sys/kern/kern_time.c Sun Mar 31 16:45:06 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_time.c,v 1.177 2013/03/29 10:34:12 martin Exp $ */
+/* $NetBSD: kern_time.c,v 1.178 2013/03/31 16:45:06 christos Exp $ */
/*-
* Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.177 2013/03/29 10:34:12 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.178 2013/03/31 16:45:06 christos Exp $");
#include <sys/param.h>
#include <sys/resourcevar.h>
@@ -328,10 +328,8 @@
struct timespec rmtstart;
int error, timo;
- if ((error = ts2timo(clock_id, flags, rqt, &timo, &rmtstart)) != 0) {
- if (error == ETIMEDOUT)
- timo = 0;
- }
+ if ((error = ts2timo(clock_id, flags, rqt, &timo, &rmtstart)) != 0)
+ return error == ETIMEDOUT ? 0 : error;
/*
* Avoid inadvertently sleeping forever
Home |
Main Index |
Thread Index |
Old Index