feat: Rust std target + ruststd tests; SYS_EXIT_GROUP; fix mkdir/create under missing parent

This commit is contained in:
daniel committed 2026-10-17 10:30:24 +02:00
1 parent 9e66c3b249
commit e87bd358a6
20 files changed
+657 -97

No files matched your search

+4 -2
View File
@@ -131,6 +131,7 @@ static inline long _mtk_syscall4(long nr, long a1, long a2, long a3, long a4) {
#define SYS_SETENVIRON 172
#define SYS_SPAWN_ENV 173
#define SYS_ABORT 198
#define SYS_EXIT_GROUP 199
/* ========================================================================
errno
@@ -1240,7 +1241,8 @@ int atexit(void (*func)(void)) {
void exit(int status) {
for (int i = _atexit_count - 1; i >= 0; i--)
_atexit_funcs[i]();
_mtk_syscall1(SYS_EXIT, (long)status);
/* SYS_EXIT from a sibling thread would end only that thread. */
_mtk_syscall1(SYS_EXIT_GROUP, (long)status);
__builtin_unreachable();
}
@@ -4066,7 +4068,7 @@ pid_t waitpid(pid_t pid, int *status, int options) {
}
void _exit(int status) {
_mtk_syscall1(SYS_EXIT, (long)status);
_mtk_syscall1(SYS_EXIT_GROUP, (long)status);
__builtin_unreachable();
}