Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp300/stand/common Reduce a number of getsecs() cal...
details: https://anonhg.NetBSD.org/src/rev/a3edc128d822
branches: trunk
changeset: 329052:a3edc128d822
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu May 01 18:08:47 2014 +0000
description:
Reduce a number of getsecs() calls in le_get() to make netboot a bit faster.
diffstat:
sys/arch/hp300/stand/common/if_le.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (22 lines):
diff -r 83a893a99910 -r a3edc128d822 sys/arch/hp300/stand/common/if_le.c
--- a/sys/arch/hp300/stand/common/if_le.c Thu May 01 15:19:16 2014 +0000
+++ b/sys/arch/hp300/stand/common/if_le.c Thu May 01 18:08:47 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le.c,v 1.11 2009/01/12 11:32:43 tsutsui Exp $ */
+/* $NetBSD: if_le.c,v 1.12 2014/05/01 18:08:47 tsutsui Exp $ */
/*
* Copyright (c) 1993 Adam Glass
@@ -631,10 +631,9 @@
int cc;
t = getsecs();
- cc = 0;
- while (((getsecs() - t) < timeout) && !cc) {
+ do {
cc = le_poll(desc, pkt, len);
- }
+ } while (cc == 0 && (getsecs() - t) < timeout);
return cc;
}
Home |
Main Index |
Thread Index |
Old Index