• Alessandro Rubini's avatar
    userspace/libwr: change the udelay function · 4bebb908
    Alessandro Rubini authored
    To delay for less than 1ms (was: 10ms) we must busy-loop, because the
    kernel is jiffy-based. No way out of it.
    
    The implementation, however, was based on gettimeofday(), which means
    we couldn't really strace the hal process, as it appeared to
    only call gettimeofday all the time.
    
    This code uses a local software loop, after a calibration step of
    around 20ms (depends on CPU speed). Moreover, by calling usleep() for
    longer-than-1ms delays it doesn't use 100% cpu power during the
    initial led blinking.
    
    Now strace on the process shows what it really is doing (besides
    user-spac-only i2c accesses).
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    4bebb908
Name
Last commit
Last update
binaries Loading commit data...
build Loading commit data...
configs Loading commit data...
doc Loading commit data...
hwinfo-sdb Loading commit data...
kernel Loading commit data...
patches Loading commit data...
robustness/coding Loading commit data...
scripts Loading commit data...
usb-loader Loading commit data...
userspace Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
COPYING Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
Makefile.kconfig Loading commit data...
README Loading commit data...