• Randolph Chung's avatar
    [PATCH] fix __div64_32 to do division properly · c2988baf
    Randolph Chung authored
    This fixes the generic __div64_32() to correctly handle divisions by
    large 32-bit values (as used by nanosleep() and friends, for example).
    
    It's a simple bit-at-a-time implementation with a reduction of the high
    32-bits handled manually.  Architectures that can do 64/32-bit divisions
    in hardware should implement their own more efficient versions.
    c2988baf
div64.c 1.28 KB