Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9e42f195
Commit
9e42f195
authored
Dec 31, 2017
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eventfd: switch to ->poll_mask
Signed-off-by:
Christoph Hellwig
<
hch@lst.de
>
parent
dd67081b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
fs/eventfd.c
fs/eventfd.c
+11
-4
No files found.
fs/eventfd.c
View file @
9e42f195
...
...
@@ -101,14 +101,20 @@ static int eventfd_release(struct inode *inode, struct file *file)
return
0
;
}
static
__poll_t
eventfd_poll
(
struct
file
*
file
,
poll_table
*
wait
)
static
struct
wait_queue_head
*
eventfd_get_poll_head
(
struct
file
*
file
,
__poll_t
events
)
{
struct
eventfd_ctx
*
ctx
=
file
->
private_data
;
return
&
ctx
->
wqh
;
}
static
__poll_t
eventfd_poll_mask
(
struct
file
*
file
,
__poll_t
eventmask
)
{
struct
eventfd_ctx
*
ctx
=
file
->
private_data
;
__poll_t
events
=
0
;
u64
count
;
poll_wait
(
file
,
&
ctx
->
wqh
,
wait
);
/*
* All writes to ctx->count occur within ctx->wqh.lock. This read
* can be done outside ctx->wqh.lock because we know that poll_wait
...
...
@@ -305,7 +311,8 @@ static const struct file_operations eventfd_fops = {
.
show_fdinfo
=
eventfd_show_fdinfo
,
#endif
.
release
=
eventfd_release
,
.
poll
=
eventfd_poll
,
.
get_poll_head
=
eventfd_get_poll_head
,
.
poll_mask
=
eventfd_poll_mask
,
.
read
=
eventfd_read
,
.
write
=
eventfd_write
,
.
llseek
=
noop_llseek
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment