Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Use mdelay for ...
details: https://anonhg.NetBSD.org/src/rev/ef0159b961ef
branches: riastradh-drm2
changeset: 788498:ef0159b961ef
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 04:04:30 2013 +0000
description:
Use mdelay for msleep of less than one tick.
diffstat:
sys/external/bsd/drm2/include/linux/delay.h | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diffs (36 lines):
diff -r 6d92808ba342 -r ef0159b961ef sys/external/bsd/drm2/include/linux/delay.h
--- a/sys/external/bsd/drm2/include/linux/delay.h Wed Jul 24 04:04:16 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/delay.h Wed Jul 24 04:04:30 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: delay.h,v 1.1.2.5 2013/07/24 03:44:54 riastradh Exp $ */
+/* $NetBSD: delay.h,v 1.1.2.6 2013/07/24 04:04:30 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -47,12 +47,6 @@
}
static inline void
-msleep(unsigned int msec)
-{
- (void)kpause("lnxmslep", false, mstohz(msec), NULL);
-}
-
-static inline void
mdelay(unsigned int msec)
{
@@ -63,4 +57,13 @@
udelay(1000);
}
+static inline void
+msleep(unsigned int msec)
+{
+ if ((hz < 1000) && (msec < (1000/hz)))
+ mdelay(msec);
+ else
+ (void)kpause("lnxmslep", false, mstohz(msec), NULL);
+}
+
#endif /* _LINUX_DELAY_H_ */
Home |
Main Index |
Thread Index |
Old Index