6#ifndef ZEPHYR_INCLUDE_SYS_FDTABLE_H_
7#define ZEPHYR_INCLUDE_SYS_FDTABLE_H_
27 int (*
ioctl)(
void *obj,
unsigned int request, va_list args);
40int z_reserve_fd(
void);
52void z_finalize_fd(
int fd,
void *obj,
const struct fd_op_vtable *vtable);
65int z_alloc_fd(
void *obj,
const struct fd_op_vtable *vtable);
75void z_free_fd(
int fd);
93void *z_get_fd_obj(
int fd,
const struct fd_op_vtable *vtable,
int err);
107void *z_get_fd_obj_and_vtable(
int fd,
const struct fd_op_vtable **vtable,
125bool z_get_obj_lock_and_cond(
void *obj,
const struct fd_op_vtable *vtable,
struct k_mutex **lock,
140static inline int z_fdtable_call_ioctl(
const struct fd_op_vtable *vtable,
void *obj,
141 unsigned long request, ...)
146 va_start(args, request);
147 res = vtable->
ioctl(obj, request, args);
@ ZFD_IOCTL_SET_LOCK
Definition: fdtable.h:168
@ ZFD_IOCTL_FIONREAD
Definition: fdtable.h:171
@ ZFD_IOCTL_POLL_PREPARE
Definition: fdtable.h:165
@ ZFD_IOCTL_FSYNC
Definition: fdtable.h:163
@ ZFD_IOCTL_LSEEK
Definition: fdtable.h:164
@ ZFD_IOCTL_FIONBIO
Definition: fdtable.h:172
@ ZFD_IOCTL_POLL_OFFLOAD
Definition: fdtable.h:167
@ ZFD_IOCTL_POLL_UPDATE
Definition: fdtable.h:166
__SIZE_TYPE__ ssize_t
Definition: types.h:28
File descriptor virtual method table.
Definition: fdtable.h:23
int(* close)(void *obj)
Definition: fdtable.h:26
ssize_t(* read)(void *obj, void *buf, size_t sz)
Definition: fdtable.h:24
ssize_t(* write)(void *obj, const void *buf, size_t sz)
Definition: fdtable.h:25
int(* ioctl)(void *obj, unsigned int request, va_list args)
Definition: fdtable.h:27
Definition: kernel.h:3026
Mutex Structure.
Definition: kernel.h:2914