On Saturday 03 April 2010 09:22:20 Peter Korsgaard wrote:
> Hi,
>
> As you probably know, the new stable 0.9.31 uClibc release is out. One
> of the changes since earlier versions is that usleep is (correctly so)
> not available when UCLIBC_SUSV3_LEGACY is disabled, which it is by
> default.

There's a lot of config symbols you can switch off in uClibc that break 
busybox.  
Adding a new one isn't a big thing.

> Now, we use usleep in quite a lot of places:
>
> coreutils/usleep.c
> libbb/lineedit.c
> libbb/update_passwd.c
> miscutils/beep.c
> miscutils/chat.c
> miscutils/flashcp.c
> miscutils/watchdoc.c
> modutils/modprobe-small.c
> networking/ifupdown.c
> networking/pscan.c
> networking/traceroute.c
> procps/nmeter.c
> procps/top.c
> runit/sv.c
> util-linux/hwclock.c
> util-linux/mdev.c
> util-linux/rtcwake.c
> util-linux/scriptreplay.c

So they knew they were breaking busybox when they did it.

> We're supposed to use nanosleep instead, but calling that directly would
> lead to some bloat because of the more complicated interface - Is there
> interest in a patch adding a xusleep / bb_usleep emulation to libbb
> similar to uClibc's version?
>
> int usleep (__useconds_t usec)
> {
>     const struct timespec ts = {
>         .tv_sec = (long int) (usec / 1000000),
>         .tv_nsec = (long int) (usec % 1000000) * 1000ul
>     };
>     return(nanosleep(&ts, NULL));
> }

Or just say that you need to switch the config symbol on in uClibc in order to 
build rather a lot of busybox functions, which is the easy way.

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to