Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29735
b: refs/heads/master
c: 3419b23
h: refs/heads/master
i:
  29733: 26c0917
  29731: 7792be6
  29727: 86af5e0
v: v3
  • Loading branch information
Davide Libenzi authored and Linus Torvalds committed Jun 25, 2006
1 parent add0346 commit 5943220
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ad3bcf3146aa12f41262bb5dd1d9f1778e085b1
refs/heads/master: 3419b23a919698f75944d3e0d97eb1d9c51e4bb6
17 changes: 10 additions & 7 deletions trunk/fs/eventpoll.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* fs/eventpoll.c ( Efficent event polling implementation )
* Copyright (C) 2001,...,2003 Davide Libenzi
* Copyright (C) 2001,...,2006 Davide Libenzi
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -1004,7 +1004,7 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event,

/* Notify waiting tasks that events are available */
if (waitqueue_active(&ep->wq))
wake_up(&ep->wq);
__wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE);
if (waitqueue_active(&ep->poll_wait))
pwake++;
}
Expand Down Expand Up @@ -1083,7 +1083,8 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, struct epoll_even

/* Notify waiting tasks that events are available */
if (waitqueue_active(&ep->wq))
wake_up(&ep->wq);
__wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE |
TASK_INTERRUPTIBLE);
if (waitqueue_active(&ep->poll_wait))
pwake++;
}
Expand Down Expand Up @@ -1260,7 +1261,8 @@ static int ep_poll_callback(wait_queue_t *wait, unsigned mode, int sync, void *k
* wait list.
*/
if (waitqueue_active(&ep->wq))
wake_up(&ep->wq);
__wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE |
TASK_INTERRUPTIBLE);
if (waitqueue_active(&ep->poll_wait))
pwake++;

Expand Down Expand Up @@ -1444,7 +1446,8 @@ static void ep_reinject_items(struct eventpoll *ep, struct list_head *txlist)
* wait list.
*/
if (waitqueue_active(&ep->wq))
wake_up(&ep->wq);
__wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE |
TASK_INTERRUPTIBLE);
if (waitqueue_active(&ep->poll_wait))
pwake++;
}
Expand Down Expand Up @@ -1516,7 +1519,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
* ep_poll_callback() when events will become available.
*/
init_waitqueue_entry(&wait, current);
add_wait_queue(&ep->wq, &wait);
__add_wait_queue(&ep->wq, &wait);

for (;;) {
/*
Expand All @@ -1536,7 +1539,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
jtimeout = schedule_timeout(jtimeout);
write_lock_irqsave(&ep->lock, flags);
}
remove_wait_queue(&ep->wq, &wait);
__remove_wait_queue(&ep->wq, &wait);

set_current_state(TASK_RUNNING);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/eventpoll.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* include/linux/eventpoll.h ( Efficent event polling implementation )
* Copyright (C) 2001,...,2003 Davide Libenzi
* Copyright (C) 2001,...,2006 Davide Libenzi
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down

0 comments on commit 5943220

Please sign in to comment.