Commit graph

1341 commits

Author SHA1 Message Date
Jean-Baptiste Queru
e22dfc46b7 Merge "execvp: bcopy() is deprecated. Use memcpy() instead" 2012-01-24 14:26:36 -08:00
David 'Digit' Turner
b70659d8ea Merge "libc: Fix recursive mutex lock implementation." 2012-01-24 09:28:29 -08:00
David 'Digit' Turner
b57db7581c libc: Fix recursive mutex lock implementation.
This fixes a bug that was introduced in the latest pthread optimization.
It happens when a recursive lock is contented by several threads. The main
issue was that the atomic counter increment in _recursive_increment() could
be annihilated by a non-conditional write in pthread_mutex_lock() used to
update the value's lower bits to indicate contention.

This patch re-introduces the use of the global recursive lock in
_recursive_increment(). This will hit performance, but a future patch
will be provided to remove it from the source code.

Change-Id: Ie22069d376cebf2e7d613ba00b6871567f333544
2012-01-24 13:20:38 +01:00
Jean-Baptiste Queru
73fa5fdaf9 Merge 2f80f07d
Change-Id: Iff51b8530dbee01499ba4af0ecd6ab837c8c94fb
2012-01-20 16:47:01 -08:00
Jean-Baptiste Queru
2f80f07d81 am 23f56bbb: Merge "Add extended attribute (xattr) system call wrappers to bionic."
* commit '23f56bbb6ae053996dd821f29379aea0c7166055':
  Add extended attribute (xattr) system call wrappers to bionic.
2012-01-20 11:54:47 -08:00
Jean-Baptiste Queru
23f56bbb6a Merge "Add extended attribute (xattr) system call wrappers to bionic." 2012-01-20 10:29:22 -08:00
Jeff Brown
3452e301ec Add new suspend-block input ioctls.
Change-Id: I8cfd63d22ecf8e08f261eb576d6ea448f396f709
2012-01-19 14:27:30 -08:00
David 'Digit' Turner
79fcc6948d Merge "libc: remove private declarations from <time.h> and <resolv.h>" 2012-01-19 04:15:38 -08:00
Elliott Hughes
dac52ff9f5 am e8e1efea: Update to tzdata2011n.
* commit 'e8e1efeafb8754ea8358e78cfe3d0f7ad4e809b2':
  Update to tzdata2011n.
2012-01-18 16:34:01 -08:00
Nick Kralevich
df49ebabfe Merge "Eliminate duplicate copies of constants." 2012-01-18 08:53:51 -08:00
Stephen Smalley
5eb686d105 Add extended attribute (xattr) system call wrappers to bionic.
The xattr system calls are required for the SE Android userspace in
order to get and set file security contexts.  In particular, libselinux
requires these calls.

Change-Id: I78f5eb3d8f3384aed0a5e7c6a6f001781d982017
2012-01-18 08:02:23 -05:00
Jean-Baptiste Queru
5f926c2679 am b00d7a33: am eae1f1fb: Merge "res_send: Avoid spurious close()s and (rare) failure"
* commit 'b00d7a331c9f2a578a4cfc4dfe0d626aa58fa702':
  res_send: Avoid spurious close()s and (rare) failure
2012-01-17 18:18:29 -08:00
Jean-Baptiste Queru
b00d7a331c am eae1f1fb: Merge "res_send: Avoid spurious close()s and (rare) failure"
* commit 'eae1f1fba33cb105302227b044a14e5abcbe55e7':
  res_send: Avoid spurious close()s and (rare) failure
2012-01-17 18:16:10 -08:00
Elliott Hughes
e8e1efeafb Update to tzdata2011n.
There are three changes of note - most urgently, Cuba (America/Havana)
has extended summer time by two weeks, now to end on Nov 13, rather than
the (already past) Oct 30.   Second, the Pridnestrovian Moldavian Republic
(Europe/Tiraspol) decided not to split from the rest of Moldova after
all, and consequently that zone has been removed (again) and reinstated
in the "backward" file as a link to Europe/Chisinau.   And third, the
end date for Fiji's summer time this summer was moved forward from the
earlier planned Feb 26, to Jan 22.

Apart from that, Moldova (MD) returns to a single entry in zone.tab
(and the incorrect syntax that was in the 2011m version of that file
is so fixed - it would have been fixed in a different way had this
change not happened - that's the "missing" sccs version id).

Bug: 5863692

Change-Id: I78e29c682c623b1dec0b0ea2cb6545713ae9eed0
2012-01-17 17:47:59 -08:00
Nick Kralevich
ea29cd5a4a Eliminate duplicate copies of constants.
sys/personality.h and linux/personality.h contain mostly
identical contents. Eliminate dups.

Change-Id: Ie786edcb5dca57af7ee5b5fdad2949369f1bc4e4
2012-01-17 17:28:42 -08:00
Nick Kralevich
d6045cba4e Don't generate sys/linux-unistd.h
linux-unistd.h was here for reference purposes, but shouldn't
have been accessible to client code. Delete it.

Change-Id: I60c264ff6ca489a48117914bdf6daa486737af8c
2012-01-17 15:56:26 -08:00
Nick Kralevich
fc5ea79c5e Merge "update personality.h" 2012-01-17 15:46:54 -08:00
Nick Kralevich
023e5409df am 06f51ba1: am f44de270: add personality() system call.
* commit '06f51ba1af2fafeec7fdfcba5d635bd001a31b3e':
  add personality() system call.
2012-01-17 13:09:53 -08:00
Nick Kralevich
b6f40f0027 update personality.h
Pull in an updated version of personality.h from the linux
kernel.

This file was generated using the following command:

cd bionic/libc/kernel/
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/personality.h

Change-Id: I860ce21110ebf7e7499fb8165584d296a73aa602
2012-01-17 13:03:11 -08:00
Nick Kralevich
06f51ba1af am f44de270: add personality() system call.
* commit 'f44de270bba32c9b1b5eff8a34be07b10ddff238':
  add personality() system call.
2012-01-17 11:45:25 -08:00
Jim Huang
87043f9c89 res_send: Avoid spurious close()s and (rare) failure
When looping over the current list of sockets we are connected to,
use getpeername() not getsockname() to find out who the remote
end is.  This change avoids spurious close() and (rare) failure.

Origin: ISC bug #18625 and fixed in libbind 6.0

Change-Id: I5e85f9ff4b98c237978e4bf4bd85ba0a90d768e6
2012-01-14 11:30:00 +08:00
Jim Huang
28a7c35fea execvp: bcopy() is deprecated. Use memcpy() instead
The function bcopy() is marked as LEGACY in POSIX.1-2001 and removed in
POSIX.1-2008. memcpy (POSIX.1-2001) is its recommended replacement.

Change-Id: I2cc0cc4673d1368255afd11132ddbfd3f87b530b
2012-01-14 11:22:36 +08:00
Nick Kralevich
f44de270bb add personality() system call.
Change-Id: Ie899def8ea1d705930ed83adae1343c1353e7c57
2012-01-13 15:50:40 -08:00
David 'Digit' Turner
697011d3c4 Merge "libc: Copy private C library declarations to private/" 2012-01-13 14:25:25 -08:00
Glenn Kasten
c61f990566 Fix misspelled Python variable name and typos
Typos:
 - Update pathname in README.txt
 - Fix missing newlines in header update script.

Change-Id: Ib0e053f92a27ff10071b9805fa64e5653ab31b0c
2012-01-13 07:41:20 -08:00
David 'Digit' Turner
208898ee77 libc: remove private declarations from <time.h> and <resolv.h>
This patch is used to remove private C library declarations from the
public headers (that are exported to the NDK). It should *only* be
submitted after all other patches modifying the users of said
private functions have been submitted to the tree, to avoid
breakages.

Change-Id: I0a5e3014f8e3ac9ed8df86a5cdae506337c23252
2012-01-13 14:24:08 +01:00
David 'Digit' Turner
11f3d5a431 libc: Copy private C library declarations to private/
This patch is the first in a series that aims at cleaning up the
public C library headers (which end up being distributed with the NDK).

<resolv.h> and <time.h> contain declarations that should not be public.
They are used by other parts of the platform, but NDK applications should
not use or rely on them.

So copy them to private <bionic_time.h> and <resolv_iface.h> headers
and use a guard macro to avoid conflicts when both headers are included
at the same time.

The idea is that we're going to fix the other platform modules to
include these private headers. After this is done, we will remove the
duplicate definitions from <resolv.h> and <time.h>

Change-Id: I121c11936951c98ca7165e811126ed8a4a3a394d
2012-01-13 13:26:50 +01:00
Robert Greenwalt
e4ade69654 am 82c4be54: am ecd0e95a: Adding a timeout to tcp dns lookup connects.
* commit '82c4be54da0825ebe74b524932c9db733419057a':
  Adding a timeout to tcp dns lookup connects.
2012-01-12 15:05:57 -08:00
Robert Greenwalt
82c4be54da am ecd0e95a: Adding a timeout to tcp dns lookup connects.
* commit 'ecd0e95a0276c1ba72c7331f5e4617815f015f22':
  Adding a timeout to tcp dns lookup connects.
2012-01-12 15:03:52 -08:00
Robert Greenwalt
ecd0e95a02 Adding a timeout to tcp dns lookup connects.
TCP isn't supported on some dns servers, which makes the old code
hang forever.

NOT adding a stopship to remove debugging stuff - it was too painful
(14s timeout on failed tcp dns lookups) so we decided not to bother people.

bug:5766949
Change-Id: I381c20c3e11b8e994438d4f7c58ef643cd36554e
2012-01-12 14:26:41 -08:00
Mathias Agopian
68d03fdbd8 Merge "implement pthread mutex deadlock detection" 2012-01-05 14:05:30 -08:00
Bruce Beare
6519c8124e am e30e9093: sreadahead: adding readahead system call into bionic libc
* commit 'e30e909363c5c706f394050d9cd00ce222caadbf':
  sreadahead: adding readahead system call into bionic libc
2012-01-03 18:37:28 -08:00
Bruce Beare
e30e909363 sreadahead: adding readahead system call into bionic libc
Add bionic libc to support readahead system call.
This is needed to enable sreadahead to work.

Change-Id: I3856e1a3833db82e6cf42fd34af7631bd40cc723
Author: Winson Yung <winson.w.yung@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-01-03 15:18:04 -08:00
Ken Sumrall
334379dada Merge "Add the posix_memalign(3) function to bionic" 2011-12-20 15:06:52 -08:00
Bruce Beare
5936e36f6b am a37f3729: readdir: fix interface to kernel getdents64 function
* commit 'a37f3729730e4e7345977915d67adc3eea93dfe4':
  readdir: fix interface to kernel getdents64 function
2011-12-19 11:36:48 -08:00
Bruce Beare
a37f372973 readdir: fix interface to kernel getdents64 function
Issue:
  The kernel will pad the entry->d_reclen in a getdents64 call to a
  long-word boundary.  For very long records, this could exceed the
  size of a struct dirent. The mismatch in the size was causing error
  paranoid checking code in bionic to fail... thus causing an early
  "end" when reading the dirent structures from the kernel buffer.

Test:
 ls
 mkdir abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstu
 ls

Change-Id: I75d1f8e45e1655fdd7bac4a08a481d086f28073a
Author: Bruce Beare <bruce.j.beare@intel.com>
2011-12-19 09:38:48 -08:00
Ken Sumrall
85aad90956 Add the posix_memalign(3) function to bionic
The posix_memalign(3) function is very similar to the traditional
memalign(3) function, but with better error reporting and a guarantee
that the memory it allocates can be freed.  In bionic, memalign(3)
allocated memory can be freed, so posix_memalign(3) is just a wrapper
around memalign(3).

Change-Id: I62ee908aa5ba6b887d8446a00d8298d080a6a299
2011-12-14 20:55:43 -08:00
David 'Digit' Turner
a5cb76bca0 libc: x86: Use SSE2 or SSSE3 optimized routines when possible.
This patch uses the new hardware feature macros for x86 to define
various compile-time macros used to make the C library use
SSE2 and/or SSSE3 optimized memory functions for target CPUs
that support these features.

Note that previously, we relied on the macros being defined by
build/core/combo/TARGET_linux-x86.mk, but this is no longer the
case.

Change-Id: Ieae5ff5284c0c839bc920953fb6b91d2f2633afc
2011-12-14 18:23:40 +01:00
Erik Gilling
ddaa771cd5 am 8d28b043: am 94963af2: update video/dsscomp.h
* commit '8d28b043e93d323684add3406ebae6b8fe6475d5':
  update video/dsscomp.h
2011-12-13 17:29:12 -08:00
Erik Gilling
8d28b043e9 am 94963af2: update video/dsscomp.h
* commit '94963af28e445384e19775a838a29e6a71708179':
  update video/dsscomp.h
2011-12-13 16:02:50 -08:00
Erik Gilling
94963af28e update video/dsscomp.h
Change-Id: I9da47f7fb7f34f9c4baa860bb767cb8fd4f8020c
Signed-off-by: Erik Gilling <konkers@android.com>
2011-12-13 14:48:51 -08:00
Bruce Beare
e2bb45a7c0 am f3087c6e: am af96d4da: x86: libc may use the gcc flags from TARGET_linux-x86.mk
* commit 'f3087c6e86f54874538669d899d8a2ede59f7433':
  x86: libc may use the gcc flags from TARGET_linux-x86.mk
2011-12-12 15:39:04 -08:00
Bruce Beare
cb4d9c0e1d am 68ec71eb: am 7d03c9cb: pathconf: dead loop in bionic function __2_symlinks
* commit '68ec71ebd6df12596dc5688c907c76ea4b32c9b4':
  pathconf: dead loop in bionic function __2_symlinks
2011-12-12 15:30:11 -08:00
Erik Gilling
61f90d1898 am ffe65783: am bba5c314: update video/dsscomp.h
* commit 'ffe65783b4afc3f687a54b582a4e236caa22ed30':
  update video/dsscomp.h
2011-12-12 12:34:57 -08:00
Bruce Beare
f3087c6e86 am af96d4da: x86: libc may use the gcc flags from TARGET_linux-x86.mk
* commit 'af96d4dadc3f3d8466dbbeaf3a816e6871715fbc':
  x86: libc may use the gcc flags from TARGET_linux-x86.mk
2011-12-09 16:19:30 -08:00
Mathias Agopian
7c0c379372 implement pthread mutex deadlock detection
this works by building a directed graph of acquired
pthread mutexes and making sure there are no loops in
that graph.

this feature is enabled with:

    setprop debug.libc.pthread 1

when a potential deadlock is detected, a large warning is
output to the log with appropriate back traces.

currently disabled at compile-time. set PTHREAD_DEBUG_ENABLED=1
to enable.

Change-Id: I916eed2319599e8aaf8f229d3f18a8ddbec3aa8a
2011-12-09 14:38:57 -08:00
Bruce Beare
af96d4dadc x86: libc may use the gcc flags from TARGET_linux-x86.mk
Change-Id: Iaf4d864d4b6fe388bd3c2d7c4d7d6e42aebb0d35
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-09 13:54:20 -08:00
Bruce Beare
68ec71ebd6 am 7d03c9cb: pathconf: dead loop in bionic function __2_symlinks
* commit '7d03c9cbcedb1dc7e3a8210ac0001120558ec6df':
  pathconf: dead loop in bionic function __2_symlinks
2011-12-09 10:19:37 -08:00
Erik Gilling
ffe65783b4 am bba5c314: update video/dsscomp.h
* commit 'bba5c314b2420483e2c0e3e441bf54bda6935bc1':
  update video/dsscomp.h
2011-12-08 14:57:00 -08:00
Erik Gilling
bba5c314b2 update video/dsscomp.h
Change-Id: Ic5f1c01add1f2adb5a09d05c94129f3dc9cc3f1f
Signed-off-by: Erik Gilling <konkers@android.com>
2011-12-08 14:42:04 -08:00
David 'Digit' Turner
022d303116 libc: optimize pthread mutex lock/unlock operations (1/2)
This patch provides several small optimizations to the
implementation of mutex locking and unlocking. Note that
a following patch will get rid of the global recursion
lock, and provide a few more aggressive changes, I
though it'd be simpler to split this change in two parts.

+ New behaviour: pthread_mutex_lock et al now detect
  recursive mutex overflows and will return EAGAIN in
  this case, as suggested by POSIX. Before, the counter
  would just wrap to 0.

- Remove un-necessary reloads of the mutex value from memory
  by storing it in a local variable (mvalue)

- Remove un-necessary reload of the mutex value by passing
  the 'shared' local variable to _normal_lock / _normal_unlock

- Remove un-necessary reload of the mutex value by using a
  new macro (MUTEX_VALUE_OWNER()) to compare the thread id
  for recursive/errorcheck mutexes

- Use a common inlined function to increment the counter
  of a recursive mutex. Also do not use the global
  recursion lock in this case to speed it up.

Change-Id: I106934ec3a8718f8f852ef547f3f0e9d9435c816
2011-12-07 22:09:48 +01:00
David 'Digit' Turner
6c6de44f04 libc: optimize pthread_once() implementation.
This patch changes the implementation of pthread_once()
to avoid the use of a single global recursive mutex. This
should also slightly speed up the non-common case where
we have to call the init function, or wait for another
thread to finish the call.

Change-Id: I8a93f4386c56fb89b5d0eb716689c2ce43bdcad9
2011-12-07 22:06:36 +01:00
Bruce Beare
7d03c9cbce pathconf: dead loop in bionic function __2_symlinks
Fix dead loops in file ./bionic/libc/unistd/pathconf.c

Change-Id: I7a1e6bcd9879c96bacfd376b88a1f899793295c8
Author: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-07 09:47:20 -08:00
Rabin Vincent
6e9d51701e am a73de44b: am 177ba8cb: Prevent deadlock when using fork
* commit 'a73de44b7c0a50908ea8afe16134316cfc6cfbbe':
  Prevent deadlock when using fork
2011-12-06 16:04:56 -08:00
Rabin Vincent
a73de44b7c am 177ba8cb: Prevent deadlock when using fork
* commit '177ba8cb42ed6d232e7c8bcad5e6ee21fc51a0e8':
  Prevent deadlock when using fork
2011-12-06 13:59:56 -08:00
Rabin Vincent
177ba8cb42 Prevent deadlock when using fork
When forking of a new process in bionic, it is critical that it
does not allocate any memory according to the comment in
java_lang_ProcessManager.c:
"Note: We cannot malloc() or free() after this point!
A no-longer-running thread may be holding on to the heap lock, and
an attempt to malloc() or free() would result in deadlock."
However, as fork is using standard lib calls when tracing it a bit,
they might allocate memory, and thus causing the deadlock.
This is a rewrite so that the function cpuacct_add, that fork calls,
will use system calls instead of standard lib calls.

Signed-off-by: christian bejram <christian.bejram@stericsson.com>

Change-Id: Iff22ea6b424ce9f9bf0ac8e9c76593f689e0cc86
2011-12-06 08:39:18 -08:00
Jean-Baptiste Queru
c5819d427d Merge 35765066 from ics-mr1-plus-aosp
Change-Id: Ibaeb49dc20f3c736417d5cb68769e7b501a61632
2011-12-06 08:35:08 -08:00
Bruce Beare
6d77a81456 am cb835cd7: am cb1df916: string: Fix wrong comparison semantics
* commit 'cb835cd77c8e60b4a9fb8a54a06d4fd4039ae1b0':
  string: Fix wrong comparison semantics
2011-12-05 22:13:21 -08:00
Bruce Beare
35765066b9 am e4a21c89: signal: Align the sigset_t size passed to from user space to kernel.
* commit 'e4a21c89a8b24b32f7a2637b45522dfa59f2aaa4':
  signal: Align the sigset_t size passed to from user space to kernel.
2011-12-05 22:12:08 -08:00
Bruce Beare
cb835cd77c am cb1df916: string: Fix wrong comparison semantics
* commit 'cb1df9161666db2a312814752de67fc623149a9b':
  string: Fix wrong comparison semantics
2011-12-05 22:12:07 -08:00
Bruce Beare
e4a21c89a8 signal: Align the sigset_t size passed to from user space to kernel.
Pass kernel space sigset_t size to __rt_sigprocmask to workaround
the miss-match of NSIG/sigset_t definition between kernel and bionic.

Note: Patch originally from Google...
Change-Id: I4840fdc56d0b90d7ce2334250f04a84caffcba2a
Signed-off-by: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-05 18:37:33 -08:00
Bruce Beare
cb1df91616 string: Fix wrong comparison semantics
Chars are signed for x86 -- correct the comparison semantics.

Change-Id: I2049e98eb063c0b4e83ea973d3fcae49c6817dde
Author: Liubov Dmitrieva <liubov.dmitrieva@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-05 18:37:10 -08:00
Bruce Beare
aed4a4c90b am 75039baf: am 89d3fdca: MALLOC_DEBUG: enable the option libc.debug.malloc = 10
* commit '75039bafde8e6f03caffa9d6aa7142a09ba50952':
  MALLOC_DEBUG: enable the option libc.debug.malloc = 10
2011-12-05 17:02:20 -08:00
Bruce Beare
75039bafde am 89d3fdca: MALLOC_DEBUG: enable the option libc.debug.malloc = 10
* commit '89d3fdcae26980bf81a4622c3c83e48ead4c1c3a':
  MALLOC_DEBUG: enable the option libc.debug.malloc = 10
2011-12-05 17:01:13 -08:00
Bruce Beare
89d3fdcae2 MALLOC_DEBUG: enable the option libc.debug.malloc = 10
Fix the compile warning to let the libc.debug.malloc=10 works well
Due to unsuitable value comparison, which cause compiler optimize the
code of comparing two digits.

Change-Id: I0bedd596c9ca2ba308fb008da20ecb328d8548f5
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Author: liu chuansheng <chuansheng.liu@intel.com>
2011-12-05 14:58:55 -08:00
Jack Ren
bec5dec947 am 0c3d21e6: am e480fc83: bionic: fix pthread_{create, exit}/signal race condition
* commit '0c3d21e63c6e75ae73aaf2b8d64af0bd8caa6beb':
  bionic: fix pthread_{create, exit}/signal race condition
2011-11-30 10:50:59 -08:00
Jack Ren
338a06f4bc am 621df526: am 31e72bc3: bionic: fix __get_tls( ) crash issue
* commit '621df52644cc19001688c0964ad425c5ed6c8990':
  bionic: fix __get_tls( ) crash issue
2011-11-30 10:50:58 -08:00
Jack Ren
0c3d21e63c am e480fc83: bionic: fix pthread_{create, exit}/signal race condition
* commit 'e480fc83b2887388d469eb3bf58c86c610f5b082':
  bionic: fix pthread_{create, exit}/signal race condition
2011-11-29 22:42:32 -08:00
Jack Ren
621df52644 am 31e72bc3: bionic: fix __get_tls( ) crash issue
* commit '31e72bc3289acdd85b0b745fbf64c5949ca33432':
  bionic: fix __get_tls( ) crash issue
2011-11-29 22:42:31 -08:00
Jack Ren
e480fc83b2 bionic: fix pthread_{create, exit}/signal race condition
(1) in pthread_create:
    If the one signal is received before esp is subtracted by 16 and
    __thread_entry( ) is called, the stack will be cleared by kernel
    when it tries to contruct the signal stack frame. That will cause
    that __thread_entry will get a wrong tls pointer from the stack
    which leads to the segment fault when trying to access tls content.

(2) in pthread_exit
    After pthread_exit called system call unmap(), its stack will be
    freed.  If one signal is received at that time, there is no stack
    available for it.

Fixed by subtracting the child's esp by 16 before the clone system
call and by blocking signal handling before pthread_exit is started.

Author: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-11-29 17:09:51 -08:00
Jack Ren
31e72bc328 bionic: fix __get_tls( ) crash issue
When running the stress test of pthread create/destroy, a crash may
oocur in __get_tls(). That is caused by the race condition with __set_tls( ):

Author: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-11-29 17:09:15 -08:00
Robert Greenwalt
e796d39d80 Merge "Request both v4 and v6 dns when on secondary net" 2011-11-29 15:48:48 -08:00
Nick Kralevich
495f16cbac update capabilities.h
Pull in an updated version of capabilities.h from the linux
kernel.

This file was generated using the following command:

cd bionic/libc/kernel/
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/capability.h

Change-Id: I43c8f014954f543858006f24e60a2e69955349da
2011-11-28 13:42:50 -08:00
David 'Digit' Turner
f1a39dce60 libc: Fix typo that broke NDK compatibility.
The function must be named __atomic_cmpxchg, not __android_cmpxchg.
This typo broke existing prebuilt binaries (they couldn't be loaded
at runtime anymore).

Change-Id: I25ca7d18329817f0056e616a0409113269ad7b1f
2011-11-23 14:38:36 +01:00
Robert Greenwalt
ca6fe7bebe Request both v4 and v6 dns when on secondary net
We can't easily tell the protocol family of the secondary network,
so try both and trust that the carrier has configured dns servers
according to the protocols supported on its network.

bug:5468224
Change-Id: If4f017573d313a6ad8354574076de6d63d43b444
2011-11-22 15:24:44 -08:00
David 'Digit' Turner
de44d0b2bd Merge "libc: provide atomic operations will full barriers for NDK apps." 2011-11-22 02:10:06 -08:00
Jeff Brown
95a17848d3 Merge "Add tgkill syscall." 2011-11-21 13:13:26 -08:00
Jeff Brown
10c8ce59a4 Add tgkill syscall.
Use tgkill instead of tkill to implement pthread_kill.
This is safer in the event that the thread has already terminated
and its id has been reused by a different process.

Change-Id: Ied715e11d7eadeceead79f33db5e2b5722954ac9
2011-11-18 16:40:48 -08:00
Nick Kralevich
5f64df4bc3 ASLR: enable pthread stack location randomization
Allow the kernel to choose a memory location to put the
thread stack, rather than hard coding 0x10000000

Change-Id: Ib1f37cf0273d4977e8d274fbdab9431ec1b7cb4f
2011-11-18 10:07:12 -08:00
David 'Digit' Turner
0fec6b9d88 libc: provide atomic operations will full barriers for NDK apps.
__atomic_cmpxchg and other related atomic operations did not
provide memory barriers, which can be a problem for non-platform
code that links against them when it runs on multi-core devices.

This patch does two things to fix this:

- It modifies the existing implementation of the functions
  that are exported by the C library to always provide
  full memory barriers. We need to keep them exported by
  the C library to prevent breaking existing application
  machine code.

- It also modifies <sys/atomics.h> to only export
  always-inlined versions of the functions, to ensure that
  any application code compiled against the new header will
  not rely on the platform version of the functions.

  This ensure that said machine code will run properly on
  all multi-core devices.

This is based on the GCC built-in sync primitives.

The end result should be only slightly slower than the
previous implementation.

Note that the platform code does not use these functions
at all. A previous patch completely removed their usage in
the pthread and libstdc++ code.

+ rename arch-arm/bionic/atomics_arm.S to futex_arm.S
+ rename arch-x86/bionic/atomics_x86.S to futex_x86.S
+ remove arch-x86/include/sys/atomics.h which already
  provided inlined functions to the x86 platform.

Change-Id: I752a594475090cf37fa926bb38209c2175dda539
2011-11-16 17:37:15 +01:00
David 'Digit' Turner
b385229837 Merge "libc: speed-up flockfile()/funlockfile()" 2011-11-16 07:31:31 -08:00
David Turner
90c4c1e82b Merge "bionic: Do not use <sys/atomics.h> for platform code." 2011-11-16 07:29:59 -08:00
David 'Digit' Turner
e31bfae2ba bionic: Do not use <sys/atomics.h> for platform code.
We're going to modify the __atomic_xxx implementation to provide
full memory barriers, to avoid problems for NDK machine code that
link to these functions.

First step is to remove their usage from our platform code.
We now use inlined versions of the same functions for a slight
performance boost.

+ remove obsolete atomics_x86.c (was never compiled)

NOTE: This improvement was benchmarked on various devices.
      Comparing a pthread mutex lock + atomic increment + unlock
      we get:

  - ARMv7 emulator, running on a 2.4 GHz Xeon:
       before: 396 ns    after: 288 ns

  - x86 emulator in KVM mode on same machine:
       before: 27 ns     after: 27 ns

  - Google Nexus S, in ARMv7 mode (single-core):
       before: 82 ns     after: 76 ns

  - Motorola Xoom, in ARMv7 mode (multi-core):
       before: 121 ns    after: 120 ns

The code has also been rebuilt in ARMv5TE mode for correctness.

Change-Id: Ic1dc72b173d59b2e7af901dd70d6a72fb2f64b17
2011-11-16 16:28:10 +01:00
Eino-Ville Talvala
fd7d5acdeb am 0d9f87a3: Add auto-exposure/auto-white balance lock support to soc2030 image sensor.
* commit '0d9f87a3b71057cf804b2d7aa8589e3bf94eab28':
  Add auto-exposure/auto-white balance lock support to soc2030 image sensor.
2011-11-15 18:25:18 -08:00
David 'Digit' Turner
9831ad3ce6 libc: speed-up flockfile()/funlockfile()
For Honeycomb, we added proper file thread-safety for
all FILE* operations. However, we did implement that by
using an out-of-band hash table to map FILE* pointers
to phtread_mutex_t mutexes, because we couldn't change
the size of 'struct _sFILE' without breaking the ABI.

It turns out that our BSD-derived code already has
some support code to extend FILE* objects, so use it
instead. See libc/stdio/fileext.h

This patch gets rid of the hash table, and put the
mutex directly into the sFILE extension.

Change-Id: If1c3fe0a0a89da49c568e9a7560b7827737ff4d0
2011-11-15 13:16:42 +01:00
Nick Kralevich
4b469eae40 Merge "generate PIC code." 2011-11-14 15:12:43 -08:00
David 'Digit' Turner
9bf330b567 libc: fix the pthread_sigmask implementation
The old code didn't work because the kernel expects a 64-bit sigset_t
while the one provided by our ABI is only 32-bit. This is originally
due to the fact that the kernel headers themselves define sigset_t
as a 32-bit type when __KERNEL__ is not defined (apparently to cater
to libc5 or some similarly old C library).

We can't modify the size of sigset_t without breaking the NDK ABI,
so instead perform runtime translation during the call.

Change-Id: Ibfdc3cbceaff864af7a05ca193aa050047b4773f
2011-11-14 22:57:24 +01:00
Nick Kralevich
0aa8289c6f generate PIC code.
Change-Id: I6740c30e2782ae203aa7ddaeaf3b233e90de9c4d
2011-11-11 17:28:59 -08:00
Elliott Hughes
f3dbdbe269 Update to tzdata2011n.
There are three changes of note - most urgently, Cuba (America/Havana)
has extended summer time by two weeks, now to end on Nov 13, rather than
the (already past) Oct 30.   Second, the Pridnestrovian Moldavian Republic
(Europe/Tiraspol) decided not to split from the rest of Moldova after
all, and consequently that zone has been removed (again) and reinstated
in the "backward" file as a link to Europe/Chisinau.   And third, the
end date for Fiji's summer time this summer was moved forward from the
earlier planned Feb 26, to Jan 22.

Apart from that, Moldova (MD) returns to a single entry in zone.tab
(and the incorrect syntax that was in the 2011m version of that file
is so fixed - it would have been fixed in a different way had this
change not happened - that's the "missing" sccs version id).

Change-Id: I7a0fba88d1fc6face649648013aaf2b111c29d7f
2011-10-31 14:11:32 -07:00
Eino-Ville Talvala
0d9f87a3b7 Add auto-exposure/auto-white balance lock support to soc2030 image
sensor.

Bug: 4980604
Change-Id: I1be07a23573b70eeddd9ecb2370605713aea3d03
2011-10-31 11:42:18 -07:00
Elliott Hughes
bcb2edac65 Update to tzdata2011m.
Fixes for Europe/Tiraspol (Moldova) and all four Ukrainian zones.

Also show the MD5 of the downloaded data, for comparison against the MD5
given in the announcement mails. (There's a plan to move to proper signing,
but that's not implemented on their end yet.)

Change-Id: I845e6f125c0f54298abadc643adfeca2eff4827a
2011-10-24 10:52:14 -07:00
Nick Kralevich
d9ad62343c Add linker support for PIE
Modify the dynamic linker so that executables can be loaded
at locations other than 0x00000000.

Modify crtbegin* so that non-PIC compilant "thumb interwork
veneers" are not created by the linker.

Bug: 5323301
Change-Id: Iece0272e2b708c79034f302c20160e1fe9029588
2011-10-22 13:19:23 -07:00
Jesse Wilson
b0641d4a44 Merge "Use ENTRY and EXIT macros for strcmp, memcpy, atexit." 2011-10-12 07:51:53 -07:00
Evgeniy Stepanov
487b613e57 Use ENTRY and EXIT macros for strcmp, memcpy, atexit.
Without this change strcmp size is zero (not set), and it gets
ignored by Valgrind. Changes to memcpy and atexit don't affect the
generated binary in any way.

Change-Id: I05818cb5951f75901dc8c0eef02807a2e83a9231
2011-10-11 12:12:05 +04:00
Elliott Hughes
faa7c1d29f Update to tzdata2011l.
This affects Asia/Hebron and Pacific/Fiji (and historical data for
America/Sitka).

Change-Id: I111a34038e44416f1900f774bdb78750e815eb5f
2011-10-10 14:05:53 -07:00
Lorenzo Colitti
229ab1a33e Merge "Send both A and AAAA queries if all probes fail." 2011-09-29 10:52:23 -07:00
Lorenzo Colitti
4638822fc0 Merge "Revert "Use framework hints to determine dns query type."" 2011-09-29 10:52:16 -07:00
Lorenzo Colitti
f432de2de7 Send both A and AAAA queries if all probes fail.
AI_ADDRCONFIG is currently implemented by trying to connect
to well-known addresses in order to see if IPv4 and/or IPv6
connectivity is available.

In some cases (e.g., walled gardens with no global
connectivity) both probes can fail. If this happens,
query for both IPv4 and IPv6 addresses instead of doing
nothing and failing the query.

Bug: 5284168
Change-Id: I4e3a69ea86fb6d839a6bd31236b98da81e5cbf45
2011-09-28 22:38:08 -07:00
Lorenzo Colitti
b82532d11a Revert "Use framework hints to determine dns query type."
Change Ife82a8d8 broke IPv6 on wifi. Change I4e3a69ea is
an alternate approach that does not require any framework
changes.

Bug: 5284168
Change-Id: Ib52614be3875a2ae2eaedd1be265f90e506eda41
2011-09-28 22:37:41 -07:00
Mathias Agopian
bda5da074e fix prototype of dladdr
this breaks C++ source code in particular.

Change-Id: Ie06b5d31d23b5455e6950c470adc64dd5e7784df
2011-09-28 12:17:34 -07:00
Elliott Hughes
0096491274 Update to tzdata2011k.
Affects Palestine, Gaza, Hebron, Belarus, Ukraine, and "Russia".

Change-Id: Ib17f848c3b0e86d0bfcf289c4c4a3ae53dd2f8c4
2011-09-26 10:53:50 -07:00
Robert Greenwalt
924c8785f0 am 8af58f0f: Use framework hints to determine dns query type.
* commit '8af58f0fd4ff3fb11cb8a3c61e4654e3633906a4':
  Use framework hints to determine dns query type.
2011-09-22 23:39:54 -07:00
Robert Greenwalt
8af58f0fd4 Use framework hints to determine dns query type.
Instead of checking for IPv4 or IPv6 connectivity, try using pid-specific
hints the framework has left for us.

bug:5284168
Change-Id: Id64d48db3900865a7d58ada8309870c63d6eab12
2011-09-22 11:43:06 -07:00
JP Abgrall
771600415f am 3884bfe9: libc: popen: work around data corruption
* commit '3884bfe9661955543ce203c60f9225bbdf33f6bb':
  libc: popen: work around data corruption
2011-09-17 16:32:00 -07:00
JP Abgrall
3884bfe966 libc: popen: work around data corruption
vfork() would not save the registers that the parent would expect
to have restored after execl() completed.
Specially that execl() would call execve() underneath, further messing
up the stack of the parent.
To avoid that, we fork() for now. Later we will revisit and cleanup
vfork()+execve() to actually have vfork() store all the register
that the parent expects to see, and not those left by execve().

In the original code, looking at the registers just before the call to
popen(), and after the call showed that r7 would get clobbered.
This would leave the caller with an invalid pointer, leading to all
kinds of data corruptions.
execve() is simpler that execl() in this case.


Bug: 5336252
Change-Id: I3bf718c0bb4c0439f6f2753f153cdea14175be9c
2011-09-17 15:22:21 -07:00
Glenn Kasten
d53cae0e45 Add non-NDK internal API __pthread_gettid
Tracking bugs 5267571 and 5090073 (for deadlock detection logs).

Change-Id: Icb90f91ec1525607551c2234ef921bf88296484f
2011-09-16 12:38:28 -07:00
Erik Gilling
b8ef90d679 update linux/fb.h
Change-Id: Ib00343e3b6f95eaf3d347d4b8b9df950d0686e70
Signed-off-by: Erik Gilling <konkers@android.com>
2011-09-14 11:20:23 -07:00
Elliott Hughes
5da3ed177c Merge "Update to tzdata2011j." 2011-09-12 11:19:51 -07:00
Elliott Hughes
6ea19d7815 Update to tzdata2011j.
Affects Samoa, Kenya, Uganda, and Tanzania.

Change-Id: Ibee638d415d4f0389ff27ea1c9c481543e181f1f
2011-09-12 10:28:11 -07:00
Erik Gilling
763230ae55 update kernel video/dsscomp.h
Change-Id: Ifc4f96e3a9c3435c0b0ee80ac9da295b4e9463a1
Signed-off-by: Erik Gilling <konkers@android.com>
2011-09-07 12:53:22 -07:00
Robert Greenwalt
7f84da69f8 Add some logging of dns cache operations
Added info about what entries are getting flushed due to ttl or size limits.

Change-Id: I69fb70ce23b5b820f5f1a5738c0f1aa57b6a1127
2011-09-02 07:44:36 -07:00
Elliott Hughes
b0bbbff606 Update to tzdata2011i.
Affects South Sudan (Africa/Juba), Samoa, Europe/Kalingrad, Newfoundland,
America/Resolute, Metlakatla, America/Honolulu, America/Goose_Bay and
America/St_Johns.

Change-Id: I8e60a7c7ba5ab71eedcc66937443a9e6993accd6
2011-08-29 08:58:09 -07:00
Erik Gilling
4f3465240a Merge "update video/dsscomp.h" 2011-08-24 15:01:13 -07:00
Erik Gilling
9749753889 update video/dsscomp.h
Change-Id: If4bd1d751b30ad2e65c0bd83caba436334949463
Signed-off-by: Erik Gilling <konkers@android.com>
2011-08-24 13:33:13 -07:00
Mike Lockwood
0b33d9982e Add linux/leds-an30259a.h
Change-Id: I9144b58bdc522d6ec22466adc459a40be648592f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-23 10:29:30 -04:00
David 'Digit' Turner
58246b7067 libc: Add __aeabi_f2uiz to libgcc_compat.c
This patch ensure that __aeabi_f2uiz is embedded in our C library.
This is needed to avoid breaking certain applications when they are
loaded in ICS. It is likely that the issue is due to mis-linked
binaries generated with the stand-alone toolchain (the problem
should not exist if you use ndk-build), but this fix is easier
than asking all app developers to fix their custom build system.

If you want more technical details, read the comments inside
libgcc_compat.c

Change-Id: I59ac1fc781ecb70b90b5573c5a3c67560ca8f270
2011-08-22 19:53:10 +02:00
David Turner
6dcf0d73a6 am 3dc94305: am 17a40ffb: am c57fd963: Merge "NDK: x86 header file has incorrect definition for ptrdiff_t"
* commit '3dc94305e4eb243747248b43954c499ddc96638d':
  NDK: x86 header file has incorrect definition for ptrdiff_t
2011-08-09 13:37:30 -07:00
David Turner
3afafd46f3 am 951e8381: am 3906a9c1: am f5aa1382: Merge "x86 libc: Fix the range to check the error"
* commit '951e8381916464243c7601fdb41e941811aa3773':
  x86 libc: Fix the range to check the error
2011-08-09 13:37:21 -07:00
David Turner
3dc94305e4 am 17a40ffb: am c57fd963: Merge "NDK: x86 header file has incorrect definition for ptrdiff_t"
* commit '17a40ffbf0e12ee44a024a9bb37434388478b478':
  NDK: x86 header file has incorrect definition for ptrdiff_t
2011-08-05 09:42:57 -07:00
David Turner
17a40ffbf0 am c57fd963: Merge "NDK: x86 header file has incorrect definition for ptrdiff_t"
* commit 'c57fd963817afa8894af49d6c98a80d8f9100937':
  NDK: x86 header file has incorrect definition for ptrdiff_t
2011-08-05 09:41:22 -07:00
David Turner
c57fd96381 Merge "NDK: x86 header file has incorrect definition for ptrdiff_t" 2011-08-05 09:23:29 -07:00
Mark D Horn
c3c0e88bed NDK: x86 header file has incorrect definition for ptrdiff_t
See Bug http://code.google.com/p/android/issues/detail?id=19042

Change-Id: I8e975930e7f8c3c437ecdffbc6f6bc5028937829
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2011-08-05 08:34:17 -07:00
David Turner
951e838191 am 3906a9c1: am f5aa1382: Merge "x86 libc: Fix the range to check the error"
* commit '3906a9c16b971c2689e1b8ae5455feec8cf7353c':
  x86 libc: Fix the range to check the error
2011-08-05 08:25:35 -07:00
David Turner
3906a9c16b am f5aa1382: Merge "x86 libc: Fix the range to check the error"
* commit 'f5aa1382ec7592c58827ed0822c77cb5bf8df165':
  x86 libc: Fix the range to check the error
2011-08-05 08:24:22 -07:00
David Turner
f5aa1382ec Merge "x86 libc: Fix the range to check the error" 2011-08-05 08:08:57 -07:00
Iliyan Malchev
5598077d35 bionic: update sanitized kernel header dsscomp.h
Change-Id: I3d52beb97efd23000b76131b6049978546571754
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-08-04 17:10:53 -07:00
David 'Digit' Turner
83eb46c59d am a64990f3: am f03fb955: am 023c4988: Merge "libc: x86: Fixed size_t definition."
* commit 'a64990f3f25c45fcfe79b9b71cf54d7045af0e4f':
  libc: x86: Fixed size_t definition.
2011-08-04 11:17:11 -07:00
David 'Digit' Turner
a64990f3f2 am f03fb955: am 023c4988: Merge "libc: x86: Fixed size_t definition."
* commit 'f03fb955a92bdcc341aaa1b4a6eb2d81bc844e06':
  libc: x86: Fixed size_t definition.
2011-08-04 11:13:10 -07:00
David 'Digit' Turner
f03fb955a9 am 023c4988: Merge "libc: x86: Fixed size_t definition."
* commit '023c49882e247bd0345946c908cff231ebf7097e':
  libc: x86: Fixed size_t definition.
2011-08-04 11:09:34 -07:00
David 'Digit' Turner
d265046dcc libc: x86: Fixed size_t definition.
This patch changes the declaration of size_t on x86 targets
to test for the __ANDROID__ macro, instead of ANDROID

__ANDROID__ should be a builting toolchain macro, while ANDROID
is usually added manually during the build.

Testing against __ANDROID__ allows us to use the header when
using the NDK's standalone x86 toolchain.

This is related to http://code.google.com/p/android/issues/detail?id=19011
The bug was already fixed in the NDK platform headers, this simply updates
the C library one accordingly.

Change-Id: Ie038c4c8b37b7d24e2e4ae4d7a63371b69c9a51e
2011-08-04 14:07:00 +02:00
Iliyan Malchev
3a5d668e01 bionic: add clean kernel header dsscomp.h
Change-Id: I09a98d0abe8ff4f92058f90ffb80ddc19ccee076
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-08-03 20:59:19 -07:00
Iliyan Malchev
7b79d1ed88 bionic: add processed kernel header rpmsg_omx.h
Change-Id: Id07ad37dd464d859cebdf72b68e6fb16d5e91c0f
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-08-03 18:08:35 -07:00
David Turner
ae3c9783f2 am bc9d1fe7: am 4685acbd: am 9efda5b7: Merge "typo in libc/stdio/wcio.h"
* commit 'bc9d1fe7c467d861a2b7c1deafca5589c1bc309e':
  typo in libc/stdio/wcio.h
2011-08-03 17:42:41 -07:00
David Turner
bc9d1fe7c4 am 4685acbd: am 9efda5b7: Merge "typo in libc/stdio/wcio.h"
* commit '4685acbdd45c44e2e21c74242953bee5198209f9':
  typo in libc/stdio/wcio.h
2011-08-03 08:16:37 -07:00
David Turner
4685acbdd4 am 9efda5b7: Merge "typo in libc/stdio/wcio.h"
* commit '9efda5b7d0a2e8d9dc7495680d66085dc0e151f3':
  typo in libc/stdio/wcio.h
2011-08-03 08:14:52 -07:00
David Turner
9efda5b7d0 Merge "typo in libc/stdio/wcio.h" 2011-08-03 08:10:29 -07:00
Robert Greenwalt
dfec555c7f am bcf861f2: Merge "Don\'t call freeaddrinfo with a NULL ptr."
* commit 'bcf861f246bb06ebba2c070af5b3222c5254970d':
  Don't call freeaddrinfo with a NULL ptr.
2011-07-29 10:15:21 -07:00
Robert Greenwalt
92425f097d Don't call freeaddrinfo with a NULL ptr.
bug:5067055
Change-Id: I863dc4760a0aa449ac6298397ed571d8d9287801
2011-07-28 17:21:17 -07:00
Robert Greenwalt
0cb2d467de resolved conflicts for merge of 9363d912 to honeycomb-plus-aosp
Change-Id: Ib0680d7e0be34ae656a9675ddd1014a6193a4006
2011-07-27 09:18:54 -07:00
Robert Greenwalt
777901424f resolved conflicts for merge of 9363d912 to honeycomb-plus-aosp
Change-Id: I555f5c10da9770feacdbece9fd77729d6151bfba
2011-07-26 16:18:52 -07:00
Robert Greenwalt
9363d91218 Add per-interface dns caches.
import of changes 22100 and 23138 from opensource.

Change-Id: I3ce86394323d269272aeb2bebeed4374f171a8cf
2011-07-26 12:59:50 -07:00
Mike Lockwood
a4fdd8ae4c f_accessory.h: Update USB accessory kernel driver header file
Bug: 5051683

Change-Id: I24fb640f24439f0010735eaa8e1e7b2767c353ea
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-21 13:51:30 -07:00
Robert Greenwalt
e4197d41bb am fed31359: am f6fcdb2e: am 28de3e59: Merge "Don\'t reset caches when dns props change."
* commit 'fed3135972f9725a44a7d9b3df728e311ac1a130':
  Don't reset caches when dns props change.
2011-07-20 17:20:03 -07:00
Robert Greenwalt
fed3135972 am f6fcdb2e: am 28de3e59: Merge "Don\'t reset caches when dns props change."
* commit 'f6fcdb2edd522de75811c7ccd23e74677bda6856':
  Don't reset caches when dns props change.
2011-07-20 17:16:37 -07:00
Robert Greenwalt
f6fcdb2edd am 28de3e59: Merge "Don\'t reset caches when dns props change."
* commit '28de3e5901fd54208f20e027365d2ba7b7e136b6':
  Don't reset caches when dns props change.
2011-07-20 15:49:50 -07:00
Mattias Falk
bad1686e1f Don't reset caches when dns props change.
This happens too frequently.  We should flush a per-interface cache
when it's dns server addrs changes.

Change-Id: I8a691c96ce9a775160ef55ddb8f755d649041583
2011-07-20 15:09:24 -07:00
Chia-chi Yeh
1dcc732bb5 update VPN related kernel headers to 2.6.39.
The original files are updated in I84220a16b667082f4ff75e72c6b0f2f0dddb65df.

Change-Id: I14ca73b79c66427fd2ad58fb54a5ac649c9b7eee
2011-07-18 12:00:23 -07:00
Mike Lockwood
10f6adf0c8 f_mtp.h: Update for MTP_SEND_FILE_WITH_HEADER ioctl
Change-Id: Ib5541625998805cbc23f34eb00f5a21cba6eef53
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-14 21:02:30 -04:00
David 'Digit' Turner
30e30acf10 am 6b6ebeca: am 3a131026: resolved conflicts for merge of 50a83255 to gingerbread-plus-aosp
* commit '6b6ebeca985fb3843b56b507ac4ac1be44080a9c':
  enable support for large files (> 2G)
  Enable functional DSO object destruction
  x86: Enable -fstack-protector
  Update X86 Bionic CRT files for unwind/exceptions
  bionic, libthread_db x86 fixes
  Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list
  Remove an extra register move.
  Replace __atomic_XXX with GCC __sync_XXX intrinsics.
  move some typedefs to procfs.h required by gdbserver build
  use consistent guards for off_t and size_t defines for IA
  Simplify variable typing for IA builds
  sigsetmask.c was not processing the "mask" argument.
  Add defines for CAIF support
  Remove extra/unneeded copy of fenv.h
  Use proper variable typing
  Update ATOM string routines to latest
  Fix undefined reference to dl_iterate_phdr for x86
  Fix missing NL
  ptrace.c Fix source file format to unix from dos
2011-07-13 14:53:56 -07:00
David Turner
6b577759b2 am f2ebd304: am 57aadbb0: Merge "enable support for large files (> 2G)"
* commit 'f2ebd304c3c0822121e6a4d0f542a048a7fc3b20':
  enable support for large files (> 2G)
2011-07-13 14:53:34 -07:00
David 'Digit' Turner
6b6ebeca98 am 3a131026: resolved conflicts for merge of 50a83255 to gingerbread-plus-aosp
* commit '3a13102637c8be53edf28f96598ac11aaa3e14df':
  enable support for large files (> 2G)
  Enable functional DSO object destruction
  x86: Enable -fstack-protector
  Update X86 Bionic CRT files for unwind/exceptions
  bionic, libthread_db x86 fixes
  Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list
  Remove an extra register move.
  Replace __atomic_XXX with GCC __sync_XXX intrinsics.
  move some typedefs to procfs.h required by gdbserver build
  use consistent guards for off_t and size_t defines for IA
  Simplify variable typing for IA builds
  sigsetmask.c was not processing the "mask" argument.
  Add defines for CAIF support
  Remove extra/unneeded copy of fenv.h
  Use proper variable typing
  Update ATOM string routines to latest
  Fix undefined reference to dl_iterate_phdr for x86
  Fix missing NL
  ptrace.c Fix source file format to unix from dos
2011-07-11 13:25:01 -07:00
David 'Digit' Turner
3a13102637 resolved conflicts for merge of 50a83255 to gingerbread-plus-aosp
Change-Id: Idf1971120bbdd52676f95aa3aa69f62342dc012e
2011-07-11 21:39:14 +02:00
Iliyan Malchev
f733ca08e6 bionic: update processed omap_ion.h
Change-Id: I72acee8d285247c9e5fe21014a6f5ce8af3f73e5
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-07-11 11:55:47 -07:00
David Turner
f2ebd304c3 am 57aadbb0: Merge "enable support for large files (> 2G)"
* commit '57aadbb096a118dd33f9f16c67bd18dbb6b92c4a':
  enable support for large files (> 2G)
2011-07-11 10:46:00 -07:00
Dragos Tatulea
c4a5e97624 enable support for large files (> 2G)
bionic has an i386 ifdef guard for the O_LARGEFILE flag. The reason for this
is not traceable in the git history, but it's most likely due to some old
toolchain or emulator problem.

Bug Id: 10035

Change-Id: I742ee6e50220276c2cb268d66f89b5655ef689fc
Signed-off-by: Dragos Tatulea <dragos.tatulea@intel.com>
2011-07-09 03:53:45 +02:00
David Turner
57aadbb096 Merge "enable support for large files (> 2G)" 2011-07-08 18:52:49 -07:00
Iliyan Malchev
221595a085 bionic: update cleaned headers for ion
Change-Id: I5352e6c2b29a1c3c17eda531df397d8d3a63649a
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-07-07 15:50:10 -07:00
Bruce Beare
afb0167ad9 Enable functional DSO object destruction
Unfortunately, legacy .so files for ARM don't have a correct crtbegin file.
Consequently, we have to grandfather the old __dso_handle behaviour.
Add some ifdefs for ARM to allow it to use the old code until we can work
out a transition.

Change-Id: I6a28f368267d792c94e1d985d8344023bc632f6f
Author: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:51:43 +02:00
Bruce Beare
a0aec0bd30 x86: Enable -fstack-protector
Change-Id: Iff9e3a3ba0e2d0faa7c6d98154aa5be0cc8a6c50
Orig-Change-Id: Ib69514c3afcb4c1f5e5f3f8cd91acfd145a0866c
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:51:37 +02:00
Mark D Horn
3eb2657855 Update X86 Bionic CRT files for unwind/exceptions
Several updates to Bionic crt*.o files to implement Linux/x86
stack unwind/exception handling.
Mark __dso_handle as hidden.
Note: Requires complete rebuild due to CRT changes. Google will
need to regenerate and check-in all the prebuilt x86 CRT object
files and libraries which link to them.

Change-Id: I01c14c19ef7569c9ffed89495cae2a459972c04b
Orig-Change-Id: I191ce1afb0dee7bbc28dcd9694e5919226dbd070
Signed-off-by: Bruce J Beare <bruce.j.beare@intel.com>
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Author: Lu, Hongjiu <hongjiu.lu@intel.com>
2011-07-07 22:46:16 +02:00
James Rose
3435fc600d bionic, libthread_db x86 fixes
Orig-Change-Id: I3be997f5f1f6a894a3c200d4f325cf3bfd428c66
Author: James Rose <james.rose@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:46:16 +02:00
Bruce Beare
bf29647964 Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list
Orig-Change-Id: Ia840a19a45257128eccdcf25d105f500f2d90741
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:46:16 +02:00
Bruce Beare
b1dd939e90 Remove an extra register move.
Orig-Change-Id: I63c217b73203b44b1a2e74950b58f2ec12989cab
Author: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:46:16 +02:00
Bruce Beare
e0bdf2c3e2 Replace __atomic_XXX with GCC __sync_XXX intrinsics.
Orig-Change-Id: I14f275392fcd70cc15e307470e0a099777c7c09e
Author: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:46:16 +02:00
Bruce Beare
84f8b3ad9c use consistent guards for off_t and size_t defines for IA
Orig-Change-Id: I9347ab4407c48c71c99f42583523ebe31a5e67ae
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:46:16 +02:00
Bruce Beare
4711f8faa8 Simplify variable typing for IA builds
Orig-Change-Id: I3f080b34360bfade0dbd5e2d8d0365e049162e4c
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:46:15 +02:00
Bruce Beare
e5705524e2 sigsetmask.c was not processing the "mask" argument.
Orig-Change-Id: I79b898ea5b882e8c0564e25466e827a9bedda6e8
Author: yhe19 <yunan.he@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:46:15 +02:00
Bruce Beare
074af91700 Add defines for CAIF support
Orig-Change-Id: I32d2e02814f1965ebdcecb804e947ff303dbe230
Author: Mark Gross <mark.gross@intel.com>
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2011-07-07 22:46:15 +02:00
Bruce Beare
832a86eaba Update ATOM string routines to latest
Orig-Change-Id: I22a600e7f172681cfd38ff73a64e3fd07b284959
Signed-off-by: Lu, Hongjiu <hongjiu.lu@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:46:15 +02:00
Bruce Beare
88bb394c0d Fix undefined reference to dl_iterate_phdr for x86
Orig-Change-Id: I22410b27939e8f54da932d7a1104102550c4685f
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2011-07-07 22:46:15 +02:00
Bruce Beare
0bbcbf0d57 Fix missing NL
Orig-Change-Id: Ic210fe9f740b9a8235a66d479ad4eddc869998bb
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2011-07-07 22:46:15 +02:00
Bruce Beare
0f2dc2b60c ptrace.c Fix source file format to unix from dos
Orig-Change-Id: Ia771b457eec7f9575d4631fb1c12a7062ebcc7de
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-07-07 22:46:15 +02:00
Jean-Baptiste Queru
681c4bd782 Merge b3773e9c
Change-Id: I5787d9ac5e745a08e1c891e9ce9efc4e7f97ace8
2011-07-06 13:00:05 -07:00
Jean-Baptiste Queru
cb5529efd8 Merge 784515ad
Change-Id: I3e5b691d008e9548f43339635bafdd95bc2f56fe
2011-07-06 12:59:55 -07:00
Jean-Baptiste Queru
c993768360 Revert "Revert "libc: Add logcat error message for memory corruption""
This reverts commit 368ee1e4d6.
2011-07-06 12:58:56 -07:00
David 'Digit' Turner
b3773e9cc8 am 9c95cbf7: Merge "Really fix the build."
* commit '9c95cbf75094c15d251bb3d57a55ce47d7c6c2c8':
  Really fix the build.
2011-07-06 10:27:49 -07:00
David 'Digit' Turner
c51871d4b2 Really fix the build.
libcutils/mspace.c includes libc/bionic/dlmalloc.c, we need to
take care of the fact that any internal C library function cannot
be used from it.

Change-Id: I0bc81ae090b7ac2d464f26b97fc6b94a08cdad9c
2011-07-06 19:02:15 +02:00
David 'Digit' Turner
784515ad93 am 01eb7f72: Merge "Fix broken build"
* commit '01eb7f72434830bb14cec906d885d2b7ee40d53b':
  Fix broken build
2011-07-06 09:08:47 -07:00
David 'Digit' Turner
a4824467c3 Fix broken build
Change-Id: Ia46b50aec51a55434c8828a73e07f4732f8f6c1c
2011-07-06 17:54:35 +02:00
Mathew Inwood
368ee1e4d6 Revert "libc: Add logcat error message for memory corruption"
This fixes the build.

This reverts commit 7708a89c60.
2011-07-06 16:51:54 +01:00
David 'Digit' Turner
877923d369 am d25ea49e: am b73b6783: Merge "libc: Add logcat error message for memory corruption"
* commit 'd25ea49e632c00d57d893563dac3f6dae5493b7e':
  libc: Add logcat error message for memory corruption
2011-07-06 07:53:10 -07:00
David 'Digit' Turner
d25ea49e63 am b73b6783: Merge "libc: Add logcat error message for memory corruption"
* commit 'b73b6783a595cf4b1cef6463c23317a8b417f1e9':
  libc: Add logcat error message for memory corruption
2011-07-06 07:46:40 -07:00
David 'Digit' Turner
7708a89c60 libc: Add logcat error message for memory corruption
Our dlmalloc implementation currently calls abort() when it detects
that the heap is corrupted, or that an invalid pointer is passed to
one of its functions.

The only way to detect this is because abort() will force-fully
crash the current program with a magic fault address of '0xdeadbaad'.

However, this is not really well documented, and a frequent topic
on the android-ndk forum (among others).

This change makes our dlmalloc code dump a simple message to the
log just before the abort() call (and hence before the stack trace)
to better help identify the problem.

Change-Id: Iebf7eb7fe26463ecadfaca8f247d237edb441e3c
2011-07-05 19:53:53 +02:00
Dragos Tatulea
0e1723e684 enable support for large files (> 2G)
bionic has an i386 ifdef guard for the O_LARGEFILE flag. The reason for this
is not traceable in the git history, but it's most likely due to some old
toolchain or emulator problem.

Bug Id: 10035

Change-Id: I742ee6e50220276c2cb268d66f89b5655ef689fc
Signed-off-by: Dragos Tatulea <dragos.tatulea@intel.com>
2011-07-05 15:36:43 +03:00
Nathan Forbes
7743f68204 typo in libc/stdio/wcio.h
whcar_io_data -> wchar_io_data
Signed-off-by: Nathan Forbes <me@nathanforbes.com>

Change-Id: I45c231efffac265eed51b7632d5a1b21c18bfa55
2011-07-02 20:29:25 -04:00
repo sync
946f3ad199 resolved conflicts for merge of 2f5c6d2d to honeycomb-plus-aosp
Change-Id: I858210fce4a04531afd9337a098db1dbf2308c2c
2011-06-30 17:28:59 -07:00
Elliott Hughes
1ee2cbe919 Update to tzdata2011h.
This includes the Egyptian and Russian DST changes.

(Cherry pick of dd0ffc738e3f956cf4f0ae409cda22595a33f08b.)

Change-Id: Ibf4b6a1f004c997a0b8df66e78f8867425d15dbe
2011-06-30 16:03:23 -07:00
Rebecca Schultz Zavin
015f3a770d Merge "Add cleaned headers for ion to bionic" 2011-06-30 15:10:37 -07:00
Elliott Hughes
dd0ffc738e Update to tzdata2011h.
This reflects the Russia and Curacao changes.

Change-Id: Id324b5b7690e0e7e46e1984f51647a6d6e7f0df3
2011-06-30 14:56:34 -07:00
Rebecca Schultz Zavin
1079eb1747 Add cleaned headers for ion to bionic
Change-Id: I0e2c35e8fb5cd20a796c4f588954205eacde0ae2
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-06-30 14:16:17 -07:00
Robert Greenwalt
8f88cbedc1 am e0a4b678: am cc32fbc3: Merge "Add support for a dns cache per interface"
* commit 'e0a4b67811981ab4c04c437b23c36ae42c444bce':
  Add support for a dns cache per interface
2011-06-27 14:14:07 -07:00
David 'Digit' Turner
2d2dbd3024 x86: fix full_x86-eng build
The latest merge conflict resolution worked only for ARM, but not for x86
Both ARM and x86 builds have been tested with this fix.

Change-Id: I4ec1f1b0ea32fa86e7e2515b221133473d6550a3
NOTE: Care has been taken to not change the compiler flags for ARM builds.
      In particular, when building crtbegin_so.so, the -fPIC flag is only
      used for x86 (previous reports indicate that it breaks the ARM
      build at runtime for obscure reasons).
2011-06-25 17:26:38 +02:00
David Turner
afc92c7023 am c643a4d4: am 2be3f09f: Merge "time: Improve C99 compliance"
* commit 'c643a4d4c71c2caaf016ab402fba99c1c9377567':
  time: Improve C99 compliance
2011-06-24 17:16:56 -07:00
David Turner
8bac1c0dfc am cd9f1f0b: am ac56f5ca: Merge "strftime: Use snprintf() instead of sprintf()"
* commit 'cd9f1f0b2726fbaac75b47231eb80a91841231f9':
  strftime: Use snprintf() instead of sprintf()
2011-06-24 10:50:37 -07:00
David 'Digit' Turner
67cbb25865 resolved conflicts for merge of b4896660 to master
Change-Id: I40451873c006e5bbcbd17d3bddc1a44773ba16a0
2011-06-24 18:00:04 +02:00
Robert Greenwalt
e0a4b67811 am cc32fbc3: Merge "Add support for a dns cache per interface"
* commit 'cc32fbc3050079aa020ac39afb1c84b5e72737a8':
  Add support for a dns cache per interface
2011-06-23 11:12:19 -07:00
Robert Greenwalt
cc32fbc305 Merge "Add support for a dns cache per interface" 2011-06-23 10:20:38 -07:00
David Turner
c643a4d4c7 am 2be3f09f: Merge "time: Improve C99 compliance"
* commit '2be3f09f2d9b6d35b262f7a6148f51c164bb8cbb':
  time: Improve C99 compliance
2011-06-23 10:01:11 -07:00
David Turner
2be3f09f2d Merge "time: Improve C99 compliance" 2011-06-23 09:10:39 -07:00
David Turner
cd9f1f0b27 am ac56f5ca: Merge "strftime: Use snprintf() instead of sprintf()"
* commit 'ac56f5ca2f4c54ddbd37b033f9465d89542c2cbe':
  strftime: Use snprintf() instead of sprintf()
2011-06-23 06:13:53 -07:00
David Turner
ac56f5ca2f Merge "strftime: Use snprintf() instead of sprintf()" 2011-06-23 06:04:28 -07:00
David Turner
b489666086 am 1c0a0381: Merge "Enable functional DSO object destruction"
* commit '1c0a0381dfb3648ffadef9537ec9383d63d62473':
  Enable functional DSO object destruction
2011-06-23 05:28:13 -07:00
Jim Huang
e6cff939e6 strftime: Use snprintf() instead of sprintf()
Change-Id: I112ac012894eddc96e5f3e77cb87bb300596e3ce
Signed-off-by: Jim Huang <jserv@0xlab.org>
2011-06-23 11:10:32 +08:00
Brian Carlstrom
e4e7755de3 Merge "Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master" 2011-06-22 14:45:07 -07:00
Brian Carlstrom
a94dc678fb Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master
Change-Id: I795687c11ca2e8443f7c8c264e209501dab9b2c9
2011-06-22 14:34:39 -07:00
Jim Huang
21edf366ea time: Improve C99 compliance
Quote from Linux Programmer's Manual:
  "If t is non-NULL, the return value is also stored in the memory
   pointed to by t."

Change-Id: I8cb66b67e5f34c536ce2f0db76a6dc337c42ea3f
Signed-off-by: Jim Huang <jserv@0xlab.org>
2011-06-22 16:44:45 +08:00
Glenn Kasten
31b1221c2f Re-generate resource.h from Linux 2.6.39
Change-Id: I22534914a4ae042ece4933bd372aafbc9129ab59
2011-06-21 17:49:32 -07:00
Bruce Beare
3964084282 Enable functional DSO object destruction
Unfortunately, legacy .so files for ARM don't have a correct crtbegin file.
Consequently, we have to grandfather the old __dso_handle behaviour.
Add some ifdefs for ARM to allow it to use the old code until we can work
out a transition.

Change-Id: I6a28f368267d792c94e1d985d8344023bc632f6f
Author: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-06-20 14:44:44 -07:00
Jun Nakajima
5288fee835 x86 libc: Fix the range to check the error
The spec says "A value in the range between -4095 to -1 indicates an error" (not -129).
This was pointed out in the comment in 22039.

Change-Id: I11b7c45015a9e4ccf09aed5364a889437eab6ab8
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2011-06-17 14:37:50 -07:00
Jeff Brown
d9dd4bcd9e Update linux/input.h header to 2.6.39.
Change-Id: I48e32adb78aac7e9a79163177fcea827159bd906
2011-06-12 18:09:00 -07:00
Elliott Hughes
3398ee9c15 Fix build.
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/stingray/obj/lib/libc.so: error: undefined reference to '_inet_pton'

Change-Id: Iee9f1ee87d0a37fa6aa91ecfb6283a7e03fb91c2
2011-06-09 13:03:17 -07:00
Elliott Hughes
b1fd729d63 Update to the latest NetBSD inet_pton.c.
Bug: 4580520
Change-Id: I1079574b14e78e153e10ac527ca406ef560af310
2011-06-08 17:17:53 -07:00
Mattias Falk
23d3e6b21b Add support for a dns cache per interface
Initial commit for dns cache per interface.
Added a type that holds a reference to a
cache and name of associated interface,
address of interface, name server(s)
associated with an interface etc.

New functions to set default interface,
address of name servers etc.

Change-Id: Ie991bc5592fd998409853d8bf77d7fe69035dac5
2011-06-08 15:39:29 +02:00
Jean-Baptiste Queru
09dc7fb1b8 am b127b1f2: Merge "libc: enable IPTOS_MINCOST, fixup gethostbyaddr() proto."
* commit 'b127b1f208e67d74a7ee94ad2bd0ffb2fed3af6b':
  libc: enable IPTOS_MINCOST, fixup gethostbyaddr() proto.
2011-06-07 13:24:04 -07:00
Jean-Baptiste Queru
1952c8f430 am e1bd6aa4: Merge "Update netlink-related kernel includes"
* commit 'e1bd6aa4e10e6b05e74d915c52e11a3998217522':
  Update netlink-related kernel includes
2011-06-07 13:24:01 -07:00
David 'Digit' Turner
cfaf49ddea am 4aa32153: am 2cae7967: Merge "libc: Fix prctl() declaration."
* commit '4aa321538afde20a632ed666f83f40f892505550':
  libc: Fix prctl() declaration.
2011-06-07 10:49:32 -07:00
Martijn Coenen
fd88dd19f7 Revert "Update X86 Bionic CRT files for unwind/exceptions"
This reverts commit dc3bc87b43,
causes netd to crash.
2011-06-07 17:19:36 +02:00
Martijn Coenen
a903811819 Revert "x86: Enable -fstack-protector"
This reverts commit e0b4844a20,
causes netd to crash.
2011-06-07 17:19:12 +02:00
David Turner
65fb884d28 am 204d1f65: am b2c7e0c1: Merge "x86: Enable -fstack-protector"
* commit '204d1f65dbfc6d5a14a90627d9d1efcfce8261ee':
  x86: Enable -fstack-protector
2011-06-06 12:57:08 -07:00
David Turner
1dae997ca4 am a57270b6: am 56baceca: Merge "Update X86 Bionic CRT files for unwind/exceptions"
* commit 'a57270b6ab2978764920ade17448f94875249001':
  Update X86 Bionic CRT files for unwind/exceptions
2011-06-06 12:57:00 -07:00
David 'Digit' Turner
4aa321538a am 2cae7967: Merge "libc: Fix prctl() declaration."
* commit '2cae7967e6049e45eaef71207481b6f8b2456025':
  libc: Fix prctl() declaration.
2011-06-06 12:27:10 -07:00
David Turner
204d1f65db am b2c7e0c1: Merge "x86: Enable -fstack-protector"
* commit 'b2c7e0c18b7ab04cfe306277c79165de0612a2d1':
  x86: Enable -fstack-protector
2011-06-06 11:32:49 -07:00
David Turner
a57270b6ab am 56baceca: Merge "Update X86 Bionic CRT files for unwind/exceptions"
* commit '56baceca024f1cc2a5e8ef8c5e7ba7ea463d1ae2':
  Update X86 Bionic CRT files for unwind/exceptions
2011-06-06 11:32:38 -07:00
Brian Carlstrom
78d18badef Merge commit 'a7f976c9de3c20cc8cdde4f3dfeeb48a1a89adb7' into honeycomb-mr2-release-to-dalvik-dev 2011-06-03 12:40:34 -07:00
JP Abgrall
8a51237407 libc: enable IPTOS_MINCOST, fixup gethostbyaddr() proto.
Make netinet/ip.h have IPTOS_MINCOST which matches what
  kernel/common/linux/ip.h has to say.
Fixup gethostbyaddr() 1st arg to match what man has to say.

Change-Id: Iff9647d4a46ea88b1fc32163eb69bb9b27cdf370
2011-06-02 15:28:16 -07:00
Dmitry Shmidt
b78220573a Update netlink-related kernel includes
Change-Id: I7e41bb168a1036093b598383d663a6a2e036ea42
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-02 15:05:34 -07:00
Steinar H. Gunderson
c18d76f6ec Add icmp6.h and ip6.h files from current NetBSD libc.
Change-Id: I6b304dfbefaec74c5fb15b216f38d698a55f0642
2011-06-01 11:12:38 -07:00
Brian Carlstrom
1f8e2672a8 Implement getpwnam_r(3) and getpwuid_r(3).
These functions were already declared in <pwd.h>, but hadn't been implemented
yet.

git cherry-pick --no-commit 081504af74

Change-Id: I316acf4cffb9f2c6788e8e342aa620f9a00886d5
2011-05-27 00:52:21 -07:00
Simon Wilson
fe88a194a3 Merge "sound/asound.h: add header for ALSA" 2011-05-26 09:37:32 -07:00
David 'Digit' Turner
2cae7967e6 Merge "libc: Fix prctl() declaration." 2011-05-25 18:24:51 -07:00
David 'Digit' Turner
b083bb57f5 libc: Fix prctl() declaration.
This change fixes the prctl() declaration to match GLibc, and allow us
to build gcc-4.6 for Android (among other things). Note that this does
not change the source and binary interfaces.

Change-Id: I3900c957f0da8b3548cbe9da8c41d50099dc19d6
2011-05-26 02:46:41 +02:00
Frank Maker
7b6795dad9 Fixed bug where -k option would not be passed to cleanupFile function
Changed cleanupFile to have no default original path, forcing it to be passed instead, thereby conforming to the Google Python style guide.
2011-05-25 17:28:37 -07:00
Simon Wilson
f67e03274d sound/asound.h: add header for ALSA
Change-Id: If9680194846752a2fae6a4a3b8e6dba4175fb9ca
2011-05-25 14:16:34 -07:00
Michael I. Gold
9d91860612 am 5c7384fa: am 8f7cdff4: am a7f976c9: update linux/tegrafb.h
* commit '5c7384fa791dafe6cdf9769c5166e683e29f189e':
  update linux/tegrafb.h
2011-05-25 11:04:06 -07:00
Michael I. Gold
5c7384fa79 am 8f7cdff4: am a7f976c9: update linux/tegrafb.h
* commit '8f7cdff45557c937e6c7a7e010dc961feeb60c16':
  update linux/tegrafb.h
2011-05-24 16:48:48 -07:00
Michael I. Gold
8f7cdff455 am a7f976c9: update linux/tegrafb.h
* commit 'a7f976c9de3c20cc8cdde4f3dfeeb48a1a89adb7':
  update linux/tegrafb.h
2011-05-24 16:46:27 -07:00
Bruce Beare
e0b4844a20 x86: Enable -fstack-protector
Change-Id: Ib69514c3afcb4c1f5e5f3f8cd91acfd145a0866c
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-05-24 13:32:14 -07:00
Mark D Horn
dc3bc87b43 Update X86 Bionic CRT files for unwind/exceptions
Several updates to Bionic crt*.o files to implement Linux/x86
stack unwind/exception handling.
Mark __dso_handle as hidden.
Note: Requires complete rebuild due to CRT changes. Google will
need to regenerate and check-in all the prebuilt x86 CRT object
files and libraries which link to them.

Change-Id: I191ce1afb0dee7bbc28dcd9694e5919226dbd070
Signed-off-by: Bruce J Beare <bruce.j.beare@intel.com>
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Author: Lu, Hongjiu <hongjiu.lu@intel.com>
2011-05-24 13:31:50 -07:00
Michael I. Gold
a7f976c9de update linux/tegrafb.h
Change-Id: I6bccdb7e0eb34fc4ca370458f44ed187ccb67ac8
2011-05-24 13:02:58 -07:00
Anders Fredlund
dd16182b4b Remove expired dns cache entries before removing oldest
A suggestion how to make a smarter delete function when the cache
is full. First look through the entire cache and remove all entries
which have expired. If none use the old solution and just remove
the last entry in the MRU list.

Change-Id: I5f997ab35290a55dc6e1ddf37d725759edf83d36
2011-05-20 08:12:37 +02:00
JP Abgrall
f8d02d24ed libc: enable IPTOS_MINCOST, fixup gethostbyaddr() proto.
Make netinet/ip.h have IPTOS_MINCOST which matches what
  kernel/common/linux/ip.h has to say.
Fixup gethostbyaddr() 1st arg to match what man has to say.

Change-Id: Iff9647d4a46ea88b1fc32163eb69bb9b27cdf370
2011-05-18 16:53:23 -07:00
David 'Digit' Turner
b6cd6816d2 libc: Fix leak in the DNS thread-specific state.
NOTE: This is a back-port from the internal HC branch.

This patch fixes a leak that occurs when creating a new
thread-specific DNS resolver state object.

Essentially, each thread that calls gethostbyname() or getaddrinfo()
at least once will leak a small memory block. Another leak happens
anytime these functions are called after a change of the network
settings.

The leak is insignificant and hard to notice on typical programs.
However, netd tends to create one new thread for each DNS request
it processes, and quickly grows in size after a > 20 hours.

The same problem is seen in other system processes that tend to
create one thread per request too.

The leak occured becasue res_ninit() was called twice when creating
a new thread-specific DNS resolver state in _res_get_thread().

This function could not properly reset an existing thread and was
leaking a memory block.

The patch does two things:

- First, it fixes res_ninit() to prevent any leakage when resetting
  the state of a given res_state instance.

- Second, it modifies the _res_get_thread() implementation to
  make it more explicit, and avoid calling res_ninit() twice
  in a row on first-time creation.

Fix for Bug 4089945, and Bug 4090857

Change-Id: Icde1d4d1dfb9383efdbf38d0658ba915be77942e
2011-05-18 13:48:20 +02:00
David Turner
b609bfd048 am a9e409a0: am a7a9dddb: Merge "bionic: Add ARM optimized strcmp()"
* commit 'a9e409a03530c79bc7ad8144d08e8921ebe0dd02':
  bionic: Add ARM optimized strcmp()
2011-05-17 04:51:45 -07:00
David Turner
bde9e2802d am 3f7a3228: am c5c84c86: Merge "vfscanf: Add support for L type modifier for long long"
* commit '3f7a3228cdf1a48e379fb297be9114ecd71bff11':
  vfscanf: Add support for L type modifier for long long
2011-05-17 04:51:41 -07:00
David Turner
a9e409a035 am a7a9dddb: Merge "bionic: Add ARM optimized strcmp()"
* commit 'a7a9dddb5dfe783d65fec4d3b0dee9f734345a29':
  bionic: Add ARM optimized strcmp()
2011-05-17 04:47:09 -07:00
David Turner
3f7a3228cd am c5c84c86: Merge "vfscanf: Add support for L type modifier for long long"
* commit 'c5c84c8643250c71bde87541f2b28fc21a9c5cc7':
  vfscanf: Add support for L type modifier for long long
2011-05-17 04:47:06 -07:00
David Turner
a7a9dddb5d Merge "bionic: Add ARM optimized strcmp()" 2011-05-17 04:29:20 -07:00
David Turner
c5c84c8643 Merge "vfscanf: Add support for L type modifier for long long" 2011-05-17 04:07:27 -07:00
Elliott Hughes
081504af74 Merge "Implement getpwnam_r(3) and getpwuid_r(3)." into dalvik-dev 2011-05-13 13:30:59 -07:00
Elliott Hughes
e80227c2d3 Implement getpwnam_r(3) and getpwuid_r(3).
These functions were already declared in <pwd.h>, but hadn't been implemented
yet.

Change-Id: I9cddafa4c7f19a40eec566d3f3b221bd5a680e85
2011-05-13 12:20:05 -07:00