config/libc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 20 13:48:26 2007 +0000 (2007-05-20)
changeset 112 ea15433daba0
parent 1 eeea35fbf182
child 136 22b5ef41df97
permissions -rw-r--r--
Ah! I finally have a progress bar that doesn't stall the build!
- pipe size in Linux is only 8*512=4096 bytes
- pipe size is not setable
- when the feeding process spits out data faster than the eating
process can read it, then the feeding process stalls after 4KiB
of data sent to the pipe
- for us, the progress bar would spawn a sub-shell every line,
and the sub-shell would in turn spawn a 'date' command.
Which was sloooww as hell, and would cause some kind of a
starvation: the pipe was full most of the time, and the
feeding process was stalled all this time.

Now, we use internal variables and a little hack based onan offset
to determine the elapsed time. Much faster this way, but still
CPU-intensive.
     1 # C library options
     2 
     3 menu "C-library"
     4 
     5 choice
     6     bool
     7     prompt "C-library to use:"
     8     default LIBC_GLIBC
     9 
    10 config LIBC_GLIBC
    11     bool
    12     prompt "glibc"
    13     select LIBC_SUPPORT_NPTL
    14     select LIBC_SUPPORT_LINUXTHREADS
    15 
    16 config LIBC_UCLIBC
    17     bool
    18     prompt "uClibc"
    19     select LIBC_SUPPORT_LINUXTHREADS
    20 
    21 endchoice
    22 
    23 config LIBC_VERSION
    24     string
    25 
    26 config LIBC
    27     string
    28     default "glibc" if LIBC_GLIBC
    29     default "uClibc" if LIBC_UCLIBC
    30 
    31 config LIBC_SUPPORT_NPTL
    32     bool
    33     default n
    34 
    35 config LIBC_SUPPORT_LINUXTHREADS
    36     bool
    37     default n
    38 
    39 choice
    40     bool
    41     prompt "Threading implentation to use:"
    42     default LIBC_THREADS_NPTL           if LIBC_SUPPORT_NPTL
    43     default LIBC_THREADS_LINUXTHREADS   if LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL
    44     default LIBC_THREADS_NONE           if ! LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL
    45     depends on EXPERIMENTAL
    46 
    47 config LIBC_THREADS_NPTL
    48     bool
    49     prompt "nptl (EXPERIMENTAL)"
    50     depends on LIBC_SUPPORT_NPTL
    51     depends on EXPERIMENTAL
    52 
    53 config LIBC_THREADS_LINUXTHREADS
    54     bool
    55     prompt "linuxthreads"
    56     depends on LIBC_SUPPORT_LINUXTHREADS
    57 
    58 config LIBC_THREADS_NONE
    59     bool
    60     prompt "none"
    61 
    62 endchoice
    63 
    64 if LIBC_GLIBC
    65 source config/libc_glibc.in
    66 endif
    67 
    68 if LIBC_UCLIBC
    69 source config/libc_uClibc.in
    70 endif
    71 
    72 endmenu