Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177423197
D61208.1794346956.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
536 B
Referenced Files
None
Subscribers
None
D61208.1794346956.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/math.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/math.h
+++ sys/compat/linuxkpi/common/include/linux/math.h
@@ -64,6 +64,20 @@
})
#endif
+static inline uint64_t
+int_pow(uint64_t base, unsigned int exp)
+{
+ uint64_t result;
+
+ result = 1;
+ while (exp) {
+ result *= base;
+ exp--;
+ }
+
+ return (result);
+}
+
unsigned long linuxkpi_int_sqrt(unsigned long val);
#define int_sqrt(x) linuxkpi_int_sqrt(x)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 10, 9:42 PM (4 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41556536
Default Alt Text
D61208.1794346956.diff (536 B)
Attached To
Mode
D61208: linuxkpi: Add `int_pow()`
Attached
Detach File
Event Timeline