aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/spec/shared_memory.h
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2016-04-26 13:40:42 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2016-04-27 09:24:21 +0300
commit6510afccd17ef9d88e3ee7888cbf4dab0f855d71 (patch)
tree67c03873ff0f4523a152aea943222a2eb9a85309 /include/odp/api/spec/shared_memory.h
parent9ca19730b51b5d55fe86c8a776229f9e15bff86a (diff)
api: shm: replaced config api with capability structure
Added capability structure and replaced the config API definition (odp_config_shm_blocks()) with it. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include/odp/api/spec/shared_memory.h')
-rw-r--r--include/odp/api/spec/shared_memory.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/odp/api/spec/shared_memory.h b/include/odp/api/spec/shared_memory.h
index 5d31f4199..fbe0fdee7 100644
--- a/include/odp/api/spec/shared_memory.h
+++ b/include/odp/api/spec/shared_memory.h
@@ -61,6 +61,41 @@ typedef struct odp_shm_info_t {
uint32_t flags; /**< ODP_SHM_* flags */
} odp_shm_info_t;
+/**
+ * Shared memory capabilities
+ */
+typedef struct odp_shm_capability_t {
+ /** Maximum number of shared memory blocks
+ *
+ * This number of separate shared memory blocks can be
+ * reserved concurrently. */
+ unsigned max_blocks;
+
+ /** Maximum memory block size in bytes
+ *
+ * The value of zero means that size is limited only by the available
+ * memory size. */
+ uint64_t max_size;
+
+ /** Maximum memory block alignment in bytes
+ *
+ * The value of zero means that alignment is limited only by the
+ * available memory size. */
+ uint64_t max_align;
+
+} odp_shm_capability_t;
+
+/**
+ * Query shared memory capabilities
+ *
+ * Outputs shared memory capabilities on success.
+ *
+ * @param[out] capa Pointer to capability structure for output
+ *
+ * @retval 0 on success
+ * @retval <0 on failure
+ */
+int odp_shm_capability(odp_shm_capability_t *capa);
/**
* Reserve a contiguous block of shared memory