aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/ishmphy_internal.h
diff options
context:
space:
mode:
authorChristophe Milard <christophe.milard@linaro.org>2016-08-20 09:45:58 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2017-01-12 18:01:11 +0300
commit2eb3e87bc56b2a02cb10637e5ce3a7d1157472cf (patch)
tree7b65e5ab294644052393ac6db93adba7f5034f58 /platform/linux-generic/include/ishmphy_internal.h
parentba203281cfd10b88a5d5b8f143ea34d14d373b58 (diff)
linux-gen: ishm: internal shared memory allocator (ishm) added
A new ODP internal memory allocator, called ishm (for internal shmem) is introduced here. This memory allocator enables the following: - works for odpthreads being linux processes, regardless for fork time. - guarantees the uniqueness of the virtual space mapping address over all ODP threads (even processes and regardless of fork time), when the required _ODP_ISHM_SINGLE_VA flag is used. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Brian Brooks <brian.brooks@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/ishmphy_internal.h')
-rw-r--r--platform/linux-generic/include/ishmphy_internal.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/platform/linux-generic/include/ishmphy_internal.h b/platform/linux-generic/include/ishmphy_internal.h
new file mode 100644
index 000000000..0bc4207af
--- /dev/null
+++ b/platform/linux-generic/include/ishmphy_internal.h
@@ -0,0 +1,24 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef _ISHMPHY_INTERNAL_H_
+#define _ISHMPHY_INTERNAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *_ishmphy_book_va(uint64_t len);
+int _ishmphy_unbook_va(void);
+void *_ishmphy_map(int fd, void *start, uint64_t size,
+ int flags, int mmap_flags);
+int _ishmphy_unmap(void *start, uint64_t len, int flags);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif