Commit Graph

4953 Commits

Author SHA1 Message Date
Elliott Hughes
c03e1e7439 Define PTHREAD_KEYS_MAX and _POSIX_THREAD_KEYS_MAX in a POSIX-compliant way.
Also make sysconf use PTHREAD_STACK_MIN rather than redefining its
own, different, constant.

Bug: 9997352
Change-Id: I9a8e7d2b18e691439abfb45533e82c36eee9e81d
2013-07-29 17:09:36 -07:00
synergydev
efddf44c8e libgcc_compat: Introduce __aeabi_lasr for cortex-a9 and higher
This is needed when passing -mcpu=cortex-a9 or higher on a modern
toolchain for prebuilt library compatibility

Change-Id: I73eb2393377914ae26216a8c2828ad973d1c1225
2013-07-29 16:55:08 -07:00
Elliott Hughes
9a73d08f4c Merge "Bump the number of TLS slots to 128." 2013-07-25 21:51:05 +00:00
Elliott Hughes
838f01fdc7 Bump the number of TLS slots to 128.
Bug: 9997352
Change-Id: I7bde7228d803e9d4bb83309c5891d54a07e3b025
2013-07-25 14:14:22 -07:00
Elliott Hughes
a9feb5e33a Merge "Avoid sign extension of the mmap offset." 2013-07-25 17:28:59 +00:00
Elliott Hughes
e320a8c780 Avoid sign extension of the mmap offset.
off_t is signed to support seeking backwards, but that's a liability
when using off_t to represent a subset of a file.

Change-Id: I2a3615166eb16212347eb47f1242e3bfb93c2022
2013-07-25 10:15:07 -07:00
Elliott Hughes
bfba6aac99 am a8d06766: Merge "[MIPS] __dso_handle.S and __dso_handle_so.S not needed."
* commit 'a8d06766c7674bbfde852e8bfee4200e75ad8f24':
  [MIPS] __dso_handle.S and __dso_handle_so.S not needed.
2013-07-23 18:07:12 -07:00
Elliott Hughes
a8d06766c7 Merge "[MIPS] __dso_handle.S and __dso_handle_so.S not needed." 2013-07-24 01:05:18 +00:00
Rom Lemarchand
c5749f1f42 am 061246b6: Merge "Restore dlmalloc mmap threshold to 64k"
* commit '061246b600c16a80b246804221b9e3fa65e507d9':
  Restore dlmalloc mmap threshold to 64k
2013-07-23 13:52:29 -07:00
Rom Lemarchand
061246b600 Merge "Restore dlmalloc mmap threshold to 64k" 2013-07-23 20:49:46 +00:00
Rom Lemarchand
d0f2a6014c Restore dlmalloc mmap threshold to 64k
Restoring DEFAULT_MMAP_THRESHOLD to 64k, the way it was before
999089181e.

This forces allocations in the 64k-256k range to be mmaped.

Change-Id: Iace55ed638edd272b3e94fa6cd2ddd349042be84
Signed-off-by: Rom Lemarchand <romlem@google.com>
2013-07-23 13:48:39 -07:00
Pete Delaney
0995a7b322 [MIPS] __dso_handle.S and __dso_handle_so.S not needed.
Global hidden variable __dso_handle is now declared in:
       bionic/libc/private/__dso_handle.h

Change-Id: I8e951a8d7c65877bafc1be23a7fff6d44d3a2846
Signed-off-by: Pete Delaney  <piet.delaney@imgtec.com>
Signed-off-by: Chao-Ying Fu  <chao-ying.fu@imgtec.com>
2013-07-22 23:16:02 -07:00
Elliott Hughes
c2902edfc4 am 6fe4a58f: Merge "Move stuff only needed by pthread-timers.c into pthread-timers.c."
* commit '6fe4a58f84954523f17114f1f7cf060a3573c073':
  Move stuff only needed by pthread-timers.c into pthread-timers.c.
2013-07-19 17:13:33 -07:00
Elliott Hughes
6fe4a58f84 Merge "Move stuff only needed by pthread-timers.c into pthread-timers.c." 2013-07-20 00:10:32 +00:00
Elliott Hughes
4cf1395217 Move stuff only needed by pthread-timers.c into pthread-timers.c.
Change-Id: I4915b3fff9c4f5a36b4f51027fb22019c11607b0
2013-07-19 16:42:27 -07:00
Elliott Hughes
178c418573 am e8bd8c2e: Merge "Upgrade mktemp.c to the current upstream version."
* commit 'e8bd8c2ed9c71c73682f29020456934c55f260e3':
  Upgrade mktemp.c to the current upstream version.
2013-07-19 16:37:52 -07:00
Elliott Hughes
e8bd8c2ed9 Merge "Upgrade mktemp.c to the current upstream version." 2013-07-19 23:35:29 +00:00
Elliott Hughes
284f788032 Upgrade mktemp.c to the current upstream version.
Yet another archaic relic containing bugs that had been fixed years before the
Android project even started...

Bug: 9935113
Change-Id: I3c9d019a216efd609ee568cf8c70bc360f357403
2013-07-19 15:20:31 -07:00
Elliott Hughes
81b4698059 am f8a66bb3: Merge "Remove some non-unused makefile generality."
* commit 'f8a66bb31204b42f830c1865a795b5f3eb1e0147':
  Remove some non-unused makefile generality.
2013-07-17 17:41:43 -07:00
Elliott Hughes
f8a66bb312 Merge "Remove some non-unused makefile generality." 2013-07-18 00:39:35 +00:00
Elliott Hughes
4c6b925bac Remove some non-unused makefile generality.
MIPS uses .c files like ARM and x86 now.

Change-Id: Ie580647e385121c380316c443ec199dabf657ff8
2013-07-17 17:38:45 -07:00
Elliott Hughes
b6b2375df8 am 8fa9081f: Merge "[MIPS] Rewrite MIPS crtbegin* as C files."
* commit '8fa9081f48c4861f83737d59bf2c2c8f21c7da3f':
  [MIPS] Rewrite MIPS crtbegin* as C files.
2013-07-17 17:36:26 -07:00
Elliott Hughes
8fa9081f48 Merge "[MIPS] Rewrite MIPS crtbegin* as C files." 2013-07-18 00:34:22 +00:00
Pete Delaney
368860124c [MIPS] Rewrite MIPS crtbegin* as C files.
This updates the MIPS arch to be much more in
sync with the commit Nick Kralevich made last
June; see 9d40326830.

    Rewrite
     crtbegin.S        -> crtbegin.c
     crtbegin_so.S     -> crtbegin_so.c
     __dso_handle.S    -> __dso_handle.c
     __dso_handle_so.S -> __dso_handle_so.c
     atexit.S          -> atexit.c

Previously __do_global_dtors_aux was in the tasks
__FINI_ARRAY__ linked with crtbegin.S and it now being
removed as there is no need to call a destructor just
before terminating a process.

Shared libraries, on the other hand, are linked with
crtbegin_so.c and have a hidden destructor declared
to allow the bionic linker to call __on_dlclose().

Change-Id: Ieb4da5199b54573de05743990e309db381a11cb8
Signed-off-by: Pete Delaney  <piet.delaney@imgtec.com>
Signed-off-by: Chao-Ying Fu  <chao-ying.fu@imgtec.com>
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
2013-07-17 14:23:29 -07:00
Elliott Hughes
cbf07a2514 am 2be511d4: Merge "Improve stack overflow diagnostics (take 2)."
* commit '2be511d405d47eccc61a6e3c338d1877bf33b4fa':
  Improve stack overflow diagnostics (take 2).
2013-07-17 13:50:15 -07:00
Elliott Hughes
2be511d405 Merge "Improve stack overflow diagnostics (take 2)." 2013-07-17 20:48:25 +00:00
Elliott Hughes
84114c8dd5 Improve stack overflow diagnostics (take 2).
This reverts commits eb1b07469f and
d14dc3b87f, and fixes the bug where
we were calling mmap (which might cause errno to be set) before
__set_tls (which is required to implement errno).

Bug: 8557703
Change-Id: I2c36d00240c56e156e1bb430d8c22a73a068b70c
2013-07-17 13:33:19 -07:00
Elliott Hughes
e35d6c28df am 40e7a878: Merge "Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno."
* commit '40e7a87864fee75f7af2caf8e1972d0d764135cd':
  Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno.
2013-07-17 13:22:39 -07:00
Elliott Hughes
40e7a87864 Merge "Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno." 2013-07-17 20:20:41 +00:00
Elliott Hughes
107cdd406b Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno.
Bug: 9889616
Change-Id: I4a7323e0ae5aeb5cbe0da1b2bc7501d83b3a2aa4
2013-07-17 13:12:26 -07:00
Elliott Hughes
4763ef2b5b am b7b36b81: Merge "mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps"
* commit 'b7b36b819e8029a152859f3204ba2da38a0e2879':
  mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps
2013-07-17 13:05:13 -07:00
Elliott Hughes
b7b36b819e Merge "mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps" 2013-07-17 20:02:11 +00:00
Rom Lemarchand
e459bba398 mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps
Reinstate mmap calling madvise(MADV_MERGEABLE) removed in
635df850e5

(cherry-pick of c702a904679a36511bead29c51eeac15d81f4fd2.)

Change-Id: I18803fb54701b2b3d8186dff5c678211ee3efa1f
2013-07-17 13:00:45 -07:00
Guang Zhu
6f08b8659a am 2cf5a6f6: Merge "Revert "Improve stack overflow diagnostics.""
* commit '2cf5a6f6627549842c0c840ff3615ae942a90ea3':
  Revert "Improve stack overflow diagnostics."
2013-07-16 20:18:57 -07:00
Guang Zhu
849bfd5811 am 8c1b9668: Merge "Revert "Clean up our alternate signal stacks.""
* commit '8c1b96681af91fda86a5493e7f7e4381ce489648':
  Revert "Clean up our alternate signal stacks."
2013-07-16 20:18:57 -07:00
Guang Zhu
2cf5a6f662 Merge "Revert "Improve stack overflow diagnostics."" 2013-07-17 03:17:19 +00:00
Guang Zhu
d14dc3b87f Revert "Improve stack overflow diagnostics."
This reverts commit aa754dca90.

Change-Id: Ifa76eee31f7f44075eb3a48554315b2693062f44
2013-07-17 03:17:05 +00:00
Guang Zhu
8c1b96681a Merge "Revert "Clean up our alternate signal stacks."" 2013-07-17 03:16:52 +00:00
Guang Zhu
eb1b07469f Revert "Clean up our alternate signal stacks."
This reverts commit 5cf87951ab.

Change-Id: Idd6ca7d80a018755da3bd315d91193723ce7f3bf
2013-07-17 03:16:04 +00:00
Christopher Ferris
7ff868a630 am f63c28f0: Merge "Fix assembler errors in generic arm strlen.c."
* commit 'f63c28f0338fd647e88f1f9300b2220093af1aae':
  Fix assembler errors in generic arm strlen.c.
2013-07-16 17:22:05 -07:00
Christopher Ferris
b1d7fd4969 am 6f4fed74: Merge "Add new optimized strlen for arm."
* commit '6f4fed74cb9405c0f5322307085d15afed6be764':
  Add new optimized strlen for arm.
2013-07-16 17:21:55 -07:00
Christopher Ferris
f63c28f033 Merge "Fix assembler errors in generic arm strlen.c." 2013-07-17 00:19:42 +00:00
Christopher Ferris
6f4fed74cb Merge "Add new optimized strlen for arm." 2013-07-17 00:19:30 +00:00
Christopher Ferris
9ad2a73ed6 Fix assembler errors in generic arm strlen.c.
Tested using a static version of the strlen libc_test program
on a nexus7 that uses the generic code.

Merge from internal master.

(cherry-picked from d8d10a8994)

Change-Id: I88f7dc01dc5b5c3ac2d5580d92153bc1bc36c564
2013-07-16 16:47:54 -07:00
Christopher Ferris
0aa9b52efa Add new optimized strlen for arm.
This optimized version is primarily targeted at cortex-a15.

Tested on all nexus devices using the system/extras/libc_test strlen test.
Tested alignments from 1 to 32 that are powers of 2.
Tested that strlen does not cross page boundaries at all alignments.

Speed improvements listed below:

cortex-a15
- Sizes >= 32 bytes, ~75% improvement.
- Sizes >= 1024 bytes, ~250% improvement.

cortex-a9
- Sizes >= 32 bytes, ~75% improvement.
- Sizes >= 1024 bytes, ~85% improvement.

krait
- Sizes >= 32 bytes, ~95% improvement.
- Sizes >= 1024 bytes, ~160% improvement.

Merge from internal master.

(cherry-picked from 2fc0717977)

Change-Id: I1ceceb4e745fd68e9d946f96d1d42e0cdaff6ccf
2013-07-16 16:47:37 -07:00
Elliott Hughes
79dfb1afda am f35e0c14: Merge "Clean up our alternate signal stacks."
* commit 'f35e0c149f1a6801a5af7c339f84d81ae05c3adf':
  Clean up our alternate signal stacks.
2013-07-16 15:50:18 -07:00
Elliott Hughes
f35e0c149f Merge "Clean up our alternate signal stacks." 2013-07-16 22:47:41 +00:00
Elliott Hughes
10a954dea6 am 026867c7: Merge "Improve stack overflow diagnostics."
* commit '026867c7dcce7828212dcd4a61806146908e9039':
  Improve stack overflow diagnostics.
2013-07-16 15:31:40 -07:00
Elliott Hughes
d2acf124ed am 9562d38d: Merge "Clean up __builtin_expect usage."
* commit '9562d38df1e4aba941b3433cfd0922fee5ea258b':
  Clean up __builtin_expect usage.
2013-07-16 15:31:39 -07:00
Elliott Hughes
2a18ea1462 am f152e386: Merge "EABI syscall cleanup."
* commit 'f152e386fcf477f3f5de9dc020c3660d4f9c4b81':
  EABI syscall cleanup.
2013-07-16 15:31:39 -07:00