Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2018 16:23:33 +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: r330855 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201803131623.w2DGNX3L005094@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Mar 13 16:23:33 2018
New Revision: 330855
URL: https://svnweb.freebsd.org/changeset/base/330855

Log:
  MFC r330389:
  Implement for_each_clear_bit() function macro in the LinuxKPI.
  
  Submitted by:	Johannes Lundberg <johalun0@gmail.com>
  Sponsored by:	Mellanox Technologies
  Sponsored by:	Limelight Networks

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h	Tue Mar 13 16:22:32 2018	(r330854)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h	Tue Mar 13 16:23:33 2018	(r330855)
@@ -390,6 +390,10 @@ done:
 	     (bit) < (size);					\
 	     (bit) = find_next_bit((addr), (size), (bit) + 1))
 
+#define	for_each_clear_bit(bit, addr, size) \
+	for ((bit) = find_first_zero_bit((addr), (size));		\
+	     (bit) < (size);						\
+	     (bit) = find_next_zero_bit((addr), (size), (bit) + 1))
 
 static inline uint64_t
 sign_extend64(uint64_t value, int index)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803131623.w2DGNX3L005094>