Merge commit 'bc10cd2900cdb7fed077163b6a33e0f8572b2b19' into eclair-plus-aosp
* commit 'bc10cd2900cdb7fed077163b6a33e0f8572b2b19':
Fix a typo that resulted in a crash in the boot sequence
This is used to perform a mutex lock for a given amount of
milliseconds before giving up. Using the _np prefix since this
is absolutely not portable.
Also remove a compiler warning in pthread_attr_getstackaddr
For performance reasons, we don't call the kernel helper. Instead, we directly
access the TLS register on ARMv6 and higher. For ARMv5TE, keep using the hard-coded
address populated by the kernel on each task switch.
NOTE: Since we don't call the kernel helper, this must precisely match your
kernel configuration. This is controlled by setting the ARCH_ARM_HAVE_TLS_REGISTER
variable to 'true' in your board configuration file.
the TLS access functions to use the kernel helper.
This Fix is verified on ST Ericsson's U8500 platform and Submitted on behalf of a third-party:
Surinder-pal SINGH from STMicroelectronics.
GDB will try to read l_ld of linkmaps and compare the value to vma of
.dynamic sections from shared objects. Since linker does not assign l_ld,
GDB will complain about and re-compute l_addr from l_ld. And, GDB will get a
wrong value.
Compiling with -std=c99 defines __STRICT_ANSI__, but the 64 bit types
and type macros should still be defined in this case.
This helps compiling third party code that needs -std=c99 with the NDK.
Merge commit '4e57cf3f8c0b696f117579c8165b13c8d32b9b5d' into eclair-plus-aosp
* commit '4e57cf3f8c0b696f117579c8165b13c8d32b9b5d':
Fix an infinite loop in time2sub.
The problem is that time_t is signed, and the original code relied on the
fact that (X + c < X) in case of overflow for c >= 0. Unfortunately, this
condition is only guaranteed by the standard for unsigned arithmetic, and
the gcc 4.4.0 optimizer did completely remove the corresponding test from
the code. This resulted in a missing boundary check, and an infinite loop.
The problem is solved by testing explicitely for TIME_T_MIN and TIME_T_MAX
in the loop that uses this.
Also fix increment_overflow and long_increment_overflow which were buggy
for exactly the same reasons.
Note: a similar fix is needed for system/core/libcutils
Merge commit '9e74f697e0178a0e9b6133a2b270cc7fed9920bf' into eclair-plus-aosp
* commit '9e74f697e0178a0e9b6133a2b270cc7fed9920bf':
libc: add void to clock() function prototype
ARMv6 onwards. These architectures provide the load-linked, store-conditional pair of ldrex/strex whose use
is recommended in place of 'swp'. Also, the description of the 'swp' instruction in the ARMv6 reference
manual states that the swap operation does not include any memory barrier guarantees.This fix attempts to
address these issues by providing an atomic swap implementation using ldrex/strex under _ARM_HAVE_LDREX_STREX
macro. This Fix is verified on ST Ericsson's U8500 platform and Submitted on behalf of a third-party:
Surinder-pal SINGH from STMicroelectronics.
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