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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux