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 Define clamp_val.
details: https://anonhg.NetBSD.org/src/rev/e87810e9e3fd
branches: trunk
changeset: 1027811:e87810e9e3fd
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 00:48:16 2021 +0000
description:
Define clamp_val.
diffstat:
sys/external/bsd/common/include/linux/kernel.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r 8b5da1346773 -r e87810e9e3fd sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h Sun Dec 19 00:48:09 2021 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h Sun Dec 19 00:48:16 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.h,v 1.29 2021/12/19 00:48:09 riastradh Exp $ */
+/* $NetBSD: kernel.h,v 1.30 2021/12/19 00:48:16 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -94,6 +94,7 @@
#define clamp_t(T, X, MIN, MAX) min_t(T, max_t(T, X, MIN), MAX)
#define clamp(X, MN, MX) MIN(MAX(X, MN), MX)
+#define clamp_val(X, MIN, MAX) clamp_t(typeof(X), X, MIN, MAX)
#define min3(X, Y, Z) MIN(X, MIN(Y, Z))
#define max3(X, Y, Z) MAX(X, MAX(Y, Z))
Home |
Main Index |
Thread Index |
Old Index