summaryrefslogtreecommitdiff
path: root/include/android/sharedmem.h
diff options
context:
space:
mode:
author Elliott Hughes <enh@google.com> 2019-11-13 12:04:30 -0800
committer android-build-merger <android-build-merger@google.com> 2019-11-13 12:04:30 -0800
commit360cfccd103c295e9358831677fba99bb3348c41 (patch)
treea07131b7b2e07b763aca2ca7f9e3748346677d03 /include/android/sharedmem.h
parent630523fd329cd05c4af5578fb607467635b2b3e8 (diff)
parent0327bdacf53c2895cdf7b7043e74be76f9d8fc02 (diff)
Merge "sharedmem.h: fix the docs." am: 03f12ae919
am: 0327bdacf5 Change-Id: I14ce792c0237becd037ca4563d4bb70d78693beb
Diffstat (limited to 'include/android/sharedmem.h')
-rw-r--r--include/android/sharedmem.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/android/sharedmem.h b/include/android/sharedmem.h
index 7f5177bde9..2aacf11ee4 100644
--- a/include/android/sharedmem.h
+++ b/include/android/sharedmem.h
@@ -21,7 +21,7 @@
/**
* @file sharedmem.h
- * @brief Shared memory buffers that can be shared across process.
+ * @brief Shared memory buffers that can be shared between processes.
*/
#ifndef ANDROID_SHARED_MEMORY_H
@@ -61,11 +61,14 @@ extern "C" {
*
* Use close() to release the shared memory region.
*
+ * Use {@link android.os.ParcelFileDescriptor} to pass the file descriptor to
+ * another process.
+ *
* Available since API level 26.
*
* \param name an optional name.
* \param size size of the shared memory region
- * \return file descriptor that denotes the shared memory; error code on failure.
+ * \return file descriptor that denotes the shared memory; -1 and sets errno on failure, or -EINVAL if the error is that size was 0.
*/
int ASharedMemory_create(const char *name, size_t size) __INTRODUCED_IN(26);
@@ -109,7 +112,7 @@ size_t ASharedMemory_getSize(int fd) __INTRODUCED_IN(26);
* \param fd file descriptor of the shared memory region.
* \param prot any bitwise-or'ed combination of PROT_READ, PROT_WRITE, PROT_EXEC denoting
* updated access. Note access can only be removed, but not added back.
- * \return 0 for success, error code on failure.
+ * \return 0 for success, -1 and sets errno on failure.
*/
int ASharedMemory_setProt(int fd, int prot) __INTRODUCED_IN(26);