函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:io_sendmsg

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

返回类型:int

参数:

类型参数名称
struct io_kiocb *req
struct io_kiocb **nxt
boolforce_nonblock
2189  struct io_async_msghdr * kmsg = NULL
2193  如果此条件成立可能性小(为编译器优化)(flags & _context is polled )则返回:负EINVAL
2196  sock等于sock_from_file(file, & ret)
2197  如果sock
2202  如果io
2203  kmsg等于msg
2206  如果非ioviov等于fast_iov
2208  iov等于iov
2209  否则
2210  sr等于sr_msg
2212  kmsg等于msg
2215  iov等于fast_iov
2216  ret等于sendmsg_copy_msghdr( & msg, msg, msg_flags, & iov)
2218  如果ret则返回:ret
2222  flags等于msg_flags
2223  如果flags按位与Nonblocking io flags或等于must not punt to workers
2225  否则如果force_nonblockflags或等于Nonblocking io
2228  ret等于__sys_sendmsg_sock(sock, & msg, flags)
2229  如果force_nonblockret恒等于负EAGAIN
2230  如果io则返回:负EAGAIN
2232  如果io_alloc_async_ctx(req)则
2233  如果kmsgiov不等于fast_iov释放内存
2235  返回:负ENOMEM
2237  memcpy( & msg, & msg, msg的长度)
2238  返回:负EAGAIN
2240  如果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
2244  如果kmsgiov不等于fast_iov释放内存
2246  io_cqring_add_event(req, ret)
2247  如果ret小于0则req_set_fail_links(req)
2249  Drop reference to request, return next in chain (if there is one) if this* was the last reference to this request.
2250  返回:0
调用者
名称描述
io_issue_sqe