Commit graph

567 commits

Author SHA1 Message Date
David 'Digit' Turner
2576abf0ed am 51976326: libc: Fix sem_post() implementation to wake up all waiting threads.
Merge commit '519763265ec0b634bd9c264a0aca034882458ecc' into gingerbread-plus-aosp

* commit '519763265ec0b634bd9c264a0aca034882458ecc':
  libc: Fix sem_post() implementation to wake up all waiting threads.
2010-07-02 15:12:00 -07:00
David 'Digit' Turner
519763265e libc: Fix sem_post() implementation to wake up all waiting threads.
This also allows us to optimize the case where we increment an
uncontended semaphore (no need to call futex_wake() then).

Change-Id: Iad48efe8551dc66dc89d3e3f18c001e5a6c1939f
2010-07-02 15:09:57 -07:00
The Android Open Source Project
424d027b6e merge from open-source master
Change-Id: I895b74454b35da7eba6c0f6250fe2ca6c9907f1d
2010-07-02 11:40:01 -07:00
The Android Open Source Project
d6f3185148 merge from open-source master
Change-Id: I6a15428fd9ce1f1dbbb702ff13c6af8da8f54a1e
2010-07-02 11:37:54 -07:00
Jean-Baptiste Queru
6fce15cea1 Merge "Regenerate linux/netfilter_ipv6/ip6_tables.h." 2010-07-02 10:34:04 -07:00
David 'Digit' Turner
3b43f87d29 Allow dlclose() to properly call static C++ destructors.
With this patch _and_ an upcoming build/ patch, the destruction
of static C++ objects contained in shared libraries will happen
properly when dlclose() is called.

Note that this change introduces crtbegin_so.S and crtend_so.S which
are currently ignored by the build system.

+ move definition of __dso_handle to the right place
(before that, all shared libraries used the __dso_handle
global variable from the C library).

Note that we keep a 'weak' __dso_handle in aeabi.c to avoid
breaking the build until the next patch to build/core/combo/
appears. We will be able to remove that later.

+ move bionic/aeabi.c to arch-arm/bionic/ (its proper location)

NOTE: The NDK will need to be modified to enable this feature in
         the shared libraries that are generated through it.

Change-Id: I99cd801375bbaef0581175893d1aa0943211b9bc
2010-07-01 23:09:28 -07:00
David 'Digit' Turner
7d1d98b97e am a02b93bd: libc: add sanity checks to pthread_mutex_destroy()
Merge commit 'a02b93bd75a9d156117264d88069566e447397e2' into gingerbread-plus-aosp

* commit 'a02b93bd75a9d156117264d88069566e447397e2':
  libc: add sanity checks to pthread_mutex_destroy()
2010-06-29 12:53:13 -07:00
David 'Digit' Turner
a02b93bd75 libc: add sanity checks to pthread_mutex_destroy()
Change-Id: Iddb2204fa792fa9aca5f19838926dddbb09b74a2
2010-06-28 14:20:22 -07:00
David 'Digit' Turner
4a927712b7 am 0621a279: libstdc++: use extern "C++" in all our C++ system headers.
Merge commit '0621a279adfb981ea1f0564e7fc8280cda78e043' into gingerbread-plus-aosp

* commit '0621a279adfb981ea1f0564e7fc8280cda78e043':
  libstdc++: use extern "C++" in all our C++ system headers.
2010-06-28 11:27:32 -07:00
Vilmos Nebehaj
c1a534ba0b Regenerate linux/netfilter_ipv6/ip6_tables.h.
Add ip6t_get_target() to kernel_known_generic_statics in
libc/kernel/tools/defaults.py to be able to build ip6tables.

Change-Id: Iadb885db3faa85b2d0070dc2e0ac493af6e62bb6
2010-06-28 15:13:23 +02:00
David 'Digit' Turner
0621a279ad libstdc++: use extern "C++" in all our C++ system headers.
This is needed to build an independent toolchain with g++ that doesn't think
that all these headers are in C.

Change-Id: Ie9a8ccfcab7780d6a4e5722777d61c2b1b312001
2010-06-25 16:53:37 -07:00
Nick Pelly
0a79d2135c am fa5755ae: Merge "Add clean headers for 7x30 video codec." into gingerbread
Merge commit 'fa5755ae980b6f4ac5df37b263ba20f472db31ca' into gingerbread-plus-aosp

* commit 'fa5755ae980b6f4ac5df37b263ba20f472db31ca':
  Add clean headers for 7x30 video codec.
2010-06-23 17:58:38 -07:00
Nick Pelly
fa5755ae98 Merge "Add clean headers for 7x30 video codec." into gingerbread 2010-06-23 17:56:38 -07:00
Nick Pelly
21baae3d71 Add clean headers for 7x30 video codec.
Change-Id: Id4faa5bacb03cc42377527e05c53c6392c776e7d
2010-06-23 16:17:58 -07:00
David 'Digit' Turner
cb0f5ed811 am 50ace4fe: Remove compiler warnings when building Bionic.
Merge commit '50ace4fec5e8cb5afcbc656a4556fa528adfd760' into gingerbread-plus-aosp

* commit '50ace4fec5e8cb5afcbc656a4556fa528adfd760':
  Remove compiler warnings when building Bionic.
2010-06-23 11:17:07 -07:00
David 'Digit' Turner
50ace4fec5 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
2010-06-22 17:51:41 -07:00
David 'Digit' Turner
e1a739ec38 am 6a9b888d: Allow static C++ destructors to be properly called on dlclose().
Merge commit '6a9b888d7c4b246f6f66360789c72b754ff85021' into gingerbread-plus-aosp

* commit '6a9b888d7c4b246f6f66360789c72b754ff85021':
  Allow static C++ destructors to be properly called on dlclose().
2010-06-22 11:19:25 -07:00
The Android Open Source Project
04acf6c80e merge from froyo-plus-aosp
Change-Id: I64de22c97a98ec4f1f288c619e3d66d6be261c6d
2010-06-21 10:52:43 -07:00
David 'Digit' Turner
6a9b888d7c Allow static C++ destructors to be properly called on dlclose().
With this patch, _and_ an upcoming build/ patch, the destruction
of static C++ objects contained in shared libraries will happen
properly when dlclose() is called.

Note that this change introduces crtbegin_so.S and crtend_so.S which
are currently ignored by the build system.

+ move definition of __dso_handle to the right place
  (before that, all shared libraries used the __dso_handle
   global variable from the C library).

  Note that we keep a 'weak' __dso_handle in aeabi.c to avoid
  breaking the build until the next patch to build/core/combo/
  appears. We will be able to remove that later.

+ move bionic/aeabi.c to arch-arm/bionic/ (its proper location)

Change-Id: Ie771aa204e3acbdf02fd30ebd4150373a1398f39
NOTE: The NDK will need to be modified to enable this feature in
      the shared libraries that are generated through it.
2010-06-18 16:07:10 -07:00
The Android Open Source Project
e8f79c1f5d merge from open-source master
Change-Id: I408b5705b18d9e93e66bfbfeec0e3baefd618dec
2010-06-18 11:33:00 -07:00
David Turner
c6b5cd8d76 Merge "Fix for incorrect reply from sysconf(_SC_NPROCESSORS_ONLN)" 2010-06-16 17:36:32 -07:00
Mikael Ohlson
b44fcd6e8f Fix for incorrect reply from sysconf(_SC_NPROCESSORS_ONLN)
When calling sysconf with _SC_NPROCESSORS_ONLN, the value one (1) was
returned on systems with two or more cores, since '/proc/stat' was
incorrectly parsed.

The function line_parser_getc (LineParser* p) read 128 characters of
input for each invocation.

The proper and probably aimed for behavior is to read 128 characters
at the first call, then for each subsequent call only return the next
buffered character until a new read is needed and only then read
another 128 characters.

Due to a flipped comparison between the two variables in_len and
in_pos that track the number of bytes of data read into the input
buffer and how much of it has been parsed, a new group of 128
characters were read at almost every call to line_parser_getc,
overwriting the still unhandled bytes from the previous call to
read. This caused the lines to be read to be sampled more than parsed.

Change-Id: I93eec3c8c9b9f19ef798748579d0977111b5c0bb

Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
2010-06-16 22:02:20 +00:00
David 'Digit' Turner
f201ae83fc am 6a09cfd9: Merge "wchar.h: improve wchar_t support in Bionic" into kraken
Merge commit '6a09cfd9f916e3a60de707ff0806cdeb143d77a4' into gingerbread-plus-aosp

* commit '6a09cfd9f916e3a60de707ff0806cdeb143d77a4':
  wchar.h: improve wchar_t support in Bionic
2010-06-15 07:07:44 -07:00
David 'Digit' Turner
6a09cfd9f9 Merge "wchar.h: improve wchar_t support in Bionic" into kraken 2010-06-15 07:05:21 -07:00
David 'Digit' Turner
3527fd6f0d wchar.h: improve wchar_t support in Bionic
Change-Id: Iffd41046fd0933c66542abf7627a1569522dfcb2
2010-06-15 07:04:41 -07:00
David 'Digit' Turner
a37ffb0c74 am a24bc688: Merge "linker: remove libcutils dependency by re-implementing simpler socket_local_client." into kraken
Merge commit 'a24bc688c037c9ecf0486747cb8d7568af8ec37b' into gingerbread-plus-aosp

* commit 'a24bc688c037c9ecf0486747cb8d7568af8ec37b':
  linker: remove libcutils dependency by re-implementing simpler socket_local_client.
2010-06-15 07:01:02 -07:00
David 'Digit' Turner
a24bc688c0 Merge "linker: remove libcutils dependency by re-implementing simpler socket_local_client." into kraken 2010-06-15 06:54:45 -07:00
The Android Open Source Project
49b53c0b94 merge from froyo-plus-aosp
Change-Id: Ibbde24d8ee26259f3eff076ee4d32476f868db85
2010-06-14 11:18:38 -07:00
The Android Open Source Project
04ed4a1c88 merge from open-source master
Change-Id: I63e2bfcf87d190fb063c5b2457ebe6b0d50ddd26
2010-06-14 10:49:00 -07:00
Szymon Jakubczak
4032c1e2df added missing ether_aton and ether_ntoa
Change-Id: I32ee448abde4d5693d393030ed77ddc6d2ad1dfc
2010-06-11 20:48:40 -04:00
David 'Digit' Turner
ef5f1ec301 am da3019b5: libc: add missing truncate() declaration
Merge commit 'da3019b55305ce51b1b483d8727641e791ce0941' into gingerbread-plus-aosp

* commit 'da3019b55305ce51b1b483d8727641e791ce0941':
  libc: add missing truncate() declaration
2010-06-11 14:42:58 -07:00
David 'Digit' Turner
1b5b230593 am ecb6d413: libc: Add missing <termio.h> header
Merge commit 'ecb6d4133477fef90c2fa23a40637d3c62681ee0' into gingerbread-plus-aosp

* commit 'ecb6d4133477fef90c2fa23a40637d3c62681ee0':
  libc: Add missing <termio.h> header
2010-06-11 14:42:56 -07:00
David 'Digit' Turner
da3019b553 libc: add missing truncate() declaration
Change-Id: Icb3601bbc9365b75b05ff443a39192f9cd3cbfb7
2010-06-11 14:40:02 -07:00
David 'Digit' Turner
ecb6d41334 libc: Add missing <termio.h> header
Change-Id: Id4e020ed330b3eabf09324f9b6d44d3a0f336d87
2010-06-11 14:39:39 -07:00
David 'Digit' Turner
c0b91e659a am 6c8a2f2a: libc: remove cutils dependencies
Merge commit '6c8a2f2a5bc8d612ee953f528f2b5eb35983656a' into gingerbread-plus-aosp

* commit '6c8a2f2a5bc8d612ee953f528f2b5eb35983656a':
  libc: remove cutils dependencies
2010-06-11 13:58:56 -07:00
David 'Digit' Turner
6c8a2f2a5b libc: remove cutils dependencies
We simply copy the stuff we need from cutils headers.

A future patch will change cutils to include the private <bionic_atomic_inline.h>

Change-Id: Ib6fd9a03bc9e337ce867bd606dc94c2b4438480a
2010-06-11 13:49:09 -07:00
David 'Digit' Turner
8bff9a31aa linker: remove libcutils dependency by re-implementing simpler socket_local_client.
Change-Id: I87f29fd59454d713b9ddfb13e6cf114822f52efd
2010-06-10 22:58:22 -07:00
David 'Digit' Turner
43a3d66f13 am 038fbae5: sysconf(): Fix line parser for /proc files. 2010-06-09 18:19:10 -07:00
David 'Digit' Turner
038fbae518 sysconf(): Fix line parser for /proc files.
Change-Id: I2678010ee95933de19c8a8e3b2fe65ceb9b86400
2010-06-09 18:15:57 -07:00
Bruce Beare
cd11be09cb am 9205fdf8: Add missing termios defns to bring on par with ARM - DO NOT MERGE 2010-06-09 15:54:41 -07:00
David 'Digit' Turner
59e778eba7 am 2beac0f5: DO NOT MERGE - add sincos.c to libm compilation 2010-06-09 15:53:03 -07:00
Bruce Beare
9205fdf8c6 Add missing termios defns to bring on par with ARM - DO NOT MERGE
Change-Id: I6e16e7ab117b6df07ef24f092de1511fe1e9e7b1
2010-06-09 15:52:28 -07:00
David 'Digit' Turner
2beac0f5c6 DO NOT MERGE - add sincos.c to libm compilation
For some reason, a previous backport from master didn't get this.

Change-Id: I59eb96ad9de495a659808fdfb557033476c3d123
2010-06-09 15:49:35 -07:00
David 'Digit' Turner
2837863f35 am 20783c14: Update libthread_db for gdb-7.0 - DO NOT MERGE 2010-06-09 14:45:34 -07:00
David 'Digit' Turner
20783c1428 Update libthread_db for gdb-7.0 - DO NOT MERGE
Change-Id: Id02b29314109ad1bf6de3388f856af6da3f90d33
2010-06-09 14:43:39 -07:00
David 'Digit' Turner
0f9a0a025a am 410b2ae7: Add sincosl() function to bionic. So that sincos optimization can - DO NOT MERGE be enabled. 2010-06-09 14:38:40 -07:00
David 'Digit' Turner
410b2ae7fb Add sincosl() function to bionic. So that sincos optimization can - DO NOT MERGE
be enabled.

Change-Id: I672cb319689aa4fb3f1f7cd868dda76842bebae9
2010-06-09 14:35:29 -07:00
Jing Yu
4b043b56f7 am 506b13d9: Remove a gcc-4.5 compilation warning: 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] 2010-06-09 13:27:29 -07:00
Jing Yu
506b13d910 Remove a gcc-4.5 compilation warning:
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
2010-06-09 13:24:22 -07:00
David 'Digit' Turner
8946da4fe1 am b8e6c50c: Fix setjmp()/longjmp() to save FP registers on ARMv7. - DO NOT MERGE 2010-06-09 13:21:51 -07:00