svn commit: r334425 - head/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Thu May 31 12:48:25 UTC 2018


Author: hselasky
Date: Thu May 31 12:48:24 2018
New Revision: 334425
URL: https://svnweb.freebsd.org/changeset/base/334425

Log:
  Implement bitmap_complement() in the LinuxKPI.
  
  Submitted by:	Johannes Lundberg <johalun0 at gmail.com>
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/bitmap.h

Modified: head/sys/compat/linuxkpi/common/include/linux/bitmap.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/bitmap.h	Thu May 31 12:37:34 2018	(r334424)
+++ head/sys/compat/linuxkpi/common/include/linux/bitmap.h	Thu May 31 12:48:24 2018	(r334425)
@@ -244,6 +244,17 @@ bitmap_equal(const unsigned long *pa,
 }
 
 static inline void
+bitmap_complement(unsigned long *dst, const unsigned long *src,
+    const unsigned int size)
+{
+	const unsigned int end = BITS_TO_LONGS(size);
+	unsigned int i;
+
+	for (i = 0; i != end; i++)
+		dst[i] = ~src[i];
+}
+
+static inline void
 bitmap_or(unsigned long *dst, const unsigned long *src1,
     const unsigned long *src2, const unsigned int size)
 {


More information about the svn-src-head mailing list