Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
2c7d3dac
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2c7d3dac
编写于
4月 09, 2018
作者:
C
Christoph Hellwig
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
net/tcp: convert to ->poll_mask
Signed-off-by:
N
Christoph Hellwig
<
hch@lst.de
>
上级
984652dd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
21 deletion
+9
-21
include/net/tcp.h
include/net/tcp.h
+1
-2
net/ipv4/af_inet.c
net/ipv4/af_inet.c
+1
-1
net/ipv4/tcp.c
net/ipv4/tcp.c
+6
-17
net/ipv6/af_inet6.c
net/ipv6/af_inet6.c
+1
-1
未找到文件。
include/net/tcp.h
浏览文件 @
2c7d3dac
...
...
@@ -388,8 +388,7 @@ bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst);
void
tcp_close
(
struct
sock
*
sk
,
long
timeout
);
void
tcp_init_sock
(
struct
sock
*
sk
);
void
tcp_init_transfer
(
struct
sock
*
sk
,
int
bpf_op
);
__poll_t
tcp_poll
(
struct
file
*
file
,
struct
socket
*
sock
,
struct
poll_table_struct
*
wait
);
__poll_t
tcp_poll_mask
(
struct
socket
*
sock
,
__poll_t
events
);
int
tcp_getsockopt
(
struct
sock
*
sk
,
int
level
,
int
optname
,
char
__user
*
optval
,
int
__user
*
optlen
);
int
tcp_setsockopt
(
struct
sock
*
sk
,
int
level
,
int
optname
,
...
...
net/ipv4/af_inet.c
浏览文件 @
2c7d3dac
...
...
@@ -986,7 +986,7 @@ const struct proto_ops inet_stream_ops = {
.
socketpair
=
sock_no_socketpair
,
.
accept
=
inet_accept
,
.
getname
=
inet_getname
,
.
poll
=
tcp_poll
,
.
poll
_mask
=
tcp_poll_mask
,
.
ioctl
=
inet_ioctl
,
.
listen
=
inet_listen
,
.
shutdown
=
inet_shutdown
,
...
...
net/ipv4/tcp.c
浏览文件 @
2c7d3dac
...
...
@@ -494,32 +494,21 @@ static inline bool tcp_stream_is_readable(const struct tcp_sock *tp,
}
/*
* Wait for a TCP event.
*
* Note that we don't need to lock the socket, as the upper poll layers
* take care of normal races (between the test and the event) and we don't
* go look at any of the socket buffers directly.
* Socket is not locked. We are protected from async events by poll logic and
* correct handling of state changes made by other threads is impossible in
* any case.
*/
__poll_t
tcp_poll
(
struct
file
*
file
,
struct
socket
*
sock
,
poll_table
*
wait
)
__poll_t
tcp_poll
_mask
(
struct
socket
*
sock
,
__poll_t
events
)
{
__poll_t
mask
;
struct
sock
*
sk
=
sock
->
sk
;
const
struct
tcp_sock
*
tp
=
tcp_sk
(
sk
);
__poll_t
mask
=
0
;
int
state
;
sock_poll_wait
(
file
,
sk_sleep
(
sk
),
wait
);
state
=
inet_sk_state_load
(
sk
);
if
(
state
==
TCP_LISTEN
)
return
inet_csk_listen_poll
(
sk
);
/* Socket is not locked. We are protected from async events
* by poll logic and correct handling of state changes
* made by other threads is impossible in any case.
*/
mask
=
0
;
/*
* EPOLLHUP is certainly not done right. But poll() doesn't
* have a notion of HUP in just one direction, and for a
...
...
@@ -600,7 +589,7 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
return
mask
;
}
EXPORT_SYMBOL
(
tcp_poll
);
EXPORT_SYMBOL
(
tcp_poll
_mask
);
int
tcp_ioctl
(
struct
sock
*
sk
,
int
cmd
,
unsigned
long
arg
)
{
...
...
net/ipv6/af_inet6.c
浏览文件 @
2c7d3dac
...
...
@@ -571,7 +571,7 @@ const struct proto_ops inet6_stream_ops = {
.
socketpair
=
sock_no_socketpair
,
/* a do nothing */
.
accept
=
inet_accept
,
/* ok */
.
getname
=
inet6_getname
,
.
poll
=
tcp_poll
,
/* ok */
.
poll
_mask
=
tcp_poll_mask
,
/* ok */
.
ioctl
=
inet6_ioctl
,
/* must change */
.
listen
=
inet_listen
,
/* ok */
.
shutdown
=
inet_shutdown
,
/* ok */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录