summaryrefslogtreecommitdiff
path: root/ev_epoll.c
diff options
context:
space:
mode:
authorroot <root>2008-10-29 10:24:23 +0000
committerroot <root>2008-10-29 10:24:23 +0000
commit9a8a8360821b7414dc252abe85e3f3c87e6a73f1 (patch)
treeb34ae8ba1c7ef52975d8da42d1fc5a1ae1fa2473 /ev_epoll.c
parent6c2b22e22f8573bc5fa5ce68b5a2caef122428c6 (diff)
docpatch by Mikachu
Diffstat (limited to 'ev_epoll.c')
-rw-r--r--ev_epoll.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ev_epoll.c b/ev_epoll.c
index a57e203..f8f9835 100644
--- a/ev_epoll.c
+++ b/ev_epoll.c
@@ -79,8 +79,9 @@ epoll_modify (EV_P_ int fd, int oev, int nev)
oldmask = anfds [fd].emask;
anfds [fd].emask = nev;
- /* store the generation counter in the upper 32 bits */
- ev.data.u64 = (uint64_t)(uint32_t)fd | ((uint64_t)(uint32_t)++anfds [fd].egen << 32);
+ /* store the generation counter in the upper 32 bits, the fd in the lower 32 bits */
+ ev.data.u64 = (uint64_t)(uint32_t)fd
+ | ((uint64_t)(uint32_t)++anfds [fd].egen << 32);
ev.events = (nev & EV_READ ? EPOLLIN : 0)
| (nev & EV_WRITE ? EPOLLOUT : 0);