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
diff --git a/libc/docs/CHANGES.TXT b/libc/docs/CHANGES.TXT
index 4f87547..2e3ba62 100644
--- a/libc/docs/CHANGES.TXT
+++ b/libc/docs/CHANGES.TXT
@@ -80,6 +80,16 @@
   an unknown domain name. Due to an initialization bug, a random DNS search
   list was generated for each thread is net.dns.search is not defined.
 
+- <pthread.h>: Add pthread_condattr_init/destroy/setpshared/getpshared.
+  Also modify mutex and condvar implementation to use private futexes by
+  default, unless PROCESS_SHARED is specified in the init attributes.
+
+  Private futexes are limited to a single address space and can't be shared
+  among processes. However they are much faster to wake/wait for. This should
+  speed up mutex and condvar operations.
+
+  NOTE: PROCESS_SHARED mutexes are still NOT robust (see note below).
+
 -------------------------------------------------------------------------------
 Differences between Android 2.1 and 2.0.1: