Commit graph

32 commits

Author SHA1 Message Date
David Turner
1825fb5d5f Merge "bionic: on pthread_join(), avoid extra check in case we find the thread" 2010-03-18 16:42:49 -07:00
David Turner
c0e464268d Merge "bionic: ftell() returns a long, not an int" 2010-03-18 16:35:42 -07:00
David Turner
a9c41a8e0a Merge "bionic: remove unneeded variable from chk_realloc()" 2010-03-16 17:26:44 -07:00
André Goddard Rosa
699237baf5 bionic: equalize the <unknown> program name between ssp.c and libc_init_common.c
... for the consistency sake.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-02-05 17:48:07 -02:00
André Goddard Rosa
291100c795 bionic: remove unneeded variable from chk_realloc()
... and simplify the generated code.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-02-05 16:32:56 -02:00
André Goddard Rosa
a28336c735 bionic: on pthread_join(), avoid extra check in case we find the thread
... by using similar logic as used in pthread_detach().

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-02-05 16:21:07 -02:00
André Goddard Rosa
3b06c128cf bionic: ftell() returns a long, not an int
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-02-05 16:05:52 -02:00
Jean-Baptiste Queru
95604529ec merge from eclair 2009-11-15 12:05:31 -08:00
Jean-Baptiste Queru
194d3fa048 eclair snapshot 2009-11-12 18:45:14 -08:00
Matthieu CASTET
a4e67f4512 Remove code duplication for pthread_cond_timeout_np : use __pthread_cond_timedwait_relative helper 2009-09-14 09:19:42 -07:00
Alexey Tarasov
cc05d12716 Changed logging functions in bionic/logd_write.c.
Main differences from original code:
1. now log channel for LOG_ID_MAIN may exist even if LOG_ID_RADIO
   facility failed.
2. __write_to_log_null() now acts as always successful function.
3. it's more simplier to add new logging channels now

ammended commit fixes my typo on line 130
2009-08-25 10:27:26 -07:00
Android Code Review
bb08537104 Merge change 10057
* changes:
  Add mspace_merge_objects
2009-08-07 16:43:33 -07:00
Andy McFadden
39f3745cf3 Restore malloc debug.
Some libc changes were preventing the initialization call from being made.
The basic problem appears to be that libc_init_common.c is only built once,
and it's only built for the non-debug libc.
2009-07-21 15:44:23 -07:00
David 'Digit' Turner
b56b5659b3 Fix the C library runtime initialization order.
This allows libc.so to run the C runtime initializer as soon as the
dynamic linker loads the shared library, i.e. before any other initializers
(e.g. static C++ constructors in other shared libraries the executable depends
on).

This also removes the bug where the initializers from the executable itself
were run twice: once by the dynamic linker, and another time by __libc_init
as defined by libc_init_dynamic.c
2009-07-18 01:11:10 +02:00
David 'Digit' Turner
c4eee3765b Prevent a crash in the memory leak checker (which happened in chk_free())
Simplify the code a little, removing un-necessary mutex locks/unlocks.
Provide slightly better diagnostic message in case of corruption.
Use snprintf/strlcat instead of sprintf/strcat
2009-07-10 00:32:08 +02:00
David 'Digit' Turner
3a654b1e04 Revert "Fix the C library initialization to avoid calling static C++ constructors twice."
This reverts commit 03eabfe65e.
2009-06-03 19:32:37 +02:00
Barry Hayes
f30dae9cf4 Add mspace_merge_objects 2009-06-02 14:48:59 -07:00
David 'Digit' Turner
03eabfe65e Fix the C library initialization to avoid calling static C++ constructors twice.
The problem was due to the fact that, in the case of dynamic executables,
the dynamic linker calls the DT_PREINIT_ARRAY, DT_INIT and DT_INIT_ARRAY
constructors when loading shared libraries and dynamic executables,
*before* calling the executable's entry point (i.e. arch-$ARCH/bionic/crtbegin_dynamic.c)
which in turns call __libc_init() in libc.so, as defined by bionic/libc_init_dynamic.c

The latter did call these constructors array again, mistakenly.

The patch also updates the documentation of many related functions.

Also adds a new section to linker/README.TXT explaining restrictions on
C library usage.

The patch has been tested on a Dream for stability issues with
proprietary blobs:

- H264 decoding works
- Camera + Video recording works
- GPS works
- Sensors work

The tests in system/extra/tests/bionic/libc/common/test_static_cpp_mutex.cpp has been
run and shows the static C++ constructor being called only once.
2009-06-02 23:27:44 +02:00
David 'Digit' Turner
0ba91ed3ca Fix __eabi_atexit() implementation, as well as a bug in the BSD-originated __cxa_finalize() implementation
This patch uses "#if ANDROID" instead of "#if 1" in the __cxa_finalize() fix
2009-05-20 11:42:52 +02:00
David 'Digit' Turner
d386afcc41 revert to previous implementation of __aeabi_atexit() since the new one seems to crash a static ICU String destructor.
I don't have the time to investigate why right now, so a revert is preferred. Damn...
2009-05-15 02:11:12 +02:00
David 'Digit' Turner
3e16f84fca Fix __aeabi_atexit to call __cxa_atexit properly. This function is defined by the C++ ABI for ARM document. 2009-05-14 14:25:26 +02:00
The Android Open Source Project
1dc9e472e1 auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
The Android Open Source Project
1767f908af auto import from //depot/cupcake/@135843 2009-03-03 18:28:13 -08:00
The Android Open Source Project
a799b53f10 auto import from //depot/cupcake/@132589 2009-03-03 14:03:51 -08:00
The Android Open Source Project
fe5745033a auto import from //depot/cupcake/@137055 2009-03-02 22:54:14 -08:00
The Android Open Source Project
6f04a0f4c7 auto import from //branches/cupcake/...@132276 2009-02-19 10:57:29 -08:00
The Android Open Source Project
2489551343 auto import from //branches/cupcake/...@131421 2009-02-13 12:57:48 -08:00
The Android Open Source Project
9f65adf2ba auto import from //branches/cupcake/...@130745 2009-02-10 15:43:56 -08:00
The Android Open Source Project
d37527501c auto import from //branches/cupcake/...@127101 2009-01-20 14:03:55 -08:00
The Android Open Source Project
e5cc1f386b auto import from //branches/cupcake/...@126645 2009-01-15 16:12:07 -08:00
The Android Open Source Project
4e468ed2eb Code drop from //branches/cupcake/...@124589 2008-12-17 18:03:48 -08:00
The Android Open Source Project
a27d2baa0c Initial Contribution 2008-10-21 07:00:00 -07:00