]> granicus.if.org Git - python/commitdiff
add EPOLLEXCLUSIVE
authorBenjamin Peterson <benjamin@python.org>
Tue, 19 Jul 2016 05:02:44 +0000 (22:02 -0700)
committerBenjamin Peterson <benjamin@python.org>
Tue, 19 Jul 2016 05:02:44 +0000 (22:02 -0700)
Doc/library/select.rst
Misc/NEWS
Modules/selectmodule.c

index 93f01a3c118fb445b8b4a873e0616a87a3535459..4fafb117b8db8914047e32ee41e9a6173ae00dc5 100644 (file)
@@ -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()
index 55b6800928ea87475b52d60aa673b6762a018911..0ff80f08fa7832d1f19647ec048e4e79bb73e81e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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.
index fa71d6e7f491e6d12fc908f5f9cac4eeeb678204..c84c3cc26b562c44d82e8a7035f7e3ba27701927 100644 (file)
@@ -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);