OSDN Git Service

android-x86/bionic.git
12 years agoam 418e647a: Merge "libstdc++: Fix x86 thread-safe one-time-construction implementation."
Elliott Hughes [Mon, 16 Apr 2012 20:12:47 +0000 (13:12 -0700)]
am 418e647a: Merge "libstdc++: Fix x86 thread-safe one-time-construction implementation."

* commit '418e647a8300bb8e62b6b73814a5211152cbaacd':
  libstdc++: Fix x86 thread-safe one-time-construction implementation.

12 years agoam 4994deae: Merge "Bionic: Fix wrong prototype of system call clock_nanosleep"
Elliott Hughes [Mon, 16 Apr 2012 20:12:46 +0000 (13:12 -0700)]
am 4994deae: Merge "Bionic: Fix wrong prototype of system call clock_nanosleep"

* commit '4994deaef51d5fa1ac12e6160b47d9cbe3b2bc43':
  Bionic: Fix wrong prototype of system call clock_nanosleep

12 years agoam 7b8666e6: Merge "bionic: Fix wrong prototype of system call getresuid/getresgid"
Elliott Hughes [Mon, 16 Apr 2012 20:12:46 +0000 (13:12 -0700)]
am 7b8666e6: Merge "bionic: Fix wrong prototype of system call getresuid/getresgid"

* commit '7b8666e683e56549091b86fd7b9c421fd0124dbc':
  bionic: Fix wrong prototype of system call getresuid/getresgid

12 years agoam 6435d27f: Merge "bionic: fix NULL parameter failure in getcwd()"
Elliott Hughes [Mon, 16 Apr 2012 20:12:45 +0000 (13:12 -0700)]
am 6435d27f: Merge "bionic: fix NULL parameter failure in getcwd()"

* commit '6435d27f9d45d01fbd15bcc3dcd9617b86b825bb':
  bionic: fix NULL parameter failure in getcwd()

12 years agoMerge "libstdc++: Fix x86 thread-safe one-time-construction implementation."
Elliott Hughes [Mon, 16 Apr 2012 16:13:13 +0000 (09:13 -0700)]
Merge "libstdc++: Fix x86 thread-safe one-time-construction implementation."

12 years agoMerge "Bionic: Fix wrong prototype of system call clock_nanosleep"
Elliott Hughes [Mon, 16 Apr 2012 16:09:04 +0000 (09:09 -0700)]
Merge "Bionic: Fix wrong prototype of system call clock_nanosleep"

12 years agoMerge "bionic: Fix wrong prototype of system call getresuid/getresgid"
Elliott Hughes [Mon, 16 Apr 2012 16:06:22 +0000 (09:06 -0700)]
Merge "bionic: Fix wrong prototype of system call getresuid/getresgid"

12 years agoBionic: Fix wrong prototype of system call clock_nanosleep
Jack Ren [Tue, 17 Apr 2012 03:20:15 +0000 (11:20 +0800)]
Bionic: Fix wrong prototype of system call clock_nanosleep

In bionic/libc/SYSCALLS.TXT, the prototype of system call
clock_nanosleep is incorrect.

According to man page:
int clock_nanosleep(clockid_t clock_id, int flags,
                    const struct timespec *request,
                    struct timespec *remain);

Change-Id: Ic44c6db3d632293aa17998035554eacd664c2d57
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoMerge "bionic: fix NULL parameter failure in getcwd()"
Elliott Hughes [Mon, 16 Apr 2012 15:48:19 +0000 (08:48 -0700)]
Merge "bionic: fix NULL parameter failure in getcwd()"

12 years agobionic: Fix wrong prototype of system call getresuid/getresgid
Jack Ren [Tue, 17 Apr 2012 03:16:18 +0000 (11:16 +0800)]
bionic: Fix wrong prototype of system call getresuid/getresgid

In bionic/libc/SYSCALLS.TXT, the prototypes of system call
getresuid/getresgid are incorrect.

According to man page, they should be:
    int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
    int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);

Change-Id: I676098868bb05a9e1fe45419b234cf397626fdad
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agobionic: fix NULL parameter failure in getcwd()
Jack Ren [Tue, 13 Mar 2012 10:26:28 +0000 (18:26 +0800)]
bionic: fix NULL parameter failure in getcwd()

LTP: getcwd01 failed in LTP

Need to check getcwd parameters, otherwise it will lead to
posix test case to fail.

Change-Id: Ieb673b6dd4ca6481da81c5339dbf7ec0a463f263
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agolibstdc++: Fix x86 thread-safe one-time-construction implementation.
Fengwei Yin [Wed, 28 Mar 2012 09:25:17 +0000 (17:25 +0800)]
libstdc++: Fix x86 thread-safe one-time-construction implementation.

The root of the problem is that the existing implementation is based on the
ARM C++ ABI, which mandates a different guard variable layout than the
Itanium/x86 C++ one.

This patch modifies the implementation in a way that satisfies both ABIs (and
doesn't require changing the toolchains).

Change-Id: I885e9adc7f088b9c0a78355bd752f1e6aeec9f07
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoam 6bc18fa5: Merge "libm: fix invalid result of function remquo/remquof"
Elliott Hughes [Sat, 14 Apr 2012 00:07:43 +0000 (17:07 -0700)]
am 6bc18fa5: Merge "libm: fix invalid result of function remquo/remquof"

* commit '6bc18fa58849a4307cf6ddcfd526d9258e8175fc':
  libm: fix invalid result of function remquo/remquof

12 years agoMerge "libm: fix invalid result of function remquo/remquof"
Elliott Hughes [Fri, 13 Apr 2012 21:57:59 +0000 (14:57 -0700)]
Merge "libm: fix invalid result of function remquo/remquof"

12 years agolibm: fix invalid result of function remquo/remquof
Jack Ren [Sat, 19 Nov 2011 07:52:08 +0000 (15:52 +0800)]
libm: fix invalid result of function remquo/remquof

Currently we will get the wrong result as follows:
remquof(0x7bb33336, 0x63000000) = -671088640, 0x00000000
remquo(0xbff0000000000003, 0x3ff0000000000003) = 1, 0x8000000000000000
remquo(0x9120000000000001, 0x0000000000000005) = -1288490188, 0x0000000000000004
while the correct one should be:
remquof(0x7bb33336, 0x63000000) = 1476395008, 0x00000000
remquo(0xbff0000000000003, 0x3ff0000000000003) = -1, 0x8000000000000000
remquo(0x9120000000000001, 0x0000000000000005) = -1288490189, 0x0000000000000001

Fixed in this patch.

Change-Id: I540b348cd10a539f3b39b1753945c893c4c7ec46
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoam b88f810d: Merge "Update to tzdata2012c."
Elliott Hughes [Mon, 2 Apr 2012 23:07:46 +0000 (16:07 -0700)]
am b88f810d: Merge "Update to tzdata2012c."

* commit 'b88f810d585a1736a1759c2c22e9f4999441ae00':
  Update to tzdata2012c.

12 years agoMerge "Update to tzdata2012c."
Elliott Hughes [Mon, 2 Apr 2012 17:25:43 +0000 (10:25 -0700)]
Merge "Update to tzdata2012c."

12 years agoUpdate to tzdata2012c.
Elliott Hughes [Mon, 2 Apr 2012 14:35:13 +0000 (07:35 -0700)]
Update to tzdata2012c.

From the release notes:

       africa
               Summer time changes for Morocco (to start late April 2012)

       asia
               Changes for 2012 for Gaza & the West Bank (Hebron) and Syria

       northamerica
               Haiti following US/Canada rules for 2012 (and we're assuming,
               for now anyway, for the future).

Also include a change made internally to the 'generate' script as part of
the tzdata2011m update that apparently never made it to AOSP; the original
checkin comment for which was:

    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.)

(I'm repeating the tzdata change for the convenience of anyone grepping the
log, since the 2012 tzdata releases also contain the 2011m changes; 2011m
is the only missing release I noticed.)

Change-Id: I9a2e530b3a8ea88e3375334a12376e3d8526f267

12 years agoam 63b14755: Merge "libc/x86: ensure the stack 16-byte aligned when tasks created"
Elliott Hughes [Fri, 30 Mar 2012 22:53:19 +0000 (15:53 -0700)]
am 63b14755: Merge "libc/x86: ensure the stack 16-byte aligned when tasks created"

* commit '63b14755512d515762cbe3ad8544c561a576f32e':
  libc/x86: ensure the stack 16-byte aligned when tasks created

12 years agoMerge "libc/x86: ensure the stack 16-byte aligned when tasks created"
Elliott Hughes [Fri, 30 Mar 2012 20:42:42 +0000 (13:42 -0700)]
Merge "libc/x86: ensure the stack 16-byte aligned when tasks created"

12 years agoam d509f9cc: am 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running...
Elliott Hughes [Wed, 28 Mar 2012 00:57:41 +0000 (17:57 -0700)]
am d509f9cc: am 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture."

* commit 'd509f9ccbba6e1dd53acfd7425bfc06d6b3f8693':
  [MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture.

12 years agoam 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel...
Elliott Hughes [Wed, 28 Mar 2012 00:53:35 +0000 (17:53 -0700)]
am 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture."

* commit '09ce7749d74733b28d4fa7a1d36457cb366cc5da':
  [MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture.

12 years agoMerge "[MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_...
Elliott Hughes [Tue, 27 Mar 2012 23:49:28 +0000 (16:49 -0700)]
Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture."

12 years ago[MIPS] Clean Kernel headers are generated by running
Raghu Gandham [Tue, 27 Mar 2012 18:37:17 +0000 (11:37 -0700)]
[MIPS] Clean Kernel headers are generated by running
libc/kernel/tools/update_all.py script. This patch ignores
any changes to libc/kernel directory not related to MIPS
architecture.

Change-Id: I2c9e461dccb7c33eb4420be2db1a562f45137c8d
Signed-off-by: Raghu Gandham <raghu@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
12 years agoam d7c6147e: am 56731351: Merge "bionic: fix atfork hanlder_mutex deadlock"
Jean-Baptiste Queru [Tue, 27 Mar 2012 01:29:23 +0000 (18:29 -0700)]
am d7c6147e: am 56731351: Merge "bionic: fix atfork hanlder_mutex deadlock"

* commit 'd7c6147eff65572762d55950b965db949ccd0281':
  bionic: fix atfork hanlder_mutex deadlock

12 years agoam 56731351: Merge "bionic: fix atfork hanlder_mutex deadlock"
Jean-Baptiste Queru [Tue, 27 Mar 2012 01:25:43 +0000 (18:25 -0700)]
am 56731351: Merge "bionic: fix atfork hanlder_mutex deadlock"

* commit '56731351de7230180fc99a1a4b0afd12f881b0f7':
  bionic: fix atfork hanlder_mutex deadlock

12 years agoMerge "bionic: fix atfork hanlder_mutex deadlock"
Jean-Baptiste Queru [Mon, 26 Mar 2012 23:19:35 +0000 (16:19 -0700)]
Merge "bionic: fix atfork hanlder_mutex deadlock"

12 years agolibc/x86: ensure the stack 16-byte aligned when tasks created
Jack Ren [Wed, 21 Mar 2012 09:48:13 +0000 (17:48 +0800)]
libc/x86: ensure the stack 16-byte aligned when tasks created

Currently Renderscript sample code RsBalls crashed on x86 when SSE2
enabled. The root cause is that the stack was not 16-byte aligned
from the beginning when the processes/threads were created, so the
RsBalls crashed when SSE2 instructions tried to access the variables
on the stack.

- For the thread created by fork():
Its stack alignment is determined by crtbegin_{dynamic, static}.S

- For the thread created by pthread_create():
Its stack alignment is determined by clone.S. __thread_entry( ) is
a standard C function. In order to have its stack be aligned with
16 byte properly, __thread_entry() needs the stack with following
layout when it is called:
layout #1 (correct)
--------------
|            |
-------------- <--ESP (ECX - 20)
| ret EIP    |
-------------- <--ECX - 16
| arg0       |
-------------- <--ECX - 12
| arg1       |
-------------- <--ECX - 8
| arg2       |
-------------- <--ECX - 4
| unused     |
-------------- <--ECX (16-byte boundary)

But it has following layout for now:
layout #2: (incorrect)
--------------
|            |
-------------- <--ESP (ECX - 16)
| unused     |
-------------- <--ECX - 12
| arg0       |
-------------- <--ECX - 8
| arg1       |
-------------- <--ECX - 4
| arg2       |
-------------- <--ECX (16-byte boundary)

Fixed in this patch.

Change-Id: Ibe01f64db14be14033c505d854c73033556ddaa8
Signed-off-by: Michael Liao <michael.liao@intel.com>
Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agobionic: fix atfork hanlder_mutex deadlock
Jack Ren [Fri, 16 Mar 2012 08:37:35 +0000 (16:37 +0800)]
bionic: fix atfork hanlder_mutex deadlock

After applying the kernel_id fix, the system refused to boot up and we
got following crash log:
I/DEBUG   (  113): pid: 618, tid: 618  >>> org.simalliance.openmobileapi.service:remote <<<
I/DEBUG   (  113): signal 16 (SIGSTKFLT), code -6 (?), fault addr --------
I/DEBUG   (  113):  eax fffffe00  ebx b77de994  ecx 00000080  edx 00724002
I/DEBUG   (  113):  esi 00000000  edi 00004000
I/DEBUG   (  113):  xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000 xss 0000007b
I/DEBUG   (  113):  eip b7761351  ebp bfdf3de8  esp bfdf3dc4  flags 00000202
I/DEBUG   (  113):     #00  eip: 00015351  /system/lib/libc.so
I/DEBUG   (  113):     #01  eip: 0000d13c  /system/lib/libc.so (pthread_mutex_lock)
I/DEBUG   (  113):     #02  eip: 00077b48  /system/lib/libc.so (__bionic_atfork_run_prepare)
I/DEBUG   (  113):     #03  eip: 00052cdb  /system/lib/libc.so (fork)
I/DEBUG   (  113):     #04  eip: 0009ae91  /system/lib/libdvm.so (_Z18dvmOptimizeDexFileillPKcjjb)
I/DEBUG   (  113):     #05  eip: 000819d6  /system/lib/libdvm.so (_Z14dvmJarFileOpenPKcS0_PP7JarFileb)
I/DEBUG   (  113):     #06  eip: 000b175e  /system/lib/libdvm.so (_ZL40Dalvik_dalvik_system_DexFile_openDexFilePKjP6JValue)
I/DEBUG   (  113):     #07  eip: 0011fb94  /system/lib/libdvm.so

Root cause:
The atfork uses the mutex handler_mutex to protect the atfork_head. The
parent will call __bionic_atfork_run_prepare() to lock the handler_mutex,
and need both the parent and child to unlock their own copy of handler_mutex
after fork. At that time, the owner of hanlder_mutex is set as the parent.
If we apply the kernel_id fix, then the child's kernel_id will be set as
child's tid.
The handler_mutex is a recursive lock, and pthread_mutex_unlock(&hander_mutex)
will fail because the mutex owner is the parent, while the current tid
(__get_thread()->kernel_id) is child, not matched with the mutex owner.
At that time, the handler_mutex is left in lock state.If the child wants to
fork other process after than, then it will try to lock handler_mutex, and
then be deadlocked.

Fix:
Since the child has its own copy of vm space from the the parent, the
child space's handler_mutex should be reset to the initialized state.

Change-Id: I3907dd9a153418fb78862f2aa6d0302c375d9e27
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoam 2f460fbe: am 73b5cad9: Merge "bionic: Fix wrong kernel_id in pthread descriptor...
Elliott Hughes [Tue, 13 Mar 2012 00:10:46 +0000 (17:10 -0700)]
am 2f460fbe: am 73b5cad9: Merge "bionic: Fix wrong kernel_id in pthread descriptor after fork()"

* commit '2f460fbee9abe2936175379c49c6618de7421233':
  bionic: Fix wrong kernel_id in pthread descriptor after fork()

12 years agoam 73b5cad9: Merge "bionic: Fix wrong kernel_id in pthread descriptor after fork()"
Elliott Hughes [Tue, 13 Mar 2012 00:06:09 +0000 (17:06 -0700)]
am 73b5cad9: Merge "bionic: Fix wrong kernel_id in pthread descriptor after fork()"

* commit '73b5cad989da317cc8089b57ee25f502b1cac71f':
  bionic: Fix wrong kernel_id in pthread descriptor after fork()

12 years agoMerge "bionic: Fix wrong kernel_id in pthread descriptor after fork()"
Elliott Hughes [Mon, 12 Mar 2012 17:32:02 +0000 (10:32 -0700)]
Merge "bionic: Fix wrong kernel_id in pthread descriptor after fork()"

12 years agobionic: Fix wrong kernel_id in pthread descriptor after fork()
Jack Ren [Tue, 17 Jan 2012 08:27:42 +0000 (16:27 +0800)]
bionic: Fix wrong kernel_id in pthread descriptor after fork()

After forking, the kernel_id field in the phtread_internal_t returned by pthread_self()
is incorrect --- it's the tid from the parent, not the new tid of the
child.

The root cause is that: currently the kernel_id is set by
_init_thread(), which is called in 2 cases:
(1) called by __libc_init_common(). That happens when the execv( ) is
called after fork( ). But when the zygote tries to fork the android
application, the child application doesn't call execv( ), instread, it
tries to call the Java main method directly.
(2) called by pthread_create(). That happens when a new thread is
created.

For the lead thread which is the thread created by fork(), it should
call execv() but it doesn't, as described in (1) above. So its kernel_id
will inherit the parent's kernel_id.

Fixed it in this patch.

Change-Id: I63513e82af40ec5fe51fbb69456b1843e4bc0fc7
Signed-off-by: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoam 70d1d45f: am a58c88c2: Merge "Upgrade to tzdata2012b."
Elliott Hughes [Fri, 2 Mar 2012 19:10:43 +0000 (11:10 -0800)]
am 70d1d45f: am a58c88c2: Merge "Upgrade to tzdata2012b."

* commit '70d1d45f0ecaee262627a6ca323fc2b4fe3e9024':
  Upgrade to tzdata2012b.

12 years agoam a58c88c2: Merge "Upgrade to tzdata2012b."
Elliott Hughes [Fri, 2 Mar 2012 19:07:03 +0000 (11:07 -0800)]
am a58c88c2: Merge "Upgrade to tzdata2012b."

* commit 'a58c88c235bfeeb17ac495991e66f7b906935852':
  Upgrade to tzdata2012b.

12 years agoam a480cf93: resolved conflicts for merge of cfe535ef to stage-aosp-master
Elliott Hughes [Fri, 2 Mar 2012 18:47:23 +0000 (10:47 -0800)]
am a480cf93: resolved conflicts for merge of cfe535ef to stage-aosp-master

* commit 'a480cf930f31ab404e7efe66259427a53d72fa2b':
  Upgrade to tzdata2011a.

12 years agoresolved conflicts for merge of cfe535ef to stage-aosp-master
Elliott Hughes [Fri, 2 Mar 2012 18:11:18 +0000 (10:11 -0800)]
resolved conflicts for merge of cfe535ef to stage-aosp-master

Change-Id: I21a1dd41503518e75892180c14f1ce79102772ad

12 years agoMerge "Upgrade to tzdata2012b."
Elliott Hughes [Fri, 2 Mar 2012 08:09:03 +0000 (00:09 -0800)]
Merge "Upgrade to tzdata2012b."

12 years agoUpgrade to tzdata2012b.
Elliott Hughes [Fri, 2 Mar 2012 07:34:11 +0000 (23:34 -0800)]
Upgrade to tzdata2012b.

Summer time in Cuba has been delayed 3 weeks (now starts April 1 rather
than March 11). Since March 11 (the old start date, as listed in 2012a)
is just a little over a week away, this change is urgent.

Change-Id: Iadf4dc30072bdac0bcd0ad4b9e076a9ca071efbe

12 years agoMerge "Upgrade to tzdata2011a."
Elliott Hughes [Fri, 2 Mar 2012 07:32:14 +0000 (23:32 -0800)]
Merge "Upgrade to tzdata2011a."

12 years agoUpgrade to tzdata2011a.
Elliott Hughes [Thu, 1 Mar 2012 17:38:31 +0000 (09:38 -0800)]
Upgrade to tzdata2011a.

From the notes:

       Chile 2011/2012 and 2012/2013 summer time date adjustments.
       Falkland Islands onto permanent summer time (we're assuming for the
               foreseeable future, though 2012 is all we're fairly certain of.)
       Armenia has abolished Summer Time.
       Tokelau jumped the International Date Line back last December
               (just the same as their near neighbour, Samoa).
       America/Creston is a new zone for a small area of British Columbia
       There will be a leapsecod 2012-06-30 23:59:60 UTC.

Change-Id: I1d66edf8d33fd1dbcf21178def91844025fd9047

12 years agoam 018c27ed: am 25f2d1f0: Merge "update stddef.h"
Jean-Baptiste Queru [Thu, 1 Mar 2012 03:12:17 +0000 (19:12 -0800)]
am 018c27ed: am 25f2d1f0: Merge "update stddef.h"

* commit '018c27eda89b54e59e6c043ea2986c6e39ec2ee0':
  update stddef.h

12 years agoam 51d22d7e: am afab5a70: Merge "Eliminate duplicate constants"
Jean-Baptiste Queru [Thu, 1 Mar 2012 03:12:16 +0000 (19:12 -0800)]
am 51d22d7e: am afab5a70: Merge "Eliminate duplicate constants"

* commit '51d22d7ea92e77f47accee59c99cb8157bf29fcb':
  Eliminate duplicate constants

12 years agoam 25f2d1f0: Merge "update stddef.h"
Jean-Baptiste Queru [Thu, 1 Mar 2012 03:08:50 +0000 (19:08 -0800)]
am 25f2d1f0: Merge "update stddef.h"

* commit '25f2d1f0c3c7802af0d4d1e2bbd3bf95a7e0970b':
  update stddef.h

12 years agoam afab5a70: Merge "Eliminate duplicate constants"
Jean-Baptiste Queru [Thu, 1 Mar 2012 03:08:49 +0000 (19:08 -0800)]
am afab5a70: Merge "Eliminate duplicate constants"

* commit 'afab5a703d30df613848cb30ab3ecceafd76102b':
  Eliminate duplicate constants

12 years agoMerge "update stddef.h"
Jean-Baptiste Queru [Thu, 1 Mar 2012 02:59:15 +0000 (18:59 -0800)]
Merge "update stddef.h"

12 years agoMerge "Eliminate duplicate constants"
Jean-Baptiste Queru [Thu, 1 Mar 2012 02:58:52 +0000 (18:58 -0800)]
Merge "Eliminate duplicate constants"

12 years agoupdate stddef.h
Nick Kralevich [Tue, 28 Feb 2012 21:36:31 +0000 (13:36 -0800)]
update stddef.h

Pull in an updated version of stddef.h from the linux kernel.
Pulled from upstream kernel at 891003abb0db6bfffd61b76ad0ed39bb7c3db8e1

This file was generated using the following command:

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

Change-Id: I6c29f3fa100c5368da41d0f0da39bc50fa668e9d

12 years agoEliminate duplicate constants
Nick Kralevich [Tue, 28 Feb 2012 19:49:41 +0000 (11:49 -0800)]
Eliminate duplicate constants

include/elf.h contains basically the same values as
linux/auxvec.h. Eliminate dups.

include/sys/exec_elf.h contains basically the same
values as linux/elf.h. Eliminate dups.

Change-Id: I66b8358161bb52223bb657f8f73ba28b324f4fa3

12 years agoam 7c38f53d: am 7f28e0b4: Merge "Clean up the remnants of SuperH support"
Jean-Baptiste Queru [Wed, 29 Feb 2012 23:43:24 +0000 (15:43 -0800)]
am 7c38f53d: am 7f28e0b4: Merge "Clean up the remnants of SuperH support"

* commit '7c38f53d1911e04acf6398921a7bd4444d585c2b':
  Clean up the remnants of SuperH support

12 years agoam 7f28e0b4: Merge "Clean up the remnants of SuperH support"
Jean-Baptiste Queru [Wed, 29 Feb 2012 23:38:55 +0000 (15:38 -0800)]
am 7f28e0b4: Merge "Clean up the remnants of SuperH support"

* commit '7f28e0b4501de7c4f8f627fd3e4be323d737ae82':
  Clean up the remnants of SuperH support

12 years agoMerge "Clean up the remnants of SuperH support"
Jean-Baptiste Queru [Wed, 29 Feb 2012 22:39:41 +0000 (14:39 -0800)]
Merge "Clean up the remnants of SuperH support"

12 years agoam 17edd38f: am 9c9b0fc7: Merge "libm: cherry-pick one patch from freebsd to fix...
Jean-Baptiste Queru [Tue, 28 Feb 2012 21:53:14 +0000 (13:53 -0800)]
am 17edd38f: am 9c9b0fc7: Merge "libm: cherry-pick one patch from freebsd to fix logb() denormals issue"

* commit '17edd38f03300af28c89f9031dad177af8232c3a':
  libm: cherry-pick one patch from freebsd to fix logb() denormals issue

12 years agoam 9c9b0fc7: Merge "libm: cherry-pick one patch from freebsd to fix logb() denormals...
Jean-Baptiste Queru [Tue, 28 Feb 2012 21:28:30 +0000 (13:28 -0800)]
am 9c9b0fc7: Merge "libm: cherry-pick one patch from freebsd to fix logb() denormals issue"

* commit '9c9b0fc7e1dff39baa8cdf2536be9776aa4af766':
  libm: cherry-pick one patch from freebsd to fix logb() denormals issue

12 years agoMerge "libm: cherry-pick one patch from freebsd to fix logb() denormals issue"
Jean-Baptiste Queru [Tue, 28 Feb 2012 17:44:40 +0000 (09:44 -0800)]
Merge "libm: cherry-pick one patch from freebsd to fix logb() denormals issue"

12 years agolibm: cherry-pick one patch from freebsd to fix logb() denormals issue
Jack Ren [Tue, 28 Feb 2012 04:02:21 +0000 (12:02 +0800)]
libm: cherry-pick one patch from freebsd to fix logb() denormals issue

from http://svnweb.freebsd.org/base?view=revision&revision=176101
"
Oops, fix the fix in rev.1.10.  logb() and logbf() were broken on
 denormals, and logb() remained broken after 1.10 because the fix for
 logbf() was incompletely translated.

Convert to __FBSDID().
"

Change-Id: I54f33648db7c421b06eee1ea8e63c57a179fae0d
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoam a71aefc6: am d041bf20: Merge "bionic/x86: fix one potential deadlock in __set_tls()"
Jean-Baptiste Queru [Thu, 23 Feb 2012 20:32:37 +0000 (12:32 -0800)]
am a71aefc6: am d041bf20: Merge "bionic/x86: fix one potential deadlock in __set_tls()"

* commit 'a71aefc66f6d4bf1302e0ce5c321aff1a2c769d1':
  bionic/x86: fix one potential deadlock in __set_tls()

12 years agoam d041bf20: Merge "bionic/x86: fix one potential deadlock in __set_tls()"
Jean-Baptiste Queru [Thu, 23 Feb 2012 20:29:10 +0000 (12:29 -0800)]
am d041bf20: Merge "bionic/x86: fix one potential deadlock in __set_tls()"

* commit 'd041bf2095f5f133c87f7ba632a8dfb39537a437':
  bionic/x86: fix one potential deadlock in __set_tls()

12 years agoMerge "bionic/x86: fix one potential deadlock in __set_tls()"
Jean-Baptiste Queru [Thu, 23 Feb 2012 16:43:29 +0000 (08:43 -0800)]
Merge "bionic/x86: fix one potential deadlock in __set_tls()"

12 years agobionic/x86: fix one potential deadlock in __set_tls()
Jin Wei [Thu, 15 Dec 2011 07:49:25 +0000 (15:49 +0800)]
bionic/x86: fix one potential deadlock in __set_tls()

Fix bug:
Currently the mutex lock _tls_desc_lock is not released
when __set_thread_area() fails. That will leads to the deadlock
when __set_tls( ) is called later on.

Change-Id: Iea3267cb0659971cba7766cbc3346f6924274f86
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoam 62daffe1: am f9c5afb1: Merge "Redesign dlopen() locks to be recursive per thread."
Jean-Baptiste Queru [Wed, 22 Feb 2012 17:58:17 +0000 (09:58 -0800)]
am 62daffe1: am f9c5afb1: Merge "Redesign dlopen() locks to be recursive per thread."

* commit '62daffe147e8810ce48a897df46b0b3db95ebaa3':
  Redesign dlopen() locks to be recursive per thread.

12 years agoam f9c5afb1: Merge "Redesign dlopen() locks to be recursive per thread."
Jean-Baptiste Queru [Wed, 22 Feb 2012 17:54:52 +0000 (09:54 -0800)]
am f9c5afb1: Merge "Redesign dlopen() locks to be recursive per thread."

* commit 'f9c5afb1f9d8e615ab98774a10bbf117962db66d':
  Redesign dlopen() locks to be recursive per thread.

12 years agoMerge "Redesign dlopen() locks to be recursive per thread."
Jean-Baptiste Queru [Wed, 22 Feb 2012 17:30:52 +0000 (09:30 -0800)]
Merge "Redesign dlopen() locks to be recursive per thread."

12 years agoRedesign dlopen() locks to be recursive per thread.
Pavel Chupin [Mon, 20 Feb 2012 06:49:13 +0000 (10:49 +0400)]
Redesign dlopen() locks to be recursive per thread.

That is to fix the bug:
dlxxx functions can't be called recursively.
For example, if we use dlopen() to use open one library whose constructor
also calls dlopen() in order to open another library, then the thread is
dead-blocked.

By changing the dl_lock from a non-recursive lock to a recursive lock, we can
prevent the thread from dead-blocked by recursive dlxxx calls in the same
thread context.

Change-Id: I1018b41c82f4641cc009c0a2eda31f5a47a534f9
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoam cfff36df: am a60ff6c5: Merge "libc: Define new symbol visibility macros"
Jean-Baptiste Queru [Mon, 13 Feb 2012 22:39:52 +0000 (14:39 -0800)]
am cfff36df: am a60ff6c5: Merge "libc: Define new symbol visibility macros"

* commit 'cfff36df2bebd95f2663b7b053c6308593c343dd':
  libc: Define new symbol visibility macros

12 years agoam a60ff6c5: Merge "libc: Define new symbol visibility macros"
Jean-Baptiste Queru [Mon, 13 Feb 2012 22:25:53 +0000 (14:25 -0800)]
am a60ff6c5: Merge "libc: Define new symbol visibility macros"

* commit 'a60ff6c5b2ca76181b387d8c10aee22a2cbcf840':
  libc: Define new symbol visibility macros

12 years agoMerge "libc: Define new symbol visibility macros"
Jean-Baptiste Queru [Mon, 13 Feb 2012 22:23:11 +0000 (14:23 -0800)]
Merge "libc: Define new symbol visibility macros"

12 years agoClean up the remnants of SuperH support
Raghu Gandham [Thu, 9 Feb 2012 23:58:46 +0000 (15:58 -0800)]
Clean up the remnants of SuperH support

12 years agoam 68fc85ff: am 177a7706: linker: fix x86 build
David 'Digit' Turner [Wed, 1 Feb 2012 19:22:07 +0000 (11:22 -0800)]
am 68fc85ff: am 177a7706: linker: fix x86 build

* commit '68fc85ffc05aca5cc187676bd1502c3c446046d9':
  linker: fix x86 build

12 years agoam 177a7706: linker: fix x86 build
David 'Digit' Turner [Wed, 1 Feb 2012 19:18:06 +0000 (11:18 -0800)]
am 177a7706: linker: fix x86 build

* commit '177a77067b6d3326dbcf88fd93d0664e48e27f9f':
  linker: fix x86 build

12 years agolinker: fix x86 build
David 'Digit' Turner [Wed, 1 Feb 2012 18:38:58 +0000 (19:38 +0100)]
linker: fix x86 build

Change-Id: I47d76a0f50515013c37ccef89accba03cc69529d

12 years agoam 44eae4c7: Reconcile with ics-mr1-release
The Android Open Source Project [Wed, 1 Feb 2012 18:00:28 +0000 (10:00 -0800)]
am 44eae4c7: Reconcile with ics-mr1-release

* commit '44eae4c7af901e521e2e880a8300b285bbf53010':

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Wed, 1 Feb 2012 16:49:24 +0000 (08:49 -0800)]
Reconcile with ics-mr1-release

Change-Id: I37e2eb5cd34a47e3eb7b2bf2353b50fc14972adf

12 years agoMerge 5b892aa7
Jean-Baptiste Queru [Wed, 1 Feb 2012 15:12:13 +0000 (07:12 -0800)]
Merge 5b892aa7

Change-Id: Ic82bc2866bdb0c93822c94281301fa127fd4bb0c

12 years agolibc: Define new symbol visibility macros
David 'Digit' Turner [Mon, 23 Jan 2012 14:15:30 +0000 (15:15 +0100)]
libc: Define new symbol visibility macros

This patch defines a few new macros that can be used to control the
visibility of symbols exported by the C library:

- ENTRY_PRIVATE() can be used in assembly sources to indicate
  that an assembler function should have "hidden" visibility, i.e.
  will never be exported by the C library's shared library.

  This is the equivalent of using __LIBC_HIDDEN__ for a C function,
  but ENTRY_PRIVATE() works like ENTRY(), and must be used with
  END() to tag the end of the function.

- __LIBC_ABI_PUBLIC__ can be used to tag a C functions as being
  part of the C library's public ABI. This is important for a
  few functions that must be exposed by the NDK to maintain
  binary compatibility.

  Once a symbol has been tagged with this macro, it shall
  *never* be removed from the library, even if it becomes
  directly unused due to implementation changes
  (e.g. __is_threaded).

- __LIBC_ABI_PRIVATE__ can be used for C functions that should
  always be exported by the C library because they are used by
  other libraries in the platform, but should not be exposed
  by the NDK. It is possible to remove such symbols from the
  implementation if all callers are also modified.

+ Add missing END() assembly macro for x86

Change-Id: Ia96236ea0dbec41d57bea634b39d246b30e5e234

12 years agoMerge "remove obsolete SuperH support"
Jean-Baptiste Queru [Tue, 31 Jan 2012 20:43:59 +0000 (12:43 -0800)]
Merge "remove obsolete SuperH support"

12 years agoremove obsolete SuperH support
David 'Digit' Turner [Mon, 30 Jan 2012 16:17:58 +0000 (17:17 +0100)]
remove obsolete SuperH support

We don't have a toolchain anymore, we don't have working original
kernel headers, and nobody is maintaining this so there is really
no point in keeping this here. Details of the patch:

- removed code paths from Android.mk files related to the SuperH
  architecture ("sh")

- removed libc/arch-sh, linker/arch-sh, libc/kernel/arch-sh

- simplified libc/SYSCALLS.TXT

- simplified the scripts in libc/tools/ and libc/kernel/tools

Change-Id: I26b0e1422bdc347489e4573e2fbec0e402f75560

Signed-off-by: David 'Digit' Turner <digit@android.com>
12 years agoam e8004445: Merge "Make sure __u64 is defined even for strict ansi or -std=c99"
Jean-Baptiste Queru [Fri, 27 Jan 2012 15:41:43 +0000 (07:41 -0800)]
am e8004445: Merge "Make sure __u64 is defined even for strict ansi or -std=c99"

* commit 'e80044455961005ac95e405c8d553f2418d8e50c':
  Make sure __u64 is defined even for strict ansi or -std=c99

12 years agoMerge "Make sure __u64 is defined even for strict ansi or -std=c99"
Jean-Baptiste Queru [Fri, 27 Jan 2012 15:31:09 +0000 (07:31 -0800)]
Merge "Make sure __u64 is defined even for strict ansi or -std=c99"

12 years agoMake sure __u64 is defined even for strict ansi or -std=c99
Martin Storsjo [Wed, 25 Jan 2012 21:25:09 +0000 (23:25 +0200)]
Make sure __u64 is defined even for strict ansi or -std=c99

The x86 asm headers define __u64 regardless of __STRICT_ANSI__.
The linux/videodev2.h header requires __u64 to be defined, thus
this fixes compiling with -std=c99 when including the
linux/videodev2.h header.

In glibc, the asm/types.h header defines __u64 regardless of
__STRICT_ANSI__.

This is the change for the generated arch-arm/asm/types.h
header, as produced by the update_all.py script (without all
the other unrelated changes that the script produces).

FWIW, the same issue also is present in
arch-sh/asm/types.h, but there are no source headers for
arch-sh in external/kernel-headers (and regenerating the
headers simply removes that file).

Change-Id: If05fcc9ed6ff5943602be121c7be140116e361fe

12 years agoam e22dfc46: Merge "execvp: bcopy() is deprecated. Use memcpy() instead"
Jean-Baptiste Queru [Tue, 24 Jan 2012 23:07:56 +0000 (15:07 -0800)]
am e22dfc46: Merge "execvp: bcopy() is deprecated. Use memcpy() instead"

* commit 'e22dfc46b763e9b0c6300b7068609d2db60a9b2c':
  execvp: bcopy() is deprecated. Use memcpy() instead

12 years agoMerge "execvp: bcopy() is deprecated. Use memcpy() instead"
Jean-Baptiste Queru [Tue, 24 Jan 2012 22:26:34 +0000 (14:26 -0800)]
Merge "execvp: bcopy() is deprecated. Use memcpy() instead"

12 years agoam cee8425f: Merge "Move variable declaration on its own line"
Jean-Baptiste Queru [Fri, 20 Jan 2012 19:54:49 +0000 (11:54 -0800)]
am cee8425f: Merge "Move variable declaration on its own line"

* commit 'cee8425f22cfe268614c7bb47b2f5874ac6a0e4b':
  Move variable declaration on its own line

12 years agoam 7e6a5773: Merge "Use the AT_SECURE auxv flag to determine whether to enable secure...
Jean-Baptiste Queru [Fri, 20 Jan 2012 19:54:48 +0000 (11:54 -0800)]
am 7e6a5773: Merge "Use the AT_SECURE auxv flag to determine whether to enable secure mode."

* commit '7e6a5773133e4b65d678535418b1f5d594859da2':
  Use the AT_SECURE auxv flag to determine whether to enable secure mode.

12 years agoam 23f56bbb: Merge "Add extended attribute (xattr) system call wrappers to bionic."
Jean-Baptiste Queru [Fri, 20 Jan 2012 19:54:47 +0000 (11:54 -0800)]
am 23f56bbb: Merge "Add extended attribute (xattr) system call wrappers to bionic."

* commit '23f56bbb6ae053996dd821f29379aea0c7166055':
  Add extended attribute (xattr) system call wrappers to bionic.

12 years agoMerge "Move variable declaration on its own line"
Jean-Baptiste Queru [Fri, 20 Jan 2012 19:07:40 +0000 (11:07 -0800)]
Merge "Move variable declaration on its own line"

12 years agoMove variable declaration on its own line
Stephen Smalley [Fri, 20 Jan 2012 18:59:15 +0000 (10:59 -0800)]
Move variable declaration on its own line

Change-Id: Ied54ffabccdc867ea4e124a0f0324a217270d6e7

12 years agoMerge "Use the AT_SECURE auxv flag to determine whether to enable secure mode."
Jean-Baptiste Queru [Fri, 20 Jan 2012 18:43:18 +0000 (10:43 -0800)]
Merge "Use the AT_SECURE auxv flag to determine whether to enable secure mode."

12 years agoUse the AT_SECURE auxv flag to determine whether to enable secure mode.
Stephen Smalley [Fri, 13 Jan 2012 12:48:11 +0000 (07:48 -0500)]
Use the AT_SECURE auxv flag to determine whether to enable secure mode.

The Linux kernel provides an AT_SECURE auxv flag to inform userspace
whether or not a security transition has occurred.  This is more reliable
than directly checking the uid/gid against the euid/egid, because it covers
not only setuid/setgid but also file capabilities, SELinux, and AppArmor
security transitions.  It is also a more efficient test since it does
not require any additional system calls.

Change-Id: I9752a4f6da452273258d2876d13b05e402fb0409

12 years agoMerge "Add extended attribute (xattr) system call wrappers to bionic."
Jean-Baptiste Queru [Fri, 20 Jan 2012 18:29:21 +0000 (10:29 -0800)]
Merge "Add extended attribute (xattr) system call wrappers to bionic."

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Thu, 19 Jan 2012 21:06:24 +0000 (13:06 -0800)]
Reconcile with ics-mr1-release

Change-Id: Iece5fc7cf15320addfda3f143235664e2ef3083d

12 years agomerge in ics-mr1-release history after reset to ics-mr1
The Android Automerger [Thu, 19 Jan 2012 05:16:26 +0000 (21:16 -0800)]
merge in ics-mr1-release history after reset to ics-mr1

12 years agoam e8e1efea: Update to tzdata2011n.
Elliott Hughes [Thu, 19 Jan 2012 00:34:01 +0000 (16:34 -0800)]
am e8e1efea: Update to tzdata2011n.

* commit 'e8e1efeafb8754ea8358e78cfe3d0f7ad4e809b2':
  Update to tzdata2011n.

12 years agoAdd extended attribute (xattr) system call wrappers to bionic.
Stephen Smalley [Fri, 13 Jan 2012 12:45:16 +0000 (07:45 -0500)]
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

12 years agoam eae1f1fb: Merge "res_send: Avoid spurious close()s and (rare) failure"
Jean-Baptiste Queru [Wed, 18 Jan 2012 02:16:10 +0000 (18:16 -0800)]
am eae1f1fb: Merge "res_send: Avoid spurious close()s and (rare) failure"

* commit 'eae1f1fba33cb105302227b044a14e5abcbe55e7':
  res_send: Avoid spurious close()s and (rare) failure

12 years agoUpdate to tzdata2011n.
Elliott Hughes [Mon, 31 Oct 2011 21:11:32 +0000 (14:11 -0700)]
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

12 years agoMerge "res_send: Avoid spurious close()s and (rare) failure"
Jean-Baptiste Queru [Tue, 17 Jan 2012 23:26:17 +0000 (15:26 -0800)]
Merge "res_send: Avoid spurious close()s and (rare) failure"

12 years agoam f44de270: add personality() system call.
Nick Kralevich [Tue, 17 Jan 2012 19:45:25 +0000 (11:45 -0800)]
am f44de270: add personality() system call.

* commit 'f44de270bba32c9b1b5eff8a34be07b10ddff238':
  add personality() system call.

12 years agores_send: Avoid spurious close()s and (rare) failure
Jim Huang [Mon, 12 Dec 2011 08:32:56 +0000 (16:32 +0800)]
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

12 years agoexecvp: bcopy() is deprecated. Use memcpy() instead
Jim Huang [Mon, 12 Dec 2011 08:17:22 +0000 (16:17 +0800)]
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