Module Name: src
Committed By: tsutsui
Date: Thu May 1 18:08:47 UTC 2014
Modified Files:
src/sys/arch/hp300/stand/common: if_le.c
Log Message:
Reduce a number of getsecs() calls in le_get() to make netboot a bit faster.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/stand/common/if_le.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/hp300/stand/common/if_le.c
diff -u src/sys/arch/hp300/stand/common/if_le.c:1.11 src/sys/arch/hp300/stand/common/if_le.c:1.12
--- src/sys/arch/hp300/stand/common/if_le.c:1.11 Mon Jan 12 11:32:43 2009
+++ src/sys/arch/hp300/stand/common/if_le.c Thu May 1 18:08:47 2014
@@ -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 @@ le_get(struct iodesc *desc, void *pkt, s
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;
}