diff options
| author | Karel Zak <kzak@redhat.com> | 2014-01-24 13:04:14 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2014-01-24 13:04:14 +0100 |
| commit | a5bd7939961aaa6e39f3b298e556063cfd97d75a (patch) | |
| tree | c7b5425996072f268f5cbb6c5496a4a2a95a5256 /lib/loopdev.c | |
| parent | 3523ca7da47b10088a396595580de8b27f3a7082 (diff) | |
| download | util-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
