9
0
Fork 0

do not sleep if read gets EAGAIN. Must be some testing leftover

This commit is contained in:
Sascha Hauer 2008-03-11 21:48:38 +01:00
parent ecc241774a
commit d9016f7cce
1 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ int linux_tstc(int fd)
/*
* We set the timeout here to 100us, because otherwise
* U-Boot would eat all cpu resources while waiting
* for input.
* for input.
*/
ret = select(fd + 1, &rfds, NULL, NULL, &tv);
@ -166,7 +166,7 @@ int linux_read(int fd, void *buf, size_t count)
reset_cpu(0);
} else if (ret == -1) {
if (errno == EAGAIN)
usleep(100);
return -errno;
else if (errno == EINTR)
continue;
else {