Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/common/include/linux Merge changes from drm...
details: https://anonhg.NetBSD.org/src/rev/553077e9dc7d
branches: trunk
changeset: 328356:553077e9dc7d
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Apr 01 14:57:58 2014 +0000
description:
Merge changes from drm2 <linux/kernel.h> to common <linux/kernel.h>.
diffstat:
sys/external/bsd/common/include/linux/kernel.h | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r 6deb3f652c5d -r 553077e9dc7d sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h Tue Apr 01 14:55:20 2014 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h Tue Apr 01 14:57:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.h,v 1.1 2013/09/05 15:28:07 skrll Exp $ */
+/* $NetBSD: kernel.h,v 1.2 2014/04/01 14:57:58 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -44,13 +44,24 @@
#define barrier() __insn_barrier()
#define unlikely(X) __predict_false(X)
-#define uninitialized_var(x) x
+/*
+ * XXX Linux kludge to work around GCC uninitialized variable warning.
+ * Linux does `x = x', which is bollocks.
+ */
+#define uninitialized_var(x) x = 0
/* XXX These will multiply evaluate their arguments. */
#define max_t(T, X, Y) MAX(X, Y)
#define min_t(T, X, Y) MIN(X, Y)
/*
+ * Rounding to nearest.
+ */
+#define DIV_ROUND_CLOSEST(N, D) \
+ ((0 < (N)) ? (((N) + ((D) / 2)) / (D)) \
+ : (((N) - ((D) / 2)) / (D)))
+
+/*
* Rounding to what may or may not be powers of two.
*/
#define DIV_ROUND_UP(X, N) (((X) + (N) - 1) / (N))
@@ -102,4 +113,6 @@
return (x < 0? (-x) : x);
}
+static int panic_timeout __unused = 0;
+
#endif /* _LINUX_KERNEL_H_ */
Home |
Main Index |
Thread Index |
Old Index