lkml.org 
[lkml]   [2005]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] HOWTO do Linux kernel development - take 3
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-28 05:38    [W:0.092 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site