mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
add EPOLLEXCLUSIVE
This commit is contained in:
parent
96e97169cc
commit
0715ce358a
3 changed files with 42 additions and 32 deletions
|
@ -266,38 +266,43 @@ Edge and Level Trigger Polling (epoll) Objects
|
||||||
|
|
||||||
*eventmask*
|
*eventmask*
|
||||||
|
|
||||||
+-----------------------+-----------------------------------------------+
|
+-------------------------+-----------------------------------------------+
|
||||||
| Constant | Meaning |
|
| Constant | Meaning |
|
||||||
+=======================+===============================================+
|
+=========================+===============================================+
|
||||||
| :const:`EPOLLIN` | Available for read |
|
| :const:`EPOLLIN` | Available for read |
|
||||||
+-----------------------+-----------------------------------------------+
|
+-------------------------+-----------------------------------------------+
|
||||||
| :const:`EPOLLOUT` | Available for write |
|
| :const:`EPOLLOUT` | Available for write |
|
||||||
+-----------------------+-----------------------------------------------+
|
+-------------------------+-----------------------------------------------+
|
||||||
| :const:`EPOLLPRI` | Urgent data for read |
|
| :const:`EPOLLPRI` | Urgent data for read |
|
||||||
+-----------------------+-----------------------------------------------+
|
+-------------------------+-----------------------------------------------+
|
||||||
| :const:`EPOLLERR` | Error condition happened on the assoc. fd |
|
| :const:`EPOLLERR` | Error condition happened on the assoc. fd |
|
||||||
+-----------------------+-----------------------------------------------+
|
+-------------------------+-----------------------------------------------+
|
||||||
| :const:`EPOLLHUP` | Hang up happened on the assoc. fd |
|
| :const:`EPOLLHUP` | Hang up happened on the assoc. fd |
|
||||||
+-----------------------+-----------------------------------------------+
|
+-------------------------+-----------------------------------------------+
|
||||||
| :const:`EPOLLET` | Set Edge Trigger behavior, the default is |
|
| :const:`EPOLLET` | Set Edge Trigger behavior, the default is |
|
||||||
| | Level Trigger behavior |
|
| | Level Trigger behavior |
|
||||||
+-----------------------+-----------------------------------------------+
|
+-------------------------+-----------------------------------------------+
|
||||||
| :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is |
|
| :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is |
|
||||||
| | pulled out, the fd is internally disabled |
|
| | pulled out, the fd is internally disabled |
|
||||||
+-----------------------+-----------------------------------------------+
|
+-------------------------+-----------------------------------------------+
|
||||||
| :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut |
|
| :const:`EPOLLEXCLUSIVE` | Wake only one epoll object when the |
|
||||||
| | down writing half of connection. |
|
| | associated fd has an event. The default (if |
|
||||||
+-----------------------+-----------------------------------------------+
|
| | this flag is not set) is to wake all epoll |
|
||||||
| :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` |
|
| | objects polling on on a fd. |
|
||||||
+-----------------------+-----------------------------------------------+
|
+-------------------------+-----------------------------------------------+
|
||||||
| :const:`EPOLLRDBAND` | Priority data band can be read. |
|
| :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut |
|
||||||
+-----------------------+-----------------------------------------------+
|
| | down writing half of connection. |
|
||||||
| :const:`EPOLLWRNORM` | Equivalent to :const:`EPOLLOUT` |
|
+-------------------------+-----------------------------------------------+
|
||||||
+-----------------------+-----------------------------------------------+
|
| :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` |
|
||||||
| :const:`EPOLLWRBAND` | Priority data may be written. |
|
+-------------------------+-----------------------------------------------+
|
||||||
+-----------------------+-----------------------------------------------+
|
| :const:`EPOLLRDBAND` | Priority data band can be read. |
|
||||||
| :const:`EPOLLMSG` | Ignored. |
|
+-------------------------+-----------------------------------------------+
|
||||||
+-----------------------+-----------------------------------------------+
|
| :const:`EPOLLWRNORM` | Equivalent to :const:`EPOLLOUT` |
|
||||||
|
+-------------------------+-----------------------------------------------+
|
||||||
|
| :const:`EPOLLWRBAND` | Priority data may be written. |
|
||||||
|
+-------------------------+-----------------------------------------------+
|
||||||
|
| :const:`EPOLLMSG` | Ignored. |
|
||||||
|
+-------------------------+-----------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
.. method:: epoll.close()
|
.. method:: epoll.close()
|
||||||
|
|
|
@ -26,6 +26,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Expose the EPOLLEXCLUSIVE (when it is defined) in the select module.
|
||||||
|
|
||||||
- Issue #27567: Expose the EPOLLRDHUP constant 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.
|
- Issue #1621: Avoid signed int negation overflow in the "audioop" module.
|
||||||
|
|
|
@ -2479,6 +2479,9 @@ PyInit_select(void)
|
||||||
/* Kernel 2.6.2+ */
|
/* Kernel 2.6.2+ */
|
||||||
PyModule_AddIntMacro(m, EPOLLONESHOT);
|
PyModule_AddIntMacro(m, EPOLLONESHOT);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef EPOLLEXCLUSIVE
|
||||||
|
PyModule_AddIntMacro(m, EPOLLEXCLUSIVE);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EPOLLRDNORM
|
#ifdef EPOLLRDNORM
|
||||||
PyModule_AddIntMacro(m, EPOLLRDNORM);
|
PyModule_AddIntMacro(m, EPOLLRDNORM);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue