summaryrefslogtreecommitdiff
path: root/lib/div64.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-06-12 07:47:44 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-12 07:47:44 -0700
commitdc10885d68ae5893038e009f82cbb14a05aa9dd0 (patch)
tree873929ff5bbb9263d1a325abd0f6a4c8fe26d208 /lib/div64.c
parent631025b4d87d5a9d7e04a1ed652d247191e223d4 (diff)
parent9412e28649d0272df5e4af57bb378926fd4df580 (diff)
Merge branch 'core/iter-div' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core/iter-div' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: always_inline timespec_add_ns add an inlined version of iter_div_u64_rem common implementation of iterative div/mod
Diffstat (limited to 'lib/div64.c')
-rw-r--r--lib/div64.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/div64.c b/lib/div64.c
index bb5bd0c0f030..a111eb8de9cf 100644
--- a/lib/div64.c
+++ b/lib/div64.c
@@ -98,3 +98,13 @@ EXPORT_SYMBOL(div64_u64);
#endif
#endif /* BITS_PER_LONG == 32 */
+
+/*
+ * Iterative div/mod for use when dividend is not expected to be much
+ * bigger than divisor.
+ */
+u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
+{
+ return __iter_div_u64_rem(dividend, divisor, remainder);
+}
+EXPORT_SYMBOL(iter_div_u64_rem);