Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/linux linux: div_u64_rem
details: https://anonhg.NetBSD.org/src/rev/aba91f65a315
branches: trunk
changeset: 1028586:aba91f65a315
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:23:09 2021 +0000
description:
linux: div_u64_rem
diffstat:
sys/external/bsd/drm2/include/linux/math64.h | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r ad80e3732ee8 -r aba91f65a315 sys/external/bsd/drm2/include/linux/math64.h
--- a/sys/external/bsd/drm2/include/linux/math64.h Sun Dec 19 11:23:00 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/math64.h Sun Dec 19 11:23:09 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: math64.h,v 1.9 2021/12/19 10:58:43 riastradh Exp $ */
+/* $NetBSD: math64.h,v 1.10 2021/12/19 11:23:09 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -62,6 +62,13 @@
return dividend / divisor;
}
+static inline uint32_t
+div_u64_rem(uint64_t dividend, uint32_t divisor, uint32_t *rem)
+{
+ *rem = dividend % divisor;
+ return dividend / divisor;
+}
+
static inline uint64_t
div64_u64_rem(uint64_t dividend, uint64_t divisor, uint64_t *rem)
{
Home |
Main Index |
Thread Index |
Old Index