Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 036335d2 authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "Fix ASharedMemory doxygen formatting, add availability."

am: 519485d1

Change-Id: I55adf877ef308e8f9f2608070d3371582cfc7c10
parents 66e97fe4 519485d1
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@


/**
/**
 * @file sharedmem.h
 * @file sharedmem.h
 * @brief Shared memory buffers that can be shared across process.
 */
 */


#ifndef ANDROID_SHARED_MEMORY_H
#ifndef ANDROID_SHARED_MEMORY_H
@@ -44,10 +45,6 @@
 *   - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
 *   - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
 */
 */


/**
 * Structures and functions for a shared memory buffer that can be shared across process.
 */

#ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
#endif
@@ -63,6 +60,8 @@ extern "C" {
 *
 *
 * Use close() to release the shared memory region.
 * Use close() to release the shared memory region.
 *
 *
 * Available since API level 26.
 *
 * \param name an optional name.
 * \param name an optional name.
 * \param size size of the shared memory region
 * \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; error code on failure.
@@ -72,6 +71,8 @@ int ASharedMemory_create(const char *name, size_t size);
/**
/**
 * Get the size of the shared memory region.
 * Get the size of the shared memory region.
 *
 *
 * Available since API level 26.
 *
 * \param fd file descriptor of the shared memory region
 * \param fd file descriptor of the shared memory region
 * \return size in bytes; 0 if fd is not a valid shared memory file descriptor.
 * \return size in bytes; 0 if fd is not a valid shared memory file descriptor.
 */
 */
@@ -101,6 +102,8 @@ size_t ASharedMemory_getSize(int fd);
 *
 *
 *     // share fd with another process here and the other process can only map with PROT_READ.
 *     // share fd with another process here and the other process can only map with PROT_READ.
 *
 *
 * Available since API level 26.
 *
 * \param fd   file descriptor of the shared memory region.
 * \param fd   file descriptor of the shared memory region.
 * \param prot any bitwise-or'ed combination of PROT_READ, PROT_WRITE, PROT_EXEC denoting
 * \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.
 *             updated access. Note access can only be removed, but not added back.
+3 −4
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@


/**
/**
 * @file sharedmem_jni.h
 * @file sharedmem_jni.h
 * @brief Shared memory buffers that can be shared across process.
 */
 */


#ifndef ANDROID_SHARED_MEMORY_JNI_H
#ifndef ANDROID_SHARED_MEMORY_JNI_H
@@ -46,10 +47,6 @@
 *   - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
 *   - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
 */
 */


/**
 * Structures and functions for a shared memory buffer that can be shared across process.
 */

#ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
#endif
@@ -64,6 +61,8 @@ extern "C" {
 *
 *
 * Use close() to release the shared memory region.
 * Use close() to release the shared memory region.
 *
 *
 * Available since API level 27.
 *
 * \param env The JNIEnv* pointer
 * \param env The JNIEnv* pointer
 * \param sharedMemory The Java android.os.SharedMemory object
 * \param sharedMemory The Java android.os.SharedMemory object
 * \return file descriptor that denotes the shared memory; -1 if the shared memory object is
 * \return file descriptor that denotes the shared memory; -1 if the shared memory object is