diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-07-18 22:02:44 -0700 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-07-18 22:02:44 -0700 |
commit | 0715ce358af2e8ad5606a6e369ecc9489326a34c (patch) | |
tree | 3dcf29b861f8f6c2c2f67412eaa734bba63879ad | |
parent | 96e97169ccf5b2cdd4eea267205f96535e037ec6 (diff) | |
download | cpython-git-0715ce358af2e8ad5606a6e369ecc9489326a34c.tar.gz |
add EPOLLEXCLUSIVE
-rw-r--r-- | Doc/library/select.rst | 69 | ||||
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/selectmodule.c | 3 |
3 files changed, 42 insertions, 32 deletions
diff --git a/Doc/library/select.rst b/Doc/library/select.rst index 93f01a3c11..4fafb117b8 100644 --- a/Doc/library/select.rst +++ b/Doc/library/select.rst @@ -266,38 +266,43 @@ Edge and Level Trigger Polling (epoll) Objects *eventmask* - +-----------------------+-----------------------------------------------+ - | Constant | Meaning | - +=======================+===============================================+ - | :const:`EPOLLIN` | Available for read | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLOUT` | Available for write | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLPRI` | Urgent data for read | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLERR` | Error condition happened on the assoc. fd | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLHUP` | Hang up happened on the assoc. fd | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLET` | Set Edge Trigger behavior, the default is | - | | Level Trigger behavior | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is | - | | pulled out, the fd is internally disabled | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut | - | | down writing half of connection. | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLRDBAND` | Priority data band can be read. | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLWRNORM` | Equivalent to :const:`EPOLLOUT` | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLWRBAND` | Priority data may be written. | - +-----------------------+-----------------------------------------------+ - | :const:`EPOLLMSG` | Ignored. | - +-----------------------+-----------------------------------------------+ + +-------------------------+-----------------------------------------------+ + | Constant | Meaning | + +=========================+===============================================+ + | :const:`EPOLLIN` | Available for read | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLOUT` | Available for write | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLPRI` | Urgent data for read | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLERR` | Error condition happened on the assoc. fd | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLHUP` | Hang up happened on the assoc. fd | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLET` | Set Edge Trigger behavior, the default is | + | | Level Trigger behavior | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is | + | | pulled out, the fd is internally disabled | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLEXCLUSIVE` | Wake only one epoll object when the | + | | associated fd has an event. The default (if | + | | this flag is not set) is to wake all epoll | + | | objects polling on on a fd. | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut | + | | down writing half of connection. | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLRDBAND` | Priority data band can be read. | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLWRNORM` | Equivalent to :const:`EPOLLOUT` | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLWRBAND` | Priority data may be written. | + +-------------------------+-----------------------------------------------+ + | :const:`EPOLLMSG` | Ignored. | + +-------------------------+-----------------------------------------------+ .. method:: epoll.close() @@ -26,6 +26,8 @@ Core and Builtins Library ------- +- Expose the EPOLLEXCLUSIVE (when it is defined) in the select module. + - Issue #27567: Expose the EPOLLRDHUP constant in the select module. - Issue #1621: Avoid signed int negation overflow in the "audioop" module. diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index fa71d6e7f4..c84c3cc26b 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -2479,6 +2479,9 @@ PyInit_select(void) /* Kernel 2.6.2+ */ PyModule_AddIntMacro(m, EPOLLONESHOT); #endif +#ifdef EPOLLEXCLUSIVE + PyModule_AddIntMacro(m, EPOLLEXCLUSIVE); +#endif #ifdef EPOLLRDNORM PyModule_AddIntMacro(m, EPOLLRDNORM); |