Merge "Remove <pthread.h> cruft."
diff --git a/libc/bionic/pthread_cond.cpp b/libc/bionic/pthread_cond.cpp
index 793dcd9..f444676 100644
--- a/libc/bionic/pthread_cond.cpp
+++ b/libc/bionic/pthread_cond.cpp
@@ -249,15 +249,18 @@
 }
 
 #if !defined(__LP64__)
-// TODO: this exists only for backward binary compatibility on 32 bit platforms.
+// This exists only for backward binary compatibility on 32 bit platforms.
+// (This is actually a _new_ function in API 28 that we could only implement for LP64.)
 extern "C" int pthread_cond_timedwait_monotonic(pthread_cond_t* cond_interface,
                                                 pthread_mutex_t* mutex,
                                                 const timespec* abs_timeout) {
   return pthread_cond_timedwait_monotonic_np(cond_interface, mutex, abs_timeout);
 }
+#endif
 
-// Force this function using CLOCK_MONOTONIC because it was always using
-// CLOCK_MONOTONIC in history.
+#if !defined(__LP64__)
+// This exists only for backward binary compatibility on 32 bit platforms.
+// (This function never existed for LP64.)
 extern "C" int pthread_cond_timedwait_relative_np(pthread_cond_t* cond_interface,
                                                   pthread_mutex_t* mutex,
                                                   const timespec* rel_timeout) {
@@ -269,11 +272,15 @@
   }
   return __pthread_cond_timedwait(__get_internal_cond(cond_interface), mutex, false, abs_timeout);
 }
+#endif
 
+#if !defined(__LP64__)
+// This exists only for backward binary compatibility on 32 bit platforms.
+// (This function never existed for LP64.)
 extern "C" int pthread_cond_timeout_np(pthread_cond_t* cond_interface,
                                        pthread_mutex_t* mutex, unsigned ms) {
   timespec ts;
   timespec_from_ms(ts, ms);
   return pthread_cond_timedwait_relative_np(cond_interface, mutex, &ts);
 }
-#endif // !defined(__LP64__)
+#endif
diff --git a/libc/bionic/pthread_mutex.cpp b/libc/bionic/pthread_mutex.cpp
index a15e981..9b37225 100644
--- a/libc/bionic/pthread_mutex.cpp
+++ b/libc/bionic/pthread_mutex.cpp
@@ -945,6 +945,8 @@
 }
 
 #if !defined(__LP64__)
+// This exists only for backward binary compatibility on 32 bit platforms.
+// (This function never existed for LP64.)
 extern "C" int pthread_mutex_lock_timeout_np(pthread_mutex_t* mutex_interface, unsigned ms) {
     timespec ts;
     timespec_from_ms(ts, ms);
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index 130a72f..fd1ebc3 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -207,23 +207,6 @@
 int pthread_mutex_trylock(pthread_mutex_t* __mutex);
 int pthread_mutex_unlock(pthread_mutex_t* __mutex);
 
-#if __ANDROID_API__ < 21
-/*
- * Cruft for supporting old API levels. Pre-L we didn't have the proper POSIX
- * APIs for things, but instead had some locally grown, artisan equivalents.
- * Keep exposing the old prototypes on old API levels so we don't regress
- * functionality.
- *
- * See the following bugs:
- *  * https://github.com/android-ndk/ndk/issues/420
- *  * https://github.com/android-ndk/ndk/issues/423
- *  * https://stackoverflow.com/q/44580542/632035
- */
-int pthread_mutex_lock_timeout_np(pthread_mutex_t* __mutex, unsigned __timeout_ms);
-int pthread_cond_timeout_np(pthread_cond_t* __cond, pthread_mutex_t* __mutex, unsigned __timeout_ms);
-int pthread_cond_timedwait_relative_np(pthread_cond_t* __cond, pthread_mutex_t* __mutex, const struct timespec* __relative_timeout);
-#endif
-
 int pthread_once(pthread_once_t* __once, void (*__init_routine)(void));
 
 int pthread_rwlockattr_init(pthread_rwlockattr_t* __attr);