Skip to content

Commit 42da3c5

Browse files
authored
[libc] Add ppoll stub to match existing pselect stub. NFC (#26084)
This is mostly just for consistency and completeness.
1 parent bceab81 commit 42da3c5

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

system/lib/libc/emscripten_syscall_stubs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ UNIMPLEMENTED(acct, (intptr_t filename))
264264
UNIMPLEMENTED(mincore, (intptr_t addr, size_t length, intptr_t vec))
265265
UNIMPLEMENTED(pipe2, (intptr_t fds, int flags))
266266
UNIMPLEMENTED(pselect6, (int nfds, intptr_t readfds, intptr_t writefds, intptr_t exceptfds, intptr_t timeout, intptr_t sigmaks))
267+
UNIMPLEMENTED(ppoll, (intptr_t fds, int nfds, intptr_t timeout, intptr_t sigmask, int size))
267268
UNIMPLEMENTED(recvmmsg, (int sockfd, intptr_t msgvec, size_t vlen, int flags, ...))
268269
UNIMPLEMENTED(sendmmsg, (int sockfd, intptr_t msgvec, size_t vlen, int flags, ...))
269270
UNIMPLEMENTED(shutdown, (int sockfd, int how, int dummy, int dummy2, int dummy3, int dummy4))

system/lib/libc/musl/arch/emscripten/bits/syscall.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#define SYS_fchmodat2 __syscall_fchmodat2
6868
#define SYS_faccessat __syscall_faccessat
6969
#define SYS_pselect6 __syscall_pselect6
70+
#define SYS_ppoll __syscall_ppoll
7071
#define SYS_utimensat __syscall_utimensat
7172
#define SYS_fallocate __syscall_fallocate
7273
#define SYS_dup3 __syscall_dup3

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ int __syscall_readlinkat(int dirfd, intptr_t path, intptr_t buf, size_t bufsize)
9191
int __syscall_fchmodat2(int dirfd, intptr_t path, int mode, int flags);
9292
int __syscall_faccessat(int dirfd, intptr_t path, int amode, int flags);
9393
int __syscall_pselect6(int nfds, intptr_t readfds, intptr_t writefds, intptr_t exceptfds, intptr_t timeout, intptr_t sigmask);
94+
int __syscall_ppoll(intptr_t fds, int nfds, intptr_t timeout, intptr_t sigmask, int size);
9495
int __syscall_utimensat(int dirfd, intptr_t path, intptr_t times, int flags);
9596
int __syscall_fallocate(int fd, int mode, off_t offset, off_t len);
9697
int __syscall_dup3(int fd, int suggestfd, int flags);

test/codesize/test_codesize_hello_dylink_all.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"a.out.js": 244848,
3-
"a.out.nodebug.wasm": 577782,
4-
"total": 822630,
3+
"a.out.nodebug.wasm": 577879,
4+
"total": 822727,
55
"sent": [
66
"IMG_Init",
77
"IMG_Load",
@@ -1892,6 +1892,7 @@
18921892
"__syscall_pause",
18931893
"__syscall_pipe2",
18941894
"__syscall_poll",
1895+
"__syscall_ppoll",
18951896
"__syscall_prlimit64",
18961897
"__syscall_pselect6",
18971898
"__syscall_recvmmsg",
@@ -2829,6 +2830,7 @@
28292830
"pow10l",
28302831
"powf",
28312832
"powl",
2833+
"ppoll",
28322834
"pread",
28332835
"preadv",
28342836
"printf",
@@ -3756,9 +3758,9 @@
37563758
"$__syscall_pause",
37573759
"$__syscall_pipe2",
37583760
"$__syscall_poll",
3761+
"$__syscall_ppoll",
37593762
"$__syscall_prlimit64",
37603763
"$__syscall_pselect6",
3761-
"$__syscall_recvmmsg",
37623764
"$__syscall_setdomainname",
37633765
"$__syscall_setpgid",
37643766
"$__syscall_setpriority",
@@ -4597,6 +4599,7 @@
45974599
"$pow",
45984600
"$powf",
45994601
"$powl",
4602+
"$ppoll",
46004603
"$pread",
46014604
"$preadv",
46024605
"$printf",

tools/system_libs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,6 @@ def get_files(self):
11531153
'memcpy.c', 'memset.c', 'memmove.c', 'getaddrinfo.c', 'getnameinfo.c',
11541154
'res_query.c', 'res_querydomain.c',
11551155
'proto.c',
1156-
'ppoll.c',
11571156
'syscall.c', 'popen.c', 'pclose.c',
11581157
'getgrouplist.c', 'initgroups.c', 'wordexp.c', 'timer_create.c',
11591158
'getauxval.c',

0 commit comments

Comments
 (0)