summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* libc: Handle cancellation in non multiplexed socket callsCarmelo Amoroso2010-09-171-17/+122
| | | | | | | | | | For those archs that provide non multiplexed socket calls it possible to implement the lib C wrappers without calling the multi-purpose __socketcall. For a subset of these functions that are cancellation point, it needs to correctly handle cancellation. Signed-off-by: Francesco Rundo <francesco.rundo@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl: Remove nptl/sysdeps/generic directory from include listCarmelo Amoroso2010-09-161-1/+0
| | | | | | | | All archs have now moved their generic sysdep.h header from sysdeps/generic to sysdeps/common directory, so it is possible to remove the sysdeps/generic directory from the include list. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl_sh: Fix compiler warning due to shadowed variableCarmelo Amoroso2010-09-161-3/+3
| | | | Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc: Add canonicalize_file_name functionCarmelo Amoroso2010-09-165-8/+121
| | | | | | | | Add canonicalize_file_name function and its related tests. Required by elfutils and coreutils (readlink). Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* test: Update gitignore to take into account new tests added.Carmelo Amoroso2010-09-161-4/+26
| | | | Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* ldso: Do not adjust dynamic section entries unnecessarilyFilippo Arcidiacono2010-09-151-7/+10
| | | | | Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* tests: Added new nptl testsSalvatore Cro2010-09-1558-1/+4877
| | | | | | | tests: Added several nptl tests from glibc 2.10.1 Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: update the memcpy adding a new loop with aggressive prefetchingSalvatore Cro2010-09-151-21/+107
| | | | | | | | | | | | | | | | After exploring different prefetch distance-degree combinations in this new update of the memcpy function, a new loop has been added for moving many cache lines with an aggressive prefetching schema. Prefetch has been removed when move few cache line aligned blocks. As final result, this memcpy gives us the same performances for small sizes (we already had!) and better numbers for big copies. In case of SH4-300 CPU Series, benchmarks show a gain of ~20% for sizes from 4KiB to 256KiB. In case of the SH4-200, there is a gain of ~40% for sizes bigger than 32KiB. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: move data without fetching cache block within the memsetSalvatore Cro2010-09-151-28/+34
| | | | | | | | | | | | | | | | | | | | | | | With this patch the movca.l instruction is used within the memset. The current memset implementation only uses the FPU and there is an real gain for all the sizes. Adding the movca.l instruction numbers always are better than the generic code. There is a big gain for size greater than 64 KiB but number are worst for 4-32KiB sizes compared with the implementation without movca.l. Time Memory Bandwidth (Mbytes) ------------------------------------------------- Generic SH4 SH4 (FPU) (FPU+movca.l) ------------------------------------------------- 512 1143 1998 1596 1 KiB 1273 2567 1915 2 KiB 1350 2993 2128 4-32KiB 1391 3262 2252 64KiB-16MiB 170 186 *830* Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc: Fix cancellation handling in some C functionsSalvatore Cro2010-09-155-8/+78
| | | | | | | | | | According to POSIX.1-2008 standard, the following syscalls shall be cancellation points : waitid, sleep, fdatasync, ppoll. Further, if generic syscall is not available and stubs are configured, provide the stub implementation for function. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libubacktrace: Provide uClibc with backtrace functionsSalvatore Cro2010-09-1512-4/+517
| | | | | | | | | | | | | | A new shared object, libubacktrace.so.0 is added to uClibc to provide backtrace functions to support application self-debugging. This set of functions requires to dynamically load libgcc_s.so so they need to call dlopen/dlsym that are provided by libdl. For this reason they cannot be included into libc.so.0 but are provided by a new library. User application that wants to use backtrace needs to be compiled with -fexceptions option and -rdynamic to get full symbols printed and must be linked against libubacktrace.so Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* misc: utmpx based logging supportSalvatore Cro2010-09-148-1/+260
| | | | | | | | misc: Added support for accessing user accounting database based on utmpx structure. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl: fix static linkingNatanael Copa2010-09-091-2/+2
| | | | | | | | We need dl-tls.c for static libc or we will get missing symbols when linking thinkgs like openssl static. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* tests: nptl tests dependencies cleanupSalvatore Cro2010-09-091-12/+8
| | | | | | | tests: some cleanings on nptl tests' dependencies. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* ldso: Fix compilation for x86_64 without TLS support.Will Newton2010-09-071-0/+2
| | | | | | | Add an #ifdef to avoid using TLS structures when TLS is not enabled. Signed-off-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* misc: Fix build error about missing PAGE_SIZEAbdoulaye Walsimou Gaye2010-09-061-0/+1
| | | | | | | | | | | | | | | | This patch fixes the following build error: CC libc/misc/internals/__h_errno_location.os CC libc/misc/internals/parse_config.os libc/misc/internals/parse_config.c: In function 'bb_get_chunk_with_continuation': libc/misc/internals/parse_config.c:77: error: 'PAGE_SIZE' undeclared (first use in this function) libc/misc/internals/parse_config.c:77: error: (Each undeclared identifier is reported only once libc/misc/internals/parse_config.c:77: error: for each function it appears in.) make[2]: *** [libc/misc/internals/parse_config.os] Error 1 Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc: Provide both getpgid and __getpgid symbolsCarmelo Amoroso2010-08-311-1/+4
| | | | | | | | | | Indeed unistd.h header does export '__getpgid' by default, while uClibc provide only 'getpgid' implementation. The 'getpgid' symbol is exported by standard header if __USE_XOPEN_EXTENDED is defined. This patch alignes uClibc implementation with standard header (matching with glibc behaviour). Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Fix resolver broken in NPTL buildTimo Teräs2010-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The combination of commit aab4df0fb51660300559f5f29290709db2f7bfee resolv.c: add support for per thread res_state commit cca45baf8353d1e338d232f5bdb2d1d6b357f1da /etc/resolv.conf: support "timeout:n" and "attempts:n" options .. and NPTL results in broken resolver in very annoying ways. Now, it seems that most of the uclibc code does not work well if res_state is TLS variable. Technically, this is the correct thing to do since this gives proper per-thread resolving behavior, and it also makes the config options overridable per thread. This probably what apps expect as glibc does it too. But alas, most places use _res to sync up static global variables which results in breakage. It gets more or less randomly selected which threads options get applied. Also in case of multiple servers it looks like the retry logic is shared between all threads, e.g. two concurrent resolutions can make other resolvers skip nameservers due to shared "last_ns_num". And finally the timeout/attempts commit breaks the accumulated stuff horribly. What happens is: 1. multithreaded application startups, initializes resolver, resolves things just fine 2. resolv.conf gets changed, application calls res_init after res_init uclibc will call res_sync on all resolver functions to refresh globals from the TLS variable _res 3. res_init was called only in one thread, so other thread's _res contains all zeroes (yes, this is correct app usage: res_init should be called only from one thread) 4. threads not calling res_init get broken resolver due to timeout being set to zero Now, one proper solution would be to: 1. make __open_nameservers return the configuration options 2. pass the config options struct to res_sync_func so it can do the proper overrides from per-thread _res 3. remove the related globals and use locally config options from __open_nameservers But technically, the correct thing (as in glibc does this) is: - res_init increases global "res_init timestamp" - use _res (or pointer within there) for resolver retries etc. get proper per-thread behavior - resolvers functions call "maybe_init" which reinitialize the TLS'ed resolver state (e.g. reload resolv.conf) if their res_init timestamp is out dated As an immediate emergency kludge fix, the following might do: resolv: fix options handling for TLS _res If _res is in TLS (NPTL), it might not get initialized. Assume zeroes mean default values. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* _uintmaxtostr: fix indentation (spaces->tabs), no code changesDenys Vlasenko2010-08-261-10/+10
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* resolv: simplify MAXALIAS handlingBernhard Reutner-Fischer2010-08-191-16/+7
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getserv: fix reading services lines w > 80 charsBernhard Reutner-Fischer2010-08-192-28/+30
| | | | | | e.g. getservbyname() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* add header guardBernhard Reutner-Fischer2010-08-191-0/+3
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: Do not error on GNUHASH for clean targetsBernhard Reutner-Fischer2010-08-191-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* testsuite: nptl/tst-basic5 depends on SUSV4_LEGACYBernhard Reutner-Fischer2010-08-171-0/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl: fix calling convention for __pthread_mutex_cond_lockTimo Teräs2010-08-172-3/+10
| | | | | | | | | | | | | | | | | | The assembly versions of pthread_cond_wait calls __pthread_mutex_cond_lock and __pthread_mutex_cond_lock_adjust using internal calling convention (which differs from default calling convention at least on x86). Thus these two functions must be defined with internal_function or the call sequence goes wrong. __pthread_mutex_cond_lock resides in sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c, but it does evil macro definitions and includes pthread_mutex_lock.c, so we need to add some extra kludge to pthread_mutex_lock.c to get the prototypes correctly. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* config parser: fix memory corruptionTimo Teräs2010-08-061-2/+2
| | | | | | | | | | | | fgets will happily write over allocated area limits. Adjusted the buffer size according to how much is already read. Also increase the maximum default line length, as 80 is slightly small. It might be better if bb_get_chunk_with_continuation would reallocate the line buffer if it was not user given. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl i686: avoid cpp problems with thunk sectionBernhard Reutner-Fischer2010-08-061-0/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Revert "nptl i686: fix pthread_cond_wait.S compilation"Bernhard Reutner-Fischer2010-08-051-1/+0
| | | | This reverts commit f71c0d8af11252f119fad04938ddd5501a7df21a.
* resolver: switch to config parserBernhard Reutner-Fischer2010-08-051-136/+119
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getnet: switch to config parserBernhard Reutner-Fischer2010-08-057-229/+239
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getproto: switch to config parserBernhard Reutner-Fischer2010-08-051-212/+137
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* usershell: switch to config parserBernhard Reutner-Fischer2010-08-051-116/+56
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* switch getservice to config parserBernhard Reutner-Fischer2010-08-051-212/+139
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* sysconf: implement _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer2010-08-053-11/+77
| | | | | | perusing the config parser Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* add config parserBernhard Reutner-Fischer2010-08-054-3/+324
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* math: isnan is a C99 featureHenning Heinold2010-08-051-6/+5
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
* nptl: fix x86 assembly PIC relocationsTimo Teräs2010-08-052-2/+2
| | | | | | | | Unwind_Resume needs to be called via PLT. Most calls are already proper, this fix the remaining two problems. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: check_gcc warning flagsBernhard Reutner-Fischer2010-08-051-5/+18
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* utils: add pregen requisiteBernhard Reutner-Fischer2010-08-041-2/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl: _POSIX_IPV6 depends on UCLIBC_HAS_IPV6Bernhard Reutner-Fischer2010-08-022-0/+16
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl: fix LFS handlingBernhard Reutner-Fischer2010-07-301-1/+3
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl: do not define _POSIX_SPAWN since its not implementedNatanael Copa2010-07-301-0/+2
| | | | | | | | Building things like vlc checks if _POSIX_SPAWN is defined. Since posix_spawn is not implemented we dont define it. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* Immediately try next nameserver on recv() failureIngo van Lil2010-07-281-1/+3
| | | | | | | | | | | | If there is a problem communicating with a nameserver the __dns_lookup() function will not immediately advance to the next nameserver but instead continue waiting until the timeout expires. This will cause a 30 second delay even if no nameserver is configured in resolv.conf and no DNS is running on localhost. Signed-off-by: Ingo van Lil <inguin@gmx.de> Acked-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* malloc: simplify MAP_UNINITIALIZE ifdef logicMike Frysinger2010-07-271-7/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* new helper funcs for alloca/malloc with mmu/nommuMike Frysinger2010-07-274-52/+54
| | | | | | | | | | | | | The rpc rcmd code has some ugly ifdef mazes to handle mmu/nommu differences just to select alloca or malloc. Unify those with some helper macros in a new header, and then convert the rcmd code over to it. This is all geared towards fixing the getdents helper functions which only use alloca() atm. Now that we have helper functions, convert the getdents functions over too. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Steven J. Magnani <steve@digidescorp.com>
* remove trailing comma in enumBernhard Reutner-Fischer2010-07-271-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* silence warning about incompatible types with _dl_init_static_tlsBernhard Reutner-Fischer2010-07-274-4/+3
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: tweak quoting of V=Bernhard Reutner-Fischer2010-07-271-14/+16
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* malloc-simple: Make calloc() return zeroed memorySteven J. Magnani2010-07-271-5/+4
| | | | | | | | | | The 0.9.31 release included a change to malloc-simple to request uninitialized memory from noMMU kernels. Unfortunately, the corresponding calloc() code assumed that memory returned by malloc() was already zeroed, which leads to all kinds of nastiness. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* lutimes: add lutimes supportVladimir Zapolskiy2010-07-272-1/+41
| | | | | | | This patch adds lutimes library call support. Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>