History log of /bionic/libc/include/pthread.h
Revision Date Author Comments
9831ad3ce6bd5b22da16a275ed67e7236eae3d1f 29-Aug-2011 David 'Digit' Turner <digit@google.com> libc: speed-up flockfile()/funlockfile()

For Honeycomb, we added proper file thread-safety for
all FILE* operations. However, we did implement that by
using an out-of-band hash table to map FILE* pointers
to phtread_mutex_t mutexes, because we couldn't change
the size of 'struct _sFILE' without breaking the ABI.

It turns out that our BSD-derived code already has
some support code to extend FILE* objects, so use it
instead. See libc/stdio/fileext.h

This patch gets rid of the hash table, and put the
mutex directly into the sFILE extension.

Change-Id: If1c3fe0a0a89da49c568e9a7560b7827737ff4d0
847b183f631ccbaa363a15c24195c00cad9529f9 11-Mar-2011 David 'Digit' Turner <digit@android.com> libc: <pthread.h>: Replace '#if __cplusplus' by '#ifdef __cplusplus'

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

Change-Id: Ia7b6668c28737810d6c4941604c6adf232a27c61
ca4462d76c65ebfbc20328ee283ac2f19efca732 10-Mar-2011 David 'Digit' Turner <digit@android.com> libc: Fix PTHREAD_RWLOCK_INITIALIZER

The macro definition was incorrect and resulted in a compile error
when used.

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

Change-Id: I8fa6047b63e7f56b53653774327099822c469cd1
bd8d987b3c3aa6d9d00cede2cb091f00bdb42204 26-Sep-2010 David 'Digit' Turner <digit@google.com> libc: remove C++ comments from public headers.

Change-Id: I4af84f912062cd2ff34711c25122fb323f20c032
4f086aeb4aa06e13079b7fec71a8178ceeacf318 25-Jun-2010 Matt Fischer <matt.fischer@garmin.com> Implemented pthread_atfork()

Change-Id: Ie6c0bf593315d3507b3c4a6c8903a74a1fa053db
78c1c04ced772298be8bdb5a94b6ce491bb9b3e1 20-May-2010 André Goddard Rosa <andre.goddard@gmail.com> 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>
8a1d2cf1422e35257c160ac5bb12dd3ee481c433 12-May-2010 David 'Digit' Turner <digit@google.com> Add pthread_rwlock_t implementation to the C library (DO NOT MERGE)

Change-Id: I756d8c26afc37cd7b71117ddbaa02a2cb40fdecb
a418c3b8370cae1c80fbe9a06e7e53025da5d6f0 12-May-2010 David 'Digit' Turner <digit@google.com> Add pthread_rwlock_t implementation to the C library

Change-Id: I14d0a112554756a7294a51fe88c1c408a16b5ff1
ee7b077abf1d99503b986489ad93374a057cb354 18-Mar-2010 David 'Digit' Turner <digit@google.com> Add pthread_condattr_init/destroy/setpshared/getpshared

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
8641833b62e3b319796dc80ea16eb1592c05edf6 11-Mar-2010 Fabrice Di Meglio <fdimeglio@google.com> Revert "bionic: pthread: use private futexes by default for mutexes and condvars"

This reverts commit ba9c6f0989ae94778ba2b9f597adc827c9dc81e8.
ba9c6f0989ae94778ba2b9f597adc827c9dc81e8 11-Mar-2010 David 'Digit' Turner <digit@google.com> bionic: pthread: use private futexes by default for mutexes and condvars

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
194d3fa048cf909ca592dd56fa538dc9cd3f5ddb 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
3f56b7f65adb9ee35cd0f878ca00b92011eec427 22-Sep-2009 David 'Digit' Turner <digit@google.com> Add pthread_mutex_lock_timeout_np

This is used to perform a mutex lock for a given amount of
milliseconds before giving up. Using the _np prefix since this
is absolutely not portable.

Also remove a compiler warning in pthread_attr_getstackaddr
a2f5e212448f36f0b35cf695d13bb4defdb4472e 14-Jul-2009 Mathias Agopian <mathias@google.com> added pthread_cond_timedwait_relative_np()
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1767f908af327fa388b1c66883760ad851267013 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
9f65adf2ba3bb15feb8b7a7b3eef788df3fd270e 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
4e468ed2eb86a2406e14f1eca82072ee501d05fd 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution