aboutsummaryrefslogtreecommitdiffstats
path: root/lib/loopdev.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2014-01-24 13:04:14 +0100
committerKarel Zak <kzak@redhat.com>2014-01-24 13:04:14 +0100
commita5bd7939961aaa6e39f3b298e556063cfd97d75a (patch)
treec7b5425996072f268f5cbb6c5496a4a2a95a5256 /lib/loopdev.c
parent3523ca7da47b10088a396595580de8b27f3a7082 (diff)
downloadutil-linux-a5bd7939961aaa6e39f3b298e556063cfd97d75a.tar.gz
include/c.h: prefer nanosleep() over usleep()
Let's use nanosleep() although if usleep() exists. The nanosleep function does no interact with signals and other timers. The patch introduces xusleep() as replacement to libc (or our fallback) usleep(). Yes, we don't want to use struct timespec + nanosleep() everywhere in code as nano-time resolution is useless for us. The patch also enlarges delays in some busy wait loops. It seems enough to try read/write 4x per second. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib/loopdev.c')
0 files changed, 0 insertions, 0 deletions