Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166495943
D45180.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
907 B
Referenced Files
None
Subscribers
None
D45180.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h
--- a/sys/compat/linuxkpi/common/include/linux/bitfield.h
+++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2020 The FreeBSD Foundation
+ * Copyright (c) 2020-2024 The FreeBSD Foundation
*
* This software was developed by Björn Zeeb under sponsorship from
* the FreeBSD Foundation.
@@ -131,6 +131,10 @@
#define FIELD_PREP(_mask, _value) \
(((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask))
+/* Likely would need extra sanity checks compared to FIELD_PREP()? */
+#define FIELD_PREP_CONST(_mask, _value) \
+ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask))
+
#define FIELD_GET(_mask, _value) \
((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask)))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 14, 8:32 PM (2 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36680948
Default Alt Text
D45180.diff (907 B)
Attached To
Mode
D45180: LinuxKPI: add FIELD_PREP_CONST()
Attached
Detach File
Event Timeline
Log In to Comment