Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
gevent
Commits
eb9a8dc7
Commit
eb9a8dc7
authored
Jul 11, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade to latest libev (4.10-CVS)
parent
bdc9f8ce
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
202 additions
and
100 deletions
+202
-100
libev/ev.c
libev/ev.c
+181
-93
libev/ev_epoll.c
libev/ev_epoll.c
+15
-4
libev/ev_vars.h
libev/ev_vars.h
+2
-1
libev/ev_wrap.h
libev/ev_wrap.h
+4
-2
No files found.
libev/ev.c
View file @
eb9a8dc7
This diff is collapsed.
Click to expand it.
libev/ev_epoll.c
View file @
eb9a8dc7
...
...
@@ -170,8 +170,12 @@ epoll_poll (EV_P_ ev_tstamp timeout)
int
got
=
(
ev
->
events
&
(
EPOLLOUT
|
EPOLLERR
|
EPOLLHUP
)
?
EV_WRITE
:
0
)
|
(
ev
->
events
&
(
EPOLLIN
|
EPOLLERR
|
EPOLLHUP
)
?
EV_READ
:
0
);
/* check for spurious notification */
/* we assume that fd is always in range, as we never shrink the anfds array */
/*
* check for spurious notification.
* this only finds spurious notifications on egen updates
* other spurious notifications will be found by epoll_ctl, below
* we assume that fd is always in range, as we never shrink the anfds array
*/
if
(
expect_false
((
uint32_t
)
anfds
[
fd
].
egen
!=
(
uint32_t
)(
ev
->
data
.
u64
>>
32
)))
{
/* recreate kernel state */
...
...
@@ -183,8 +187,15 @@ epoll_poll (EV_P_ ev_tstamp timeout)
{
anfds
[
fd
].
emask
=
want
;
/* we received an event but are not interested in it, try mod or del */
/* I don't think we ever need MOD, but let's handle it anyways */
/*
* we received an event but are not interested in it, try mod or del
* this often happens because we optimistically do not unregister fds
* when we are no longer interested in them, but also when we get spurious
* notifications for fds from another process. this is partially handled
* above with the gencounter check (== our fd is not the event fd), and
* partially here, when epoll_ctl returns an error (== a child has the fd
* but we closed it).
*/
ev
->
events
=
(
want
&
EV_READ
?
EPOLLIN
:
0
)
|
(
want
&
EV_WRITE
?
EPOLLOUT
:
0
);
...
...
libev/ev_vars.h
View file @
eb9a8dc7
...
...
@@ -73,6 +73,8 @@ VARx(int, evfd)
#endif
VAR
(
evpipe
,
int
evpipe
[
2
])
VARx
(
ev_io
,
pipe_w
)
VARx
(
EV_ATOMIC_T
,
pipe_write_wanted
)
VARx
(
EV_ATOMIC_T
,
pipe_write_skipped
)
#if !defined(_WIN32) || EV_GENWRAP
VARx
(
pid_t
,
curpid
)
...
...
@@ -180,7 +182,6 @@ VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE])
#endif
VARx
(
EV_ATOMIC_T
,
sig_pending
)
VARx
(
int
,
nosigmask
)
#if EV_USE_SIGNALFD || EV_GENWRAP
VARx
(
int
,
sigfd
)
VARx
(
ev_io
,
sigfd_w
)
...
...
libev/ev_wrap.h
View file @
eb9a8dc7
...
...
@@ -25,6 +25,8 @@
#define evfd ((loop)->evfd)
#define evpipe ((loop)->evpipe)
#define pipe_w ((loop)->pipe_w)
#define pipe_write_wanted ((loop)->pipe_write_wanted)
#define pipe_write_skipped ((loop)->pipe_write_skipped)
#define curpid ((loop)->curpid)
#define postfork ((loop)->postfork)
#define vec_ri ((loop)->vec_ri)
...
...
@@ -85,7 +87,6 @@
#define fs_2625 ((loop)->fs_2625)
#define fs_hash ((loop)->fs_hash)
#define sig_pending ((loop)->sig_pending)
#define nosigmask ((loop)->nosigmask)
#define sigfd ((loop)->sigfd)
#define sigfd_w ((loop)->sigfd_w)
#define sigfd_set ((loop)->sigfd_set)
...
...
@@ -122,6 +123,8 @@
#undef evfd
#undef evpipe
#undef pipe_w
#undef pipe_write_wanted
#undef pipe_write_skipped
#undef curpid
#undef postfork
#undef vec_ri
...
...
@@ -182,7 +185,6 @@
#undef fs_2625
#undef fs_hash
#undef sig_pending
#undef nosigmask
#undef sigfd
#undef sigfd_w
#undef sigfd_set
...
...
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