May 20, 2011
3:34 a.m.
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,