8000 gh-127481: Add `EPOLLWAKEUP` to the `select` module by rruuaanng · Pull Request #127482 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-127481: Add EPOLLWAKEUP to the select module #127482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add version info
  • Loading branch information
rruuaanng committed Dec 2, 2024
commit be67a746de1185588e6b1cb9eaa359ab73cc2f90
4 changes: 4 additions & 0 deletions Doc/library/select.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,31 +284,31 @@
| Constant | Meaning |
+===========================+===============================================+
| :const:`EPOLLIN` | Available for read |
+---------------------------+-----------------------------------------------+

Check warning on line 287 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLIN [ref.const]
| :const:`EPOLLOUT` | Available for write |
+---------------------------+-----------------------------------------------+

Check warning on line 289 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLOUT [ref.const]
| :const:`EPOLLPRI` | Urgent data for read |
+---------------------------+-----------------------------------------------+

Check warning on line 291 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLPRI [ref.const]
| :const:`EPOLLERR` | Error condition happened on the assoc. fd |
+---------------------------+-----------------------------------------------+

Check warning on line 293 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLERR [ref.const]
| :const:`EPOLLHUP` | Hang up happened on the assoc. fd |
+---------------------------+-----------------------------------------------+

Check warning on line 295 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLHUP [ref.const]
| :const:`EPOLLET` | Set Edge Trigger behavior, the default is |
| | Level Trigger behavior |

Check warning on line 297 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLET [ref.const]
+---------------------------+-----------------------------------------------+
| :const:`EPOLLONESHOT` | Set one-shot behavior. After one event is |
| | pulled out, the fd is internally disabled |

Check warning on line 300 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLONESHOT [ref.const]
+---------------------------+-----------------------------------------------+
| :const:`EPOLLEXCLUSIVE` | Wake only one epoll object when the |
| | associated fd has an event. The default (if |

Check warning on line 303 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLEXCLUSIVE [ref.const]
| | this flag is not set) is to wake all epoll |
| | objects polling on a fd. |
+---------------------------+-----------------------------------------------+
| :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut |
| | down writing half of connection. |

Check warning on line 308 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLRDHUP [ref.const]
+---------------------------+-----------------------------------------------+
| :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` |
+---------------------------+-----------------------------------------------+

Check warning on line 311 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: EPOLLRDNORM [ref.const]
| :const:`EPOLLRDBAND` | Priority data band can be read. |
+---------------------------+-----------------------------------------------+
| :const:`EPOLLWRNORM` | Equivalent to :const:`EPOLLOUT` |
Expand All @@ -326,6 +326,10 @@
:const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel 4.5
or later.

.. versionadded:: 3.14
:const:`EPOLL_URING_WAKE` and :const:`EPOLLWAKEUP` was added. It's only
supported by Linux Kernel 6.1 or later.

.. method:: epoll.close()

Close the control file descriptor of the epoll object.
Expand Down
2 changes: 2 additions & 0 deletions Modules/selectmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2716,9 +2716,11 @@ _select_exec(PyObject *m)
ADD_INT(EPOLLMSG);
#endif
#ifdef EPOLL_URING_WAKE
/* Kernel 6.1+ */
ADD_INT(EPOLL_URING_WAKE);
#endif
#ifdef EPOLLWAKEUP
/* Kernel 3.5+ */
ADD_INT(EPOLLWAKEUP);
#endif

Expand Down
Loading
0