Commit Graph

4935 Commits

Author SHA1 Message Date
Elliott Hughes
24614b4729 Remove __memcmp16 from bionic.
Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
2014-06-12 15:35:22 -07:00
Elliott Hughes
564222e338 Merge "Use default hidden visibility to build libc_dns." 2014-06-12 05:34:11 +00:00
Elliott Hughes
8563802b04 Use default hidden visibility to build libc_dns.
Bug: 11156955
Change-Id: Ia443705f5fbee0681039d4480abc89850968f475
2014-06-12 13:35:41 -07:00
Dan Albert
37b845f9e4 Merge "Remove declaration for putw(3)/getw(3)." 2014-06-12 05:34:11 +00:00
Dan Albert
65b1c90a32 Merge "Hides valloc(3)/pvalloc(3) on LP64." 2014-06-12 03:32:07 +00:00
Dan Albert
b725e7627f Merge "Removes wait3(2) from LP64." 2014-06-12 03:32:07 +00:00
Dan Albert
8229ae46f4 Removes wait3(2) from LP64.
wait3(2) was removed from POSIX 2004. Keep the symbol around in LP32 for binary
compatibility, but remove the declaration in sys/wait.h.

Bug: 13935372
Change-Id: Ic715fce6781aae43b4ac6d745dc6d1e6b9914e71
2014-06-13 16:04:41 -07:00
Dan Albert
f87ac523a1 Merge "Remove ioprio_get(2) and ioprio_set(2) from LP64." 2014-06-12 03:32:07 +00:00
Dan Albert
607341e226 Remove ioprio_get(2) and ioprio_set(2) from LP64.
Bug: 11156955
Change-Id: I07b596d85e4bd6347d488d1a92c8d0a00b5ef3b3
2014-06-12 18:10:13 -07:00
Elliott Hughes
1e7ae47d40 Merge "Bring our "libresolv" stuff in line with glibc." 2014-06-12 03:32:07 +00:00
Elliott Hughes
e8e453439f Bring our "libresolv" stuff in line with glibc.
Despite the name, most of resolv_private.h is actually in glibc; it's just
that there it's tucked away in libresolv whereas we have it in libc.

Change-Id: Ibcf6603f1141ffd2661cee0bffa83052d4f9e549
2014-06-13 11:50:07 -07:00
Elliott Hughes
7f2d4c21cc Somewhere, the declaration of _resolv_delete_cache_for_net went missing.
I couldn't work out where this went missing from "git log", but it became
important with the switch to hidden visibility.

Change-Id: I921f81e36642a2c65c3ec85dc9b5b87c5d977a5b
2014-06-12 18:40:06 -07:00
Elliott Hughes
ff17671bc6 Merge "Add a hack to <stdlib.h> until we can fix libvpx." 2014-06-12 03:32:07 +00:00
Elliott Hughes
3fb5097a7e Add a hack to <stdlib.h> until we can fix libvpx.
libvpx should probably change its assembler to refer to lrand48 directly,
because that will work on old and new versions of Android. This keeps things
building until that happens.

Bug: 15598056
Change-Id: I4a1f59e710a083b9f9a707ceeb9ca0a28141a954
2014-06-12 17:50:52 -07:00
Elliott Hughes
346fa721ca Merge "Get the full set of PRNG functions in <stdlib.h>" 2014-06-12 03:32:07 +00:00
Elliott Hughes
a0beeeabbc Get the full set of PRNG functions in <stdlib.h>
Bug: https://code.google.com/p/android/issues/detail?id=58888
Change-Id: I435250bdae302e8bd7e29977d0fde7b9afbfca5e
2014-06-12 14:37:31 -07:00
Elliott Hughes
ea13c54b17 am e02086a6: am 2c02d005: Merge "Add __pure2 to a few more functions, most notably gettid and pthread_self."
* commit 'e02086a6dc789b427c817b39a6adb9c50db8f70d':
  Add __pure2 to a few more functions, most notably gettid and pthread_self.
2014-06-11 23:44:01 +00:00
Dan Albert
cb7048138a am 6f7f1caa: am 48082a0a: Merge "Remove declarations related to cuserid(3)."
* commit '6f7f1caa1dc14c3f8b522653d20aa5075b7203f2':
  Remove declarations related to cuserid(3).
2014-06-11 21:49:00 +00:00
Dan Albert
8e613cf342 Remove declaration for putw(3)/getw(3).
These were both removed from POSIX 2004, and we don't define an
implementation for getw(3). Keep the definition of put(3) on LP32 for
binary compatibility.

Bug: 13935372
Change-Id: Iba384b45093ac6d2d7c2d81f7980cd7701dd6f56
2014-06-11 14:41:45 -07:00
Dan Albert
4880b0a820 am abf16559: am 440bd6bc: Merge "Replaces vfork() implementation with fork()"
* commit 'abf16559d31c49d52fba6f42a3d7b4566de0493b':
  Replaces vfork() implementation with fork()
2014-06-11 21:38:19 +00:00
Elliott Hughes
617573af9f am b94b1bc0: am 80664231: Merge "Revert "Temporarily expose dlmalloc_usable_size.""
* commit 'b94b1bc0342744d351db8f7720dfec8bd2279784':
  Revert "Temporarily expose dlmalloc_usable_size."
2014-06-11 21:37:50 +00:00
Elliott Hughes
5204a9e8ca Fix most of the tzcode warnings.
There's one left, but that's not fixed upstream yet.

Change-Id: Iba920cb7b156357c7f5e8220eb55ff1637ff48a1
2014-06-11 17:15:56 -07:00
Elliott Hughes
4e863b2f21 am df8a09b1: am 2b8246fa: Merge "Hide rand48 implementation details."
* commit 'df8a09b132573b021850fe41ed23ec6684d9b329':
  Hide rand48 implementation details.
2014-06-11 18:37:20 +00:00
Elliott Hughes
f1771794af am 228b33e9: am bdcab25e: Merge "Hide non-standard syslog API."
* commit '228b33e90c34a1392e77b4a9100210233a390ad0':
  Hide non-standard syslog API.
2014-06-11 18:37:18 +00:00
Elliott Hughes
f2a131cf4e am 97fbf8e7: am 87d4233c: Merge "Remove the MD5 implementation that was only used by toolbox."
* commit '97fbf8e746ca6e90f890a43d759a16901882c93a':
  Remove the MD5 implementation that was only used by toolbox.
2014-06-11 18:18:51 +00:00
Dan Albert
cd32219c5b Remove declarations related to cuserid(3).
cuserid(3) was removed from POSIX 2004, and we don't have an
implementation anyway.

Bug: 13935372
Change-Id: I7ac7cde931ba802d0d5b917c22f5116618b21d2f
2014-06-11 13:20:18 -07:00
Elliott Hughes
80664231b8 Merge "Revert "Temporarily expose dlmalloc_usable_size."" 2014-06-10 22:20:24 +00:00
Elliott Hughes
2c02d0057c Merge "Add __pure2 to a few more functions, most notably gettid and pthread_self." 2014-06-10 22:15:14 +00:00
Elliott Hughes
b27a840f4b Add __pure2 to a few more functions, most notably gettid and pthread_self.
Change-Id: I7eee9f26f45130038af09d8285782b07f70a996f
2014-06-11 16:32:10 -07:00
Dan Albert
440bd6bcc3 Merge "Replaces vfork() implementation with fork()" 2014-06-10 22:08:45 +00:00
Dan Albert
210331d976 Replaces vfork() implementation with fork()
vfork() was removed from POSIX 2008, so this replaces its implementation
with a call to fork().

Bug: 13935372
Change-Id: I6d99ac9e52a2efc5ee9bda1cab908774b830cedc
2014-06-10 21:38:52 -07:00
Elliott Hughes
809093bc21 Hide rand48 implementation details.
Bug: 11156955
Change-Id: I130272286989487dc22e246fb4ffbee5230225c4
2014-06-09 18:10:20 -07:00
Elliott Hughes
a382a792a4 Hide non-standard syslog API.
The definitions are still available on LP32 for binary compatibility, but
they're gone on LP64, and the declarations are gone everywhere.

We should probably just make syslog(3) log to the regular Android log,
but that's a job for another day.

Bug: 11156955
Change-Id: I74a98c92f7922ea733549ec6d37c6fa8b7014860
2014-06-09 17:42:14 -07:00
Elliott Hughes
87d4233c72 Merge "Remove the MD5 implementation that was only used by toolbox." 2014-06-09 23:29:21 +00:00
Elliott Hughes
67401638a9 Remove the MD5 implementation that was only used by toolbox.
I've already moved toolbox over to openssl.

Change-Id: Ia75fba5b5e3335a975b97787f653bf4df78e1b4e
2014-06-09 16:26:29 -07:00
Elliott Hughes
4e33504927 am 1dcb8471: am 36ed5971: Merge "AArch64: Remove Frame Record from ARM64 syscalls"
* commit '1dcb84712c2dad520eb49e283bff06ae47a6c1b1':
  AArch64: Remove Frame Record from ARM64 syscalls
2014-06-09 19:39:21 +00:00
Serban Constantinescu
602b4e482c AArch64: Remove Frame Record from ARM64 syscalls
This patch removes the frame record created on svc calls.

Change-Id: I67cf926ba59540e824fb9749d30538e332df7c1e
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-06-09 11:36:37 -07:00
Elliott Hughes
47907ba49b am 3b1e9bf3: am e18c2714: Merge "Add the missing issetugid binary compatibility stub."
* commit '3b1e9bf3e9bec519a75031dda231cdbfbac53005':
  Add the missing issetugid binary compatibility stub.
2014-06-07 09:57:41 +00:00
Elliott Hughes
44ac8af8ed am 20811f9e: am 19718f0c: Merge "Rewrite and hide longjmperror."
* commit '20811f9e87b86ba7171b9c9480a9212d787c732e':
  Rewrite and hide longjmperror.
2014-06-07 03:56:27 +00:00
Elliott Hughes
bffbfeed7a Add the missing issetugid binary compatibility stub.
Bug: 14569474
Change-Id: I3bedc1a0acf356af76424ceaf62ae7e85239f617
2014-06-06 20:41:42 -07:00
Elliott Hughes
19718f0cd6 Merge "Rewrite and hide longjmperror." 2014-06-07 03:35:28 +00:00
Christopher Ferris
28f321aa0f am 1b8163f5: am 1cada9b3: Merge "Remove unused scripts."
* commit '1b8163f5e686bc2405731d529c684c06bae65f17':
  Remove unused scripts.
2014-06-07 02:11:49 +00:00
Elliott Hughes
47ba295b06 Rewrite and hide longjmperror.
This shouldn't be public API, isn't supported on x86/x86_64, and it's
unlikely anyone would have actually seen the message before anyway.
Using __libc_fatal makes it much more likely to be seen.

Bug: 11156955
Change-Id: Icf7f654b22a7dacd89668b60c11e5705c7215c08
2014-06-06 16:49:39 -07:00
Elliott Hughes
3b9da0f99a Fix the printf family for non-ASCII.
The bug here turned out to be that we hadn't increased the constant
corresponding to the maximum number of bytes in a character to match
our new implementation, so any character requiring more than a byte
in UTF-8 would break our printf family.

Bug: 15439554

(cherry picked from commit 69f05d291d)

Change-Id: Ia5467e22ccb022e8d118de82291916050656147e
2014-06-06 16:25:13 -07:00
Elliott Hughes
53495dad3a am afd4df20: am 6fa47ca4: Merge "Fix ndk_cruft.cpp __getdents64 build failure."
* commit 'afd4df20c99e52be84d1cac2108c18619f32b5f2':
  Fix ndk_cruft.cpp __getdents64 build failure.
2014-06-06 22:45:50 +00:00
Elliott Hughes
12e98b459d am 655dba09: am 1c60f808: Merge "Rename __bionic_clone_entry to __start_thread."
* commit '655dba09c72ceb5852dae296cef49cbad6b1053f':
  Rename __bionic_clone_entry to __start_thread.
2014-06-06 22:45:50 +00:00
Elliott Hughes
449e4aa0a8 am e932f5b5: am 087b3cfa: Merge "Add a few more C11 functions to the whitelist."
* commit 'e932f5b5d89fcffe1c2e9e68eac4e9092f24719e':
  Add a few more C11 functions to the whitelist.
2014-06-06 22:45:49 +00:00
Elliott Hughes
3f508b3fc0 am 132a66be: am 3e0e7eea: Merge "Remove getdents from bionic."
* commit '132a66be4692840b13b3a6d6fb93d6e7965003c5':
  Remove getdents from bionic.
2014-06-06 22:45:48 +00:00
Christopher Ferris
4ff5aa3568 am 5261fd2c: am b837767a: Merge "Update kernel header generation docs."
* commit '5261fd2cacc8a53643089cab9fbbeb8142f98dea':
  Update kernel header generation docs.
2014-06-06 22:35:55 +00:00
Christopher Ferris
ab39aba70e Remove unused scripts.
Change-Id: I3391d6c903f710b45e62bcf01058cf3ad9abe399
2014-06-06 15:28:42 -07:00
Elliott Hughes
6fa47ca484 Merge "Fix ndk_cruft.cpp __getdents64 build failure." 2014-06-06 22:25:19 +00:00
Elliott Hughes
1c60f8080a Merge "Rename __bionic_clone_entry to __start_thread." 2014-06-06 22:24:44 +00:00
Elliott Hughes
d1ead2af8b Fix ndk_cruft.cpp __getdents64 build failure.
Change-Id: Ia463113da0575b36b5a9935d8d45e7bd2c801357
2014-06-06 15:24:20 -07:00
Elliott Hughes
f6b1d439cc Add a few more C11 functions to the whitelist.
Change-Id: Ie2e767910d7cc8a78c05e29960cf4ab52a59fe9d
2014-06-06 15:20:50 -07:00
Elliott Hughes
ebc8cd117a Rename __bionic_clone_entry to __start_thread.
This seems a bit less obscure.

Change-Id: I7dc528c253b73c861694f67556ad8f919bf92136
2014-06-06 15:18:54 -07:00
Elliott Hughes
3e0e7eea49 Merge "Remove getdents from bionic." 2014-06-06 22:17:59 +00:00
Christopher Ferris
b837767a63 Merge "Update kernel header generation docs." 2014-06-06 22:10:19 +00:00
Elliott Hughes
3d5cb30d23 Remove getdents from bionic.
Bug: 11156955
Change-Id: I6c306989801be552d85fba8a50dcdc79282fb9d2
2014-06-06 15:05:58 -07:00
Christopher Ferris
08b60747fe Update kernel header generation docs.
Also move the description of the cleanup data to the cleanup script.

Bug: 15433575
Change-Id: I21e2cbbfab55da483af1bbe36bbe59126b518e3c
2014-06-06 13:54:36 -07:00
Elliott Hughes
5f409720ec Merge "Use __libc_fatal() for failed malloc in new" into lmp-preview-dev 2014-06-06 18:33:03 +00:00
Dan Albert
acc2f79ed7 Use __libc_fatal() for failed malloc in new
This way we can print a useful message to the log isntead of just dying
mysteriously.

(cherry picked from commit 989725940e)

Bug: 13564922
Change-Id: I704e1263ec1e7556808348b821a20bacc934eb4a
2014-06-06 18:30:35 +00:00
Elliott Hughes
d45b2e5084 am fd0de89e: am c3bdc792: Merge "Fix the printf family for non-ASCII."
* commit 'fd0de89e4cd46de5f3439a7112c4dd25d62ec392':
  Fix the printf family for non-ASCII.
2014-06-06 18:26:25 +00:00
Elliott Hughes
c3bdc792be Merge "Fix the printf family for non-ASCII." 2014-06-06 18:06:44 +00:00
Elliott Hughes
bd7a892c30 Fix unwinding through x86-64 __bionic_clone.
x86-64 needs these CFI directives to stop unwinding here.
I've also cleaned up the assembler a little, and made x86 and x86-64
a little more alike.

Bug: 15195760

(cherry picked from commit aeb3016f81)

Change-Id: I511fe238b1ef1a1c16aef735f93bbee9accb0689
2014-06-06 10:00:32 -07:00
Elliott Hughes
69f05d291d Fix the printf family for non-ASCII.
The bug here turned out to be that we hadn't increased the constant
corresponding to the maximum number of bytes in a character to match
our new implementation, so any character requiring more than a byte
in UTF-8 would break our printf family.

Bug: 15439554
Change-Id: I693e5e6eb11c640b5886e848502908ec5fff53b1
2014-06-05 23:19:15 -07:00
Elliott Hughes
aa8979269b am 6db22710: am e2a54ca8: Merge "Remove unnecessary instructions from x86/x86_64 syscalls."
* commit '6db22710ce11766cc88f55f1e3c48d3167d5eb4c':
  Remove unnecessary instructions from x86/x86_64 syscalls.
2014-06-06 01:56:15 +00:00
Elliott Hughes
15a0456d0b Remove unnecessary instructions from x86/x86_64 syscalls.
__set_errno returns -1 exactly so that callers don't need to bother.
The other architectures were already taking advantage of this, but
no one had ever fixed x86 and x86_64.

Change-Id: Ie131494be664f6c4a1bbf8c61bbbed58eac56122
2014-06-05 17:24:30 -07:00
Elliott Hughes
76166f85e2 am a271b977: am 50b79530: Merge "Fix unwinding through x86-64 __bionic_clone."
* commit 'a271b97773e16974cb59b6636546641a14b0fe68':
  Fix unwinding through x86-64 __bionic_clone.
2014-06-05 23:59:54 +00:00
Elliott Hughes
50b79530c6 Merge "Fix unwinding through x86-64 __bionic_clone." 2014-06-05 23:38:19 +00:00
Elliott Hughes
aeb3016f81 Fix unwinding through x86-64 __bionic_clone.
x86-64 needs these CFI directives to stop unwinding here.
I've also cleaned up the assembler a little, and made x86 and x86-64
a little more alike.

Bug: 15195760
Change-Id: I40f92c007843c29c933bb6876fe2b4611e1b946b
2014-06-05 16:36:06 -07:00
Dan Albert
c99f9845fb am 802d4cab: am 9c101eb9: Merge "Removes index() from bionic."
* commit '802d4cabf37fc0008db3d7d265e18a0b6112ddb6':
  Removes index() from bionic.
2014-06-05 21:56:44 +00:00
Dan Albert
9c101eb9d1 Merge "Removes index() from bionic." 2014-06-05 21:34:49 +00:00
Christopher Ferris
72240e7b62 am 675a41f5: am 8ac8278b: Merge "Fix for slm-tuned memmove (both 32- and 64-bit)."
* commit '675a41f56eb65b91d8f3c39304869b6ae64fa983':
  Fix for slm-tuned memmove (both 32- and 64-bit).
2014-06-05 18:33:26 +00:00
Dan Albert
48089efd92 am a66c43ea: am 431aa4dc: Merge "Remove bsd_signal and sysv_signal from bionic LP64."
* commit 'a66c43eab073aae5e1e5754c476a5c39ece6930b':
  Remove bsd_signal and sysv_signal from bionic LP64.
2014-06-05 18:33:26 +00:00
Varvara Rainchik
fce861498c Fix for slm-tuned memmove (both 32- and 64-bit).
Introduce a test for memmove that catches a fault.
Fix both 32- and 64-bit versions of slm-tuned memmove.

Change-Id: Ib416def2610a0972e32c3b9b6055b54967643dc3
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
2014-06-05 11:08:09 -07:00
Dan Albert
40fca0f08b Removes index() from bionic.
This function has been removed from POSIX.

Unfortunately, we can't leave #define index(a, b) strchr((a), (b)) in its place
because defining a preprocessor macro for index() breaks a whole lot of code.

Bug: 13935372
Change-Id: Ifda348acde06da61c12e7ee2f8fe6950a3174dd1
2014-06-05 11:05:10 -07:00
Dan Albert
205dd7d9b3 Remove bsd_signal and sysv_signal from bionic LP64.
bsd_signal was removed in POSIX 2008, sysv_signal was never POSIX.

Bug: 13935372
Change-Id: I7688e5cc317247ff075dcf99b598f515fb4f15c4
2014-06-05 08:21:17 -07:00
Elliott Hughes
a6bd78a30a am 3cd4b783: am 8aabecf3: Merge "Hide __libc_fini."
* commit '3cd4b783fb7b0c0172934faef21792356fdf3385':
  Hide __libc_fini.
2014-06-05 09:47:59 +00:00
Dan Albert
6d9b463b72 am 60d57baf: am 76812041: Merge "Revert "Remove ftime from bionic LP64""
* commit '60d57baf5718f5d18dff4059b2f59f9d9b63dc0a':
  Revert "Remove ftime from bionic LP64"
2014-06-05 01:08:52 +00:00
Dan Albert
768120416b Merge "Revert "Remove ftime from bionic LP64"" 2014-06-05 00:50:56 +00:00
Dan Albert
0921204660 Revert "Remove ftime from bionic LP64"
Breaking some build... will look in to it later.

This reverts commit 26d6799bbe.

Change-Id: I35fa770221be3a181bd37c6c3dce1bf37a69a4a1
2014-06-05 00:50:43 +00:00
Dan Albert
8e89ed2e87 am 3d7fd883: am 428581fb: Merge "Remove ftime from bionic LP64"
* commit '3d7fd8836474497e2745e98df30e0fea6f4d4723':
  Remove ftime from bionic LP64
2014-06-05 00:01:53 +00:00
Dan Albert
428581fb45 Merge "Remove ftime from bionic LP64" 2014-06-04 23:42:27 +00:00
Elliott Hughes
31fee71b43 am a4edb723: am 37229f2a: Merge "Temporarily expose dlmalloc_usable_size."
* commit 'a4edb7235084cdf62149310fcb1653596f680948':
  Temporarily expose dlmalloc_usable_size.
2014-06-04 23:33:02 +00:00
Elliott Hughes
1f29665f15 Hide __libc_fini.
Bug: 11156955
Change-Id: Id5af3540c6ec4d9ef969d62a230144fe8bb76b0b
2014-06-04 16:29:37 -07:00
Dan Albert
26d6799bbe Remove ftime from bionic LP64
Bug: 13935372
Change-Id: I5dd31147143b23a090a3b75b846dc5354e599121
2014-06-04 16:25:24 -07:00
Elliott Hughes
67c437b231 Revert "Temporarily expose dlmalloc_usable_size."
This reverts commit 6403cc4870.

Change-Id: Id1ce4088be1e6c83271c6317eb3e5f7fc11c7b95
2014-06-04 23:14:48 +00:00
Elliott Hughes
6403cc4870 Temporarily expose dlmalloc_usable_size.
Bug: 15425694
Change-Id: I47e1ca598817359260c372fec8072e76886054f0
2014-06-04 16:08:17 -07:00
Elliott Hughes
c5a17834c4 am 02255f26: am 53e3bbab: Merge "Temporary fix for asan_malloc_linux.cc build failure."
* commit '02255f267448f88f16f3ddeaf5c701ab01a17c4b':
  Temporary fix for asan_malloc_linux.cc build failure.
2014-06-04 22:39:38 +00:00
Elliott Hughes
14442bb229 Temporary fix for asan_malloc_linux.cc build failure.
Bug: 15432753
Change-Id: I02a3a2c826e6d01e6809c51588a9670dcd179123
2014-06-04 15:20:46 -07:00
Elliott Hughes
aca22284fc am b27cb268: am 38732aa9: Merge "Fix debug malloc."
* commit 'b27cb268c0c1424c71d64b8a713983257d4de7ee':
  Fix debug malloc.
2014-06-04 21:49:25 +00:00
Dan Albert
ab86296461 am ea5c19c4: am 623dce3b: Merge "Removes wcswcs from bionic for LP64."
* commit 'ea5c19c4cf82eb97a0ee90d6e9c7dfe0c709e2fb':
  Removes wcswcs from bionic for LP64.
2014-06-04 21:33:35 +00:00
Elliott Hughes
38732aa9ea Merge "Fix debug malloc." 2014-06-04 21:10:55 +00:00
Elliott Hughes
8e52e8fe83 Fix debug malloc.
Previously the dynamically-loaded part of the debug malloc implementation
wanted to access hidden symbols in libc itself.

Bug: 15426546
Change-Id: I6a366ef626854d1af1d705ca24842817b1c02a19
2014-06-04 14:08:20 -07:00
Dan Albert
001f8f041b Removes wcswcs from bionic for LP64.
Bug: 13935372
Change-Id: I0deb15e769da4fa81bb65a87f3c86db5163a5796
2014-06-04 12:01:56 -07:00
Elliott Hughes
5406127ca0 am 8c5d3170: am e120cba3: Merge "Cherrypick upstream OpenBSD\'s vfwprintf.c revision 1.11."
* commit '8c5d3170411e00c8f0cc126d84e4b08e6a1223d1':
  Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11.
2014-06-04 17:32:11 +00:00
Dan Albert
bb87e9a823 am 4855a97e: am 452e0913: Merge "Adds functionality specified by uchar.h"
* commit '4855a97ed06500de7515e2984d9f44cae7bf756a':
  Adds functionality specified by uchar.h
2014-06-04 17:32:11 +00:00
Elliott Hughes
e120cba31d Merge "Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11." 2014-06-04 16:17:10 +00:00
Dan Albert
452e091300 Merge "Adds functionality specified by uchar.h" 2014-06-04 16:10:50 +00:00
Elliott Hughes
be8df2e744 Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11.
revision 1.11
date: 2014/06/04 07:45:25;  author: stsp;  state: Exp;  lines: +1 -7;  commitid:
 zJPRH5RUO224FmQu;
Remove assigned but unused local variables and macro from vfwprintf().
Found by Elliott @ google
ok mpi@

Change-Id: I716edc0c4d736a484a5317942de8e87bd8c6fd26
2014-06-04 09:00:25 -07:00
Dan Albert
7a7f9952c1 Adds functionality specified by uchar.h
mbrtoc32 and c32rtomb get their implementations from mbrtowc and wcrtomb. The
wc functions now simply call the c32 functions.

Bug: 14646575
Change-Id: I49d4b95fed0f9d790260c996c4d0f8bfd1686324
2014-06-04 08:39:24 -07:00
Elliott Hughes
27e3e3300c am 9a2aba17: am 38ed337c: Merge "Hide dlmalloc symbols."
* commit '9a2aba176a8b315207c728132591eea57f6b4d53':
  Hide dlmalloc symbols.
2014-06-04 03:51:18 +00:00
Elliott Hughes
38ed337c13 Merge "Hide dlmalloc symbols." 2014-06-04 03:30:37 +00:00
Elliott Hughes
9b5235d74e Hide dlmalloc symbols.
We need to leave dlmalloc_trim and dlmalloc_inspect_all exposed for
the VM, but if we're seriously looking at other malloc implementations,
that's something we're going to have to fix.

Bug: 11156955
Change-Id: If85156c280044f1616c09a3c50ba674aaf0e8d3a
2014-06-03 18:47:17 -07:00
Dan Albert
651dde33e4 am d90ded5a: am c3801894: Merge "Removes bcopy and bzero from bionic."
* commit 'd90ded5a911d5c37da49fb6179cf4ff5b9d48cb3':
  Removes bcopy and bzero from bionic.
2014-06-04 01:19:26 +00:00
Dan Albert
c380189410 Merge "Removes bcopy and bzero from bionic." 2014-06-04 01:00:40 +00:00
Dan Albert
ce9ce28e5d Removes bcopy and bzero from bionic.
These symbols are still defined for LP32 for binary compatibility, but
the declarations have been replaced with the POSIX recommended #defines.

Bug: 13935372
Change-Id: Ief7e6ca012db374588ba5839f11e8f3a13a20467
2014-06-03 17:22:07 -07:00
Elliott Hughes
ad5342a0c0 am 5bf90caa: am 3dbc2fe3: Merge "Work around "error: variable \'uio\' set but not used"."
* commit '5bf90caa78425c0053d35186b91a1c4936ccb149':
  Work around "error: variable 'uio' set but not used".
2014-06-04 00:12:10 +00:00
Elliott Hughes
b239d3fa27 am 85981760: am be15d16b: Merge "Turn on -Wunused and fix the mistakes it uncovers."
* commit '859817602d24d5c4868ed8b7d0cc69e5d3babfc6':
  Turn on -Wunused and fix the mistakes it uncovers.
2014-06-04 00:12:06 +00:00
Elliott Hughes
b082645ccb Work around "error: variable 'uio' set but not used".
I've sent the real fix upstream, and will merge that when they commit it.

Change-Id: I75e5cab87026f8990c585d364dd178753d727e2a
2014-06-03 16:39:58 -07:00
Elliott Hughes
430cf1a6c3 DO NOT MERGE fdprintf backward compatibility shim.
Fixes LP64 build.

Change-Id: Ic76005cd1f5a55344ea8ee3d070d25631d011037
2014-06-03 16:01:35 -07:00
Elliott Hughes
d286796fce Turn on -Wunused and fix the mistakes it uncovers.
Change-Id: I023d2d8b547fbc21d4124bb7510d42b06a0dc501
2014-06-03 15:22:34 -07:00
Paul Jensen
0d78bdaf65 Merge "Make host resolver call __connect() rather than connect() so mark isn't cleared." 2014-06-03 17:23:28 +00:00
Dan Albert
109c5a81d4 am 6e587086: am 2f9400b6: Merge "Use __libc_fatal() for failed malloc in new"
* commit '6e5870865e11f38ac9fcdf39c6097f1e39af9234':
  Use __libc_fatal() for failed malloc in new
2014-06-03 17:15:22 +00:00
Dan Albert
2f9400b679 Merge "Use __libc_fatal() for failed malloc in new" 2014-06-03 16:53:47 +00:00
Dan Albert
989725940e Use __libc_fatal() for failed malloc in new
This way we can print a useful message to the log isntead of just dying
mysteriously.

Change-Id: Ib660c2fd8ce8bb9aa0d0bb634ae08c645d3901e5
2014-06-02 18:48:53 -07:00
Elliott Hughes
4832a0961d DO NOT MERGE Fix lmp-preview-dev after bionic merge.
Other projects in lmp-preview-dev are out of date, and it's easier to patch
bionic than to fix all of them.

(cherry picked from commit a856c6f543)

Change-Id: Id8fbdf35eb55150579f85b7bdddb5d68d3012218
2014-06-02 15:27:21 -07:00
Elliott Hughes
87f0392320 am 016074f6: am 987bd5c6: am 2deef73f: Merge "Avoid a system call in \'gettid\'."
* commit '016074f6beec46fa2140e2cabd11ade488776402':
  Avoid a system call in 'gettid'.
2014-06-02 17:55:53 +00:00
Elliott Hughes
5d9a7ba0dc Avoid a system call in 'gettid'.
System calls can be pretty slow. This is mako, which has one of our
lowest latencies:

                       iterations      ns/op
  BM_unistd_getpid       10000000        209
  BM_unistd_gettid      200000000          8

Bug: 15297299 (kernel panic from too many gettid calls)
Bug: 15315766 (excessive gettid overhead in liblogd)
Change-Id: I49656c0fc5b5d092390264a59e4f2c0d8a8b1aeb
2014-06-02 10:32:55 -07:00
Elliott Hughes
468c292262 am df2e70f3: am d3f2a204: am 7a5732bd: Merge "Add some missing __noreturn attributes."
* commit 'df2e70f39036cab8bcbf8c238f39b21f83b32d8d':
  Add some missing __noreturn attributes.
2014-05-30 23:07:32 +00:00
Elliott Hughes
6203e7b853 Add some missing __noreturn attributes.
This is more honest, and lets us remove a hack.

Change-Id: I309f064743ded5248573ccafc379f78d417db08d
2014-05-30 15:56:25 -07:00
Elliott Hughes
4a7cae7a45 am 8db7b4b5: am f306c414: am 3a3b27e0: Merge "x86: stop unwinding past __bionic_clone."
* commit '8db7b4b54ca28f6c80115c43a83323f562d275b7':
  x86: stop unwinding past __bionic_clone.
2014-05-30 21:50:51 +00:00
Elliott Hughes
ee9d5bdd95 x86: stop unwinding past __bionic_clone.
The apparent "previous" frame is on another thread's stack.

Bug: 14270816
Bug: 15195760
Change-Id: I884f370e116203c5fa3b05a75fb8f356537261c4
2014-05-30 11:15:32 -07:00
Paul Jensen
31ad03761d Make host resolver call __connect() rather than connect() so mark isn't cleared.
Calling connect() will erase the mark set by the host resolver code because the
explicitlySelected bit of the Fwmark isn't set.  It's by design that the
explicitlySelected bit isn't set as this facilitates falling through to other
routing rules if the selected network doesn't provide a route to the DNS server
as may be the case with VPNs.

Change-Id: I60ba7c754194ead97df3ac6a6c5b3db1f446dac8
2014-05-30 08:02:52 -04:00
Christopher Ferris
2779dc7373 am 1a3a9d4d: am e4068e33: am 94170742: Merge "Fix x86 cfi directives for syscalls."
* commit '1a3a9d4d99557021a77d2d903775adabb24560f4':
  Fix x86 cfi directives for syscalls.
2014-05-30 02:29:08 +00:00
Christopher Ferris
15b91e92a0 Fix x86 cfi directives for syscalls.
The syscall generation always used 4 bytes for each push cfi directive.
However, the first push should always use an offset of 8 bytes, each
subsequent push after that is only 4 bytes though.

Change-Id: Ibaabd107f399ef67010b9a08213783957c2f74a9
2014-05-29 19:04:36 -07:00
Elliott Hughes
768fa1f636 am 2f97e423: am e1df1eb2: am 264d1b83: Merge "Remove issetugid."
* commit '2f97e423274793c1b47a5be2479f767fd26bbc54':
  Remove issetugid.
2014-05-30 00:17:37 +00:00
Elliott Hughes
b4e099c6f7 Remove issetugid.
Bug: 14569474
Change-Id: I752c77ed53c724f144f0b618443eb95e87f2929a
2014-05-29 16:43:01 -07:00
Christopher Ferris
a6ee6ac422 am 4704238d: am 84d90bf5: am aa5f32ea: Merge "Add Aarch64 optimized bzero based on memset"
* commit '4704238dd27095886e273edc3902722e8f941310':
  Add Aarch64 optimized bzero based on memset
2014-05-29 21:30:37 +00:00
Christopher Ferris
aa5f32ea1c Merge "Add Aarch64 optimized bzero based on memset" 2014-05-29 21:19:44 +00:00
Elliott Hughes
0f20aafa25 am 8efc3054: am dafa59b8: am 4dd0b72d: Merge "Return the actual success result from __futex."
* commit '8efc30544f5ef32395d97f41139d1906a21ca06f':
  Return the actual success result from __futex.
2014-05-29 21:10:06 +00:00
Christopher Ferris
ea1004b6b3 am deb1ec4a: am 47150dca: am 1a57de71: Merge "Fix overflow testing in sbrk."
* commit 'deb1ec4aaa0e7f74746c97ccbc22a367640c301f':
  Fix overflow testing in sbrk.
2014-05-29 21:09:29 +00:00
Bernhard Rosenkraenzer
62d92e1610 Add Aarch64 optimized bzero based on memset
Change-Id: I62cf25bfe23b9d811e00af7307bbd19d89937792
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2014-05-29 13:28:55 -07:00
Elliott Hughes
4dd0b72dd3 Merge "Return the actual success result from __futex." 2014-05-29 20:12:06 +00:00
Christopher Ferris
1a57de713a Merge "Fix overflow testing in sbrk." 2014-05-29 18:03:28 +00:00
Christopher Ferris
738b0cc5e9 Fix overflow testing in sbrk.
Modify the overflow testing for sbrk.

Bug: 15188366

Change-Id: Ia83f85f7c1789454d872279bd41f38f1ce6b8a34
2014-05-29 10:51:22 -07:00
Elliott Hughes
1ee46520ca Return the actual success result from __futex.
futex(2) can return non-zero successes.

Bug: 15195455
Change-Id: I7818bc922a5a2df31228ff72c169320b5e69a544
2014-05-29 10:27:55 -07:00
Elliott Hughes
dd4489bfbe am 4843fab2: am ad73e2f5: am ef023873: Merge "Minor style cleanup of some code I had to look at."
* commit '4843fab2ee025fae5e04d84dd687e507fc4e99f0':
  Minor style cleanup of some code I had to look at.
2014-05-29 16:23:08 +00:00
Elliott Hughes
864b926026 am 8a00b45d: am c3930812: am 0bdd668f: Merge "Upgrade to tzdata2014d."
* commit '8a00b45d601d6e9a5a7ab63544f66267ed1a857b':
  Upgrade to tzdata2014d.
2014-05-29 16:23:07 +00:00
Elliott Hughes
ef023873e2 Merge "Minor style cleanup of some code I had to look at." 2014-05-29 16:12:02 +00:00
Elliott Hughes
b7f136a01f Upgrade to tzdata2014d.
There are no substantive changes to the data in this release. I'm applying
this just for completeness.

Change-Id: Ibe953969cb16db4d8d1ddb7dd3c943316e6e46b4
2014-05-28 20:33:33 -07:00
Elliott Hughes
624996026b Minor style cleanup of some code I had to look at.
(It turns out that this is the only place we're saying __inline in C++.)

Change-Id: I8095e67a385087817c47caab9a621f82f8e0cfc8
2014-05-28 20:30:40 -07:00
Elliott Hughes
49d1ce63d9 am 275906e4: am 3388c7be: am fae42a83: Merge "Revert "Revert "Lose the hand-written futex assembler."""
* commit '275906e4b08062e50dbd0b1938a9a1379f577649':
  Revert "Revert "Lose the hand-written futex assembler.""
2014-05-29 03:22:03 +00:00
Elliott Hughes
fae42a837a Merge "Revert "Revert "Lose the hand-written futex assembler.""" 2014-05-29 03:13:23 +00:00
Elliott Hughes
b30aff405a Revert "Revert "Lose the hand-written futex assembler.""
The problem with the original patch was that using syscall(3) means that
errno can be set, but pthread_create(3) was abusing the TLS errno slot as
a pthread_mutex_t for the thread startup handshake.

There was also a mistake in the check for syscall failures --- it should
have checked against -1 instead of 0 (not just because that's the default
idiom, but also here because futex(2) can legitimately return values > 0).

This patch stops abusing the TLS errno slot and adds a pthread_mutex_t to
pthread_internal_t instead. (Note that for LP64 sizeof(pthread_mutex_t) >
sizeof(uintptr_t), so we could potentially clobber other TLS slots too.)

I've also rewritten the LP32 compatibility stubs to directly reuse the
code from the .h file.

This reverts commit 75c55ff84e.

Bug: 15195455
Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
2014-05-28 18:31:15 -07:00
Dan Albert
cd4e99048a am e4f5ae5d: am c51e9208: am dc3fb119: Merge "Updated ambiguous comment in pthread_mutex_lock."
* commit 'e4f5ae5d54865d6f61a32eeba6af846550d2a254':
  Updated ambiguous comment in pthread_mutex_lock.
2014-05-28 22:18:10 +00:00
Christopher Ferris
48c544f1c2 am 02d1cfb3: am fa204cf0: am 8a405b02: Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"
* commit '02d1cfb366b461d4c64cc87fc0f48bc3eae5fd92':
  Add optimized AArch64 versions of bcopy and wmemmove based on memmove
2014-05-28 22:17:56 +00:00
Dan Albert
dc3fb11949 Merge "Updated ambiguous comment in pthread_mutex_lock." 2014-05-28 22:00:50 +00:00
Christopher Ferris
8a405b027a Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove" 2014-05-28 21:35:04 +00:00
Brigid Smith
ff03a7aaad Updated ambiguous comment in pthread_mutex_lock.
The comment used the phrase "normal case" when it more specifically refers to the "recursive case," so I changed it to that.

Change-Id: I8335cce4dee933c6a463aee653b28bd986b5b5e4
2014-05-28 11:48:49 -07:00
Narayan Kamath
dc3178707d am adb1ec50: am 784254f2: am 52f74322: Merge "Revert "Lose the hand-written futex assembler.""
* commit 'adb1ec509e4866eab1f0a7fb8b99dd31e5d8e23f':
  Revert "Lose the hand-written futex assembler."
2014-05-28 18:14:34 +00:00
Calin Juravle
15627c1016 am c3f22810: am 7ca4d736: am 53e70fe3: Merge "Remove unnecessary padding in ucontext_t"
* commit 'c3f228103f0ff855214e0d15d51a26da7723d3b6':
  Remove unnecessary padding in ucontext_t
2014-05-28 18:10:34 +00:00
Narayan Kamath
52f74322b1 Merge "Revert "Lose the hand-written futex assembler."" 2014-05-28 18:04:26 +00:00
Narayan Kamath
75c55ff84e Revert "Lose the hand-written futex assembler."
This reverts commit ced906c849.

Causes issues on art / dalvik due to a broken return value
check and other undiagnosed issues.

bug: 15195455

Change-Id: I5d6bbb389ecefb0e33a5237421a9d56d32a9317c
2014-05-28 18:03:01 +00:00
Elliott Hughes
0ba998b3c3 am 44445f2d: am ab4c4686: am 7fdde4a5: Merge "Expose __srefill for LP64 until we can fix the NDK."
* commit '44445f2d51e946f6ba14101058a1cc6157f2e185':
  Expose __srefill for LP64 until we can fix the NDK.
2014-05-28 18:02:08 +00:00
Calin Juravle
bdca3802c9 Remove unnecessary padding in ucontext_t
- removed extra padding from ucontex_t on x86, x86_64 and mips
- force ucontext_t struct to use 64 bits for the sigmask on all arches
(previsouly wrong since sigset_t on arm and x86 is only 32 bits)
- arm and arm64 continue to use padding to match glibc sigset_t

This brings Bionic on par with the kernel w.r.t ucontext padding.

Bug: 12828904
Change-Id: Ia8915ace694ecb4695603a334e697985f4c3e7aa
2014-05-28 17:24:28 +01:00
Elliott Hughes
f6d2ca2696 Expose __srefill for LP64 until we can fix the NDK.
The LP64 has a duplicate copy of part of stdio, and relies
on bionic supplying this part. We should remove the hack from
the NDK, at least for LP64, and then revert this.

Bug: 15291317
Change-Id: I75e06e130188ca0aeb9d50dfe3a3e48a1d3968b7
2014-05-27 21:23:36 -07:00
Elliott Hughes
0f1a221b3a am faf071df: am 9e3a0356: am 1454ff25: Merge "Clear the return address register in __bionic_clone."
* commit 'faf071dfcb2f6811727dfdfc70574552639b937c':
  Clear the return address register in __bionic_clone.
2014-05-27 23:01:16 +00:00
Elliott Hughes
1454ff2574 Merge "Clear the return address register in __bionic_clone." 2014-05-27 22:53:52 +00:00
Elliott Hughes
e7dccdf683 Clear the return address register in __bionic_clone.
The unwinder will end up on the parent thread's stack if the return
address register is not cleared.

Bug: 14270816
Bug: 15195760
Change-Id: Iebcdf5cc881cad245643bb193760de35eb7f8b19
2014-05-27 15:49:51 -07:00
Dan Albert
493b5cb6ac am 923619f6: am 4a542fc5: am 134911d7: Merge "Use __typeof__() instead of typeof()"
* commit '923619f6e22cc76db598c7e0331ce3d1a470943d':
  Use __typeof__() instead of typeof()
2014-05-27 22:03:37 +00:00
Dan Albert
a7821b7121 Use __typeof__() instead of typeof()
typeof() is a gcc builtin and is not always available (such as clang when
-std=c*). Both gcc and clang always expose __typeof__(), so just use that.

Change-Id: I75e2a990acc35f6f39b2c353f6548100ec03c67f
2014-05-27 12:47:54 -07:00
Elliott Hughes
0ad4b21658 am 5264518f: am 946bc952: am 8e85b4f0: Merge "Restore __srefill for LP32."
* commit '5264518f61f506bb025b17520ae5e0f0bba9cb85':
  Restore __srefill for LP32.
2014-05-27 18:48:41 +00:00
Elliott Hughes
aa50585d96 Restore __srefill for LP32.
The NDK apparently includes an android_support.a library that
refers to __srefill in its copy of the vsnprintf implementation.

Bug: 15249361
Change-Id: Ic2cf6f21290b3146c42fbe0624f5e4d54f6194b4
2014-05-27 11:22:39 -07:00
Elliott Hughes
06b3711de3 am ab4064bc: am 50c52f74: am b3c75a1e: Merge "Restore __srget and __swbuf for LP32."
* commit 'ab4064bc9308dca7880ecca6ee52242642dfa2a7':
  Restore __srget and __swbuf for LP32.
2014-05-26 08:49:00 +00:00
Elliott Hughes
b3c75a1e8f Merge "Restore __srget and __swbuf for LP32." 2014-05-26 05:07:20 +00:00
Elliott Hughes
23826c81d4 am 6571b81b: am 21296dfe: am bc904896: Merge "Add C11 <stdatomic.h>."
* commit '6571b81b1f8f8ade80024a99af37fcf42514aaae':
  Add C11 <stdatomic.h>.
2014-05-25 17:56:53 +00:00
Elliott Hughes
bc904896a6 Merge "Add C11 <stdatomic.h>." 2014-05-25 17:48:19 +00:00
Elliott Hughes
35d90bb6ec Restore __srget and __swbuf for LP32.
Anthony King <anthonydking@slimroms.net> reports that for Grouper the
Nvidia GL blobs need access to __swbuf. This is because the old <stdio.h>
had inline getc and putc implementations that directly referred to these
symbols.

Change-Id: I11a7b5550018ecc93d8f195c99857759669b2906
2014-05-25 10:38:25 -07:00
Elliott Hughes
d460da0813 am abc68292: am 06c9662a: am 255789e4: Merge "Restore tkill for LP32."
* commit 'abc68292b48741fa646b8f16263cae3c42012dc8':
  Restore tkill for LP32.
2014-05-25 03:24:01 +00:00
Elliott Hughes
7b9626f449 am 4d436a2f: am 85df714f: am d4f37110: Merge "Restore __futex_wake and __futex_wait for LP32."
* commit '4d436a2fdc3a847571a69c22d2cfefeef29ca9a2':
  Restore __futex_wake and __futex_wait for LP32.
2014-05-25 03:17:25 +00:00
Anthony King
001707363d Restore tkill for LP32.
libmono from Unity still requires tkill(2).

Change-Id: I37a1994b08086c7fedb5c78ea0dadf2d72bc1463
Signed-off-by: Anthony King <anthonydking@slimroms.net>
2014-05-24 20:13:13 -07:00
Elliott Hughes
bd3a98c6b9 Restore __futex_wake and __futex_wait for LP32.
Should fix Skype:

  java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__futex_wake" referenced by "libsliq.so"...

Bug: 15196718
Change-Id: I8a18e18d830f0436e820cbde577121bd92710803
2014-05-24 17:19:36 -07:00
Elliott Hughes
e6c57fcb05 Add C11 <stdatomic.h>.
Bug: 14903517
Change-Id: I631dbfdaa698cf7fea8e3b5e18a32586383e62a5
2014-05-23 20:06:03 -07:00
Bernhard Rosenkraenzer
6f2bde3441 Add optimized AArch64 versions of bcopy and wmemmove based on memmove
Add optimized versions of bcopy and wmemmove for AArch64 based on the
memmove implementation

Change-Id: I82fbe8a7221ce224c567ffcfed7a94a53640fca8
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2014-05-23 18:49:57 -07:00
Christopher Ferris
18f89a699c am 3e9cd6ca: am 86f5d0f9: am 1c4d8301: Merge "Revert "Add optimized AArch64 versions of bcopy and wmemmove based on memmove""
* commit '3e9cd6ca1050d222e1ce5dbe27356162eb194f6f':
  Revert "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"
2014-05-24 01:10:59 +00:00
Christopher Ferris
d35cac4a2e am b6481ffb: am 5c34b003: am 78c3e11e: Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"
* commit 'b6481ffb63820b759369da2e6836b1ecc453889f':
  Add optimized AArch64 versions of bcopy and wmemmove based on memmove
2014-05-24 01:07:31 +00:00
Ben Cheng
a937f5246f am 50049943: am 50348295: am f4985b14: Merge "Clear link register in __bionic_clone."
* commit '500499435f04b8617e0756f71a37736bdc1ef9ad':
  Clear link register in __bionic_clone.
2014-05-24 01:04:03 +00:00
Christopher Ferris
1c4d83012f Merge "Revert "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"" 2014-05-24 01:02:31 +00:00
Christopher Ferris
fd0ce866ce Revert "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"
This reverts commit 8167dd7cb9.

For some reason I thought the bcopy change was bzero. The bcopy code doesn't pass our tests, so reverting until I can figure out what's wrong.

Change-Id: Id89fe959ea5105cd58dff6bba8d91a30cc4bcb07
2014-05-24 01:02:22 +00:00
Christopher Ferris
78c3e11e78 Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove" 2014-05-24 00:58:15 +00:00
Bernhard Rosenkraenzer
8167dd7cb9 Add optimized AArch64 versions of bcopy and wmemmove based on memmove
Add optimized versions of bcopy and wmemmove for AArch64 based on the
memmove implementation

Change-Id: Ie43d0ff4f8ec4edba5b4fb5ccacd941f81ac6557
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2014-05-23 17:54:08 -07:00
Ben Cheng
8df0fe0c74 Clear link register in __bionic_clone.
Since __bionic_clone uses tail-call to invoke __bionic_clone_entry,
at runtime the unwinder will reach the stack of the clone() function,
which belongs to the parent thread, if the link register is not cleared.

BUG: 14270816
Change-Id: Ia3711c87f8b619debe73748c28b9fb8691ea698e
2014-05-23 16:35:21 -07:00
Elliott Hughes
8adf95857b am 28bfc84e: am 764ebf8a: am a486632e: Merge "Remove <sys/atomics.h>."
* commit '28bfc84e42a91a4960844ea36c90dc7c936ef292':
  Remove <sys/atomics.h>.
2014-05-23 22:33:40 +00:00
Elliott Hughes
c3f909630b Remove <sys/atomics.h>.
Bug: 14903517
Change-Id: I6de1d9d3624922517fdc37922097abbc3b41f661
2014-05-23 14:36:30 -07:00
Calin Juravle
09afdfb514 am 66aba0d8: am d2b12988: am b2604949: Merge "Migrate pthread_rwlock implementation away from sys/atomics"
* commit '66aba0d8b2789b3ccf74df7111b0e8b838f0e320':
  Migrate pthread_rwlock implementation away from sys/atomics
2014-05-23 19:43:29 +00:00
Elliott Hughes
bfba94aa3c am 8255a971: am 69068fd9: am fb9a47c7: Merge "Hide various stdio implementation details."
* commit '8255a971cc0d6d69c870f514fcf0fae1e5d3ebec':
  Hide various stdio implementation details.
2014-05-23 19:43:17 +00:00
Elliott Hughes
fc07a1e613 am a722fdcd: am cdf15e39: am 253fa170: Merge "Lose the hand-written futex assembler."
* commit 'a722fdcdb7bcddfb5ac30ad22798da4b53988013':
  Lose the hand-written futex assembler.
2014-05-23 19:43:16 +00:00
Elliott Hughes
f25f5712f3 am 16933c6a: am 5a95dd14: am ea7dc320: Merge "Add some more BSD symbols to the list."
* commit '16933c6ae9c6b8de8e05374b5b52446f637e6071':
  Add some more BSD symbols to the list.
2014-05-23 19:34:39 +00:00
Elliott Hughes
a03e07a625 am 236130cd: am 3fd88ebe: am 0f79a2f4: Merge "Cleaned up pthread rwlocks implementation."
* commit '236130cd8dab048009ab3fbbe7e24bd7dca8dfa3':
  Cleaned up pthread rwlocks implementation.
2014-05-23 19:34:39 +00:00
Elliott Hughes
c1c1992527 am 57b0f075: am bfa87e27: am ec071ac0: Merge "Remove the tkill(2) stub."
* commit '57b0f075dd66f195c6568e049a9269b9e1e8f016':
  Remove the tkill(2) stub.
2014-05-23 19:34:38 +00:00
Calin Juravle
b26049490b Merge "Migrate pthread_rwlock implementation away from sys/atomics" 2014-05-23 10:07:46 +00:00
Elliott Hughes
fb9a47c740 Merge "Hide various stdio implementation details." 2014-05-23 06:28:42 +00:00
Elliott Hughes
2899de9b05 Hide various stdio implementation details.
I've left __sF exposed since that's how the OpenBSD stdin, stdout, stderr
are implemented. Other BSDs and glibc use a separate global for each instead
of an array.

Bug: 11156955
Change-Id: I9f3d2d4314a8d4a78c3197b9acd9258820c5f150
2014-05-22 20:06:23 -07:00
Elliott Hughes
ced906c849 Lose the hand-written futex assembler.
Also stop exporting 'futex'.

Bug: 12250341
Change-Id: Icc4fa4296cd04dfe0d1061822c69e2eb40c3433a
2014-05-22 19:49:11 -07:00
Elliott Hughes
45bf4c315d Add some more BSD symbols to the list.
Bug: 11156955
Change-Id: I07489ec63536121dbfc372170ef5cf60a5c58948
2014-05-22 18:53:21 -07:00
Elliott Hughes
0f79a2f487 Merge "Cleaned up pthread rwlocks implementation." 2014-05-23 01:47:56 +00:00
Calin Juravle
1b676ea5fb Migrate pthread_rwlock implementation away from sys/atomics
Bug: 8133149
Bug: 14903517
Change-Id: Ib85987f53d7aeaec12a980ccb645c4a449c48503
2014-05-23 00:26:24 +01:00
Calin Juravle
92687e41bc Cleaned up pthread rwlocks implementation.
- used underscore_style_for_vars
- extracted time related functionality into a function
- cleaned up style
- removed unused fields from pthread_rwlock_t on LP64
- changed reservation in pthread_rwlock_t so that the size of the
structure equals glibc version

Bug: 8133149

Change-Id: I84ad3918678dc7f5e6b3db9b7e9b0899d3abe9cd
2014-05-23 00:22:58 +01:00
Elliott Hughes
6e599a904b Remove the tkill(2) stub.
glibc doesn't have tkill or tgkill and says "use syscall(3) instead".
I've left tgkill since it's quite widely used, but there's no reason
to have tkill as well.

Bug: 11156955
Change-Id: Ifc0af750320086f829bc9914551c172b501f3b60
2014-05-22 13:41:36 -07:00
Elliott Hughes
9b49321ea5 am 4cf6b531: am 8a326a17: am 4f6ed4a1: Merge "Remove unnecessary #includes of <sys/atomics.h>."
* commit '4cf6b531c2d7408ea5fa754e5b1bf4711c5fe396':
  Remove unnecessary #includes of <sys/atomics.h>.
2014-05-22 18:28:15 +00:00
Elliott Hughes
2ea60ff0b4 Remove unnecessary #includes of <sys/atomics.h>.
Bug: 14903517
Change-Id: I7b5bcebe58774a441da986cc02376dd88e00ea0e
2014-05-22 11:00:21 -07:00
Calin Juravle
a959644d5d am 5f8626a3: am db3cda2d: am 254fa885: Merge "Switch to POSIX dprintf/vdprintf."
* commit '5f8626a3755dc397fc48c67ed36243877aea18d7':
  Switch to POSIX dprintf/vdprintf.
2014-05-22 16:49:09 +00:00
Calin Juravle
63590a2f95 am 77761e4c: am ddf52021: am d1dc009c: Merge "Add padding to mips ucontext_t."
* commit '77761e4cc8719933bf66be7894e1b3da27bd03dd':
  Add padding to mips ucontext_t.
2014-05-22 13:33:29 +00:00
Calin Juravle
e5d8092d89 am 3625f432: am 841a1a13: am 156c7d3d: Merge "Clean up ucontext.h TODOs."
* commit '3625f432b39c1f9a7f23d2219eb421d4478cd852':
  Clean up ucontext.h TODOs.
2014-05-22 13:33:29 +00:00
Calin Juravle
f9aac10cf3 am d75b6e2e: am 6cec7775: am 17216716: Merge "Mutex-free implementation of pthread_rwlock"
* commit 'd75b6e2e478fddfbdd404d44e0d33383965b2f39':
  Mutex-free implementation of pthread_rwlock
2014-05-22 13:33:28 +00:00
Calin Juravle
254fa8857f Merge "Switch to POSIX dprintf/vdprintf." 2014-05-22 13:28:52 +00:00
Elliott Hughes
fcac8ff97f Switch to POSIX dprintf/vdprintf.
Bug: 11156955
Change-Id: I734bd02db514367ab119a48304aae9767958e367
2014-05-22 11:27:06 +01:00
Calin Juravle
d1dc009c56 Merge "Add padding to mips ucontext_t." 2014-05-22 10:16:41 +00:00
Calin Juravle
156c7d3d0a Merge "Clean up ucontext.h TODOs." 2014-05-22 10:16:12 +00:00
Calin Juravle
172167163a Merge "Mutex-free implementation of pthread_rwlock" 2014-05-22 10:15:03 +00:00
Calin Juravle
76f352eec1 Mutex-free implementation of pthread_rwlock
Bug: 8133149
Change-Id: Id6775010d95f2634b173daa55d87a59a3cf4131b
2014-05-22 11:11:15 +01:00
Elliott Hughes
2c52565940 am e2d7d274: am 176e71fb: am 3d4a7b02: Merge "Hide most of the private futex functions."
* commit 'e2d7d274f5c6edf38b9a27ad87178619ed6c4ab3':
  Hide most of the private futex functions.
2014-05-22 03:09:10 +00:00
Elliott Hughes
d5ed63a6a8 Hide most of the private futex functions.
Also hide part of the system properties compatibility code, since
we needed to touch that to keep it building.

I'll remove __futex_syscall4 and futex in a later patch.

Bug: 11156955
Change-Id: Ibbf42414c5bb07fb9f1c4a169922844778e4eeae
2014-05-21 18:30:00 -07:00
Christopher Ferris
486396a8c9 am 328b2b6b: am 05645db0: am f97d8713: Merge "Add cfi directives for arm64 assembler."
* commit '328b2b6bfb73ee5bded6719ac15e0a3381c1800f':
  Add cfi directives for arm64 assembler.
2014-05-22 01:22:39 +00:00
Christopher Ferris
f97d8713a2 Merge "Add cfi directives for arm64 assembler." 2014-05-22 01:08:22 +00:00
Christopher Ferris
df22a121b2 Add cfi directives for arm64 assembler.
Fix syscall generator to add cfi directives and add the directives
for all arm64 assembler.

Bug: 15138290
Change-Id: I7f0e4a16c141ac624e5276917a3a1ed45778e057
2014-05-21 17:46:52 -07:00
Elliott Hughes
0e00375a5c am 17e44b89: am fc951aae: am bf0a4407: Merge "Remove an unnecessary instruction from arm64 __bionic_clone."
* commit '17e44b89e11286f3dcf7b35f9bb6432864ac085e':
  Remove an unnecessary instruction from arm64 __bionic_clone.
2014-05-22 00:33:42 +00:00
Elliott Hughes
bf0a440730 Merge "Remove an unnecessary instruction from arm64 __bionic_clone." 2014-05-21 23:44:55 +00:00
Elliott Hughes
f93f50d7ea Remove an unnecessary instruction from arm64 __bionic_clone.
Change-Id: Ib0dd5079d10b3634901d561932259653945176ee
2014-05-21 16:29:55 -07:00
Christopher Ferris
63900a7110 am 845e5c77: am fc11ebc5: am 3d5a4240: Merge "Fix build."
* commit '845e5c77b551b7b3079f9e6adf1f780f96729c33':
  Fix build.
2014-05-21 19:49:46 +00:00
Christopher Ferris
8d2410d33d Fix build.
Change-Id: I5a35eee4074e35f459c86c7f9b1d9b0754888940
2014-05-21 11:45:51 -07:00
Christopher Ferris
c1df57d60e am bce2357e: am c1be1ecc: am 011076b7: Merge "Support for jemalloc to replace dlmalloc."
* commit 'bce2357e42fdfb45556ec57ccb54d587e645f196':
  Support for jemalloc to replace dlmalloc.
2014-05-21 18:24:30 +00:00
Elliott Hughes
91b4613403 am 68396799: am c5f723ae: am c1b7f44c: Merge "Remove __syslog; we have the public klogctl API."
* commit '683967991425addf38a24024ae5503768a813b64':
  Remove __syslog; we have the public klogctl API.
2014-05-21 18:17:26 +00:00
Christopher Ferris
011076b720 Merge "Support for jemalloc to replace dlmalloc." 2014-05-21 18:12:50 +00:00
Elliott Hughes
3db501139b am c323b97c: am 87987df9: am daf69128: Merge "Fix x86_64 __set_tls.c build failure."
* commit 'c323b97c52297c4342dd45e329bad816f3bc5746':
  Fix x86_64 __set_tls.c build failure.
2014-05-21 18:10:23 +00:00
Elliott Hughes
c1b7f44c13 Merge "Remove __syslog; we have the public klogctl API." 2014-05-21 18:07:05 +00:00
Neil Fuller
a073b4ee0a am 55326c4b: am b7a23959: am 76805140: Merge "Treat zero or >1 dat files as an error"
* commit '55326c4b9714cba3e7bf0e27ceea0e2b91240d6f':
  Treat zero or >1 dat files as an error
2014-05-21 17:28:39 +00:00
Calin Juravle
ae0f8f1e48 Add padding to mips ucontext_t.
Bug: 12828904
Change-Id: I49e7adcebf769a9c30dc43def36501260369b1ac
2014-05-21 18:16:17 +01:00
Calin Juravle
eb454522da Clean up ucontext.h TODOs.
There's no need to expose gregset_t and fpregset_t when they
are not used in ucontext_t.

Bug: 12828904
Change-Id: Ieda1edf0ab18015f444c4d385fe9c41c4544017f
2014-05-21 18:15:35 +01:00
Elliott Hughes
7136927d39 Fix x86_64 __set_tls.c build failure.
Change-Id: I697b8ab4ce781d7aebeddb1391b63c653511bbcb
2014-05-21 10:02:00 -07:00
Neil Fuller
768051405e Merge "Treat zero or >1 dat files as an error" 2014-05-21 16:18:59 +00:00
Neil Fuller
43f3715953 Treat zero or >1 dat files as an error
Based on feedback from
I7efbd6f453fe2b3e71f564121ff0f64a74289d86

Change-Id: Ie131ab8475083350dc183d9f6d5ea7a0b0617c5b
2014-05-21 17:18:17 +01:00
Elliott Hughes
b8297bfdf6 am ee2939db: am ceed7b76: am 29f2906b: Merge "Add a few more symbols to check-symbols-glibc."
* commit 'ee2939dbf9d6574394249548e94a31575b4ada2d':
  Add a few more symbols to check-symbols-glibc.
2014-05-21 15:35:58 +00:00
Elliott Hughes
66af04b512 am a7293ddb: am 7a611f18: am 9f0a52e4: Merge "Hide __get_sp."
* commit 'a7293ddb8da94cc823ec28b851f69ef2d99a70d4':
  Hide __get_sp.
2014-05-21 15:31:13 +00:00
Elliott Hughes
802383df53 am f55dc413: am 0aa1fb1c: am 7471a370: Merge "Hide __set_tls."
* commit 'f55dc41303417904136902698191fd0f0fe3a061':
  Hide __set_tls.
2014-05-21 15:31:12 +00:00
Elliott Hughes
29f2906bda Merge "Add a few more symbols to check-symbols-glibc." 2014-05-21 15:23:35 +00:00
Elliott Hughes
9f0a52e4e5 Merge "Hide __get_sp." 2014-05-21 15:21:16 +00:00
Elliott Hughes
7471a37003 Merge "Hide __set_tls." 2014-05-21 15:21:01 +00:00
Neil Fuller
9e2595d7b6 am fa5903ed: am 3248b9d3: am 22784885: Merge "Change update-tzdata.py to update ICU data as well"
* commit 'fa5903edf32062d95a4a09f34571a640c1429eb6':
  Change update-tzdata.py to update ICU data as well
2014-05-21 11:17:01 +00:00
Neil Fuller
2278488546 Merge "Change update-tzdata.py to update ICU data as well" 2014-05-21 08:11:40 +00:00
Elliott Hughes
46a55a4478 Remove __syslog; we have the public klogctl API.
Bug: 11156955
Change-Id: I5c2cc02f39f76dd32984135f5c12c10bf2853796
2014-05-20 21:01:00 -07:00
Elliott Hughes
b497c43336 Add a few more symbols to check-symbols-glibc.
Bug: 11156955
Change-Id: Iee0bae6f9742eca188abc7a337371c50888a0ad6
2014-05-20 20:58:23 -07:00
Elliott Hughes
a75869f0b2 Hide __set_tls.
Bug: 11156955
Change-Id: If82c10ae412651361d09591017d1c3a411bd6f0b
2014-05-20 20:32:28 -07:00
Elliott Hughes
dc961faa95 am 58425608: am a9e2ffd8: am 20177b9f: Merge "Remove perf_event_open."
* commit '5842560845af94c2f15a1e7186c800e0f1e6224b':
  Remove perf_event_open.
2014-05-21 03:28:15 +00:00
Elliott Hughes
c3705f6415 Hide __get_sp.
Bug: 11156955
Change-Id: I55d8d320521e80c2085af28933a18b00cf5c714e
2014-05-20 20:22:50 -07:00
Elliott Hughes
4e631ba568 Remove perf_event_open.
This was accidentally added at a time when you couldn't add a constant
to <syscall.h> without generating an assembly stub! (You no longer need
to add the constants at all.)

Bug: 11156955
Change-Id: I053c17879138787976c744a5ecf7d30ee51dc48f
2014-05-20 16:24:55 -07:00
Christopher Ferris
72bbd42357 Support for jemalloc to replace dlmalloc.
To use jemalloc, add MALLOC_IMPL = jemalloc in a board config file
and you get the new version automatically.

Update the pthread_create_key tests since jemalloc uses a few keys.
Add a new test to verify memalign works as expected.

Bug: 981363

Change-Id: I16eb152b291a95bd2499e90492fc6b4bd7053836
2014-05-20 14:47:33 -07:00
Christopher Ferris
223069e0e1 am 1a5d6435: am 78f22ecb: am afb89c2a: Merge "denver: optimize memmove"
* commit '1a5d64357968393d03c66c564066add0d589b760':
  denver: optimize memmove
2014-05-20 20:18:04 +00:00
Dmitriy Ivanov
8151d09639 am 1350ed3d: am 5277e772: am 0a8f296e: Merge "Add RTLD_NOLOAD support and some related changes."
* commit '1350ed3d5252ed2beb8eb06564660c2cc97747f9':
  Add RTLD_NOLOAD support and some related changes.
2014-05-20 20:17:54 +00:00
Christopher Ferris
afb89c2a01 Merge "denver: optimize memmove" 2014-05-20 19:56:13 +00:00
Shu Zhang
6c80ccdeed denver: optimize memmove
Optimize 32-bit denver memmove with reversal memcpy.

Change-Id: Iaad0a9475248cdd7e4f50d58bea9db1b767abc88
2014-05-20 12:31:38 -07:00
Dmitriy Ivanov
0a8f296e09 Merge "Add RTLD_NOLOAD support and some related changes." 2014-05-20 19:11:09 +00:00
Dmitriy Ivanov
b648a8a57e Add RTLD_NOLOAD support and some related changes.
* Aligned RTLD_ values with glibc for lp64
 * dlopen supports RTLD_NOLOAD flag
 * soinfo_unload calls find_library(.., RTLD_NOLOAD)
   instead of naive find_loaded_library_by_name()
 * dlopen changed to add child to caller soinfo instead
   of somain.

Bug: https://code.google.com/p/android/issues/detail?id=64069
Change-Id: I1a65f2c34f3e0edc6d2c41a2e408b58195feb640
2014-05-20 12:02:24 -07:00
Elliott Hughes
7435e9e974 am 7bdf1e48: am da095f3c: am ce0e1b81: Merge "Add a script for finding symbols in bionic that aren\'t in glibc."
* commit '7bdf1e48ff8711f35163f95764bb1d467b205b96':
  Add a script for finding symbols in bionic that aren't in glibc.
2014-05-20 18:35:30 +00:00
Elliott Hughes
ce0e1b81cc Merge "Add a script for finding symbols in bionic that aren't in glibc." 2014-05-20 18:25:24 +00:00
Calin Juravle
077cbee5d1 am 995b9704: am bcd1a312: am b2b0f7e1: Merge "Add uc_regspace to arm\'s ucontext_t"
* commit '995b9704d8ba70d4d09ef0c3453d5f25ed099816':
  Add uc_regspace to arm's ucontext_t
2014-05-20 18:15:40 +00:00
Neil Fuller
246c688020 Change update-tzdata.py to update ICU data as well
The update-tzdata.py tool now uses downloaded Olson data
to update ICU (*new*) at the same time as it updates Bionic
data.

Change-Id: I7efbd6f453fe2b3e71f564121ff0f64a74289d86
2014-05-20 11:48:43 +01:00
Calin Juravle
b2b0f7e1ae Merge "Add uc_regspace to arm's ucontext_t" 2014-05-20 10:14:49 +00:00
Elliott Hughes
5a93e88c7f Add a script for finding symbols in bionic that aren't in glibc.
Bug: 11156955
Change-Id: I9772f054f6a92b842531df084dee0ea9c28806be
2014-05-19 18:01:07 -07:00
Dan Albert
4cc742e920 am 60bab8a7: am d8cc98ad: am 94a9ba2b: Merge "Removes RTTI support from libc"
* commit '60bab8a7ef30f72eb26a843afc3e0bdd02d3796d':
  Removes RTTI support from libc
2014-05-20 00:23:09 +00:00
Elliott Hughes
310ecf1ae9 am 348adca2: am be3db39e: am 948acf71: Merge "Switch back to OpenBSD inet_ntop now they\'re FORTIFY clean."
* commit '348adca20e68c42bdfbf594aaa675062d3595761':
  Switch back to OpenBSD inet_ntop now they're FORTIFY clean.
2014-05-20 00:23:09 +00:00
Sreeram Ramachandran
7c30167b3a am d70e0c88: am 54c83fee: am 9925c1a8: Merge "Mark sockets on creation (socket()) and accept4()."
* commit 'd70e0c884c19c08aa44c038dbf2f12a5b55c73fe':
  Mark sockets on creation (socket()) and accept4().
2014-05-20 00:23:03 +00:00
Dan Albert
94a9ba2b4a Merge "Removes RTTI support from libc" 2014-05-19 23:21:46 +00:00
Elliott Hughes
948acf710e Merge "Switch back to OpenBSD inet_ntop now they're FORTIFY clean." 2014-05-19 23:19:32 +00:00
Elliott Hughes
f51d3e8767 Switch back to OpenBSD inet_ntop now they're FORTIFY clean.
Change-Id: I04798a4966c352a8a12feebdff9646e3bad5933f
2014-05-19 15:55:29 -07:00
Sreeram Ramachandran
903b78873a Mark sockets on creation (socket()) and accept4().
Remove the separate syscall for accept() and implement it as accept4(..., 0).

Change-Id: Ib0b8f5d7c5013b91eae6bbc3847852eb355c7714
2014-05-19 15:19:16 -07:00
Paul Jensen
5240b562e7 Query libnetd_client for the appropriate netId for host resolution.
If libnetd_client can't be found, operate as before and use the default netId
potentially overriden by a more specific netId passed in to
android_get*fornet().

(cherry picked from commit 559c7842cc)

Change-Id: I42ef3293172651870fb46d2de22464c4f03e8e0b
2014-05-19 12:49:52 -07:00
Calin Juravle
0e85fb6121 Add uc_regspace to arm's ucontext_t
Bug: 12828904
Bug: 12875898
Change-Id: Ic5d532bd0ef58cad9e36a99fc2995c4b069121b2
2014-05-19 19:14:03 +01:00
Dan Albert
48ee47ce25 Removes RTTI support from libc
Our type_info stub implementation is incompatible with the libc++ headers. Since
we don't need this support internally and anyone that wants RTTI support will
have to use libc++ anyway, this can be safely removed.

Change-Id: Ied8b67a0d86a4eb0e31191a50cceba0e39a16a6d
2014-05-19 10:32:42 -07:00
Sreeram Ramachandran
57a2627575 Fix build breakage.
Change-Id: I1835198c64c28021b81f0c790f108685a3f456c7
2014-05-19 10:21:39 -07:00
Sreeram Ramachandran
7fe1063797 resolved conflicts for merge of e7329284 to master
Change-Id: Iaeb09451ed1a268a025ce3033ab018f28f954848
2014-05-19 09:57:54 -07:00
Paul Jensen
559c7842cc Query libnetd_client for the appropriate netId for host resolution.
If libnetd_client can't be found, operate as before and use the default netId
potentially overriden by a more specific netId passed in to
android_get*fornet().

Change-Id: I42ef3293172651870fb46d2de22464c4f03e8e0b
2014-05-19 11:23:12 +00:00
Sreeram Ramachandran
72c53933f8 Cosmetic changes to netd client files.
+ Name the dispatch header correctly (NetdClientDispatch.h).
+ Hide the global dispatch variable (__netdClientDispatch).
+ Explain why it's okay to read the variable without locking.
+ Use quotes instead of angle-brackets for non-system includes.
+ Add necessary declarations for C compiles (and not just C++).

Change-Id: Id0932165e71d81da5fce77a684f40c2263f58e61
2014-05-18 15:18:36 -07:00
Elliott Hughes
3810729e54 am 91a7e878: am 81e4ab45: am 8b9a22f3: Merge "Fix the newly-introduced warning and turn on -Werror."
* commit '91a7e878f22776c8b15fb1aceb4823718611fe12':
  Fix the newly-introduced warning and turn on -Werror.
2014-05-17 00:23:14 +00:00
Elliott Hughes
4c2da039ba Fix the newly-introduced warning and turn on -Werror.
I cleaned up most of our warnings last week but forgot to turn on -Werror,
so of course we're getting new warnings already. I've left -Werror commented
out in those places where we still have warnings to deal with before we can
turn on -Werror.

Change-Id: Ia58ff8b8c1ada4bf81eec6f19ec1d34e133cf4b1
2014-05-16 16:50:34 -07:00
Elliott Hughes
0f43d02843 am 19a54ce4: am 88a8e09b: am 5e6e3edb: Merge "Export get_malloc_leak_info and free_malloc_leak_info, used by ddms."
* commit '19a54ce4d446cdea01a7d50c2951481f3ed006bd':
  Export get_malloc_leak_info and free_malloc_leak_info, used by ddms.
2014-05-16 23:40:25 +00:00
Elliott Hughes
f4ad3d6dd7 am b95ce9b3: am 838c5c25: am a23ee2cf: Merge "Hide _exit_with_stack_teardown."
* commit 'b95ce9b3d7b94878cb1a42e19cf059ad4d1455e8':
  Hide _exit_with_stack_teardown.
2014-05-16 23:33:44 +00:00
Elliott Hughes
7c9923d05f Export get_malloc_leak_info and free_malloc_leak_info, used by ddms.
Bug: 11156955
Change-Id: I84043f7b2c0ea0e336f6e2af3b7adb2f8488bd53
2014-05-16 16:29:55 -07:00
Elliott Hughes
31d0398de6 Hide _exit_with_stack_teardown.
Bug: 11156955
Change-Id: Ida3020343c9975177dc324918cd1f10c455eb173
2014-05-16 16:17:44 -07:00
Elliott Hughes
7c8d98db59 am f8cb4542: am 30f89b6f: am aafa3d0e: Merge "Hide various debug malloc implementation details."
* commit 'f8cb45429b2cd4df8908f998fdc72b0fa235474a':
  Hide various debug malloc implementation details.
2014-05-16 23:15:33 +00:00
Elliott Hughes
aafa3d0e46 Merge "Hide various debug malloc implementation details." 2014-05-16 23:04:02 +00:00
Elliott Hughes
968aaf5d8d am fd5155e7: am 48ecb3a6: am 58b52fb1: Merge "Remove dead code."
* commit 'fd5155e7eb64563285831c774e112cf7513adb43':
  Remove dead code.
2014-05-16 23:00:35 +00:00
Elliott Hughes
3ac925850a am 45740160: am 67e34f30: am e2d5746a: Merge "Hide __signalfd4, used to implement signalfd(3)."
* commit '4574016027cce3132c6a348de8f0585348b4ffd5':
  Hide __signalfd4, used to implement signalfd(3).
2014-05-16 23:00:34 +00:00
Elliott Hughes
58b52fb133 Merge "Remove dead code." 2014-05-16 22:52:41 +00:00
Elliott Hughes
7222b1b594 Hide __signalfd4, used to implement signalfd(3).
Bug: 11156955
Change-Id: I50842279cb5b32ec8bd45193435574e415cd806e
2014-05-16 15:47:29 -07:00
Elliott Hughes
6b7987cca3 Hide various debug malloc implementation details.
Bug: 11156955
Change-Id: Ib9d69d49ecec8eff4f12392bde94d843ae53d442
2014-05-16 15:23:54 -07:00
Elliott Hughes
bd27a8b4af Remove dead code.
This doesn't exist upstream.

Really we should upgrade to the current arc4random, but that's a bigger
job for another day.

Bug: 11156955
Change-Id: If6cd41b79139c64c17e81999e246cf4f00882ce8
2014-05-16 14:43:00 -07:00
Elliott Hughes
971f66e469 am 1453b3df: am 7177d1d6: am d9b06298: Merge "Hide __futex_wake_ex and __futex_wait_ex."
* commit '1453b3df559609252633e40d677aadaf5dd70309':
  Hide __futex_wake_ex and __futex_wait_ex.
2014-05-16 20:07:34 +00:00
Elliott Hughes
3973de9616 Hide __futex_wake_ex and __futex_wait_ex.
Also remove some cruft that isn't needed now we're using uapi headers.

Bug: 11156955
Change-Id: I936b9c5b01d8bd6bfb2e5bc0e3f86cd86739cc04
2014-05-16 12:53:31 -07:00
Elliott Hughes
a0accd85c9 am 0178eba2: am 9700b6ca: am 22ade3c3: Merge "With libstdc++ in libc, __futex_wait and __futex_wake can be hidden."
* commit '0178eba213dfec500e71cd9889ece5af2f7de4cb':
  With libstdc++ in libc, __futex_wait and __futex_wake can be hidden.
2014-05-16 18:10:33 +00:00
Elliott Hughes
22ade3c30d Merge "With libstdc++ in libc, __futex_wait and __futex_wake can be hidden." 2014-05-16 18:00:51 +00:00
Elliott Hughes
879180c3ac With libstdc++ in libc, __futex_wait and __futex_wake can be hidden.
This patch is conservative and just touches LP64. (But not because we
know of anyone using this in LP32.)

Bug: 13367666
Change-Id: Id45652debc4534584479b16b501401f6f23acea9
2014-05-16 10:58:59 -07:00
Elliott Hughes
ae04d58b96 am 505de840: am 80cff53e: am 2a602272: Merge "Move libstdc++ into libc."
* commit '505de840a225be10947f6aa25b25e8e623e670e5':
  Move libstdc++ into libc.
2014-05-16 17:40:55 +00:00
Elliott Hughes
2a60227223 Merge "Move libstdc++ into libc." 2014-05-16 16:37:20 +00:00
Christopher Ferris
02aabff12e am c98359cc: am 0d9c78af: am 5265ad62: Merge "Fix comment typo."
* commit 'c98359cc6bffdffe03067740a0ad691cc16d83fa':
  Fix comment typo.
2014-05-16 02:21:53 +00:00
Christopher Ferris
5265ad6273 Merge "Fix comment typo." 2014-05-16 02:14:07 +00:00
Christopher Ferris
9029d2f638 Fix comment typo.
Change-Id: I1909f724826b531daf14fec4853e40d578fc0f59
2014-05-15 19:11:58 -07:00
Dmitriy Ivanov
6a0f7d6187 am a161eea2: am 7f3d6b69: am 0a5b0166: Merge "Register _cleanup function with atexit"
* commit 'a161eea241da06c70995248df7a00b6553050e05':
  Register _cleanup function with atexit
2014-05-16 00:43:54 +00:00
Dmitriy Ivanov
0a5b016623 Merge "Register _cleanup function with atexit" 2014-05-16 00:37:54 +00:00
Elliott Hughes
c571c26820 am 9eb2d38d: am b9fdad77: am ec81b4a3: Merge "Scrub uapi headers slightly harder."
* commit '9eb2d38d53b2d00a9b5bd189a34f51afb7c385bf':
  Scrub uapi headers slightly harder.
2014-05-15 23:12:23 +00:00
Dmitriy Ivanov
623b0d05bd Register _cleanup function with atexit
* Register cleanup function with atexit
   instead of calling it explicitly on
   exit()
 * abort() no longer calls _cleanup:
   Flushing stdio buffers on abort is no
   longer required by POSIX.
 * dlmalloc no longer need to reset cleanup
   (see above)
 * Upstream findfp.c makebuf.c setvbuf.cexit.c
   to openbsd versions.

Bug: 14415367
Change-Id: I277058852485a9d3dbb13e5c232db5f9948d78ac
2014-05-15 13:05:21 -07:00
Elliott Hughes
8ed7a23309 Scrub uapi headers slightly harder.
There's no point having always-false tests. It just makes the headers
harder to read.

Bug: 11560081
Change-Id: I6187755e1514ca9ff5642b3c1b0489f22edddaf5
2014-05-15 12:01:11 -07:00
Calin Juravle
bfcc82b3c0 am 4c9eab72: am 83c94c6d: am 98efae4c: Merge "Fill in missing bits in x86(_64) ucontext_t"
* commit '4c9eab723481df5921296c2dba2dbdd8a81b1395':
  Fill in missing bits in x86(_64) ucontext_t
2014-05-15 10:34:37 +00:00
Calin Juravle
a6ab968ca0 Fill in missing bits in x86(_64) ucontext_t
Bug: 12828904
Bug: 12875898
Change-Id: I0ec0dfe16af80bfb3153f3c3b1b3d180eff30f39
2014-05-15 10:34:06 +01:00
Andrew Hsieh
61c88b5648 am 5d76a6c2: am c67e917a: am d0a89921: Merge "Rename user_i387_struct -> user_fpregs_struct in sys/ucontext.h"
* commit '5d76a6c26e47cbd1b9c98b0151dda1677db32af6':
  Rename  user_i387_struct -> user_fpregs_struct in sys/ucontext.h
2014-05-15 01:59:52 +00:00
Elliott Hughes
15b641a267 Move libstdc++ into libc.
The Android build system always links against libstdc++.so anyway. Having
operator new and operator delete in a separate library means we can't use
constructors and destructors on heap-allocated objects inside the C library,
which is quite an unfortunate limitation.

This will be cheaper too; on LP64 we can stop linking against the [now empty]
libstdc++.so giving the dynamic linker one less library to worry about for
every process.

There's precedent too --- we already have no libpthread or librt.

For now I'm leaving the include files where they are, and I'm generating a
dummy libstdc++.so and libstdc++.a. We can come back and clean that up later
if all goes well.

Bug: 13367666
Change-Id: I6f3e27ea7c30d03d6394965d0400c9dc87fa83db
2014-05-14 18:18:55 -07:00
Christopher Ferris
4903b31733 am 70240fda: am 493cfc33: am 1596b884: Merge "Increase minimum thread size for 64 bit."
* commit '70240fda03d5a375b6bb4e25dd50d1e7803a140e':
  Increase minimum thread size for 64 bit.
2014-05-15 01:13:50 +00:00
Andrew Hsieh
9b5b40b4df Rename user_i387_struct -> user_fpregs_struct in sys/ucontext.h
See 93e1907ae1

Change-Id: Icb207f4e17cfffdd6d37500656434adf1cc34427
2014-05-15 09:11:11 +08:00
Christopher Ferris
1596b88464 Merge "Increase minimum thread size for 64 bit." 2014-05-15 01:06:25 +00:00
Christopher Ferris
ea5248ee1b Increase minimum thread size for 64 bit.
Bug: 14468519
Change-Id: I642a5515acf5fbed46e77e176f6b5dd3b7c7bd45
2014-05-14 18:02:11 -07:00
Elliott Hughes
71db4f6571 am e05c4ebb: am 4cbb778b: am f280130f: Merge "Remove the unused __system_property_wait."
* commit 'e05c4ebb651dc73ba86ae45242707c285847df2b':
  Remove the unused __system_property_wait.
2014-05-15 00:30:41 +00:00
Christopher Ferris
0799b77011 am d849068a: am cd5b7920: am bc7f8a79: Merge "Do not keep struct state on the stack."
* commit 'd849068a35040083ef56cfe457011bbf3a0d305c':
  Do not keep struct state on the stack.
2014-05-15 00:12:30 +00:00
Elliott Hughes
3e786987b5 Remove the unused __system_property_wait.
This isn't declared in any header file.

Bug: 14970171
Change-Id: Ib9fce61343dfb6b6ccd7e1430e1a6e34e4e869df
2014-05-14 17:02:09 -07:00
Christopher Ferris
8a8b0c9bfc Do not keep struct state on the stack.
This structure is huge (~18000 bytes on arm64) and can blow out
the stack very easily.
Modify the code to allocate these structures instead of leaving them
on the stack.

Bug: 14468519
Change-Id: I774f71235d896d32a14ab1af06f95ca9ef819f52
2014-05-14 16:50:41 -07:00
Elliott Hughes
f693d2916b am c6057a5f: am d60d67db: am aeec2ae7: Merge "Remove the broken pthread deadlock prediction."
* commit 'c6057a5f618cca842432c3a28af1a9293b551aff':
  Remove the broken pthread deadlock prediction.
2014-05-14 19:54:24 +00:00
Sreeram Ramachandran
49ec2a0cdc Merge "Mark sockets on accept()." 2014-05-14 19:40:50 +00:00
Elliott Hughes
07f1ded139 Remove the broken pthread deadlock prediction.
This hasn't built in over one release cycle and no one even noticed.
art does this the right way and other projects should do the same.

Change-Id: I7d1fb84c4080e008f329ee73e209ce85a36e6d55
2014-05-14 11:38:22 -07:00
Sreeram Ramachandran
8f0cd8aa22 Mark sockets on accept().
(cherry picked from commit 58b1f3f6a30a660ad81637c2b50382c3d279243b)

Change-Id: I5d09be413cf720fbed905f96313b007997ada76c
2014-05-14 11:10:22 -07:00
Elliott Hughes
a0d2534ef4 am b270fd33: am 7451897c: am e6c27a7a: Merge "Fix a typo in the big g_ search/replace."
* commit 'b270fd332922b365091f835b1b61ed221a87f102':
  Fix a typo in the big g_ search/replace.
2014-05-14 18:09:56 +00:00
Elliott Hughes
cd46104cf8 Fix a typo in the big g_ search/replace.
Change-Id: I79261de70d225236d0eadff288220258d697437f
2014-05-14 10:58:58 -07:00
Elliott Hughes
73a3760ea8 am b2da973f: am 6eb0fe2b: am 15c13bd6: Merge "Switch to g_ for globals."
* commit 'b2da973fe9e7a1c9e774433eeae86c517321ebdc':
  Switch to g_ for globals.
2014-05-14 17:50:17 +00:00
Elliott Hughes
1728b23965 Switch to g_ for globals.
That's what the Google style guide recommends, and we're starting
to get a mix.

Change-Id: Ib0c53a890bb5deed5c679e887541a715faea91fc
2014-05-14 10:02:03 -07:00
Ross McIlroy
4586f8d3ae am 582cf711: am bc45edaa: am bac79558: Merge "Fix x86_64 user_fpregs_struct to use the same name for the tag word as glibc."
* commit '582cf711309138e4e7e0c46696491028c823834d':
  Fix x86_64 user_fpregs_struct to use the same name for the tag word as glibc.
2014-05-14 14:40:05 +00:00
Ross McIlroy
bac795586b Merge "Fix x86_64 user_fpregs_struct to use the same name for the tag word as glibc." 2014-05-14 14:27:41 +00:00
Ross McIlroy
0c8a5f82e6 Fix x86_64 user_fpregs_struct to use the same name for the tag word as glibc.
Glibc calls the tag pointer in user_fpregs_struct ftw instead of twd.

Change-Id: I4a8dab777fa889de0b9927035cd18557ae6f3263
2014-05-14 13:29:19 +01:00
Sreeram Ramachandran
dedf2922d5 Mark sockets on accept().
Conflicts:
	libc/SYSCALLS.TXT

Change-Id: I5d09be413cf720fbed905f96313b007997ada76c
2014-05-14 04:26:51 -07:00
Paul Jensen
41d9a50371 Add support for deleting per-network DNS resolver caches.
This is required when the possible range of NetIds is large to
prevent netd consuming excessive amounts of memory.
This required replacing the per-cache locks in favor of a single
global lock to prevent accesses to deleted caches.

Change-Id: I99d058bafea5de743e56075dbed74031da4df63f
2014-05-14 04:16:18 -07:00
Calin Juravle
7fbc7481cc am 32cd82f0: am 7c0b313d: am a7318774: Merge "Change wctype_t from int to long."
* commit '32cd82f093184fc3b6b43171f16ed5d74ca02795':
  Change wctype_t from int to long.
2014-05-14 10:47:04 +00:00
Calin Juravle
9d60edbcfe am c16e4332: am d36bbf13: am fd3171b4: Merge "Change wctype_t from enum to int"
* commit 'c16e4332e42ff152c06963c398e9195576d6aae4':
  Change wctype_t from enum to int
2014-05-14 10:47:04 +00:00
Calin Juravle
a731877406 Merge "Change wctype_t from int to long." 2014-05-14 10:33:46 +00:00
Calin Juravle
fd3171b465 Merge "Change wctype_t from enum to int" 2014-05-14 10:33:35 +00:00
Elliott Hughes
8e168d2a01 am 28c9e21f: am 2146f78c: am 3e684183: Merge "Use the NetBSD inet_ntop until the OpenBSD bug is fixed."
* commit '28c9e21fe7bfadf0af5d183d6bcad5bf638de91b':
  Use the NetBSD inet_ntop until the OpenBSD bug is fixed.
2014-05-14 02:33:31 +00:00
Elliott Hughes
5c8c88dd8d Use the NetBSD inet_ntop until the OpenBSD bug is fixed.
Stupidly I found this bug by accident when writing the existing
tests, but I didn't think any real code would hit it. It turns
out that libcore always uses an INET6_ADDRSTRLEN-sized buffer
even when working with AF_INET addresses.

Change-Id: Ieffc8e4bbe9b66b49b033e3e7101c896e097e6f8
2014-05-13 19:17:46 -07:00
Elliott Hughes
d8e8909f95 am 46afef32: am 9b1e2a14: am 3557f2f6: Merge "Fix <sys/endian.h> uint32_t build failures."
* commit '46afef329fee8de35d092e3f1e635d11d6f6e91d':
  Fix <sys/endian.h> uint32_t build failures.
2014-05-14 01:56:31 +00:00
Elliott Hughes
135b103fd9 Fix <sys/endian.h> uint32_t build failures.
Change-Id: I833b51318f0bf7749073859b7ffacc668c27558e
2014-05-13 18:42:12 -07:00
Elliott Hughes
aa8e269d29 am 239347d9: am cb6f6243: am 17f8ef87: Merge "Flesh out <arpa/inet.h>."
* commit '239347d97effbd711f07da75def7620a1557988b':
  Flesh out <arpa/inet.h>.
2014-05-14 01:21:59 +00:00
Elliott Hughes
6033068d17 am 62c24c83: am f984afd0: am 57722375: Merge "We don\'t need two copies of <nsswitch.h>."
* commit '62c24c83538258fa2cd7e31d9b616bbb32d6398f':
  We don't need two copies of <nsswitch.h>.
2014-05-14 01:21:58 +00:00
Elliott Hughes
17f8ef87b5 Merge "Flesh out <arpa/inet.h>." 2014-05-14 01:09:01 +00:00
Elliott Hughes
6a41b0fb0e Flesh out <arpa/inet.h>.
Use the upstream OpenBSD implementations of these functions.

Also ensure we have symbols for htonl, htons, ntohl, and ntohs.
gtest doesn't like us using the macro versions in ASSERT_EQ.

Bug: 14840760
Change-Id: I68720e9aca14838df457d2bb27b999d5818ac2b5
2014-05-13 18:08:29 -07:00
Elliott Hughes
5772237588 Merge "We don't need two copies of <nsswitch.h>." 2014-05-14 01:06:11 +00:00
Elliott Hughes
eed3d0d1f3 We don't need two copies of <nsswitch.h>.
Change-Id: I3f874326d96f41249f5c9b1b3c2885f858589029
2014-05-13 18:05:29 -07:00
Sreeram Ramachandran
47b93faa48 Fix build (take two).
Make sure __netdClientDispatch is defined in the same set of libraries that
refer to it (e.g.: with connect.cpp).

(cherry picked from commit 8205a61248)

Change-Id: I86d7bf2df5bde09f75a35b204eac0e1361747e22
2014-05-13 17:48:52 -07:00
Sreeram Ramachandran
8205a61248 Fix build (take two).
Make sure __netdClientDispatch is defined in the same set of libraries that
refer to it (e.g.: with connect.cpp).

Change-Id: I86d7bf2df5bde09f75a35b204eac0e1361747e22
2014-05-13 17:24:03 -07:00
Sreeram Ramachandran
2677d133dd Fix build.
(cherry picked from commit 06e8796ee9)

Change-Id: I33293d8bc62cbb22e23a704c4242e7e9d3fce7c5
2014-05-13 16:59:38 -07:00
Sreeram Ramachandran
06e8796ee9 Fix build.
Change-Id: I33293d8bc62cbb22e23a704c4242e7e9d3fce7c5
2014-05-13 16:30:12 -07:00
Sreeram Ramachandran
20f8da95c0 am af36c9ae: am 9b5bc6fd: am 79b56f4b: Merge "Introduce netd_client, a dynamic library that talks to netd."
* commit 'af36c9ae139b08109fa9ffad923b542e3a64f612':
  Introduce netd_client, a dynamic library that talks to netd.
2014-05-13 22:20:38 +00:00
Elliott Hughes
05ba476c11 am 5c0fe1a3: am b00435d1: am 0ccef7ec: Merge "Upgrade to tzdata2014c."
* commit '5c0fe1a39d35886e30792f3b6023bc9799e5ebc2':
  Upgrade to tzdata2014c.
2014-05-13 18:42:26 +00:00
Sreeram Ramachandran
ceb5bd787c Introduce netd_client, a dynamic library that talks to netd.
The library exists outside bionic. It is dynamically loaded, to replace selected
standard socket syscalls with versions that talk to netd.

Change connect() to use the library if available.

(cherry picked from commit 3a6b627a14df8111b03e452f2df4b5f4938e0e49)

Change-Id: Ib6198e19dbc306521a26fcecfdf6e8424d163fc9
2014-05-13 11:30:03 -07:00
Elliott Hughes
a8e0f0e633 am 1d8130e8: am 56b18bb4: am a26dd781: Merge "Add getmntent_r to our collection of <mntent.h> compatibility stubs."
* commit '1d8130e8b30e25ad8e3e33bbd0d08f8e44f73a35':
  Add getmntent_r to our collection of <mntent.h> compatibility stubs.
2014-05-13 18:27:32 +00:00
Elliott Hughes
121cb5f4a7 Upgrade to tzdata2014c.
From the release notes:

  Changes affecting near-future time stamps

    Egypt observes DST starting 2014-05-15 at 24:00.
    (Thanks to Ahmad El-Dardiry and Gunther Vermier.)
    Details have not been announced, except that DST will not be
    observed during Ramadan.  Guess that DST will stop during the same
    Ramadan dates as Morocco, and that Egypt's future spring and fall
    transitions will be the same as 2010 when it last observed DST,
    namely April's last Friday at 00:00 to September's last Thursday at
    23:00 standard time.  Also, guess that Ramadan transitions will be
    at 00:00 standard time.

Change-Id: I6a20cae02a314871acbd52cb90fcbebd37625810
2014-05-13 11:23:18 -07:00
Elliott Hughes
280bd7a9f4 am 2fbb0fb7: am 2b5503b5: am dbcba8f5: Merge "Reduce stack usage of tmpfile(3)."
* commit '2fbb0fb751b985c6f8a6fa556cf5fe51c88e6645':
  Reduce stack usage of tmpfile(3).
2014-05-13 17:49:29 +00:00
Elliott Hughes
eb664e24c0 Add getmntent_r to our collection of <mntent.h> compatibility stubs.
This helps build 'external/flo' out of the box.

Bug: 14841211
Change-Id: I30dde77239cceaf1f5743163744eb3604d27a266
2014-05-13 10:44:07 -07:00
Elliott Hughes
dbcba8f5f9 Merge "Reduce stack usage of tmpfile(3)." 2014-05-13 17:32:48 +00:00
Calin Juravle
1b530a9f80 am 493f718d: am 66faa0c2: am f34f0ccb: Merge "Use __LP64__ instead of __LP32__ in sched.h"
* commit '493f718d87722615b2657dc6a0254dc3c3714a16':
  Use __LP64__ instead of __LP32__ in sched.h
2014-05-13 17:29:56 +00:00
Calin Juravle
f34f0ccb0e Merge "Use __LP64__ instead of __LP32__ in sched.h" 2014-05-13 17:16:30 +00:00
Elliott Hughes
b6943186ce Reduce stack usage of tmpfile(3).
Also ensure that none of our home-grown code uses more than 2KiB per frame.

Change-Id: I8987a17d72f4b7f082bb7fa25e137c8433664c14
2014-05-13 10:14:22 -07:00
Calin Juravle
dd09699fae Use __LP64__ instead of __LP32__ in sched.h
Gcc defines only __LP64__ so testing __LP32__ will always be false.

Bug: 14881256
Change-Id: Ic63c1d562be09c3eb4b9e17c9e5ef2d9e404db80
2014-05-13 16:07:28 +01:00
Calin Juravle
b55f2631dc Change wctype_t from int to long.
On LP64 this brings us on par with the other libcs where wctype_t is 8
bytes.

Bug: 12875898
Change-Id: Ice4f538ccf0634ef6667a8d90d0f7f09cec9e1b0
2014-05-13 13:11:27 +01:00
Calin Juravle
0c472479a2 Change wctype_t from enum to int
This increases bionic source compatibility with other libcs where
"wctype_t foo = 0;" is valid without -fpermissive.

Bug: 14646243
Change-Id: Ia9bd0785bc42c7b46e2bb6c3d9b9a9d3f769d983
2014-05-13 12:47:27 +01:00
Calin Juravle
3b0d098df1 am d0c625f5: am d9f0e8f2: am ddda264f: Merge "Undef private *_BODY defines after use"
* commit 'd0c625f5de63e659e524710fe49ae1061d585dc6':
  Undef private *_BODY defines after use
2014-05-13 10:41:10 +00:00
Calin Juravle
f963da22ec Undef private *_BODY defines after use
Bug: 14865741
Change-Id: I1398f7b3f64e3c94f2714cede5b61205dfa78a24
2014-05-13 11:01:11 +01:00
Calin Juravle
e1a15335be am df45321d: am e0913cd4: am e788f5e0: Merge "Support mb sequences across calls to mb*to*wcs* functions"
* commit 'df45321da1b41ee3fb6c2a5504f6e84ea3599361':
  Support mb sequences across calls to mb*to*wcs* functions
2014-05-13 09:49:39 +00:00
Calin Juravle
e788f5e04b Merge "Support mb sequences across calls to mb*to*wcs* functions" 2014-05-13 09:36:01 +00:00
Christopher Ferris
823074c5e4 am 66d0e685: am 199e830a: am 1abb1b93: Merge "Add 64-bit Silvermont-optimized string/memory functions."
* commit '66d0e685145a400b08f5e4ec6bbc61ed8185cd39':
  Add 64-bit Silvermont-optimized string/memory functions.
2014-05-13 00:59:29 +00:00
Christopher Ferris
64010b8f7e am 19e15c5b: am 5a3303da: am c1d26965: Merge "Add 32-bit Silvermont-optimized string/memory functions."
* commit '19e15c5bf6eecf2baa5bf8dd50fcf028477991bf':
  Add 32-bit Silvermont-optimized string/memory functions.
2014-05-13 00:38:59 +00:00
Varvara Rainchik
a020a244ae Add 64-bit Silvermont-optimized string/memory functions.
Add following functions:
bcopy, bzero, memcpy, memmove, memset, stpcpy, stpncpy, strcat, strcpy,
strlen, strncat, strncpy, memcmp, strcmp, strncmp.
Set all these functions as the default ones.

Change-Id: Ic66b250ad8c349a43d25e2d4dea075604f6df6ac
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
2014-05-12 17:37:07 -07:00
Elliott Hughes
3ff9c0246c am 5a19b361: am 0b1a2ee7: am 8b307e0e: Merge "Remove the useless indirection in mips\' __set_tls."
* commit '5a19b361684283e51e00d532af231f5e9e4a9456':
  Remove the useless indirection in mips' __set_tls.
2014-05-13 00:33:52 +00:00
Christopher Ferris
c1d26965ae Merge "Add 32-bit Silvermont-optimized string/memory functions." 2014-05-13 00:26:50 +00:00
Calin Juravle
15a6310e4b Support mb sequences across calls to mb*to*wcs* functions
Bug: 13077905
Change-Id: I5abdc7cc3c27c109b7900c94b112f18a95c35763
2014-05-13 00:24:25 +01:00
Elliott Hughes
8b307e0e98 Merge "Remove the useless indirection in mips' __set_tls." 2014-05-12 23:14:51 +00:00
Elliott Hughes
dcbef06ce6 Remove the useless indirection in mips' __set_tls.
Change-Id: I12e9d6716c42ccbccc9a186441aca0736bb22d05
2014-05-12 16:11:06 -07:00
Varvara Rainchik
5a92284167 Add 32-bit Silvermont-optimized string/memory functions.
Add following functions:
bcopy, memcpy, memmove, memset, bzero, memcmp, wmemcmp, strlen,
strcpy, strncpy, stpcpy, stpncpy.
Create new directories inside arch-x86 to specify architecture: atom,
silvermont and generic (non atom or silvermont architectures are treated like generic).
Due to introducing optimized versions of stpcpy and stpncpy,
c-implementations of these functions are moved from
common for architectures makefile to arm and mips specific makefiles.

Change-Id: I990f8061c3e9bca1f154119303da9e781c5d086e
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
2014-05-12 13:56:59 -07:00
Calin Juravle
3c831506cf am 26fbede0: am e032a18c: am d67c6af2: Merge "Reserve space for the future in statvfs(64)"
* commit '26fbede03e32a679836ac0b4fabe7be0d9458759':
  Reserve space for the future in statvfs(64)
2014-05-12 10:11:57 +00:00
Calin Juravle
324f9e22ef am fc7cc469: am 60e11324: am 4d695bf5: Merge "Align struct passwd definition with other variations of libc"
* commit 'fc7cc469d320b8bb66dd40d93692cd159040a04f':
  Align struct passwd definition with other variations of libc
2014-05-12 10:07:24 +00:00
Calin Juravle
d67c6af2f6 Merge "Reserve space for the future in statvfs(64)" 2014-05-12 09:59:57 +00:00
Calin Juravle
7bec1212c7 Reserve space for the future in statvfs(64)
The kernel struct has some spare space at the end too, and some extra
fields, so having a bit of flexibility in statvfs might be worthwhile.

Bug: 14681331
Bug: 12875898
Change-Id: I5b502c5dd9d2e3bb8f34804f83c02669cefce01e
2014-05-12 10:56:39 +01:00
Calin Juravle
4d695bf560 Merge "Align struct passwd definition with other variations of libc" 2014-05-12 09:53:41 +00:00
Elliott Hughes
d35f1b508e am 5ce362b4: am cf113ab9: am 4b57305a: Merge "Bring in google3-style DISALLOW_* macros."
* commit '5ce362b4c5a942beea8dc90542f00d19b3b49845':
  Bring in google3-style DISALLOW_* macros.
2014-05-10 03:46:15 +00:00
Elliott Hughes
8eac9af24e Bring in google3-style DISALLOW_* macros.
I've been meaning to do this for a very long time...

Change-Id: Ia8c16eee7c026c3c9505399948485fb778fb0152
2014-05-09 19:12:08 -07:00
Elliott Hughes
4e499eb7bf am f05495fd: am c66df5e9: am b2c3c803: Merge "Align the child stack in clone(2)."
* commit 'f05495fdab6a73575560190ae88cc0f2ba0a5a74':
  Align the child stack in clone(2).
2014-05-10 00:51:17 +00:00
Elliott Hughes
0d236aa3f1 Align the child stack in clone(2).
Also let clone(2) set the TLS for x86.

Also ensure we initialize the TLS before we clone(2) for all architectures.

Change-Id: Ie5fa4466e1c9ee116a281dfedef574c5ba60c0b5
2014-05-09 17:06:51 -07:00
Elliott Hughes
656e405f8b am 1bca28eb: am 0db4c690: am 8fa5c252: Merge "Align arm64 stacks to 16 bytes in __bionic_clone."
* commit '1bca28eb0d75763ba1813bed65b68f913dc6d79e':
  Align arm64 stacks to 16 bytes in __bionic_clone.
2014-05-09 21:54:56 +00:00
Christopher Ferris
e58f9950ae am 262700ac: am aabcf287: am b222097d: Merge "Use larger neon instructions for moving data."
* commit '262700ac96e4cdb299f542e7e7723b980dd2244f':
  Use larger neon instructions for moving data.
2014-05-09 21:54:55 +00:00
Calin Juravle
c768874c66 Align struct passwd definition with other variations of libc
Add pg_gecos ("real name") field to struct passwd.

Bug: 14679430
Bug: 12875898
Change-Id: I833ec2c46f6a6259b7232a8e3f7942968ef0b50d
2014-05-09 22:29:23 +01:00
Elliott Hughes
8fa5c2528c Merge "Align arm64 stacks to 16 bytes in __bionic_clone." 2014-05-09 21:28:05 +00:00
Elliott Hughes
fff3c0fdcf Align arm64 stacks to 16 bytes in __bionic_clone.
Also ensure that arm64/x86-64/x86 assembler uses local labels.
(There are are so many non-local labels in arm that fixing them
seems out of scope.)

Also synchronize the __bionic_clone.S comments.

Change-Id: I03b4f84780d996b54d6637a074638196bbb01cd4
2014-05-09 12:16:20 -07:00
Christopher Ferris
2146d142b2 Use larger neon instructions for moving data.
Included is a new target generic-neon that will use neon instructions
on 64 bit platforms where appropriate.

Change-Id: Iaf71b768780aa9240a24539cd87666ca9298e4c6
2014-05-09 11:29:37 -07:00
Elliott Hughes
137945c0d5 am 5f98c5a5: am df3aa079: am 55b4c8a4: Merge "Hide the __bionic_clone and __bionic_clone_entry implementation details."
* commit '5f98c5a54a63be80c59bcdf0d278c3e37cf9b325':
  Hide the __bionic_clone and __bionic_clone_entry implementation details.
2014-05-09 16:26:26 +00:00
Elliott Hughes
954cf0d4e2 Hide the __bionic_clone and __bionic_clone_entry implementation details.
clone(2) is the public symbol.

Also switch a test from __bionic_clone to clone; testing public API
means the test now works on glibc too.

Change-Id: If59def26a00c3afadb8a6cf9442094c35a59ffde
2014-05-08 19:00:23 -07:00
Elliott Hughes
b91610c95a am 8eed5d8b: am fae100f9: am a3ce6bdb: Merge "Fix LOG_ID_CRASH build failure."
* commit '8eed5d8bca6a3a2810bce17c2316ad44a3daa191':
  Fix LOG_ID_CRASH build failure.
2014-05-08 18:31:14 +00:00
Elliott Hughes
19d97abe9b am 64b53953: am 96fd4159: am 1ee18d0e: Merge "Send bionic\'s fatal logging to the crash log."
* commit '64b539533dc3a6ca21c680003d60fe1fcdd6fbdb':
  Send bionic's fatal logging to the crash log.
2014-05-08 18:31:12 +00:00
Elliott Hughes
ae0a62b014 Fix LOG_ID_CRASH build failure.
Change-Id: I66517e30c568d7f36f6bf6b1e4507ecf14f01226
2014-05-07 17:12:40 -07:00
Elliott Hughes
011101905d Send bionic's fatal logging to the crash log.
Bug: 14159417
Change-Id: I7aa986fb8e11660035221f9bb4fe0bc40ac36c58
2014-05-07 16:35:59 -07:00
Elliott Hughes
66d8ed603b am 62fcc2f6: am b40f4243: am 8ec38997: Merge "Give bionic\'s __ANDROID_API__ a more reasonable value."
* commit '62fcc2f6f012e7c66e61e564c3592f466a2be188':
  Give bionic's __ANDROID_API__ a more reasonable value.
2014-05-07 22:35:24 +00:00
Calin Juravle
9b6b11b0f9 am 71ee6889: am ed4e01f7: am e292875c: Merge "Reserve some space in sem_t for the future."
* commit '71ee6889457eb238c6a1bcbba5ecf0587f8b71c8':
  Reserve some space in sem_t for the future.
2014-05-07 22:35:22 +00:00
Calin Juravle
7fbe52b9af am 478a1b57: am c2787015: am b6c48b20: Merge "Allow for better utmp logging."
* commit '478a1b57bd44220373cedc72813ae7a9e26f328a':
  Allow for better utmp logging.
2014-05-07 22:35:21 +00:00
Calin Juravle
c5413a55e1 am 2b180ea8: am b742e82e: am fc2af0ca: Merge "Fix ino_t and suseconds_t"
* commit '2b180ea80c79db5887c03e7d6cf2b40e7036f8e0':
  Fix ino_t and suseconds_t
2014-05-07 22:35:20 +00:00
Calin Juravle
363eb3de3a am 2b4313a2: am adf5e63a: am 764a8882: Merge "Leave more space for extensions in pthread_rwlockattr_t"
* commit '2b4313a2737a9df2c0ce2e05077980ce638643c3':
  Leave more space for extensions in pthread_rwlockattr_t
2014-05-07 22:35:19 +00:00
Elliott Hughes
c47ec798bc am 5d73936f: am 1ecf7633: am 6ad9cd41: Merge "Change the interface for fatal logging."
* commit '5d73936fabd2cdcb336ec7c84d52e91a7d5e76de':
  Change the interface for fatal logging.
2014-05-07 22:35:19 +00:00