svn commit: r300503 - head/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Mon May 23 12:53:19 UTC 2016
Author: hselasky
Date: Mon May 23 12:53:17 2016
New Revision: 300503
URL: https://svnweb.freebsd.org/changeset/base/300503
Log:
Implement ror32() in 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 12:52:22 2016 (r300502)
+++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Mon May 23 12:53:17 2016 (r300503)
@@ -73,6 +73,12 @@ __flsl(long mask)
return (flsl(mask) - 1);
}
+static inline uint32_t
+ror32(uint32_t word, unsigned int shift)
+{
+
+ return ((word >> shift) | (word << (32 - shift)));
+}
#define ffz(mask) __ffs(~(mask))
More information about the svn-src-head
mailing list