+SYSCALL2(Syscall_ReadDir, "id", int, char *,
+ if(Sizes[1] < 255)
+ return -1;
+ return VFS_ReadDir(a0, a1);
+);
+SYSCALL6(Syscall_select, "iddddi", int, fd_set *, fd_set *, fd_set *, tTime *, unsigned int,
+ return VFS_Select(a0, a1, a2, a3, a4, a5, 0);
+);
+SYSCALL3(Syscall_OpenChild, "isi", int, const char *, int,
+ return VFS_OpenChild(a0, a1, a2|VFS_OPENFLAG_USER);
+);
+SYSCALL2(Syscall_GetACL, "id", int, void *,
+ if(Sizes[1] < sizeof(tVFS_ACL))
+ return -1;
+ return VFS_GetACL(a0, (void*)a1);
+);
+SYSCALL4(Syscall_Mount, "ssss", const char *, const char *, const char *, const char *,
+ return VFS_Mount(a0, a1, a2, a3);
+);
+SYSCALL1(Syscall_Chdir, "s", const char *,
+ return VFS_ChDir(a0);
+);
+SYSCALL0(Syscall_Sleep,
+ Threads_Sleep();
+ return 0;
+);
+SYSCALL2(Syscall_WaitTID, "id", int, int *,
+ if(Sizes[1] < sizeof(int))
+ return -1;
+ return Threads_WaitTID(a0, a1);
+);
+SYSCALL1(Syscall_SetUID, "i", int,
+ if(Sizes[0] < sizeof(int)) {
+ *Errno = -EINVAL; // TODO: Better message
+ return -1;
+ }
+ return Threads_SetUID(a0);
+);
+SYSCALL1(Syscall_SetGID, "i", int,
+ if(Sizes[0] < sizeof(int)) {
+ *Errno = -EINVAL; // TODO: Better message
+ return -1;
+ }
+ return Threads_SetGID(a0);
+);
+
+SYSCALL0(Syscall_GetTID, return Threads_GetTID());
+SYSCALL0(Syscall_GetPID, return Threads_GetPID());
+SYSCALL0(Syscall_GetUID, return Threads_GetUID());
+SYSCALL0(Syscall_GetGID, return Threads_GetGID());
+
+SYSCALL1(Syscall_AN_Fork, "d", int *,
+ if(Sizes[0] < sizeof(int))
+ return -1;
+ *a0 = Threads_Fork();
+ return *a0;
+);
+
+SYSCALL3(Syscall_AN_Spawn, "ddd", int *, int *, void *,
+ if(Sizes[0] < sizeof(int))
+ return -1;
+ *a0 = Threads_Spawn(Sizes[1] / sizeof(int), a1, a2);
+ return *a0;
+);
+
+SYSCALL2(Syscall_SendMessage, "id", int, void *,
+ return Proc_SendMessage(a0, Sizes[1], a1);
+);