函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-29 10:54:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:io_recvmsg

函数原型:static int io_recvmsg(struct io_kiocb *req, struct io_kiocb **nxt, bool force_nonblock)

返回类型:int

参数:

类型参数名称
struct io_kiocb *req
struct io_kiocb **nxt
boolforce_nonblock
2286  struct io_async_msghdr * kmsg = NULL
2290  如果此条件成立可能性小(为编译器优化)(flags & _context is polled )则返回:负EINVAL
2293  sock等于sock_from_file(file, & ret)
2294  如果sock
2299  如果io
2300  kmsg等于msg
2303  如果非ioviov等于fast_iov
2305  iov等于iov
2306  否则
2307  sr等于sr_msg
2309  kmsg等于msg
2312  iov等于fast_iov
2313  ret等于recvmsg_copy_msghdr( & msg, msg, msg_flags, & uaddr, & iov)
2316  如果ret则返回:ret
2320  flags等于msg_flags
2321  如果flags按位与Nonblocking io flags或等于must not punt to workers
2323  否则如果force_nonblockflags或等于Nonblocking io
2326  ret等于__sys_recvmsg_sock(sock, & msg, msg, uaddr, flags)
2328  如果force_nonblockret恒等于负EAGAIN
2329  如果io则返回:负EAGAIN
2331  如果io_alloc_async_ctx(req)则
2332  如果kmsgiov不等于fast_iov释放内存
2334  返回:负ENOMEM
2336  memcpy( & msg, & msg, msg的长度)
2337  返回:负EAGAIN
2339  如果ret恒等于负These should never be seen by user programs. To return one of ERESTART** codes, signal_pending() MUST be set. Note that ptrace can observe these* at syscall exit tracing, but they will never be left for the debugged user* process to see.ret等于负EINTR
2343  如果kmsgiov不等于fast_iov释放内存
2345  io_cqring_add_event(req, ret)
2346  如果ret小于0则req_set_fail_links(req)
2348  Drop reference to request, return next in chain (if there is one) if this* was the last reference to this request.
2349  返回:0
调用者
名称描述
io_issue_sqe