Home
last modified time | relevance | path

Searched refs:vtable (Results 1 – 13 of 13) sorted by relevance

/Zephyr-latest/tests/lib/fdtable/src/
Dmain.c36 const struct fd_op_vtable *vtable; in ZTEST() local
42 obj = zvfs_get_fd_obj_and_vtable(fd, &vtable, in ZTEST()
56 const struct fd_op_vtable *vtable = 0; in ZTEST() local
57 const struct fd_op_vtable *vtable2 = vtable+1; in ZTEST()
59 int *obj = zvfs_get_fd_obj(fd, vtable, err); /* function being tested */ in ZTEST()
65 vtable = NULL; in ZTEST()
68 zvfs_finalize_fd(fd, obj, vtable); in ZTEST()
70 obj = zvfs_get_fd_obj(-1, vtable, err); /* function being tested */ in ZTEST()
86 const struct fd_op_vtable *vtable; in ZTEST() local
91 int *obj = zvfs_get_fd_obj_and_vtable(fd, &vtable, NULL); in ZTEST()
[all …]
/Zephyr-latest/lib/os/
Dfdtable.c32 const struct fd_op_vtable *vtable; member
53 .vtable = &stdinout_fd_op_vtable,
60 .vtable = &stdinout_fd_op_vtable,
67 .vtable = &stdinout_fd_op_vtable,
105 fdtable[fd].vtable = NULL; in z_fd_unref()
165 void *zvfs_get_fd_obj(int fd, const struct fd_op_vtable *vtable, int err) in zvfs_get_fd_obj() argument
175 if ((vtable != NULL) && (entry->vtable != vtable)) { in zvfs_get_fd_obj()
183 static int z_get_fd_by_obj_and_vtable(void *obj, const struct fd_op_vtable *vtable) in z_get_fd_by_obj_and_vtable() argument
188 if (fdtable[fd].obj == obj && fdtable[fd].vtable == vtable) { in z_get_fd_by_obj_and_vtable()
197 bool zvfs_get_obj_lock_and_cond(void *obj, const struct fd_op_vtable *vtable, struct k_mutex **lock, in zvfs_get_obj_lock_and_cond() argument
[all …]
/Zephyr-latest/include/zephyr/sys/
Dfdtable.h102 void zvfs_finalize_typed_fd(int fd, void *obj, const struct fd_op_vtable *vtable, uint32_t mode);
114 static inline void zvfs_finalize_fd(int fd, void *obj, const struct fd_op_vtable *vtable) in zvfs_finalize_fd() argument
116 zvfs_finalize_typed_fd(fd, obj, vtable, ZVFS_MODE_UNSPEC); in zvfs_finalize_fd()
130 int zvfs_alloc_fd(void *obj, const struct fd_op_vtable *vtable);
158 void *zvfs_get_fd_obj(int fd, const struct fd_op_vtable *vtable, int err);
172 void *zvfs_get_fd_obj_and_vtable(int fd, const struct fd_op_vtable **vtable,
190 bool zvfs_get_obj_lock_and_cond(void *obj, const struct fd_op_vtable *vtable, struct k_mutex **lock,
205 static inline int zvfs_fdtable_call_ioctl(const struct fd_op_vtable *vtable, void *obj, in zvfs_fdtable_call_ioctl() argument
212 res = vtable->ioctl(obj, request, args); in zvfs_fdtable_call_ioctl()
/Zephyr-latest/lib/os/zvfs/
Dzvfs_poll.c29 const struct fd_op_vtable *vtable; in zvfs_poll_internal() local
48 ctx = zvfs_get_fd_obj_and_vtable(pfd->fd, &vtable, &lock); in zvfs_poll_internal()
56 result = zvfs_fdtable_call_ioctl(vtable, ctx, ZFD_IOCTL_POLL_PREPARE, pfd, &pev, in zvfs_poll_internal()
78 offl_vtable = vtable; in zvfs_poll_internal()
130 ctx = zvfs_get_fd_obj_and_vtable(pfd->fd, &vtable, &lock); in zvfs_poll_internal()
139 result = zvfs_fdtable_call_ioctl(vtable, ctx, ZFD_IOCTL_POLL_UPDATE, pfd, in zvfs_poll_internal()
/Zephyr-latest/subsys/net/lib/sockets/
Dsocket_dispatcher.c54 const struct socket_op_vtable *vtable; in sock_dispatch_socket() local
64 (const struct fd_op_vtable **)&vtable, in sock_dispatch_socket()
72 zvfs_finalize_typed_fd(fd, obj, (const struct fd_op_vtable *)vtable, ZVFS_MODE_IFSOCK); in sock_dispatch_socket()
143 const struct fd_op_vtable *vtable; in sock_dispatch_read_vmeth() local
151 new_obj = zvfs_get_fd_obj_and_vtable(fd, &vtable, NULL); in sock_dispatch_read_vmeth()
156 return vtable->read(new_obj, buffer, count); in sock_dispatch_read_vmeth()
163 const struct fd_op_vtable *vtable; in sock_dispatch_write_vmeth() local
171 new_obj = zvfs_get_fd_obj_and_vtable(fd, &vtable, NULL); in sock_dispatch_write_vmeth()
176 return vtable->write(new_obj, buffer, count); in sock_dispatch_write_vmeth()
183 const struct fd_op_vtable *vtable; in sock_dispatch_ioctl_vmeth() local
[all …]
Dsockets.c22 const struct socket_op_vtable *vtable; \
27 obj = get_sock_vtable(sock, &vtable, &lock); \
33 if (vtable->fn == NULL) { \
40 retval = vtable->fn(obj, __VA_ARGS__); \
48 const struct socket_op_vtable **vtable, in get_sock_vtable() argument
54 (const struct fd_op_vtable **)vtable, in get_sock_vtable()
160 const struct socket_op_vtable *vtable; in z_vrfy_zsock_close() local
164 ctx = get_sock_vtable(sock, &vtable, &lock); in z_vrfy_zsock_close()
177 const struct socket_op_vtable *vtable; in z_impl_zsock_shutdown() local
184 ctx = get_sock_vtable(sock, &vtable, &lock); in z_impl_zsock_shutdown()
[all …]
Dsockets_tls.c2999 const struct fd_op_vtable *vtable; in ztls_poll_prepare_ctx() local
3024 ctx->sock, (const struct fd_op_vtable **)&vtable, &lock); in ztls_poll_prepare_ctx()
3032 ret = zvfs_fdtable_call_ioctl(vtable, obj, ZFD_IOCTL_POLL_PREPARE, in ztls_poll_prepare_ctx()
3212 const struct fd_op_vtable *vtable; in ztls_poll_update_ctx() local
3219 ctx->sock, (const struct fd_op_vtable **)&vtable, &lock); in ztls_poll_update_ctx()
3233 ret = zvfs_fdtable_call_ioctl(vtable, obj, in ztls_poll_update_ctx()
3255 ret = zvfs_fdtable_call_ioctl(vtable, obj, ZFD_IOCTL_POLL_UPDATE, in ztls_poll_update_ctx()
3324 const struct fd_op_vtable *vtable; in ztls_poll_offload() local
3360 (const struct fd_op_vtable **)&vtable, in ztls_poll_offload()
3374 ret = zvfs_fdtable_call_ioctl(vtable, ctx, ZFD_IOCTL_POLL_OFFLOAD, in ztls_poll_offload()
[all …]
/Zephyr-latest/drivers/modem/
Dmodem_socket.h68 const struct socket_op_vtable *vtable; member
105 const struct socket_op_vtable *vtable);
Dmodem_socket.c179 (const struct fd_op_vtable *)cfg->vtable, ZVFS_MODE_IFSOCK); in modem_socket_get()
416 const struct socket_op_vtable *vtable) in modem_socket_init() argument
419 if (cfg == NULL || sockets == NULL || sockets_len < 1 || vtable == NULL) { in modem_socket_init()
429 cfg->vtable = vtable; in modem_socket_init()
/Zephyr-latest/tests/net/socket/offload_dispatcher/src/
Dmain.c758 const struct fd_op_vtable *vtable; in ZTEST() local
778 obj = zvfs_get_fd_obj_and_vtable(test_sock, &vtable, NULL); in ZTEST()
805 const struct fd_op_vtable *vtable; in ZTEST() local
825 obj = zvfs_get_fd_obj_and_vtable(test_sock, &vtable, NULL); in ZTEST()
/Zephyr-latest/subsys/net/lib/websocket/
Dwebsocket.c461 const struct fd_op_vtable *vtable; in websocket_poll_offload() local
483 (const struct fd_op_vtable **)&vtable, in websocket_poll_offload()
491 ret = zvfs_fdtable_call_ioctl(vtable, ctx, ZFD_IOCTL_POLL_OFFLOAD, in websocket_poll_offload()
525 const struct fd_op_vtable *vtable; in websocket_ioctl_vmeth() local
530 (const struct fd_op_vtable **)&vtable, in websocket_ioctl_vmeth()
538 return vtable->ioctl(core_obj, request, args); in websocket_ioctl_vmeth()
/Zephyr-latest/doc/releases/
Drelease-notes-1.14.rst204 * :github:`18021` - Socket vtable can access null pointer callback function
409 * :github:`18021` - Socket vtable can access null pointer callback function
Drelease-notes-2.0.rst731 * :github:`18021` - Socket vtable can access null pointer callback function