bpo-46696: Add socket.SO_INCOMING_CPU constant (#31237)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
David CARLIER 2022-05-03 18:33:11 +01:00 committed by GitHub
parent b295a92c50
commit d5dfcd4489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View File

@ -575,6 +575,15 @@ Constants
.. availability:: FreeBSD.
.. data:: SO_INCOMING_CPU
Constant to optimize CPU locality, to be used in conjunction with
:data:`SO_REUSEPORT`.
.. versionadded:: 3.11
.. availability:: Linux >= 3.9
Functions
^^^^^^^^^

View File

@ -0,0 +1 @@
Add ``SO_INCOMING_CPU`` constant to :mod:`socket`.

View File

@ -7505,6 +7505,9 @@ PyInit__socket(void)
#ifdef SO_EXCLUSIVEADDRUSE
PyModule_AddIntMacro(m, SO_EXCLUSIVEADDRUSE);
#endif
#ifdef SO_INCOMING_CPU
PyModule_AddIntMacro(m, SO_INCOMING_CPU);
#endif
#ifdef SO_KEEPALIVE
PyModule_AddIntMacro(m, SO_KEEPALIVE);