-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Revert "[libc] add epoll_wait functions" #79534
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-libc Author: None (michaelrj-google) ChangesReverts llvm/llvm-project#79515 Some minor breakages. Will fix tomorrow. Patch is 27.98 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/79534.diff 34 Files Affected:
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index beec23570ebfc7..52f1d2bce34f4c 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -172,11 +172,6 @@ set(TARGET_LIBC_ENTRYPOINTS
# sys/auxv.h entrypoints
libc.src.sys.auxv.getauxval
- # sys/epoll.h entrypoints
- libc.src.sys.epoll.epoll_wait
- libc.src.sys.epoll.epoll_pwait
- libc.src.sys.epoll.epoll_pwait2
-
# termios.h entrypoints
libc.src.termios.cfgetispeed
libc.src.termios.cfgetospeed
diff --git a/libc/config/linux/aarch64/headers.txt b/libc/config/linux/aarch64/headers.txt
index 4c8620951ccfe3..60d978bcaa76e4 100644
--- a/libc/config/linux/aarch64/headers.txt
+++ b/libc/config/linux/aarch64/headers.txt
@@ -24,5 +24,4 @@ set(TARGET_PUBLIC_HEADERS
libc.include.unistd
libc.include.sys_ioctl
- libc.include.sys_epoll
)
diff --git a/libc/config/linux/api.td b/libc/config/linux/api.td
index b8fe16cc0c79ea..85f6b59264eb06 100644
--- a/libc/config/linux/api.td
+++ b/libc/config/linux/api.td
@@ -1,11 +1,11 @@
include "config/public_api.td"
-include "spec/stdc.td"
-include "spec/posix.td"
-include "spec/linux.td"
-include "spec/gnu_ext.td"
include "spec/bsd_ext.td"
+include "spec/gnu_ext.td"
+include "spec/linux.td"
include "spec/llvm_libc_ext.td"
+include "spec/posix.td"
+include "spec/stdc.td"
def AssertMacro : MacroDef<"assert"> {
let Defn = [{
@@ -242,10 +242,6 @@ def SysUtsNameAPI : PublicAPI<"sys/utsname.h"> {
let Types = ["struct utsname"];
}
-def SysEpollAPI : PublicAPI<"sys/epoll.h"> {
- let Types = ["struct epoll_event", "struct epoll_data", "sigset_t", "struct timespec"];
-}
-
def SpawnAPI : PublicAPI<"spawn.h"> {
let Types = ["mode_t", "pid_t", "posix_spawnattr_t", "posix_spawn_file_actions_t"];
}
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index f3f42a4cbc1e1a..c75ac2302d4ac4 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -95,12 +95,6 @@ set(TARGET_LIBC_ENTRYPOINTS
# sys/prctl.h entrypoints
libc.src.sys.prctl.prctl
-
- # sys/epoll.h entrypoints
- libc.src.sys.epoll.epoll_wait
- libc.src.sys.epoll.epoll_pwait
- libc.src.sys.epoll.epoll_pwait2
-
)
set(TARGET_LIBM_ENTRYPOINTS
diff --git a/libc/config/linux/arm/headers.txt b/libc/config/linux/arm/headers.txt
index e9ded77f19566f..9e6ee51675916e 100644
--- a/libc/config/linux/arm/headers.txt
+++ b/libc/config/linux/arm/headers.txt
@@ -9,6 +9,4 @@ set(TARGET_PUBLIC_HEADERS
libc.include.string
libc.include.strings
libc.include.search
-
- libc.include.sys_epoll
)
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index a33fd1b0993f0d..a257f3f8d64ab9 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -178,11 +178,6 @@ set(TARGET_LIBC_ENTRYPOINTS
# sys/auxv.h entrypoints
libc.src.sys.auxv.getauxval
- # sys/epoll.h entrypoints
- libc.src.sys.epoll.epoll_wait
- libc.src.sys.epoll.epoll_pwait
- libc.src.sys.epoll.epoll_pwait2
-
# termios.h entrypoints
libc.src.termios.cfgetispeed
libc.src.termios.cfgetospeed
diff --git a/libc/config/linux/riscv/headers.txt b/libc/config/linux/riscv/headers.txt
index 7cd1a9d63314d7..0ade63dc5933b5 100644
--- a/libc/config/linux/riscv/headers.txt
+++ b/libc/config/linux/riscv/headers.txt
@@ -29,7 +29,6 @@ set(TARGET_PUBLIC_HEADERS
libc.include.arpa_inet
libc.include.sys_auxv
- libc.include.sys_epoll
libc.include.sys_ioctl
libc.include.sys_mman
libc.include.sys_prctl
diff --git a/libc/config/linux/syscall_numbers.h.inc b/libc/config/linux/syscall_numbers.h.inc
index 9f910c5f9042a8..5bbb08878ef9df 100644
--- a/libc/config/linux/syscall_numbers.h.inc
+++ b/libc/config/linux/syscall_numbers.h.inc
@@ -258,10 +258,6 @@
#define SYS_epoll_pwait __NR_epoll_pwait
#endif
-#ifdef __NR_epoll_pwait2
-#define SYS_epoll_pwait2 __NR_epoll_pwait2
-#endif
-
#ifdef __NR_epoll_wait
#define SYS_epoll_wait __NR_epoll_wait
#endif
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index f0e5a0f3bd8f06..3812d9586121e7 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -136,11 +136,6 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdio.scanf
libc.src.stdio.fscanf
- # sys/epoll.h entrypoints
- libc.src.sys.epoll.epoll_wait
- libc.src.sys.epoll.epoll_pwait
- libc.src.sys.epoll.epoll_pwait2
-
# sys/mman.h entrypoints
libc.src.sys.mman.madvise
libc.src.sys.mman.mmap
diff --git a/libc/config/linux/x86_64/headers.txt b/libc/config/linux/x86_64/headers.txt
index e2bea1fb31f36d..d103176897a74a 100644
--- a/libc/config/linux/x86_64/headers.txt
+++ b/libc/config/linux/x86_64/headers.txt
@@ -29,7 +29,6 @@ set(TARGET_PUBLIC_HEADERS
libc.include.arpa_inet
libc.include.sys_auxv
- libc.include.sys_epoll
libc.include.sys_ioctl
libc.include.sys_mman
libc.include.sys_prctl
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index 24e50fb6a47e01..89fffd1022758e 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -332,17 +332,6 @@ add_gen_header(
.llvm-libc-macros.sys_auxv_macros
)
-add_gen_header(
- sys_epoll
- DEF_FILE sys/epoll.h.def
- GEN_HDR sys/epoll.h
- DEPENDS
- .llvm_libc_common_h
- .llvm-libc-types.struct_epoll_event
- .llvm-libc-types.struct_epoll_data
- .llvm-libc-types.sigset_t
-)
-
add_gen_header(
sys_ioctl
DEF_FILE sys/ioctl.h.def
diff --git a/libc/include/llvm-libc-types/CMakeLists.txt b/libc/include/llvm-libc-types/CMakeLists.txt
index 6f004d2d646970..500900ffa0bbb0 100644
--- a/libc/include/llvm-libc-types/CMakeLists.txt
+++ b/libc/include/llvm-libc-types/CMakeLists.txt
@@ -96,5 +96,3 @@ add_header(rpc_opcodes_t HDR rpc_opcodes_t.h)
add_header(ACTION HDR ACTION.h)
add_header(ENTRY HDR ENTRY.h)
add_header(struct_hsearch_data HDR struct_hsearch_data.h)
-add_header(struct_epoll_event HDR struct_epoll_event.h)
-add_header(struct_epoll_data HDR struct_epoll_data.h)
diff --git a/libc/include/llvm-libc-types/struct_epoll_data.h b/libc/include/llvm-libc-types/struct_epoll_data.h
deleted file mode 100644
index c363171089f116..00000000000000
--- a/libc/include/llvm-libc-types/struct_epoll_data.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Definition of epoll_data type -------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __LLVM_LIBC_TYPES_EPOLL_DATA_H__
-#define __LLVM_LIBC_TYPES_EPOLL_DATA_H__
-
-union epoll_data {
- void *ptr;
- int fd;
- __UINT32_TYPE__ u32;
- __UINT64_TYPE__ u64;
-};
-
-typedef union epoll_data epoll_data_t;
-
-#endif // __LLVM_LIBC_TYPES_EPOLL_DATA_H__
diff --git a/libc/include/llvm-libc-types/struct_epoll_event.h b/libc/include/llvm-libc-types/struct_epoll_event.h
deleted file mode 100644
index 425dd51e030cc1..00000000000000
--- a/libc/include/llvm-libc-types/struct_epoll_event.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Definition of epoll_event type ------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __LLVM_LIBC_TYPES_EPOLL_EVENT_H__
-#define __LLVM_LIBC_TYPES_EPOLL_EVENT_H__
-
-#include <llvm-libc-types/epoll_data.h>
-
-typedef struct epoll_event {
- __UINT32_TYPE__ events;
- epoll_data_t data;
-};
-
-#endif // __LLVM_LIBC_TYPES_EPOLL_EVENT_H__
diff --git a/libc/include/sys/epoll.h.def b/libc/include/sys/epoll.h.def
deleted file mode 100644
index 490fad91db3c3a..00000000000000
--- a/libc/include/sys/epoll.h.def
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- Linux header epoll.h ----------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SYS_EPOLL_H
-#define LLVM_LIBC_SYS_EPOLL_H
-
-#include <__llvm-libc-common.h>
-
-%%public_api()
-
-#endif // LLVM_LIBC_SYS_EPOLL_H
diff --git a/libc/spec/gnu_ext.td b/libc/spec/gnu_ext.td
index 1b1b35b4d028be..cb0407c84d4e21 100644
--- a/libc/spec/gnu_ext.td
+++ b/libc/spec/gnu_ext.td
@@ -238,9 +238,7 @@ def GnuExtensions : StandardSpec<"GNUExtensions"> {
[], // Macros
[], // Types
[], // Enumerations
- [
- //TODO: Add getauxval here
- ] // Functions
+ [] // Functions
>;
HeaderSpec SendFile = HeaderSpec<
diff --git a/libc/spec/linux.td b/libc/spec/linux.td
index 9fa8734db7eba6..eab0a987b920cd 100644
--- a/libc/spec/linux.td
+++ b/libc/spec/linux.td
@@ -1,8 +1,3 @@
-def StructEpollEvent : NamedType<"struct epoll_event">;
-def StructEpollEventPtr : PtrType<StructEpollEvent>;
-
-def StructEpollData : NamedType<"struct epoll_data">;
-
def Linux : StandardSpec<"Linux"> {
HeaderSpec Errno = HeaderSpec<
"errno.h",
@@ -142,77 +137,6 @@ def Linux : StandardSpec<"Linux"> {
[] // Functions
>;
-
- HeaderSpec SysEpoll = HeaderSpec<
- "sys/epoll.h",
- [], // Macros
- [
- StructEpollEvent,
- StructEpollData,
- SigSetType,
- StructTimeSpec,
- ], // Types
- [], // Enumerations
- [
- FunctionSpec<
- "epoll_create",
- RetValSpec<IntType>,
- [
- ArgSpec<IntType>
- ]
- >,
- FunctionSpec<
- "epoll_create1",
- RetValSpec<IntType>,
- [
- ArgSpec<IntType>
- ]
- >,
- FunctionSpec<
- "epoll_ctl",
- RetValSpec<IntType>,
- [
- ArgSpec<IntType>,
- ArgSpec<IntType>,
- ArgSpec<IntType>,
- ArgSpec<StructEpollEventPtr>
- ]
- >,
- FunctionSpec<
- "epoll_wait",
- RetValSpec<IntType>,
- [
- ArgSpec<IntType>,
- ArgSpec<StructEpollEventPtr>,
- ArgSpec<IntType>,
- ArgSpec<IntType>
- ]
- >,
- FunctionSpec<
- "epoll_pwait",
- RetValSpec<IntType>,
- [
- ArgSpec<IntType>,
- ArgSpec<StructEpollEventPtr>,
- ArgSpec<IntType>,
- ArgSpec<IntType>,
- ArgSpec<SigSetPtrType>
- ]
- >,
- FunctionSpec<
- "epoll_pwait2",
- RetValSpec<IntType>,
- [
- ArgSpec<IntType>,
- ArgSpec<StructEpollEventPtr>,
- ArgSpec<IntType>,
- ArgSpec<ConstStructTimeSpecPtr>,
- ArgSpec<SigSetPtrType>
- ]
- >,
- ] // Functions
- >;
-
HeaderSpec Signal = HeaderSpec<
"signal.h",
[
@@ -257,7 +181,6 @@ def Linux : StandardSpec<"Linux"> {
let Headers = [
Errno,
- SysEpoll,
SysMMan,
SysPrctl,
SysRandom,
diff --git a/libc/src/sys/CMakeLists.txt b/libc/src/sys/CMakeLists.txt
index 57ea7b4beaca1b..81098294176ad5 100644
--- a/libc/src/sys/CMakeLists.txt
+++ b/libc/src/sys/CMakeLists.txt
@@ -1,5 +1,4 @@
add_subdirectory(auxv)
-add_subdirectory(epoll)
add_subdirectory(mman)
add_subdirectory(random)
add_subdirectory(resource)
diff --git a/libc/src/sys/epoll/CMakeLists.txt b/libc/src/sys/epoll/CMakeLists.txt
deleted file mode 100644
index d4991a238e2a77..00000000000000
--- a/libc/src/sys/epoll/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
- add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
-endif()
-
-add_entrypoint_object(
- epoll_wait
- ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.epoll_wait
-)
-
-add_entrypoint_object(
- epoll_pwait
- ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.epoll_pwait
-)
-
-add_entrypoint_object(
- epoll_pwait2
- ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.epoll_pwait2
-)
diff --git a/libc/src/sys/epoll/epoll_pwait.h b/libc/src/sys/epoll/epoll_pwait.h
deleted file mode 100644
index f4042cc9888f67..00000000000000
--- a/libc/src/sys/epoll/epoll_pwait.h
+++ /dev/null
@@ -1,23 +0,0 @@
-//===-- Implementation header for epoll_pwait function ----------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_PWAIT_H
-#define LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_PWAIT_H
-
-#include <signal.h> // For sigset_t
-#include <sys/epoll.h> // For epoll_event
-
-namespace LIBC_NAMESPACE {
-
-// TODO: sigmask should be nullable
-int epoll_pwait(int epfd, struct epoll_event *events, int maxevents,
- int timeout, const sigset_t *sigmask);
-
-} // namespace LIBC_NAMESPACE
-
-#endif // LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_PWAIT_H
diff --git a/libc/src/sys/epoll/epoll_pwait2.h b/libc/src/sys/epoll/epoll_pwait2.h
deleted file mode 100644
index 17ea4b2c226a6b..00000000000000
--- a/libc/src/sys/epoll/epoll_pwait2.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- Implementation header for epoll_pwait2 function ---------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_PWAIT2_H
-#define LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_PWAIT2_H
-
-#include <signal.h> // For sigset_t
-#include <sys/epoll.h> // For epoll_event
-#include <time.h> // For timespec
-
-namespace LIBC_NAMESPACE {
-
-// TODO: sigmask and timeout should be nullable
-int epoll_pwait2(int epfd, struct epoll_event *events, int maxevents,
- const struct timespec *timeout, const sigset_t *sigmask);
-
-} // namespace LIBC_NAMESPACE
-
-#endif // LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_PWAIT2_H
diff --git a/libc/src/sys/epoll/epoll_wait.h b/libc/src/sys/epoll/epoll_wait.h
deleted file mode 100644
index b8f768aabf16d6..00000000000000
--- a/libc/src/sys/epoll/epoll_wait.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation header for epoll_wait function -----------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_WAIT_H
-#define LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_WAIT_H
-
-#include <sys/epoll.h> // For epoll_event
-
-namespace LIBC_NAMESPACE {
-
-int epoll_wait(int epfd, struct epoll_event *events, int maxevents,
- int timeout);
-
-} // namespace LIBC_NAMESPACE
-
-#endif // LLVM_LIBC_SRC_SYS_EPOLL_EPOLL_WAIT_H
diff --git a/libc/src/sys/epoll/linux/CMakeLists.txt b/libc/src/sys/epoll/linux/CMakeLists.txt
deleted file mode 100644
index a27905d962dc57..00000000000000
--- a/libc/src/sys/epoll/linux/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-add_entrypoint_object(
- epoll_wait
- SRCS
- epoll_wait.cpp
- HDRS
- ../epoll_wait.h
- DEPENDS
- libc.include.sys_epoll
- libc.include.sys_syscall
- libc.src.__support.OSUtil.osutil
- libc.src.errno.errno
-)
-
-add_entrypoint_object(
- epoll_pwait
- SRCS
- epoll_pwait.cpp
- HDRS
- ../epoll_pwait.h
- DEPENDS
- libc.include.sys_epoll
- libc.include.signal
- libc.include.sys_syscall
- libc.src.__support.OSUtil.osutil
- libc.src.errno.errno
-)
-
-add_entrypoint_object(
- epoll_pwait2
- SRCS
- epoll_pwait2.cpp
- HDRS
- ../epoll_pwait2.h
- DEPENDS
- libc.include.sys_epoll
- libc.include.signal
- libc.include.time
- libc.include.sys_syscall
- libc.src.__support.OSUtil.osutil
- libc.src.errno.errno
-)
diff --git a/libc/src/sys/epoll/linux/epoll_pwait.cpp b/libc/src/sys/epoll/linux/epoll_pwait.cpp
deleted file mode 100644
index e3a7b6e0393bdd..00000000000000
--- a/libc/src/sys/epoll/linux/epoll_pwait.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//===---------- Linux implementation of the epoll_pwait function ----------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/sys/epoll/epoll_pwait.h"
-
-#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
-#include "src/__support/common.h"
-
-#include "src/errno/libc_errno.h"
-#include <sys/syscall.h> // For syscall numbers.
-
-#include <signal.h> // For sigset_t
-
-namespace LIBC_NAMESPACE {
-
-LLVM_LIBC_FUNCTION(int, epoll_pwait,
- (int epfd, struct epoll_event *events, int maxevents,
- int timeout, const sigset_t *sigmask)) {
- int ret = LIBC_NAMESPACE::syscall_impl<int>(
- SYS_epoll_pwait, epfd, reinterpret_cast<long>(events), maxevents, timeout,
- reinterpret_cast<long>(sigmask), sizeof(sigset_t));
-
- // A negative return value indicates an error with the magnitude of the
- // value being the error code.
- if (ret < 0) {
- libc_errno = -ret;
- return -1;
- }
-
- return 0;
-}
-
-} // namespace LIBC_NAMESPACE
diff --git a/libc/src/sys/epoll/linux/epoll_pwait2.cpp b/libc/src/sys/epoll/linux/epoll_pwait2.cpp
deleted file mode 100644
index 25ca0ae06f4402..00000000000000
--- a/libc/src/sys/epoll/linux/epoll_pwait2.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//===---------- Linux implementation of the epoll_pwait2 function ---------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/sys/epoll/epoll_pwait2.h"
-
-#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
-#include "src/__support/common.h"
-
-#include "src/errno/libc_errno.h"
-#include <sys/syscall.h> // For syscall numbers.
-
-#include <signal.h> // For sigset_t
-#include <time.h> // For timespec
-
-namespace LIBC_NAMESPACE {
-
-LLVM_LIBC_FUNCTION(int, epoll_pwait2,
- (int epfd, struct epoll_event *events, int maxevents,
- const struct timespec *timeout, const sigset_t *sigmask)) {
- int ret = LIBC_NAMESPACE::syscall_impl<int>(
- SYS_epoll_pwait2, epfd, reinterpret_cast<long>(events), maxevents,
- reinterpret_cast<long>(timeout), reinterpret_cast<long>(sigmask),
- sizeof(sigset_t));
-
- // A negative return value indicates an error with the magnitude of the
- // value being the error code.
- if (ret < 0) {
- libc_errno = -ret;
- return -1;
- }
-
- return 0;
-}
-
-} // namespace LIBC_NAMESPACE
diff --git a/libc/src/sys/epoll/linux/epoll_wait.cpp b/libc/src/sys/epoll/linux/epoll_wait.cpp
deleted file mode 100644
index b305575e099f21..00000000000000
--- a/libc/src/sys/epoll/linux/epoll_wait.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//===---------- Linux implementation of the epoll_wait function -----------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===------------------------------------...
[truncated]
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #79515
Some minor breakages. Will fix tomorrow.