Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0715ce3

Browse files
committed
add EPOLLEXCLUSIVE
1 parent 96e9716 commit 0715ce3

3 files changed

Lines changed: 42 additions & 32 deletions

File tree

Doc/library/select.rst

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -266,38 +266,43 @@ Edge and Level Trigger Polling (epoll) Objects
266266

267267
*eventmask*
268268

269-
+-----------------------+-----------------------------------------------+
270-
| Constant | Meaning |
271-
+=======================+===============================================+
272-
| :const:`EPOLLIN` | Available for read |
273-
+-----------------------+-----------------------------------------------+
274-
| :const:`EPOLLOUT` | Available for write |
275-
+-----------------------+-----------------------------------------------+
276-
| :const:`EPOLLPRI` | Urgent data for read |
277-
+-----------------------+-----------------------------------------------+
278-
| :const:`EPOLLERR` | Error condition happened on the assoc. fd |
279-
+-----------------------+-----------------------------------------------+
280-
| :const:`EPOLLHUP` | Hang up happened on the assoc. fd |
281-
+-----------------------+-----------------------------------------------+
282-
| :const:`EPOLLET` | Set Edge Trigger behavior, the default is |
283-
| | Level Trigger behavior |
284-
+-----------------------+-----------------------------------------------+
285-
| :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is |
286-
| | pulled out, the fd is internally disabled |
287-
+-----------------------+-----------------------------------------------+
288-
| :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut |
289-
| | down writing half of connection. |
290-
+-----------------------+-----------------------------------------------+
291-
| :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` |
292-
+-----------------------+-----------------------------------------------+
293-
| :const:`EPOLLRDBAND` | Priority data band can be read. |
294-
+-----------------------+-----------------------------------------------+
295-
| :const:`EPOLLWRNORM` | Equivalent to :const:`EPOLLOUT` |
296-
+-----------------------+-----------------------------------------------+
297-
| :const:`EPOLLWRBAND` | Priority data may be written. |
298-
+-----------------------+-----------------------------------------------+
299-
| :const:`EPOLLMSG` | Ignored. |
300-
+-----------------------+-----------------------------------------------+
269+
+-------------------------+-----------------------------------------------+
270+
| Constant | Meaning |
271+
+=========================+===============================================+
272+
| :const:`EPOLLIN` | Available for read |
273+
+-------------------------+-----------------------------------------------+
274+
| :const:`EPOLLOUT` | Available for write |
275+
+-------------------------+-----------------------------------------------+
276+
| :const:`EPOLLPRI` | Urgent data for read |
277+
+-------------------------+-----------------------------------------------+
278+
| :const:`EPOLLERR` | Error condition happened on the assoc. fd |
279+
+-------------------------+-----------------------------------------------+
280+
| :const:`EPOLLHUP` | Hang up happened on the assoc. fd |
281+
+-------------------------+-----------------------------------------------+
282+
| :const:`EPOLLET` | Set Edge Trigger behavior, the default is |
283+
| | Level Trigger behavior |
284+
+-------------------------+-----------------------------------------------+
285+
| :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is |
286+
| | pulled out, the fd is internally disabled |
287+
+-------------------------+-----------------------------------------------+
288+
| :const:`EPOLLEXCLUSIVE` | Wake only one epoll object when the |
289+
| | associated fd has an event. The default (if |
290+
| | this flag is not set) is to wake all epoll |
291+
| | objects polling on on a fd. |
292+
+-------------------------+-----------------------------------------------+
293+
| :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut |
294+
| | down writing half of connection. |
295+
+-------------------------+-----------------------------------------------+
296+
| :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` |
297+
+-------------------------+-----------------------------------------------+
298+
| :const:`EPOLLRDBAND` | Priority data band can be read. |
299+
+-------------------------+-----------------------------------------------+
300+
| :const:`EPOLLWRNORM` | Equivalent to :const:`EPOLLOUT` |
301+
+-------------------------+-----------------------------------------------+
302+
| :const:`EPOLLWRBAND` | Priority data may be written. |
303+
+-------------------------+-----------------------------------------------+
304+
| :const:`EPOLLMSG` | Ignored. |
305+
+-------------------------+-----------------------------------------------+
301306

302307

303308
.. method:: epoll.close()

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Core and Builtins
2626
Library
2727
-------
2828

29+
- Expose the EPOLLEXCLUSIVE (when it is defined) in the select module.
30+
2931
- Issue #27567: Expose the EPOLLRDHUP constant in the select module.
3032

3133
- Issue #1621: Avoid signed int negation overflow in the "audioop" module.

Modules/selectmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,6 +2479,9 @@ PyInit_select(void)
24792479
/* Kernel 2.6.2+ */
24802480
PyModule_AddIntMacro(m, EPOLLONESHOT);
24812481
#endif
2482+
#ifdef EPOLLEXCLUSIVE
2483+
PyModule_AddIntMacro(m, EPOLLEXCLUSIVE);
2484+
#endif
24822485

24832486
#ifdef EPOLLRDNORM
24842487
PyModule_AddIntMacro(m, EPOLLRDNORM);

0 commit comments

Comments
 (0)