Re: [RFC] HOWTO do Linux kernel development - take 3

From: Randy.Dunlap
Date: Sun Nov 27 2005 - 23:40:01 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/