Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd Add a BIT_MASK in bits.h, move it to common...



details:   https://anonhg.NetBSD.org/src/rev/e6c38f998a57
branches:  trunk
changeset: 1028169:e6c38f998a57
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:44:27 2021 +0000

description:
Add a BIT_MASK in bits.h, move it to common so bitops.h can sideload

match linux.


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/common/include/linux/bitops.h |   3 ++-
 sys/external/bsd/common/include/linux/bits.h   |  14 ++++++++++++++
 2 files changed, 16 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r f2cb57b3b9a6 -r e6c38f998a57 sys/external/bsd/common/include/linux/bitops.h
--- a/sys/external/bsd/common/include/linux/bitops.h    Sun Dec 19 09:44:11 2021 +0000
+++ b/sys/external/bsd/common/include/linux/bitops.h    Sun Dec 19 09:44:27 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bitops.h,v 1.13 2021/12/19 01:59:55 riastradh Exp $    */
+/*     $NetBSD: bitops.h,v 1.14 2021/12/19 09:44:27 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -41,6 +41,7 @@
 #include <machine/limits.h>
 
 #include <lib/libkern/libkern.h>
+#include <linux/bits.h>
 
 /*
  * Linux __ffs/__ffs64 is zero-based; zero input is undefined.  Our
diff -r f2cb57b3b9a6 -r e6c38f998a57 sys/external/bsd/common/include/linux/bits.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/common/include/linux/bits.h      Sun Dec 19 09:44:27 2021 +0000
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2020 The NetBSD Foundation, Inc.
+ */
+
+#ifndef _LINUX_BITS_H_
+#define _LINUX_BITS_H_
+
+#include <sys/param.h>
+#include <sys/cdefs.h>
+
+#define BIT_MASK(__n) __BITS(__n-1,0)
+
+#endif /* _LINUX_BITS_H_ */



Home | Main Index | Thread Index | Old Index