aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp_fdserver_internal.h
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2018-04-05 18:31:08 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-04-09 17:51:53 +0300
commita430caf661d4a0ad8d69c67dc7a20911e3169a25 (patch)
tree42b8ce2262f322ac16c9eb7698eae27fb4b271a8 /platform/linux-generic/include/odp_fdserver_internal.h
parentfbe07de54f3768f32bd39a0ea9aa2a79188b1186 (diff)
linux-gen: clean up ishm file naming
rename ivshmem related files with _<name> prefix to odp_<name> for better fix project code style. No code change, just file renames. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/odp_fdserver_internal.h')
-rw-r--r--platform/linux-generic/include/odp_fdserver_internal.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/platform/linux-generic/include/odp_fdserver_internal.h b/platform/linux-generic/include/odp_fdserver_internal.h
new file mode 100644
index 000000000..8518a5b7e
--- /dev/null
+++ b/platform/linux-generic/include/odp_fdserver_internal.h
@@ -0,0 +1,39 @@
+/* Copyright (c) 2016-2018, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef _FD_SERVER_INTERNAL_H
+#define _FD_SERVER_INTERNAL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * the following enum defines the different contextes by which the
+ * FD server may be used: In the FD server, the keys used to store/retrieve
+ * a file descriptor are actually context based:
+ * Both the context and the key are stored at fd registration time,
+ * and both the context and the key are used to retrieve a fd.
+ * In other words a context identifies a FD server usage, so that different
+ * unrelated fd server users do not have to guarantee key unicity between
+ * them.
+ */
+typedef enum fd_server_context {
+ FD_SRV_CTX_NA, /* Not Applicable */
+ FD_SRV_CTX_ISHM,
+ FD_SRV_CTX_END, /* upper enum limit */
+} fd_server_context_e;
+
+int _odp_fdserver_register_fd(fd_server_context_e context, uint64_t key,
+ int fd);
+int _odp_fdserver_deregister_fd(fd_server_context_e context, uint64_t key);
+int _odp_fdserver_lookup_fd(fd_server_context_e context, uint64_t key);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif