Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/linux Don't call kpause(9) if ...
details: https://anonhg.NetBSD.org/src/rev/5445be4869d9
branches: trunk
changeset: 333179:5445be4869d9
user: nonaka <nonaka%NetBSD.org@localhost>
date: Wed Oct 22 11:41:34 2014 +0000
description:
Don't call kpause(9) if cold.
diffstat:
sys/external/bsd/drm2/include/linux/sched.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 4ac30a1ea648 -r 5445be4869d9 sys/external/bsd/drm2/include/linux/sched.h
--- a/sys/external/bsd/drm2/include/linux/sched.h Wed Oct 22 11:11:40 2014 +0000
+++ b/sys/external/bsd/drm2/include/linux/sched.h Wed Oct 22 11:41:34 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sched.h,v 1.3 2014/07/16 20:56:25 riastradh Exp $ */
+/* $NetBSD: sched.h,v 1.4 2014/10/22 11:41:34 nonaka Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -51,12 +51,17 @@
{
int start, end;
+ if (cold) {
+ DELAY(timeout);
+ return 0;
+ }
+
start = hardclock_ticks;
/* XXX Integer truncation...not likely to matter here. */
(void)kpause("loonix", false /*!intr*/, timeout, NULL);
end = hardclock_ticks;
- return (end - start);
+ return (end - start) > 0 ? (end - start) : 0;
}
#endif /* _LINUX_SCHED_H_ */
Home |
Main Index |
Thread Index |
Old Index