1
- From 5d484b1a17191d7ce795a2d773e4a72d8fc7490e Mon Sep 17 00:00:00 2001
1
+ From a649d90c5073ef1f8a9eadb4773fe5f832a3e87c Mon Sep 17 00:00:00 2001
2
2
From: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
3
3
Date: Thu, 10 Feb 2022 19:12:25 +1100
4
4
Subject: [PATCH] yes
5
5
6
6
Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
7
7
---
8
- .gitignore | 3 ++
8
+ .gitignore | 3 +
9
9
options/rtdl/generic/linker.cpp | 2 +-
10
- sysdeps/aero/generic/aero.cpp | 12 ++++ -
11
- sysdeps/aero/generic/filesystem.cpp | 79 ++++++++++++++++++++++++++---
10
+ sysdeps/aero/generic/aero.cpp | 12 +++-
11
+ sysdeps/aero/generic/filesystem.cpp | 97 ++++++++++++++++++++++++++---
12
12
sysdeps/aero/generic/signals.cpp | 8 ++-
13
- sysdeps/aero/generic/sockets.cpp | 48 ++++++++++++++++++
14
- sysdeps/aero/include/aero/syscall.h | 12 + ++++
15
- 7 files changed, 151 insertions(+), 13 deletions(-)
13
+ sysdeps/aero/generic/sockets.cpp | 48 ++++++++++++++
14
+ sysdeps/aero/include/aero/syscall.h | 11 ++++
15
+ 7 files changed, 168 insertions(+), 13 deletions(-)
16
16
17
17
diff --git a/.gitignore b/.gitignore
18
18
index dbb35e8b..20c8d4c3 100644
@@ -69,7 +69,7 @@ index 7de909f5..4281beb9 100644
69
69
#endif
70
70
} // namespace mlibc
71
71
diff --git a/sysdeps/aero/generic/filesystem.cpp b/sysdeps/aero/generic/filesystem.cpp
72
- index 6a13f19c..d34dfce3 100644
72
+ index 6a13f19c..8f700a38 100644
73
73
--- a/sysdeps/aero/generic/filesystem.cpp
74
74
+++ b/sysdeps/aero/generic/filesystem.cpp
75
75
@@ -1,3 +1,4 @@
@@ -151,7 +151,7 @@ index 6a13f19c..d34dfce3 100644
151
151
return 0;
152
152
}
153
153
154
- @@ -267,4 +297,37 @@ int sys_pipe(int *fds, int flags) {
154
+ @@ -267,4 +297,55 @@ int sys_pipe(int *fds, int flags) {
155
155
156
156
return 0;
157
157
}
@@ -178,6 +178,24 @@ index 6a13f19c..d34dfce3 100644
178
178
+ return 0;
179
179
+ }
180
180
+
181
+ + int sys_epoll_pwait(
182
+ + int epfd,
183
+ + struct epoll_event *ev,
184
+ + int n,
185
+ + int timeout,
186
+ + const sigset_t *sigmask,
187
+ + int *raised
188
+ + ) {
189
+ + auto result = syscall(SYS_EPOLL_PWAIT, epfd, ev, n, timeout, sigmask);
190
+ +
191
+ + if (result < 0) {
192
+ + return -result;
193
+ + }
194
+ +
195
+ + *raised = result;
196
+ + return 0;
197
+ + }
198
+ +
181
199
+ int sys_eventfd_create(unsigned int initval, int flags, int *fd) {
182
200
+ auto result = syscall(SYS_EVENT_FD, initval, flags);
183
201
+
@@ -263,10 +281,10 @@ index e69de29b..4e6bd608 100644
263
281
+ }
264
282
+ } // namespace mlibc
265
283
diff --git a/sysdeps/aero/include/aero/syscall.h b/sysdeps/aero/include/aero/syscall.h
266
- index 07b1b51b..ef797e40 100644
284
+ index 07b1b51b..6487cd85 100644
267
285
--- a/sysdeps/aero/include/aero/syscall.h
268
286
+++ b/sysdeps/aero/include/aero/syscall.h
269
- @@ -49,6 +49,18 @@
287
+ @@ -49,6 +49,17 @@
270
288
#define SYS_DUP 42
271
289
#define SYS_FCNTL 43
272
290
#define SYS_DUP2 44
@@ -280,8 +298,7 @@ index 07b1b51b..ef797e40 100644
280
298
+ #define SYS_EPOLL_CREATE 52
281
299
+ #define SYS_EPOLL_PWAIT 53
282
300
+ #define SYS_EPOLL_CTL 54
283
- + #define SYS_EPOLL_WAIT 55
284
- + #define SYS_EVENT_FD 56
301
+ + #define SYS_EVENT_FD 55
285
302
286
303
// Invalid syscall used to trigger a log error in the kernel (as a hint)
287
304
// so, that we can implement the syscall in the kernel.
0 commit comments