All of lore.kernel.org
 help / color / mirror / Atom feed
* about 64-bits division in kernel
@ 2011-05-20  3:34 loody
  2011-05-20  4:15 ` Dave Hylands
  0 siblings, 1 reply; 6+ messages in thread
From: loody @ 2011-05-20  3:34 UTC (permalink / raw)
  To: kernelnewbies

hi all:
My platform is 32-bits cpu and I need following calculation in my driver.
#define longdiv(sr1, sr2, div)      (unsigned long )((((unsigned long
long)(sr1) << 32) ^ (sr2)) / (div))

my question are:
1. why "__udivdi3" has any relationship with above calculation?
2. I know the above calculation is implemented in clibc, but why
kernel still implement itself?
     why kernel try to make another wheel instead of including what
clib provided ?

-- 
Regards,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-21  7:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20  3:34 about 64-bits division in kernel loody
2011-05-20  4:15 ` Dave Hylands
2011-05-20  5:51   ` loody
2011-05-20  6:47     ` Dave Hylands
2011-05-21  6:57       ` loody
2011-05-21  7:22         ` Dave Hylands

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.