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))
 
_______________________________________________
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