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
652fe8e8
Commit
652fe8e8
authored
Mar 05, 2018
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timerfd: convert to ->poll_mask
Signed-off-by:
Christoph Hellwig
<
hch@lst.de
>
parent
9e42f195
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
fs/timerfd.c
fs/timerfd.c
+11
-11
No files found.
fs/timerfd.c
View file @
652fe8e8
...
...
@@ -226,21 +226,20 @@ static int timerfd_release(struct inode *inode, struct file *file)
kfree_rcu
(
ctx
,
rcu
);
return
0
;
}
static
__poll_t
timerfd_poll
(
struct
file
*
file
,
poll_table
*
wait
)
static
struct
wait_queue_head
*
timerfd_get_poll_head
(
struct
file
*
file
,
__poll_t
eventmask
)
{
struct
timerfd_ctx
*
ctx
=
file
->
private_data
;
__poll_t
events
=
0
;
unsigned
long
flags
;
poll_wait
(
file
,
&
ctx
->
wqh
,
wait
);
return
&
ctx
->
wqh
;
}
spin_lock_irqsave
(
&
ctx
->
wqh
.
lock
,
flags
);
if
(
ctx
->
ticks
)
events
|=
EPOLLIN
;
spin_unlock_irqrestore
(
&
ctx
->
wqh
.
lock
,
flags
);
static
__poll_t
timerfd_poll_mask
(
struct
file
*
file
,
__poll_t
eventmask
)
{
struct
timerfd_ctx
*
ctx
=
file
->
private_data
;
return
events
;
return
ctx
->
ticks
?
EPOLLIN
:
0
;
}
static
ssize_t
timerfd_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
...
...
@@ -364,7 +363,8 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg
static
const
struct
file_operations
timerfd_fops
=
{
.
release
=
timerfd_release
,
.
poll
=
timerfd_poll
,
.
get_poll_head
=
timerfd_get_poll_head
,
.
poll_mask
=
timerfd_poll_mask
,
.
read
=
timerfd_read
,
.
llseek
=
noop_llseek
,
.
show_fdinfo
=
timerfd_show
,
...
...
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