• Alessandro Rubini's avatar
    arith.c: use __div64_32 from the library · 7e5fe21c
    Alessandro Rubini authored
    This change is needed to avoid requiring libgcc in freestanding
    environments.
    
    The div64 function I copied from the kernel only works with unsigned
    numbers, but arth.h had them signed. I'm not sure at this point
    whether PTP uses negative nanoseconds in this conversion, so I added a
    diagnostic message. If it triggers, I can look for a solution, but I
    suspect it doesn't happen.
    
    Please note that a 64-bit arch may define the function as an inline
    that does the calculation with C operators, but currently
    arch-gnu-linux is used for both 32-bit and 64-bit hosts.
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    7e5fe21c
Name
Last commit
Last update
..
Makefile Loading commit data...
arith.c Loading commit data...
bmc.c Loading commit data...
common-fun.c Loading commit data...
common-fun.h Loading commit data...
fsm-table.c Loading commit data...
msg.c Loading commit data...
open-close.c Loading commit data...
servo.c Loading commit data...
state-disabled.c Loading commit data...
state-faulty.c Loading commit data...
state-initializing.c Loading commit data...
state-listening.c Loading commit data...
state-master.c Loading commit data...
state-passive.c Loading commit data...
state-pre-master.c Loading commit data...
state-slave.c Loading commit data...
state-uncalibrated.c Loading commit data...