Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jan 2026 20:09:29 +0000
From:      Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron <dumbbell@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: a9462e32fa75 - main - linuxkpi: Add `rol64()`
Message-ID:  <695c1a79.8598.20d4de8d@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by dumbbell:

URL: https://cgit.FreeBSD.org/src/commit/?id=a9462e32fa75a9a1e3f49964bc42b5303e0dd092

commit a9462e32fa75a9a1e3f49964bc42b5303e0dd092
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2025-09-07 23:22:22 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2026-01-05 19:32:49 +0000

    linuxkpi: Add `rol64()`
    
    This is used by <linux/siphash.h> added in a separate future commit.
    
    Reviewed by:    bz
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D54499
---
 sys/compat/linuxkpi/common/include/linux/bitops.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h
index 8fac80820f30..969b5e8245e7 100644
--- a/sys/compat/linuxkpi/common/include/linux/bitops.h
+++ b/sys/compat/linuxkpi/common/include/linux/bitops.h
@@ -437,4 +437,10 @@ sign_extend32(uint32_t value, int index)
 	return ((int32_t)(value << shift) >> shift);
 }
 
+static inline uint64_t
+rol64(uint64_t word, unsigned int shift)
+{
+	return ((word << (shift & 63)) | (word >> ((-shift) & 63)));
+}
+
 #endif	/* _LINUXKPI_LINUX_BITOPS_H_ */


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695c1a79.8598.20d4de8d>