Date: Thu, 31 May 2018 12:48:24 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334425 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201805311248.w4VCmOin069596@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805311248.w4VCmOin069596>