Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 12:53:18 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300503 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201605231253.u4NCrIdI026747@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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))
 



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