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 Add min_t and D...
details: https://anonhg.NetBSD.org/src/rev/faec6e2850af
branches: riastradh-drm2
changeset: 788396:faec6e2850af
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:36:31 2013 +0000
description:
Add min_t and DIV_ROUND_UP to <linux/kernel.h>.
diffstat:
sys/external/bsd/drm2/include/linux/kernel.h | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r e983908532c8 -r faec6e2850af sys/external/bsd/drm2/include/linux/kernel.h
--- a/sys/external/bsd/drm2/include/linux/kernel.h Wed Jul 24 03:36:10 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/kernel.h Wed Jul 24 03:36:31 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.h,v 1.1.2.18 2013/07/24 03:28:09 riastradh Exp $ */
+/* $NetBSD: kernel.h,v 1.1.2.19 2013/07/24 03:36:31 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -46,6 +46,14 @@
#define uninitialized_var(x) x
+/* XXX This will multiply evaluate its arguments. */
+#define min_t(T, X, Y) MIN(X, Y)
+
+/*
+ * Rounding to what may or may not be powers of two.
+ */
+#define DIV_ROUND_UP(X, N) (((X) + (N) - 1) / (N))
+
/*
* Rounding to powers of two -- carefully avoiding multiple evaluation
* of arguments and pitfalls with C integer arithmetic rules.
Home |
Main Index |
Thread Index |
Old Index