Skip to content

Commit

Permalink
gh-127481: Add EPOLLWAKEUP to the select module (GH-127482)
Browse files Browse the repository at this point in the history
  • Loading branch information
rruuaanng authored Dec 4, 2024
1 parent bc0f2e9 commit 6bc3e83
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Doc/library/select.rst
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,17 @@ Edge and Level Trigger Polling (epoll) Objects
+-------------------------+-----------------------------------------------+
| :const:`EPOLLMSG` | Ignored. |
+-------------------------+-----------------------------------------------+
| :const:`EPOLLWAKEUP` | Prevents sleep during event waiting. |
+-------------------------+-----------------------------------------------+

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

.. versionadded:: next
:const:`EPOLLWAKEUP` was added. It's only supported by Linux Kernel 3.5
or later.

.. method:: epoll.close()

Close the control file descriptor of the epoll object.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add the ``EPOLLWAKEUP`` constant to the :mod:`select` module.
4 changes: 4 additions & 0 deletions Modules/selectmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2715,6 +2715,10 @@ _select_exec(PyObject *m)
#ifdef EPOLLMSG
ADD_INT(EPOLLMSG);
#endif
#ifdef EPOLLWAKEUP
/* Kernel 3.5+ */
ADD_INT(EPOLLWAKEUP);
#endif

#ifdef EPOLL_CLOEXEC
ADD_INT(EPOLL_CLOEXEC);
Expand Down

0 comments on commit 6bc3e83

Please sign in to comment.