mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-11 20:51:42 +08:00
Add os.eventfd, os.eventfd_read and os.eventfd_write to Linux for Python 3.10+ (#10768)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import sys
|
||||
from _typeshed import (
|
||||
AnyStr_co,
|
||||
BytesPath,
|
||||
FileDescriptor,
|
||||
FileDescriptorLike,
|
||||
FileDescriptorOrPath,
|
||||
GenericPath,
|
||||
@@ -1057,6 +1058,14 @@ if sys.version_info >= (3, 12) and sys.platform == "win32":
|
||||
def listmounts(volume: str) -> list[str]: ...
|
||||
def listvolumes() -> list[str]: ...
|
||||
|
||||
if sys.version_info >= (3, 10) and sys.platform == "linux":
|
||||
EFD_CLOEXEC: int
|
||||
EFD_NONBLOCK: int
|
||||
EFD_SEMAPHORE: int
|
||||
def eventfd(initval: int, flags: int = 524288) -> FileDescriptor: ...
|
||||
def eventfd_read(fd: FileDescriptor) -> int: ...
|
||||
def eventfd_write(fd: FileDescriptor, value: int) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 12) and sys.platform == "linux":
|
||||
CLONE_FILES: int
|
||||
CLONE_FS: int
|
||||
@@ -1072,3 +1081,4 @@ if sys.version_info >= (3, 12) and sys.platform == "linux":
|
||||
CLONE_SYSVSEM: int
|
||||
CLONE_THREAD: int
|
||||
CLONE_VM: int
|
||||
def unshare(flags: int) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user