blob: 0b0a9bb0ef241084069337c2c9198782cb4e71b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 contexts 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
|