Merge commit '50ace4fec5e8cb5afcbc656a4556fa528adfd760' into gingerbread-plus-aosp
* commit '50ace4fec5e8cb5afcbc656a4556fa528adfd760':
Remove compiler warnings when building Bionic.
Also add missing declarations to misc. functions.
Fix clearerr() implementation (previous was broken).
Handle feature test macros like _POSIX_C_SOURCE properly.
Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4
Merge commit '6a09cfd9f916e3a60de707ff0806cdeb143d77a4' into gingerbread-plus-aosp
* commit '6a09cfd9f916e3a60de707ff0806cdeb143d77a4':
wchar.h: improve wchar_t support in Bionic
bionic/libc/include/../include/stdlib.h: In function 'int grantpt(int)':
bionic/libc/include/../include/stdlib.h:138:23: warning: parameter '__fd' set but not used [-Wunused-but-set-parameter]
By adding __attribute((unused)) to __fd, the warning is gone, and this
attribute is compatible with gcc-4.4.0, gcc-4.3.1 gcc-4.2.1.
There is no any side effect.
Change-Id: I385f0f4da1013ffd1499e391eac9123aafe1f7a5
... so that each cloned process at the kernel level can be named
independently. Tools like 'top' can display the CPU/memory statistics
for each process's thread if "Show Threads" mode is on.
With this function in place, we can convert dalvik/Thread.c setThreadName()
function over this function. This feature ought to be provided by the
underlying C library and not coded directly in Dalvik.
Change-Id: Ifa997665dbaa114e0b126f8c667708be9a4137fd
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
GDB looks for specific opcode sequences when trying to recognize a stack
frame as a signal trampoline. The sequences it looks for happen to be those
created when SA_RESTORER is set, since glibc always sets a restorer. This
patch does the same here, so that the trampolines can be correctly identified.
Change-Id: I0ac574a68818cb24d939c3527f3aaeb04b853d04
Note that this does not change the implementation of conditional variables
which still use shared futexes, independent on the flags being selected.
This will be fixed in a later patch, once our system is modified to use
pthread_condattr_setpshared(attr, PTHREAD_PROCESS_SHARED) properly.
Change-Id: I935de50964cd41f97a13dbfd6626d3407b0406c3
dladdr() is a GNU extension function, which allows the caller to retrieve
symbol information for a specified memory address. It is useful for things
like generating backtrace information at runtime.
Change-Id: I3a1def1a6c9c666d93e1e97b7d260dfa5b9b79a9
Private futexes are a recent kernel addition: faster futexes that cannot be
shared between processes. This patch uses them by default, unless the PROCESS_SHARED
attribute flag is used when creating a mutex and/or conditional variable.
Also introduces pthread_condattr_init/destroy/setpshared/getpshared.
Change-Id: I3a0e2116f467072b046524cb5babc00e41057a53
Any of the setuid functions now updates /acct/uid/ with its own tid
before changing users. This is so we can properly account for cpu time
per uid.
Change-Id: I34186cf4d5228cac8439e582a9e26c01ef3011e4
Signed-off-by: Mike Chan <mike@android.com>
Only provide an implementation for ARM at the moment, since
it requires specific assembly fragments (the standard syscall
stubs cannot be used because the child returns in a different
stack).
The gHardy man pages specify the return type of ptsname_r to be char*, but the
return value to be 0 on success, negative on error and the gHardy stdlib.h
defines extern int ptsname_r(...).
Busybox telnetd fails to run successfully without this change.
Merge commit 'f197147a787d7415e6e0a1bad15566836c55befb'
* commit 'f197147a787d7415e6e0a1bad15566836c55befb':
Revert "Add qsort_r() implementation to the C library."
Merge commit 'be71c8142d4225dd9af4742ec050f30fcbc2aa5e'
* commit 'be71c8142d4225dd9af4742ec050f30fcbc2aa5e':
Add qsort_r() implementation to the C library.
Merge commit 'ca07064c9ebd8523ed88fa09e97feaaafb7e9c15' into eclair-mr2-plus-aosp
* commit 'ca07064c9ebd8523ed88fa09e97feaaafb7e9c15':
Revert "Add qsort_r() implementation to the C library."
Merge commit '5f53a18204ec991f5a77872806eeaa185936aa8c' into eclair-plus-aosp
* commit '5f53a18204ec991f5a77872806eeaa185936aa8c':
Revert "Add qsort_r() implementation to the C library."
Merge commit '5f53a18204ec991f5a77872806eeaa185936aa8c' into eclair-mr2
* commit '5f53a18204ec991f5a77872806eeaa185936aa8c':
Revert "Add qsort_r() implementation to the C library."