8000 gh-127481: Add `EPOLLWAKEUP` to the `select` module (GH-127482) · python/cpython@6bc3e83 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6bc3e83

Browse files
authored
gh-127481: Add EPOLLWAKEUP to the select module (GH-127482)
1 parent bc0f2e9 commit 6bc3e83

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Doc/library/select.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,17 @@ Edge and Level Trigger Polling (epoll) Objects
317317
+-------------------------+-----------------------------------------------+
318318
| :const:`EPOLLMSG` | Ignored. |
319319
+-------------------------+-----------------------------------------------+
320+
| :const:`EPOLLWAKEUP` | Prevents sleep during event waiting. |
321+
+-------------------------+-----------------------------------------------+
320322

321323
.. versionadded:: 3.6
322324
:const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel 4.5
323325
or later.
324326

327+
.. versionadded:: next
328+
:const:`EPOLLWAKEUP` was added. It's only supported by Linux Kernel 3.5
329+
or later.
330+
325331
.. method:: epoll.close()
326332

327333
Close the control file descriptor of the epoll object.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add the ``EPOLLWAKEUP`` constant to the :mod:`select` module.

Modules/selectmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,6 +2715,10 @@ _select_exec(PyObject *m)
27152715
#ifdef EPOLLMSG
27162716
ADD_INT(EPOLLMSG);
27172717
#endif
2718+
#ifdef EPOLLWAKEUP
2719+
/* Kernel 3.5+ */
2720+
ADD_INT(EPOLLWAKEUP);
2721+
#endif
27182722

27192723
#ifdef EPOLL_CLOEXEC
27202724
ADD_INT(EPOLL_CLOEXEC);

0 commit comments

Comments
 (0)
0