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
| | /*
* Copyright (C) 2012-2016 all contributors <cmogstored-public@bogomips.org>
* License: GPLv3 or later (see COPYING for details)
*/
static inline struct mog_fd * mog_fd_of(void *as_obj)
{
uintptr_t as_addr = (uintptr_t)as_obj;
return (struct mog_fd *)(as_addr - offsetof(struct mog_fd, as));
}
\f
/* used to validate a mog_fd is never in two queues at once */
static inline void mog_fd_check_in(struct mog_fd *mfd)
{
/* currently unused */
}
/* used to validate a mog_fd is never in two queues at once */
static inline void mog_fd_check_out(struct mog_fd *mfd)
{
/* currently unused */
}
struct mog_fd * mog_fd_init(int fd, enum mog_fd_type fd_type);
|