svn commit: r334659 - head/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Tue Jun 5 15:30:37 UTC 2018


Author: hselasky
Date: Tue Jun  5 15:30:36 2018
New Revision: 334659
URL: https://svnweb.freebsd.org/changeset/base/334659

Log:
  Implement mul_u32_u32() function in the LinuxKPI.
  
  Submitted by:	Johannes Lundberg <johalun0 at gmail.com>
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies
  Sponsored by:	Limelight Networks

Modified:
  head/sys/compat/linuxkpi/common/include/linux/math64.h

Modified: head/sys/compat/linuxkpi/common/include/linux/math64.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/math64.h	Tue Jun  5 15:20:20 2018	(r334658)
+++ head/sys/compat/linuxkpi/common/include/linux/math64.h	Tue Jun  5 15:30:36 2018	(r334659)
@@ -84,4 +84,11 @@ div_u64(uint64_t dividend, uint32_t divisor)
 	return (dividend / divisor);
 }
 
+static inline uint64_t
+mul_u32_u32(uint32_t a, uint32_t b)
+{
+
+	return ((uint64_t)a * b);
+}
+
 #endif /* _LINUX_MATH64_H */


More information about the svn-src-head mailing list