Commit graph

343 commits

Author SHA1 Message Date
Szymon Jakubczak
4032c1e2df added missing ether_aton and ether_ntoa
Change-Id: I32ee448abde4d5693d393030ed77ddc6d2ad1dfc
2010-06-11 20:48:40 -04:00
David Turner
16c91eff09 Merge "Add missing termios defns to bring on par with ARM" 2010-06-05 13:07:40 -07:00
Bruce Beare
84baa86362 Add missing termios defns to bring on par with ARM
Change-Id: Ied1871aa0a2e33473b89a4ac6d54e3c44be7f457
2010-06-04 08:14:44 -07:00
David Turner
f982f03832 Merge "pthread: introduce pthread_setname_np() as a mean to give names to threads" 2010-06-03 13:11:52 -07:00
André Goddard Rosa
78c1c04ced pthread: introduce pthread_setname_np() as a mean to give names to threads
... 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>
2010-05-19 23:17:16 -03:00
André Goddard Rosa
a910abcd19 improve readability of stdio: fix indentation and remove trailing spaces
Change-Id: Ic51e58a7c75d20bf770dc0ebd7f97a338fbe0036
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-05-17 09:34:13 -07:00
David Turner
1297428e89 Merge "Add declaration for sys_signame[] forgotten in change 12489" 2010-05-14 12:12:24 -07:00
Matt Fischer
e4fa46e75c Set SA_RESTORER in sigaction()
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
2010-05-12 14:18:36 -05:00
Jean-Baptiste Queru
c3581dc78a Merge "Sometimes the compiler is very right! Found bug in bessel routines for float." 2010-05-11 10:43:56 -07:00
David Turner
7911e057a5 Merge "Reduce compiler anxiety." 2010-05-11 10:20:15 -07:00
David Turner
16b59c4c38 Merge "Added support for LD_PRELOAD" 2010-05-11 10:17:00 -07:00
David Turner
6ba5efd59a Merge "stdio: simplify __fremovelock()" 2010-05-10 16:04:02 -07:00
Jean-Baptiste Queru
161232820c Merge "Reversed order of const and static to hush warning from compiler." 2010-05-10 16:00:22 -07:00
André Goddard Rosa
051ea9bc07 stdio: simplify __fremovelock()
... by removing extraneous NULL check, as free() already does it.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Change-Id: I0445f35c7ad0a049a0e4aee1fbe002ed2f13b94b
2010-05-10 15:42:47 -07:00
Matt Fischer
4fd42c1dc0 Added support for LD_PRELOAD
The LD_PRELOAD environment variable allows the user to specify a list of
libraries which should be unconditionally loaded before any others.  This
makes possible some useful tricks, such as library interposers.

Change-Id: I433d775ab08ef63a5fbe7b21f87a5642954fc32f
2010-05-10 15:09:19 -07:00
David Turner
d791da7943 Merge "string: tidy up strndup()" 2010-05-10 14:52:02 -07:00
Scott Turner
c1f8dd9f0b Sometimes the compiler is very right! Found bug in bessel routines for float.
Original compiler error:

target arm C: libm <= bionic/libm/src/e_j0f.c
bionic/libm/src/e_j0f.c: In function 'j0f':
bionic/libm/src/e_j0f.c:66: warning: comparison between signed and unsigned integer expressions
bionic/libm/src/e_j0f.c: In function 'y0f':
bionic/libm/src/e_j0f.c:140: warning: comparison between signed and unsigned integer expressions
target arm C: libm <= bionic/libm/src/e_j1.c

It's subtle but ix is masked with 0x7f000000 so it can never ever have a value
greater than 0x80000000. So I switched to using the unmasked hx and added a
cast as a reward to the compiler for being right.

I checked the original routines that e_j0f.c was ported from (in e_j0.c) and
the double's don't use 0x80000000 so this issue didn't exist there.

Let that be a warning to those that just slap on casts to shut up the compiler,
sometimes it's sniffed out a bug for you. :-)

Similar fixes in the other functions.

Change-Id: I7a776e5d4721fc3a9e3bd89179b67e9af3a2ebfa
2010-05-07 15:02:36 -07:00
David Turner
0be7eda75a Merge "Fix log channel initialization at bionic/logd_write.c." 2010-05-01 15:31:39 -07:00
Jean-Baptiste Queru
716e06071a Merge "added headers for SuperH which automatically generate by update_all.py" 2010-04-29 08:01:50 -07:00
Yi Sun
3472348067 linker: fix the undefined weak symbols issue
I'm not sure if this is a correct fix or not.
Also need to find out why 1.6 does not have this issue.

Change-Id: If46c844834bda1e2cbf084a1a45a1832119b3ae3
2010-04-29 07:50:04 -07:00
André Goddard Rosa
5751c54bf1 bionic: add missing NULL check from memory allocation on record_backtrace()
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>

Change-Id: I739c63c5a7344fff1775580044dc647edf246ebf
2010-04-29 07:37:42 -07:00
André Goddard Rosa
c8a850bcd1 stdio: simplify vasprintf()
... by removing unneeded NULL check, as free() already does it.
By the way, we don't need to set a stack variable back to NULL.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>

Change-Id: Id90eb8f042b5c922c5ff139b11ff8366fb404566
2010-04-29 07:33:40 -07:00
André Goddard Rosa
6aed4288eb stdio: simplify asprintf()
... by removing unneeded NULL check, as free() already does it.
By the way, we don't need to set a stack variable back to NULL.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>

Change-Id: Id1f72e872f73366dddcea4abc75885a3d9a318c6
2010-04-29 07:31:44 -07:00
André Goddard Rosa
e734769276 improve readability of stdlib: fix indentation and remove trailing spaces
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>

Change-Id: I7dd90a0816b5376ffc1de4499d56935e0bd574a1
2010-04-29 07:29:06 -07:00
Matt Fischer
1698d9ebfc Fixed support for RTLD_NEXT in dlsym()
The previous implementation of this flag was broken--it behaved identically
to RTLD_DEFAULT.  This adds a proper implementation, which examines the address
of the calling function, and uses it to determine which library to use to begin
the symbol search process.

Change-Id: I2ad2b46363f68932af63a3828a22f9c7987eea67
2010-04-08 10:14:47 -05:00
Thorsten Glaser
81569aa72c Add declaration for sys_signame[] forgotten in change 12489 2010-04-05 21:08:30 +02:00
André Goddard Rosa
350bb359fa bionic: fix memory leak in get_malloc_leak_info() error path
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-03-29 21:21:26 -03:00
David Turner
f8916e2e45 Merge "bionic: clear only the part of the buffer which is not overwritten afterward" 2010-03-30 14:52:14 -07:00
André Goddard Rosa
3f61212781 bionic: clear only the part of the buffer which is not overwritten afterward
Change-Id: I5ddd93f0557e5a7401460dc9fc8a55b330a79c3a
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-03-28 21:32:36 -03:00
David Turner
4ad72f89b1 Merge "linker: fix the undefined weak symbols issue" 2010-03-29 15:49:42 -07:00
Min-su, Kim
3cab22c8cf linker: fix the undefined weak symbols issue 2010-03-29 15:43:09 -07:00
David Turner
8ab5b02b5f Merge changes Ibdc6e3c8,I9bcb91a2
* changes:
  Correct generic memset implementation
  Generic memcpy should define MEMCOPY before including bcopy.c
2010-03-29 15:05:47 -07:00
David Turner
87ae0da817 Merge "Atom optimized string and memory routines" 2010-03-29 14:40:05 -07:00
André Goddard Rosa
acdb052030 stdlib: optimize bsearch()
... by checking most probable condition first (elements do differ)

Change-Id: I424eab9c32a6d9eb82b686ca04025ec8c9097035
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-03-28 21:18:56 -03:00
Bruce Beare
8ff1a2759a Atom optimized string and memory routines
Change-Id: I27b68bb28551c75c9ac84bb9730e2cd8254d8991
2010-03-26 10:54:07 -07:00
Bruce Beare
58f0326362 Android hack for size_t
Change-Id: I3c967fca60f542459dc17be84da47b3b6a26242b
2010-03-26 09:36:01 -07:00
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
Matt Fischer
e2a8b1fd19 Added support for dladdr()
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
2010-03-17 16:11:37 -05:00
David Turner
ede2e75f49 Merge "x86 syscall system call implementation" 2010-03-17 14:07:27 -07:00
David Turner
b0ae864dff Merge "Fix pread()/pwrite() stubs" 2010-03-17 14:00:20 -07:00
David Turner
a9c41a8e0a Merge "bionic: remove unneeded variable from chk_realloc()" 2010-03-16 17:26:44 -07:00
David Turner
3f192f55f0 Merge "bionic: equalize the <unknown> program name between ssp.c and libc_init_common.c" 2010-03-16 17:25:53 -07:00
David Turner
dd8f3c80f1 Merge "improve readability of string: fix indentation and remove trailing spaces" 2010-03-16 17:25:04 -07:00
David Turner
5586838bab Merge "optimize delete/delete[] operators by removing unneeded branch" 2010-03-16 17:21:52 -07:00
Bruce Beare
3c543e1da9 x86 syscall system call implementation 2010-03-04 10:29:38 -08:00
Matt Fischer
e31c1d0b48 Fix pread()/pwrite() stubs
On ARM EABI, 64-bit function parameters must be aligned
to an even/odd register pair.  The weird way these stubs
were written (using separate lo/hi parameters) prevented
this alignment from being enforced by the compiler.
2010-02-12 16:13:46 -06:00
Iliyan Malchev
58060c50bc am ee424e23: bionic: update processed kernel header a1026.h
Merge commit 'ee424e23c10c051ee4760177c85f6003ff20108c' into eclair-plus-aosp

* commit 'ee424e23c10c051ee4760177c85f6003ff20108c':
  bionic: update processed kernel header a1026.h
2010-02-09 09:25:57 -08:00
Iliyan Malchev
ee424e23c1 bionic: update processed kernel header a1026.h
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-02-08 15:57:09 -08:00
Chris Dearman
bdc6e3c83f Correct generic memset implementation
Signed-off-by: Chris Dearman <chris@mips.com>
2010-02-05 15:13:55 -08:00