HOWTO do Linux kernel development - take 3
Pardon the technical question, but..
I wonder if you could either elaborate or give a reference to what is meant by
"Arbitrary long long divisions .. not allowed"
Thanks,
..jim
Quoted 6 lines · On Wed, 23 Nov 2005 22:16:40 -0800 James G. Sack (jim) wrote:
Pardon the technical question, but..
I wonder if you could either elaborate or give a reference to what is meant by
"Arbitrary long long divisions .. not allowed"
(if not already answered)
short answer: see include/asm-generic/div64.h
longer answer:
Not supported:
long long numerator, divisor, dividend;
/* init. numerator & divisor */
dividend = numerator / divisor;
Is supported:
uin64_t numerator, dividend;uint32_t divisor, remainder;
/* init. numerator & divisor */
remainder = do_div(&numerator, divisor);
---
~Randy