Hide most of the private futex functions.

Also hide part of the system properties compatibility code, since
we needed to touch that to keep it building.

I'll remove __futex_syscall4 and futex in a later patch.

Bug: 11156955
Change-Id: Ibbf42414c5bb07fb9f1c4a169922844778e4eeae
diff --git a/libc/bionic/pthread_internals.cpp b/libc/bionic/pthread_internals.cpp
index baa95d9..8c5d9c7 100644
--- a/libc/bionic/pthread_internals.cpp
+++ b/libc/bionic/pthread_internals.cpp
@@ -88,11 +88,3 @@
   }
   return 0;
 }
-
-int __futex_wake_ex(volatile void* ftx, int pshared, int val) {
-  return __futex_syscall3(ftx, pshared ? FUTEX_WAKE : FUTEX_WAKE_PRIVATE, val);
-}
-
-int __futex_wait_ex(volatile void* ftx, int pshared, int val, const timespec* timeout) {
-  return __futex_syscall4(ftx, pshared ? FUTEX_WAIT : FUTEX_WAIT_PRIVATE, val, timeout);
-}
diff --git a/libc/bionic/system_properties.cpp b/libc/bionic/system_properties.cpp
index 97e1a03..7618586 100644
--- a/libc/bionic/system_properties.cpp
+++ b/libc/bionic/system_properties.cpp
@@ -51,9 +51,8 @@
 #include <sys/_system_properties.h>
 #include <sys/system_properties.h>
 
-#include <sys/atomics.h>
-
 #include "private/bionic_atomic_inline.h"
+#include "private/bionic_futex.h"
 #include "private/bionic_macros.h"
 
 #define ALIGN(x, a) (((x) + (a - 1)) & ~(a - 1))
diff --git a/libc/bionic/system_properties_compat.c b/libc/bionic/system_properties_compat.c
index b4c2494..6aeaa0c 100644
--- a/libc/bionic/system_properties_compat.c
+++ b/libc/bionic/system_properties_compat.c
@@ -35,7 +35,8 @@
  */
 
 #include <string.h>
-#include <sys/atomics.h>
+
+#include "private/bionic_futex.h"
 
 #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
 #include <sys/_system_properties.h>
@@ -67,7 +68,7 @@
 
 extern prop_area *__system_property_area__;
 
-const prop_info *__system_property_find_compat(const char *name)
+__LIBC_HIDDEN__ const prop_info *__system_property_find_compat(const char *name)
 {
     prop_area_compat *pa = (prop_area_compat *)__system_property_area__;
     unsigned count = pa->count;
@@ -93,7 +94,7 @@
     return 0;
 }
 
-int __system_property_read_compat(const prop_info *_pi, char *name, char *value)
+__LIBC_HIDDEN__ int __system_property_read_compat(const prop_info *_pi, char *name, char *value)
 {
     unsigned serial, len;
     const prop_info_compat *pi = (const prop_info_compat *)_pi;
@@ -115,7 +116,7 @@
     }
 }
 
-int __system_property_foreach_compat(
+__LIBC_HIDDEN__ int __system_property_foreach_compat(
         void (*propfn)(const prop_info *pi, void *cookie),
         void *cookie)
 {