Author: hselasky
Date: Mon May 23 11:41:35 2016
New Revision: 300490
URL: https://svnweb.freebsd.org/changeset/base/300490

Log:
  Add support for atomic_long_inc_not_zero() to the LinuxKPI.
  
  Obtained from:        kmacy @
  MFC after:    1 week
  Sponsored by: Mellanox Technologies

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

Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/bitops.h      Mon May 23 
10:31:54 2016        (r300489)
+++ head/sys/compat/linuxkpi/common/include/linux/bitops.h      Mon May 23 
11:41:35 2016        (r300490)
@@ -46,7 +46,7 @@
 #define        BITS_TO_LONGS(n)        howmany((n), BITS_PER_LONG)
 #define        BIT_MASK(nr)            (1UL << ((nr) & (BITS_PER_LONG - 1)))
 #define BIT_WORD(nr)           ((nr) / BITS_PER_LONG)
-#define        GENMASK(lo, hi)         (((2UL << ((hi) - (lo))) - 1UL) << (lo))
+#define        GENMASK(h, l)           (((~0UL) >> (BITS_PER_LONG - (h) - 1)) 
& ((~0UL) << (l)))
 #define BITS_PER_BYTE           8
 
 static inline int
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to