Skip to content

Revert "[libc] add epoll_wait functions" #79534

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 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 0 additions & 5 deletions libc/config/linux/aarch64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion libc/config/linux/aarch64/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ set(TARGET_PUBLIC_HEADERS
libc.include.unistd

libc.include.sys_ioctl
libc.include.sys_epoll
)
12 changes: 4 additions & 8 deletions libc/config/linux/api.td
Original file line number Diff line number Diff line change
@@ -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 = [{
Expand Down Expand Up @@ -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"];
}
Expand Down
6 changes: 0 additions & 6 deletions libc/config/linux/arm/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions libc/config/linux/arm/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ set(TARGET_PUBLIC_HEADERS
libc.include.string
libc.include.strings
libc.include.search

libc.include.sys_epoll
)
5 changes: 0 additions & 5 deletions libc/config/linux/riscv/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion libc/config/linux/riscv/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions libc/config/linux/syscall_numbers.h.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions libc/config/linux/x86_64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion libc/config/linux/x86_64/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions libc/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions libc/include/llvm-libc-types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
21 changes: 0 additions & 21 deletions libc/include/llvm-libc-types/struct_epoll_data.h

This file was deleted.

19 changes: 0 additions & 19 deletions libc/include/llvm-libc-types/struct_epoll_event.h

This file was deleted.

16 changes: 0 additions & 16 deletions libc/include/sys/epoll.h.def

This file was deleted.

4 changes: 1 addition & 3 deletions libc/spec/gnu_ext.td
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ def GnuExtensions : StandardSpec<"GNUExtensions"> {
[], // Macros
[], // Types
[], // Enumerations
[
//TODO: Add getauxval here
] // Functions
[] // Functions
>;

HeaderSpec SendFile = HeaderSpec<
Expand Down
77 changes: 0 additions & 77 deletions libc/spec/linux.td
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
[
Expand Down Expand Up @@ -257,7 +181,6 @@ def Linux : StandardSpec<"Linux"> {

let Headers = [
Errno,
SysEpoll,
SysMMan,
SysPrctl,
SysRandom,
Expand Down
1 change: 0 additions & 1 deletion libc/src/sys/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
add_subdirectory(auxv)
add_subdirectory(epoll)
add_subdirectory(mman)
add_subdirectory(random)
add_subdirectory(resource)
Expand Down
24 changes: 0 additions & 24 deletions libc/src/sys/epoll/CMakeLists.txt

This file was deleted.

23 changes: 0 additions & 23 deletions libc/src/sys/epoll/epoll_pwait.h

This file was deleted.

24 changes: 0 additions & 24 deletions libc/src/sys/epoll/epoll_pwait2.h

This file was deleted.

Loading