Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-28 20:22:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:io_sendmsg

Proto:static int io_sendmsg(struct io_kiocb *req, struct io_kiocb **nxt, bool force_nonblock)

Type:int

Parameter:

TypeParameterName
struct io_kiocb *req
struct io_kiocb **nxt
boolforce_nonblock
2189  struct io_async_msghdr * kmsg = NULL
2193  If Value for the false possibility is greater at compile time(flags & _context is polled ) Then Return -EINVAL
2196  sock = sock_from_file(file, & ret)
2197  If sock Then
2202  If io Then
2203  kmsg = msg
2206  If Not iov Then iov = fast_iov
2208  iov = iov
2209  Else
2210  sr = sr_msg
2212  kmsg = msg
2215  iov = fast_iov
2218  If ret Then Return ret
2222  flags = msg_flags
2223  If flags & Nonblocking io Then flags |= must not punt to workers
2225  Else if force_nonblock Then flags |= Nonblocking io
2228  ret = __sys_sendmsg_sock(sock, & msg, flags)
2229  If force_nonblock && ret == -EAGAIN Then
2230  If io Then Return -EAGAIN
2232  If io_alloc_async_ctx(req) Then
2233  If kmsg && iov != fast_iov Then kfree(iov)
2235  Return -ENOMEM
2237  memcpy( & msg, & msg, size of msg )
2238  Return -EAGAIN
2240  If 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. Then ret = -EINTR
2244  If kmsg && iov != fast_iov Then kfree(iov)
2246  io_cqring_add_event(req, ret)
2247  If ret < 0 Then 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  Return 0
Caller
NameDescribe
io_issue_sqe