Module Name: src
Committed By: riastradh
Date: Wed Jul 24 03:03:06 UTC 2013
Modified Files:
src/sys/external/bsd/drm2/include/linux [riastradh-drm2]: delay.h
Log Message:
Implement udelay (DELAY) and msleep (kpause) in <linux/delay.h>.
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
src/sys/external/bsd/drm2/include/linux/delay.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/include/linux/delay.h
diff -u src/sys/external/bsd/drm2/include/linux/delay.h:1.1.2.1 src/sys/external/bsd/drm2/include/linux/delay.h:1.1.2.2
--- src/sys/external/bsd/drm2/include/linux/delay.h:1.1.2.1 Wed Jul 24 00:33:12 2013
+++ src/sys/external/bsd/drm2/include/linux/delay.h Wed Jul 24 03:03:06 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: delay.h,v 1.1.2.1 2013/07/24 00:33:12 riastradh Exp $ */
+/* $NetBSD: delay.h,v 1.1.2.2 2013/07/24 03:03:06 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,4 +32,17 @@
#ifndef _LINUX_DELAY_H_
#define _LINUX_DELAY_H_
+#include <sys/param.h>
+#include <sys/proc.h>
+
+#include <machine/param.h>
+
+#define udelay DELAY
+
+static inline void
+msleep(unsigned int msec)
+{
+ (void)kpause("lnxmslep", false, mstohz(msec), NULL);
+}
+
#endif /* _LINUX_DELAY_H_ */