summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fix the handle locking in stdioKenny Root2011-02-1436-92/+239
| | | | | | | | | | | | | | | | | Fix the handle locking in stdio to use flockfile/funlockfile internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. Based on OpenBSD change by guenther@openbsd.org http://www.mail-archive.com/source-changes@cvs.openbsd.org/msg01015.html Bug: 3446659 Change-Id: Ie82116e358c541718d6709ec45ca6796be5a007b
* am b35d80f0: am 76299d19: Merge "Remove an extra register move."David Turner2011-02-071-2/+1
|\ | | | | | | | | * commit 'b35d80f0b0a6d87ba20aa2de594db19a0ccf93df': Remove an extra register move.
| * Merge "Remove an extra register move."David Turner2011-02-061-2/+1
| |\
| | * Remove an extra register move.Bruce Beare2011-02-031-2/+1
| | | | | | | | | | | | | | | | | | Change-Id: I63c217b73203b44b1a2e74950b58f2ec12989cab Author: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* | | am d7cf6382: am 8db7bcb1: Merge "Replace __atomic_XXX with GCC __sync_XXX ↵David Turner2011-02-072-97/+65
|\ \ \ | |/ / | | | | | | | | | | | | | | | intrinsics." * commit 'd7cf638288f100f29f6ba733c50f12ecdb5e192b': Replace __atomic_XXX with GCC __sync_XXX intrinsics.
| * | Merge "Replace __atomic_XXX with GCC __sync_XXX intrinsics."David Turner2011-02-062-97/+65
| |\ \ | | |/
| | * Replace __atomic_XXX with GCC __sync_XXX intrinsics.Bruce Beare2011-02-032-97/+65
| | | | | | | | | | | | | | | | | | Change-Id: I14f275392fcd70cc15e307470e0a099777c7c09e Author: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* | | am dd279aa9: am 2282ecc2: Merge "Use more optimized version of memmove"David Turner2011-02-071-34/+3
|\ \ \ | |/ / | | | | | | | | | * commit 'dd279aa99f6b6310480e28ba1e843a23f722c87e': Use more optimized version of memmove
| * | Use more optimized version of memmoveJohannes Carlsson2011-02-031-34/+3
| |/ | | | | | | | | | | | | | | | | On ARM there is currently no assembler optimized memmove in libc. There is however a more optimized bcopy which copies long instead of bytes where possible. This almost doubles the performance in best case. Change-Id: I1f1cd27529443358047c385730deaf938ce4e642
* | Merge "libc: Update auto-gen scripts"David 'Digit' Turner2011-02-0613-238/+433
|\ \
| * | libc: Update auto-gen scriptsDavid 'Digit' Turner2011-02-0313-238/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the scripts use external/kernel-headers/original by default. clean_header.py: Document -k<path>, add -d<path> find_headers.py: Make kernel config files optional update_all.py: Allow setting the path to kernel headers on the command-line update_all.py: Better formatting of output on ttys update_all.py: Automatically perform "git add/rm" on affected files. SYSCALLS.TXT: Fix typo in __socketcall definition. checksyscalls.py: Add support for superH architecture in the checks. gensyscalls.py: Automatically perform "git add/rm" on affected files. cpp.py: Fixed a bug that prevented certain type definitions to be kept in the generated clean header (e.g. struct ethtool_drvinfo in <linux/ethtool.h>) All scripts will use the content of external/kernel-headers/original by default now. The generated code removes all empty lines and trailing whitespace. This is useful to ensure a unified output even if we change the parser again in the future. The top-level disclaimer has been edited with update instructions to regenerate the headers when needed. Also, a warning is now inserted every 8th line in the final output: /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ Changes under kernel/arch-arm and kernel/arch-x86 should correspond to whitespace differences and additionnal struct definitions that were missed by the previous parser implementation. Change-Id: Icd1c056bacd766759f3e9b7bb5d63a246f3d656a WARNING: If you run these script, do not submit the result to gerrit for now. It seems there are discrepancies between the content of original headers and those currently commited under bionic/libc/kernel/. (This problem is the main motivation to insert the warning repeatedly). Current list of issues: - Missing SuperH headers (i.e. external/kernel-headers/original/asm-sh)
* | | Added _memmove_wordsAndy McFadden2011-02-042-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a memmove() variant for Dalvik's System.arraycopy() implementation. It guarantees 16-bit or 32-bit atomicity depending on the alignment of the arguments. Bug 3398352 Change-Id: Ie7bd246305ef0ff8290513663327c5b81680368d
* | | am b8175727: am 9a330512: Merge "Add time-to-live (TTL) support to resolver ↵Brad Fitzpatrick2011-02-031-15/+100
|\ \ \ | | |/ | |/| | | | | | | | | | | | | cache" * commit 'b8175727c7a165076311f18c29f09bdc27d7be10': Add time-to-live (TTL) support to resolver cache
| * | Add time-to-live (TTL) support to resolver cacheMattias Falk2011-02-021-15/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the the TTL of the answer as the time a query shall remain in the resolver cache. Added some debugging support as well, i.e. parse answer and print a la dig. Change-Id: I724d3392245032592f1912f3ca7a81a8987ebbac
* | | Merge "libc: Fix struct user_vfp definition."David 'Digit' Turner2011-02-032-6/+12
|\ \ \
| * | | libc: Fix struct user_vfp definition.David 'Digit' Turner2011-02-012-6/+12
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the definition of struct user_vfp from <asm/ptrace.h> to <asm/user.h> for the ARM platform, in order to match the original kernel headers. See patches 94519 and 94520 for a description of the problem and a fix for debuggerd that uses the structure. This prevented us from properly re-running the kernel headers cleanup scripts. Change-Id: I43718a59ae49b9d89fc2d1c8affb65973fb2919c
* | | Merge "Bug 3330205 Thread safety for bignum powers of 5"David Turner2011-02-031-0/+5
|\ \ \
| * | | Bug 3330205 Thread safety for bignum powers of 5Glenn Kasten2011-01-171-0/+5
| | | | | | | | | | | | | | | | Change-Id: I739a06f9037a9fb643276f61601f0f3e192581b8
* | | | Merge changes I6b304dfb,I4a3c2035,I5af12b3f,I0ef33ca6,I149c46e7David Turner2011-02-039-15/+1472
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Add icmp6.h and ip6.h files from current NetBSD libc. Include the Linux ipv6.h header from netinet/in.h, to get things like in6_pktinfo. Add IN6ADDR_LOOPBACK_INIT macro to <netinet/in6.h>, as the kernel headers do not provide it anymore. Update IPv6 kernel headers with new 2.6.37 headers, cleaned by update_all.py. (It wanted to do many other changes, most of them cosmetic, but I only included the IPv6 changes.) Fix syntax error in defaults.py.
| * | | Add icmp6.h and ip6.h files from current NetBSD libc.Steinar H. Gunderson2011-01-282-0/+1049
| | | | | | | | | | | | | | | | Change-Id: I6b304dfbefaec74c5fb15b216f38d698a55f0642
| * | | Include the Linux ipv6.h header from netinet/in.h, to get things like ↵Steinar H. Gunderson2011-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | in6_pktinfo. Change-Id: I4a3c2035ff8e2846352345580756a1bdc2768ec4
| * | | Add IN6ADDR_LOOPBACK_INIT macro to <netinet/in6.h>, as the kernel headers do ↵Steinar H. Gunderson2011-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | not provide it anymore. Change-Id: I5af12b3f38097ed165e64a408253dc375aa605d7
| * | | Update IPv6 kernel headers with new 2.6.37 headers, cleaned by ↵Steinar H. Gunderson2011-01-205-15/+421
| | | | | | | | | | | | | | | | | | | | | | | | update_all.py. (It wanted to do many other changes, most of them cosmetic, but I only included the IPv6 changes.) Change-Id: I0ef33ca6d890d067949fce772104cd03335f612d
| * | | Fix syntax error in defaults.py.Steinar H. Gunderson2011-01-201-1/+1
| | | | | | | | | | | | | | | | Change-Id: I149c46e7541af16856264b7f826981ce0d33290b
* | | | Merge "libc: fix kernel cleanup script typo."David 'Digit' Turner2011-01-311-1/+1
|\ \ \ \
| * | | | libc: fix kernel cleanup script typo.David 'Digit' Turner2011-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I5fc119be535ed47dadc780234665335efa6b9ac5
* | | | | am f03e2d3f: am 5d45fa40: am 2081fda6: Merge "Only look up A records if the ↵David Turner2011-01-211-29/+59
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | system has IPv4." into gingerbread * commit 'f03e2d3f3104a85d64f66a18ab13d5ba5fb4131c': Only look up A records if the system has IPv4.
| * | | | am 5d45fa40: am 2081fda6: Merge "Only look up A records if the system has ↵David Turner2011-01-211-29/+59
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPv4." into gingerbread * commit '5d45fa4049d9ba03c0d922ece18d1d2dda119dc7': Only look up A records if the system has IPv4.
| | * \ \ \ am 2081fda6: Merge "Only look up A records if the system has IPv4." into ↵David Turner2011-01-181-29/+59
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gingerbread * commit '2081fda69a68505c914324797400b1b798516904': Only look up A records if the system has IPv4.
| | | * \ \ \ Merge "Only look up A records if the system has IPv4." into gingerbreadandroid-cts-2.3_r2android-2.3.3_r1aandroid-2.3.3_r1.1android-2.3.3_r1David Turner2011-01-181-29/+59
| | | |\ \ \ \
| | | | * | | | Only look up A records if the system has IPv4.Lorenzo Colitti2011-01-151-29/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getaddrinfo only asks DNS for IPv6 addresses if the system has IPv6 connectivity, but always asks for IPv4 addresses. Don't ask for IPv4 addresses if there is no IPv4 connectivity. Change-Id: Iefe9fcb006fabe60b4b11dd4653a7c4a406506f4
* | | | | | | | am 84f4753d: am 56faf66f: raise: Send signal to current threadColin Cross2011-01-211-1/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | | | | / / | |_|_|_|_|/ / |/| | | | | | * commit '84f4753d1b5f89ace0cc89021916f6f5b44e6540': raise: Send signal to current thread
| * | | | | | am 56faf66f: raise: Send signal to current threadColin Cross2011-01-211-1/+1
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '56faf66fd7a90ea11835f8f0c9a7d6d8b350a09d': raise: Send signal to current thread
| | * | | | | | raise: Send signal to current threadColin Cross2011-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie4318b8ddd01cc2f58f5e07c1d71376953943153
| * | | | | | | am 2be18508: am 2e23e292: Backport (simple cherry-pick) ↵Steinar H. Gunderson2011-01-171-13/+31
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| / / / / / | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | d33019030c1f0cddca557f9659e3c471bde0e6a9 to gingerbread. * commit '2be18508f349b74b60b09e1b1118d879afb5928c': Backport (simple cherry-pick) d33019030c1f0cddca557f9659e3c471bde0e6a9 to gingerbread.
| | * | | | | am 2e23e292: Backport (simple cherry-pick) ↵Steinar H. Gunderson2011-01-171-13/+31
| | |\ \ \ \ \ | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d33019030c1f0cddca557f9659e3c471bde0e6a9 to gingerbread. * commit '2e23e29245aa42d0f9419187c94e72dba3888eef': Backport (simple cherry-pick) d33019030c1f0cddca557f9659e3c471bde0e6a9 to gingerbread.
| | | * | | | Backport (simple cherry-pick) d33019030c1f0cddca557f9659e3c471bde0e6a9Steinar H. Gunderson2011-01-141-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to gingerbread. Implement RFC3484 policy table changes from draft-ietf-6man-rfc3484-revise-01. The changes in a nutshell: - Handle v4-mapped as different from v4-compat (this was probably an existing bug in our code). - Add policy entries for ULA, above most everything else. - Put v4-compat, old-style IPv6 site-local and 6bone addresses way down in the preference table. The rest is just shuffling numbers around (no actual changes to priority).
| | * | | | | am f4dca7be: Backport (simple cherry-pick) ↵Steinar H. Gunderson2011-01-171-0/+4
| | |\ \ \ \ \ | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 64b6c43379dba176659bc1313b6bb488ac94cfd6 to gingerbread. * commit 'f4dca7be3b7bc181f1534be187428c5a52cb8c6a': Backport (simple cherry-pick) 64b6c43379dba176659bc1313b6bb488ac94cfd6 to gingerbread.
| | | * | | | Backport (simple cherry-pick) 64b6c43379dba176659bc1313b6bb488ac94cfd6Steinar H. Gunderson2011-01-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to gingerbread. Add a new #define IN6_IS_ADDR_ULA, for testing for Universal Local IPv6 Unicast addresses (ULAs). These replace the old site-local IPv6 addresses.
| | * | | | | am a798b9f0: Backport (simple cherry-pick) ↵Steinar H. Gunderson2011-01-171-4/+6
| | |\ \ \ \ \ | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d1624add2b73ce8ff7826ce27b1d6d6e35bb83a6 to gingerbread. * commit 'a798b9f0e171643b0bc7bbf79f14cb018689f715': Backport (simple cherry-pick) d1624add2b73ce8ff7826ce27b1d6d6e35bb83a6 to gingerbread.
| | | * | | | Backport (simple cherry-pick) d1624add2b73ce8ff7826ce27b1d6d6e35bb83a6Steinar H. Gunderson2011-01-141-4/+6
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to gingerbread. Don't treat private IPv4 addresses as being in a non-global scope. The effect of this change is essentially to prefer NATed IPv4 over 6to4.
| | * | | | use consistent guards for off_t and size_t defines for IABruce Beare2011-01-021-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9347ab4407c48c71c99f42583523ebe31a5e67ae Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
| | * | | | Simplify variable typing for IA buildsBruce Beare2011-01-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3f080b34360bfade0dbd5e2d8d0365e049162e4c Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* | | | | | Bug 3330205, 3362385 clock(3) SMP safety and epochGlenn Kasten2011-01-191-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ida1e4400489c8c19818c6af5640ab89942c8f712
* | | | | | Merge "Bug 3330205 Put blanks and zeroes in const area"Glenn Kasten2011-01-163-4/+4
|\ \ \ \ \ \
| * | | | | | Bug 3330205 Put blanks and zeroes in const areaGlenn Kasten2011-01-093-4/+4
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | Change-Id: I8f25aebd1ded3617dc60951271767281f73b8684
* | | | | | Merge "Implement RFC3484 policy table changes from ↵Lorenzo Colitti2011-01-141-13/+31
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | draft-ietf-6man-rfc3484-revise-01."
| * | | | | | Implement RFC3484 policy table changes from draft-ietf-6man-rfc3484-revise-01.Steinar H. Gunderson2011-01-131-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes in a nutshell: - Handle v4-mapped as different from v4-compat (this was probably an existing bug in our code). - Add policy entries for ULA, above most everything else. - Put v4-compat, old-style IPv6 site-local and 6bone addresses way down in the preference table. The rest is just shuffling numbers around (no actual changes to priority). Change-Id: Ieb111e0edd705992bc9d066befaaee95a8c1a5df
* | | | | | | Merge "Bug 3330205 Thread safe strptime implementation"David Turner2011-01-131-25/+27
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | |
| * | | | | | Bug 3330205 Thread safe strptime implementationGlenn Kasten2011-01-111-25/+27
| | |/ / / / | |/| | | | | | | | | | | | | | | | Change-Id: I03e72b0253a7a2e015455ab81dbf155ed1e574d2