Date: Thu, 7 Jun 2018 07:45:49 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r334765 - stable/11/sys/compat/linuxkpi/common/include/linux Message-ID: <201806070745.w577jnbm062040@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu Jun 7 07:45:49 2018 New Revision: 334765 URL: https://svnweb.freebsd.org/changeset/base/334765 Log: MFC r334425: Implement bitmap_complement() in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitmap.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitmap.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/bitmap.h Thu Jun 7 07:44:54 2018 (r334764) +++ stable/11/sys/compat/linuxkpi/common/include/linux/bitmap.h Thu Jun 7 07:45:49 2018 (r334765) @@ -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?201806070745.w577jnbm062040>