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 __maybe_unused, typecheck



details:   https://anonhg.NetBSD.org/src/rev/c591a19d8985
branches:  trunk
changeset: 1028014:c591a19d8985
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:39:12 2021 +0000

description:
__maybe_unused, typecheck

diffstat:

 sys/external/bsd/common/include/linux/kernel.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 680a3ead1938 -r c591a19d8985 sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h    Sun Dec 19 01:39:05 2021 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h    Sun Dec 19 01:39:12 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernel.h,v 1.35 2021/12/19 01:24:57 riastradh Exp $    */
+/*     $NetBSD: kernel.h,v 1.36 2021/12/19 01:39:12 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -73,6 +73,7 @@
 #define        __must_check    /* nothing */
 #endif
 #define        __always_unused __unused
+#define        __maybe_unused  __unused
 #define        noinline        __noinline
 #define        __deprecated    /* nothing */
 
@@ -88,6 +89,8 @@
  */
 #define        uninitialized_var(x)    x = 0
 
+#define        typecheck(T, X) ({(1 + 0*sizeof((T *)0 - &(X)));})
+
 /* XXX These will multiply evaluate their arguments.  */
 #define        min(X, Y)       MIN(X, Y)
 #define        max(X, Y)       MAX(X, Y)



Home | Main Index | Thread Index | Old Index