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 DELAY takes microseconds...
details: https://anonhg.NetBSD.org/src/rev/f3c348557ca6
branches: trunk
changeset: 445328:f3c348557ca6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Oct 23 03:56:33 2018 +0000
description:
DELAY takes microseconds, not ticks.
XXX pullup-7
XXX pullup-8
diffstat:
sys/external/bsd/drm2/include/linux/sched.h | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 561705375a07 -r f3c348557ca6 sys/external/bsd/drm2/include/linux/sched.h
--- a/sys/external/bsd/drm2/include/linux/sched.h Tue Oct 23 01:49:37 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/sched.h Tue Oct 23 03:56:33 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sched.h,v 1.10 2018/08/27 07:47:11 riastradh Exp $ */
+/* $NetBSD: sched.h,v 1.11 2018/10/23 03:56:33 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -60,7 +60,16 @@
int start, end;
if (cold) {
- DELAY(timeout);
+ unsigned us;
+ if (hz <= 1000) {
+ unsigned ms = hztoms(MIN(timeout, mstohz(INT_MAX)));
+ us = MIN(ms, INT_MAX/1000)*1000;
+ } else if (hz <= 1000000) {
+ us = MIN(timeout, (INT_MAX/1000000)/hz)*hz*1000000;
+ } else {
+ us = timeout/(1000000/hz);
+ }
+ DELAY(us);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index