Skip to content

Commit 3205328

Browse files
authored
Remove legacy __sys_exit syscall. NFC (#14463)
This was replaced by the WASI `proc_exit` syscall a while back.
1 parent 9ea47e0 commit 3205328

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

src/library_syscall.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,6 @@ var SyscallsLibrary = {
305305
return 0;
306306
},
307307

308-
__sys_exit: function(status) {
309-
exit(status);
310-
// no return
311-
},
312308
__sys_open: function(path, flags, varargs) {
313309
var pathname = SYSCALLS.getStr(path);
314310
var mode = varargs ? SYSCALLS.get() : 0;
@@ -1214,13 +1210,6 @@ var SyscallsLibrary = {
12141210
#endif // SYSCALLS_REQUIRE_FILESYSTEM
12151211
},
12161212

1217-
#if MINIMAL_RUNTIME
1218-
__sys_exit_group__deps: ['$exit'],
1219-
#endif
1220-
__sys_exit_group: function(status) {
1221-
exit(status);
1222-
return 0;
1223-
},
12241213
__sys_statfs64: function(path, size, buf) {
12251214
path = SYSCALLS.getStr(path);
12261215
#if ASSERTIONS

system/lib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,9 @@ uptr internal_execve(const char *filename, char *const argv[],
483483

484484
#if !SANITIZER_NETBSD
485485
void internal__exit(int exitcode) {
486-
#if SANITIZER_FREEBSD || SANITIZER_SOLARIS
486+
#if SANITIZER_EMSCRIPTEN
487+
__wasi_proc_exit(exitcode);
488+
#elif SANITIZER_FREEBSD || SANITIZER_SOLARIS
487489
internal_syscall(SYSCALL(exit), exitcode);
488490
#else
489491
internal_syscall(SYSCALL(exit_group), exitcode);

system/lib/libc/musl/arch/emscripten/syscall_arch.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ extern "C" {
1414
/* Causes the final import in the wasm binary be named "env.sys_<name>" */
1515
#define SYS_IMPORT(NAME) EM_IMPORT(__sys_##NAME)
1616

17-
long SYS_IMPORT(exit) __syscall1(long exit_code);
1817
long SYS_IMPORT(open) __syscall5(long path, long flags, ...); // mode is optional
1918
long SYS_IMPORT(link) __syscall9(long oldpath, long newpath);
2019
long SYS_IMPORT(unlink) __syscall10(long path);
@@ -96,7 +95,6 @@ long SYS_IMPORT(mincore) __syscall218(long addr, long length, long vec);
9695
long SYS_IMPORT(madvise1) __syscall219(long addr, long length, long advice);
9796
long SYS_IMPORT(getdents64) __syscall220(long fd, long dirp, long count);
9897
long SYS_IMPORT(fcntl64) __syscall221(long fd, long cmd, ...);
99-
long SYS_IMPORT(exit_group) __syscall252(long status);
10098
long SYS_IMPORT(statfs64) __syscall268(long path, long size, long buf);
10199
long SYS_IMPORT(fstatfs64) __syscall269(long fd, long size, long buf);
102100
long SYS_IMPORT(fadvise64_64)

0 commit comments

Comments
 (0)