Commit Graph

3070 Commits

Author SHA1 Message Date
David 'Digit' Turner
423a0740b5 am 4136c3a2: Merge "libc: Provide ucontext_t/mcontext_t/<sys/ucontext.h>"
* commit '4136c3a2b7f7546968c5a305aa2ef0663fcb6c6d':
  libc: Provide ucontext_t/mcontext_t/<sys/ucontext.h>
2012-10-17 07:32:56 -07:00
David 'Digit' Turner
4136c3a2b7 Merge "libc: Provide ucontext_t/mcontext_t/<sys/ucontext.h>" 2012-10-17 07:20:54 -07:00
David 'Digit' Turner
c124baaf29 libc: Provide ucontext_t/mcontext_t/<sys/ucontext.h>
This patch updates the C library headers to provide ucontext_t
definitions for three architectures.

+ Fix <signal.h> to always define 'struct sigcontext'.

The new declarations are announced with new macros defined in
<sys/cdefs.h> in order to make it easier to adapt client code
that already defines its own, incompatible, versions of the
structures seen here.

http://code.google.com/p/android/issues/detail?id=34784

Change-Id: Ie78c48690a4ce61c50593f6c39639be7fead3596
2012-10-17 15:59:23 +02:00
Elliott Hughes
5419b94747 Make dlerror(3) thread-safe.
I gave up trying to use the usual thread-local buffer idiom; calls to
calloc(3) and free(3) from any of the "dl" functions -- which live in
the dynamic linker -- end up resolving to the dynamic linker's stubs.
I tried to work around that, but was just making things more complicated.
This alternative costs us a well-known TLS slot (instead of the
dynamically-allocated TLS slot we'd have used otherwise, so no difference
there), plus an extra buffer inside every pthread_internal_t.

Bug: 5404023
Change-Id: Ie9614edd05b6d1eeaf7bf9172792d616c6361767
2012-10-16 17:58:17 -07:00
Elliott Hughes
ee7a28c529 am a9944cfe: Merge "LONG_LONG_MIN/MAX: Move declarations to <limits.h>"
* commit 'a9944cfe9e152ca46afb0a77300ec5a2a1a24e64':
  LONG_LONG_MIN/MAX: Move declarations to <limits.h>
2012-10-15 20:20:50 -07:00
Elliott Hughes
a9944cfe9e Merge "LONG_LONG_MIN/MAX: Move declarations to <limits.h>" 2012-10-15 17:34:13 -07:00
David 'Digit' Turner
f8a2c51bf3 LONG_LONG_MIN/MAX: Move declarations to <limits.h>
LONG_LONG_MIN, LONG_LONG_MAX and ULONG_LONG_MAX are
GLibc-specific macros that are better defined in <limits.h>
instead of the current exotic location (<pthread.h>).

Note that GCC's <limits.h> only defines these macros
when __GNU_LIBRARY__ is also defined. This is only the
case when building against GLibc, so manually redefine
the macros here.

Note that using LLONG_MIN/LLONG_MAX/ULLONG_MAX is the
C99-compliant way to get these values, but it's easier
to define these compatibility macros for the sake of
porting existing code.

Change-Id: I8023918d73b4685238054932f94a4006c1ca7d03
2012-10-15 18:52:55 +02:00
Elliott Hughes
1452324ff5 am fcf901d5: Merge "Fix realloc(3) when chk_malloc debugging is on."
* commit 'fcf901d5c0924a71a1405a2535051663281da048':
  Fix realloc(3) when chk_malloc debugging is on.
2012-10-12 17:14:29 -07:00
Elliott Hughes
fcf901d5c0 Merge "Fix realloc(3) when chk_malloc debugging is on." 2012-10-12 17:09:03 -07:00
Elliott Hughes
e7e274b13a Fix realloc(3) when chk_malloc debugging is on.
The tests for a NULL pointer and size 0 were the wrong way round.

From Intel's patch 9cae4f2ffc4778ed82be04711d8775a84092d4e2.

Change-Id: I118aff3358aa5f34126d74bfaa43f6e2f1a89055
2012-10-12 17:05:05 -07:00
Elliott Hughes
c2483ea9b6 am 9434e8fe: Merge "Make the dlfcn mutex static."
* commit '9434e8febc8b223db2d49e7f97140771700113b9':
  Make the dlfcn mutex static.
2012-10-12 11:21:59 -07:00
Elliott Hughes
9434e8febc Merge "Make the dlfcn mutex static." 2012-10-12 10:59:59 -07:00
Elliott Hughes
22d629211d Make the dlfcn mutex static.
More style fixes too, and removal of yet another lingering SH reference!

Change-Id: Iebc34a46475dd11845ad172b9108bb6ddd7585bb
2012-10-12 10:50:21 -07:00
Elliott Hughes
ab4e2ed182 am db4fdf1a: Merge "Fix dlerror(3)."
* commit 'db4fdf1aafb63b09ee967066d9b8107a9812db2d':
  Fix dlerror(3).
2012-10-12 10:47:59 -07:00
Elliott Hughes
db4fdf1aaf Merge "Fix dlerror(3)." 2012-10-12 10:27:44 -07:00
The Android Open Source Project
cf3fa7f457 Reconcile with jb-mr1-factory-release - do not merge
Change-Id: I833db3c1458b360d17442413b86b546dc650bc0c
2012-10-12 07:30:26 -07:00
Elliott Hughes
3b297c4079 Fix dlerror(3).
Add unit tests for dlerror(3) in various situations. I think We're at least
as good as glibc now.

Also factor out the ScopedPthreadMutexLock and use it here too.

Bug: http://code.google.com/p/android/issues/detail?id=38398
Change-Id: I040938b4366ab836e3df46d1d8055b92f4ea6ed8
2012-10-11 16:08:51 -07:00
Elliott Hughes
2facd5b5ef am 417fd233: Merge "Fix perf_event_open syscall for x86 and mips"
* commit '417fd2334a694cf6a831b81cd672b4ca31ff2f54':
  Fix perf_event_open syscall for x86 and mips
2012-10-11 10:42:00 -07:00
Elliott Hughes
417fd2334a Merge "Fix perf_event_open syscall for x86 and mips" 2012-10-11 10:26:00 -07:00
Shuo Gao
4e75c4b2d7 Fix perf_event_open syscall for x86 and mips
perf_event_open syscall has a different syscall number for
the 3 supported architectures: arm, x86 and mips. Currenlty
only the arm syscall number is defined for all architectures.
Tracing tools like perf will not work on other architectures
than arm.

Add the different values for perf_event_open on x86 and mips
and run gensyscalls.py to update generated headers.

Change-Id: I2ed78bd42c0e5df8dbc51d784be49cccda5fab30
Author: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
2012-10-11 10:24:51 -07:00
The Android Automerger
b5f1e03079 merge in jb-mr1-factory-release history after reset to jb-mr1-dev 2012-10-11 08:18:46 -07:00
The Android Open Source Project
d1844d4b30 Reconcile with jb-mr1-release - do not merge
Change-Id: I8ceb7a33ab427c2d3e884e8b71064ecbc531fd1e
2012-10-11 05:56:36 -07:00
The Android Automerger
7cc2dec82e merge in jb-mr1-release history after reset to jb-mr1-dev 2012-10-10 14:06:19 -07:00
Ying Wang
0620122763 am ecbded40: am 2c287e95: Set up the private variables.
* commit 'ecbded40ff1278ddb155d3e1a5d137285f18629f':
  Set up the private variables.
2012-10-10 13:52:59 -07:00
Ying Wang
ecbded40ff am 2c287e95: Set up the private variables.
* commit '2c287e9510ec1d379b3cd779651b595dafb6a2ff':
  Set up the private variables.
2012-10-10 13:51:30 -07:00
Ying Wang
2c287e9510 Set up the private variables.
Now we use private variables in transform-o-to-executable to support
build executables against the NDK.
Cherry-picked from master.

Bug: 7170098
Change-Id: Ic8f1d36a116fce24f3ea6a3ff5e9bfab6cafee99
2012-10-10 10:25:13 -07:00
Elliott Hughes
4c3d7a86bb am 1ceb9824: Merge "Fix a getcwd(3) bug and make our tests run correctly under valgrind."
* commit '1ceb9824ab39501e98300bc87f7984ee6b455ce8':
  Fix a getcwd(3) bug and make our tests run correctly under valgrind.
2012-10-09 18:27:11 -07:00
Elliott Hughes
1ceb9824ab Merge "Fix a getcwd(3) bug and make our tests run correctly under valgrind." 2012-10-09 18:14:37 -07:00
Elliott Hughes
c7f654dffe am b83cad79: Merge "Fix two comment typos."
* commit 'b83cad79838f780779bd129da9ed4662b741bd31':
  Fix two comment typos.
2012-10-09 17:38:01 -07:00
Elliott Hughes
b83cad7983 Merge "Fix two comment typos." 2012-10-09 17:23:38 -07:00
Elliott Hughes
e5d5f7f0d8 Fix two comment typos.
Change-Id: Icb2d6f7fa97ef5a4409a7606875e416cfab0a4b3
2012-10-09 17:23:09 -07:00
Elliott Hughes
156da96621 Fix a getcwd(3) bug and make our tests run correctly under valgrind.
The getcwd(3) bug was found by valgrind.

Bug: 7291287
Change-Id: I59f3bff1c1392a408b905934eebcd5d894d37492
2012-10-09 17:17:24 -07:00
Ying Wang
a55f0a1007 am b04598a6: Set up the private variables.
* commit 'b04598a63c3f0df597f6186beea3adafc665ef56':
  Set up the private variables.
2012-10-08 14:21:38 -07:00
Ying Wang
b04598a63c Set up the private variables.
Now we use private variables in transform-o-to-executable to support
build executables against the NDK.

Bug: 7170098
Change-Id: I6e505b33001b76f4b11fcbbb1d35392c4ddf4c70
2012-10-08 14:12:56 -07:00
Elliott Hughes
7e7853230f am 9a7366e8: am fa7e2586: Merge "Test flags before using "info""
* commit '9a7366e8943990619c494548050aa906f1971332':
  Test flags before using "info"
2012-10-03 17:42:35 -07:00
Elliott Hughes
9a7366e894 am fa7e2586: Merge "Test flags before using "info""
* commit 'fa7e2586176711896e6c0b94c7b811f7cbe29907':
  Test flags before using "info"
2012-10-03 17:41:08 -07:00
Elliott Hughes
fa7e258617 Merge "Test flags before using "info"" 2012-10-03 17:27:51 -07:00
Andy McFadden
1db6f2db49 Test flags before using "info"
Our debugger signal catcher expects to receive three args, but if
somebody cleared SA_SIGINFO we only get one, and bad things happen
when we try to use the second one.  Test to see if SA_SIGINFO is
still set before we try to use the argument.

(cherry-pick of f84bc8d6f6368f1c846124a8168761ee8cc589c0.)

Bug: 7272866
Change-Id: I69a65c25e833aea70acb78f9ba40ed93308583e6
2012-10-03 17:20:06 -07:00
The Android Open Source Project
ae8000f368 Reconcile with jb-mr1-release - do not merge
Change-Id: I80b71067d1e628d18a19d94219fcfa1000133abf
2012-10-03 07:33:03 -07:00
The Android Automerger
956092e07c merge in jb-mr1-release history after reset to jb-mr1-dev 2012-10-03 06:59:12 -07:00
Naseer Ahmed
9c3892558f am 6b1ba118: am 3ef4fecd: bionic: update processed msm_mdp.h
* commit '6b1ba1184a5e0884686b63da837a85f8c861d1fc':
  bionic: update processed msm_mdp.h
2012-10-03 01:03:04 -07:00
Naseer Ahmed
6b1ba1184a am 3ef4fecd: bionic: update processed msm_mdp.h
* commit '3ef4fecd30c22f3c17c1dadfce4527e858b42e7e':
  bionic: update processed msm_mdp.h
2012-10-03 00:57:49 -07:00
Naseer Ahmed
3ef4fecd30 bionic: update processed msm_mdp.h
-- Has display commit ioctl

Bug: 7274951
Change-Id: If2d47edf3ada418e8c61a2acc7b79fb3422f3473
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-02 23:37:34 -07:00
Andy McFadden
51c7167d22 am 7c67e4e4: am 98957db5: Merge "Test flags before using "info"" into jb-mr1-dev
* commit '7c67e4e423f7608c50a1fc7c355d87593cfdbcca':
  Test flags before using "info"
2012-10-02 15:27:09 -07:00
Andy McFadden
7c67e4e423 am 98957db5: Merge "Test flags before using "info"" into jb-mr1-dev
* commit '98957db5536e93724c2e9e6bd19d5063f9d4dc2c':
  Test flags before using "info"
2012-10-02 15:24:25 -07:00
Andy McFadden
98957db553 Merge "Test flags before using "info"" into jb-mr1-dev 2012-10-02 15:23:20 -07:00
Andreas Huber
3a0aa5e0a0 am cafbc940: am 2e0452cb: bionic: update processed msm_vidc_enc.h
* commit 'cafbc9404310828ecddc55a1eed5fc897008b1f3':
  bionic: update processed msm_vidc_enc.h
2012-10-02 14:42:35 -07:00
Andreas Huber
cafbc94043 am 2e0452cb: bionic: update processed msm_vidc_enc.h
* commit '2e0452cbd1f5b981fbadb4021198d2c27ec1cde3':
  bionic: update processed msm_vidc_enc.h
2012-10-02 14:40:02 -07:00
Andreas Huber
2e0452cbd1 bionic: update processed msm_vidc_enc.h
Updated kernel headers to support a video encoder ioctl to preprend each IDR
frame with SPS/PPS.

related-to-bug: 7245308
Change-Id: I7244c521690d69a905deb19940a04fd4f2e06935
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-02 14:34:03 -07:00
Andy McFadden
f84bc8d6f6 Test flags before using "info"
Our debugger signal catcher expects to receive three args, but if
somebody cleared SA_SIGINFO we only get one, and bad things happen
when we try to use the second one.  Test to see if SA_SIGINFO is
still set before we try to use the argument.

Bug: 7272866
Change-Id: If682a2262fe8a575f3802fb0c60a53eea3082456
2012-10-02 14:30:41 -07:00