ashmem: Expose has_memfd_support() for ashmem-tests to use
has_memfd_support() can be used to determine if memfds support ashmem
ioctl commands. This will be useful for the ashmem test suite, as it
can use that information to determine if it should test the
implementation of the memfd-ashmem ioctls.
Therefore, expose has_memfd_support() but only for ashmem-tests to use.
Ashmem clients do not need/must not use this function.
Bug: 111903542
Change-Id: If1378f73ddbba9a94c45375357ebf56fb0170b51
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
diff --git a/libcutils/ashmem-internal.h b/libcutils/ashmem-internal.h
new file mode 100644
index 0000000..7bd037b
--- /dev/null
+++ b/libcutils/ashmem-internal.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2025 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+bool has_memfd_support();