summaryrefslogtreecommitdiffstats
path: root/third_party/rust/ashmem/README.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/rust/ashmem/README.md
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/ashmem/README.md')
-rw-r--r--third_party/rust/ashmem/README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/third_party/rust/ashmem/README.md b/third_party/rust/ashmem/README.md
new file mode 100644
index 0000000000..ce19cf4e15
--- /dev/null
+++ b/third_party/rust/ashmem/README.md
@@ -0,0 +1,14 @@
+# ashmem-rs
+
+Provides a compatibility interface for Android 8.0's public ASharedMemory API.
+
+Some variant of ashmem has existed in Android as a private API for some time. Originally available only via [direct ioctl interface](https://elixir.bootlin.com/linux/v5.11.8/source/drivers/staging/android/uapi/ashmem.h), it later became callable (still private) via ashmem_create_region (et al.) in libcutils.
+
+[ASharedMemory](https://developer.android.com/ndk/reference/group/memory) is the public API to ashmem made available in Android 8.0 (API level 26).
+Builds targeting Android 10 (API 29) are no longer permitted to access ashmem via the ioctl interface. This makes life for a portable program difficult - you can't reliably use the old or new interface during this transition period.
+
+ashmem-rs provides a simple wrapper around the ASharedMemory API, directly calling the public API implementation via dynamically loaded libandroid where available, and falling back to the direct ioctl interface elsewhere.
+
+References:
+ - [ASharedMemory documentation](https://developer.android.com/ndk/reference/group/memory)
+ - [Linux kernel ashmem.h definitions](https://elixir.bootlin.com/linux/v5.11.8/source/drivers/staging/android/uapi/ashmem.h)