From: John Hodge (sonata) Date: Sat, 19 Jan 2013 11:40:27 +0000 (+0800) Subject: AcessNative - Fixes for recent userland changes, cleanups X-Git-Tag: rel0.15~598^2~40 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=c7acbe49842c871244d76ce9dd7e4e9e70ec3a97;p=tpg%2Facess2.git AcessNative - Fixes for recent userland changes, cleanups --- diff --git a/AcessNative/acesskernel_src/helpers.c b/AcessNative/acesskernel_src/helpers.c index 51b96533..6396d166 100644 --- a/AcessNative/acesskernel_src/helpers.c +++ b/AcessNative/acesskernel_src/helpers.c @@ -144,7 +144,6 @@ int strpos(const char *str, char ch) { const char *retptr = strchr(str, ch); int rv = retptr ? retptr - str : -1; - fprintf(stderr, "strpos: str = %p'%s', retptr = %p, rv = %i\n", str, str, retptr, rv); return rv; } @@ -152,7 +151,6 @@ int CheckString(const char *string) { if( (intptr_t)string < 0x1000 ) return 0; - strlen(string); return 1; } @@ -163,3 +161,38 @@ int CheckMem(const void *buf, size_t len) return 1; } +void itoa(char *buf, Uint64 num, int base, int minLength, char pad) +{ + static const char cUCDIGITS[] = "0123456789ABCDEF"; + char tmpBuf[64+1]; + int pos=0, i; + Uint64 rem; + + // Sanity check + if(!buf) return; + + // Sanity Check + if(base > 16 || base < 2) { + buf[0] = 0; + return; + } + + // Convert + while(num > base-1) { + rem = num % base; + num = num / base; // Shift `num` and get remainder + tmpBuf[pos] = cUCDIGITS[ rem ]; + pos++; + } + tmpBuf[pos++] = cUCDIGITS[ num ]; // Last digit of `num` + + // Put in reverse + i = 0; + minLength -= pos; + while(minLength-- > 0) + buf[i++] = pad; + while(pos-- > 0) + buf[i++] = tmpBuf[pos]; // Reverse the order of characters + buf[i] = 0; +} + diff --git a/AcessNative/acesskernel_src/nativefs.c b/AcessNative/acesskernel_src/nativefs.c index af25e3c3..cca9e7d8 100644 --- a/AcessNative/acesskernel_src/nativefs.c +++ b/AcessNative/acesskernel_src/nativefs.c @@ -205,8 +205,9 @@ size_t NativeFS_Read(tVFS_Node *Node, _acess_off_t Offset, size_t Length, void * LEAVE('i', 0); return 0; } - LEAVE('-'); - return fread( Buffer, 1, Length, (FILE *)(tVAddr)Node->Inode ); + size_t ret = fread( Buffer, 1, Length, (FILE *)(tVAddr)Node->Inode ); + LEAVE('x', ret); + return ret; } size_t NativeFS_Write(tVFS_Node *Node, _acess_off_t Offset, size_t Length, const void *Buffer) diff --git a/AcessNative/acesskernel_src/syscalls.c b/AcessNative/acesskernel_src/syscalls.c index 827d6110..44588463 100644 --- a/AcessNative/acesskernel_src/syscalls.c +++ b/AcessNative/acesskernel_src/syscalls.c @@ -30,7 +30,7 @@ typedef int (*tSyscallHandler)(Uint *Errno, const char *Format, void *Args, int a3 = *(_t3*)Args;Args+=sizeof(_t3);\ a4 = *(_t4*)Args;Args+=sizeof(_t4);\ a5 = *(_t5*)Args;Args+=sizeof(_t5);\ - LOG("SYSCALL5 '%s' %p %p %p %p %p %p", Fmt, (intptr_t)a0,(intptr_t)a1,(intptr_t)a2,(intptr_t)a3,(intptr_t)a4,(intptr_t)a5);\ + LOG("SYSCALL6 '%s' %p %p %p %p %p %p", Fmt, (intptr_t)a0,(intptr_t)a1,(intptr_t)a2,(intptr_t)a3,(intptr_t)a4,(intptr_t)a5);\ _call\ } #define SYSCALL5(_name, _fmtstr, _t0, _t1, _t2, _t3, _t4, _call) int _name(Uint*Errno,const char*Fmt,void*Args,int*Sizes){\ @@ -281,12 +281,15 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength) int argListLen = 0; int i, retVal; tRequestHeader *ret; - int retValueCount = 1; - int retDataLen = sizeof(Uint64); + int retValueCount; + int retDataLen; void *returnData[Request->NParams]; int argSizes[Request->NParams]; Uint ret_errno = 0; + // Clear errno (Acess verson) at the start of the request + errno = 0; + // Sanity check if( Request->CallID >= ciNumSyscalls ) { Log_Notice("Syscalls", "Unknown syscall number %i", Request->CallID); @@ -297,7 +300,11 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength) Log_Notice("Syscalls", "Unimplemented syscall %i", Request->CallID); return NULL; } - + + // Init return count/size + retValueCount = 2; + retDataLen = sizeof(Uint64) + sizeof(Uint32); + // Get size of argument list for( i = 0; i < Request->NParams; i ++ ) { @@ -318,12 +325,19 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength) case ARG_TYPE_DATA: formatString[i] = 'd'; argListLen += sizeof(void*); + // Prepare the return values + if( Request->Params[i].Flags & ARG_FLAG_RETURN ) + { + retDataLen += Request->Params[i].Length; + retValueCount ++; + } break; case ARG_TYPE_STRING: formatString[i] = 's'; argListLen += sizeof(char*); break; default: + Log_Error("Syscalls", "Unknown param type %i", Request->Params[i].Type); return NULL; // ERROR! } } @@ -364,13 +378,6 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength) // Data gets special handling, because only it can be returned to the user // (ARG_TYPE_DATA is a pointer) case ARG_TYPE_DATA: - // Prepare the return values - if( Request->Params[i].Flags & ARG_FLAG_RETURN ) - { - retDataLen += Request->Params[i].Length; - retValueCount ++; - } - // Check for non-resident data if( Request->Params[i].Length == 0 ) { @@ -406,9 +413,9 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength) // ---------- Return - if( ret_errno == 0 ) { - perror("Syscall?"); + if( ret_errno == 0 && errno != 0 ) { ret_errno = errno; + LOG("errno = %i", errno); } // Allocate the return @@ -427,9 +434,18 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength) *(Uint64*)inData = retVal; inData += sizeof(Uint64); + // Static Uint32 errno value + ret->Params[1].Type = ARG_TYPE_INT32; + ret->Params[1].Flags = 0; + ret->Params[1].Length = sizeof(Uint32); + *(Uint32*)inData = ret_errno; + inData += sizeof(Uint32); + + LOG("Ret: %llx, errno=%i", retVal, ret_errno); + //Log_Debug("Syscalls", "Return 0x%llx", retVal); - retValueCount = 1; + retValueCount = 2; for( i = 0; i < Request->NParams; i ++ ) { if( Request->Params[i].Type != ARG_TYPE_DATA ) continue; @@ -450,9 +466,7 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength) retValueCount ++; } - *ReturnLength = sizeof(tRequestHeader) - + retValueCount * sizeof(tRequestValue) - + retDataLen; + *ReturnLength = ret->MessageLength; return ret; } diff --git a/AcessNative/ld-acess_src/binary.c b/AcessNative/ld-acess_src/binary.c index d04ac6d2..59be8295 100644 --- a/AcessNative/ld-acess_src/binary.c +++ b/AcessNative/ld-acess_src/binary.c @@ -65,9 +65,9 @@ char *Binary_LocateLibrary(const char *Name) strcat(tmp, "/"); strcat(tmp, Name); - fd = acess_open(tmp, 4); // OPENFLAG_EXEC + fd = acess__SysOpen(tmp, 4); // OPENFLAG_EXEC if(fd != -1) { - acess_close(fd); + acess__SysClose(fd); return strdup(tmp); } } @@ -84,9 +84,9 @@ char *Binary_LocateLibrary(const char *Name) printf("Binary_LocateLibrary: tmp = '%s'\n", tmp); #endif - fd = acess_open(tmp, 4); // OPENFLAG_EXEC + fd = acess__SysOpen(tmp, 4); // OPENFLAG_EXEC if(fd != -1) { - acess_close(fd); + acess__SysClose(fd); return strdup(tmp); } } @@ -156,22 +156,22 @@ void *Binary_Load(const char *Filename, uintptr_t *EntryPoint) } } - fd = acess_open(Filename, 2|1); // Execute and Read + fd = acess__SysOpen(Filename, 2|1); // Execute and Read if( fd == -1 ) { // TODO: Handle libary directories perror("Opening binary"); return NULL; } - acess_read(fd, &dword, 4); - acess_seek(fd, 0, ACESS_SEEK_SET); + acess__SysRead(fd, &dword, 4); + acess__SysSeek(fd, 0, ACESS_SEEK_SET); if( memcmp(&dword, "\x7F""ELF", 4) == 0 ) { fmt = &gElf_FormatDef; } else { fprintf(stderr, "Unknown executable format (0x%08x)\n", dword); - acess_close(fd); + acess__SysClose(fd); return NULL; } @@ -179,7 +179,7 @@ void *Binary_Load(const char *Filename, uintptr_t *EntryPoint) printf("fmt->Load(0x%x)...\n", fd); #endif ret = fmt->Load(fd); - acess_close(fd); + acess__SysClose(fd); #if DEBUG printf("fmt->Load(0x%x): %p\n", fd, ret); #endif diff --git a/AcessNative/ld-acess_src/common.h b/AcessNative/ld-acess_src/common.h index 376faa58..9f67e9c6 100644 --- a/AcessNative/ld-acess_src/common.h +++ b/AcessNative/ld-acess_src/common.h @@ -36,6 +36,7 @@ static inline int _SysSetMemFlags(uintptr_t Addr, unsigned int flags, unsigned i return 0; } + extern int AllocateMemory(uintptr_t VirtAddr, size_t ByteCount); extern uintptr_t FindFreeRange(size_t ByteCount, int MaxBits); diff --git a/AcessNative/ld-acess_src/elf_load.c b/AcessNative/ld-acess_src/elf_load.c index d661622e..19a8c13f 100644 --- a/AcessNative/ld-acess_src/elf_load.c +++ b/AcessNative/ld-acess_src/elf_load.c @@ -42,7 +42,7 @@ void *Elf_Load(int FD) Elf64_Ehdr hdr; // Read ELF Header - acess_read(FD, &hdr, sizeof(hdr)); + acess__SysRead(FD, &hdr, sizeof(hdr)); // Check the file type if(hdr.e_ident[0] != 0x7F || hdr.e_ident[1] != 'E' || hdr.e_ident[2] != 'L' || hdr.e_ident[3] != 'F') { @@ -89,8 +89,8 @@ void *Elf32Load(int FD, Elf32_Ehdr *hdr) return NULL; } LOG("hdr.phoff = 0x%08x\n", hdr->phoff); - acess_seek(FD, hdr->phoff, ACESS_SEEK_SET); - acess_read(FD, phtab, sizeof(Elf32_Phdr) * hdr->phentcount); + acess__SysSeek(FD, hdr->phoff, ACESS_SEEK_SET); + acess__SysRead(FD, phtab, sizeof(Elf32_Phdr) * hdr->phentcount); // Count Pages iPageCount = 0; @@ -146,8 +146,8 @@ void *Elf32Load(int FD, Elf32_Ehdr *hdr) char *tmp; //if(ret->Interpreter) continue; tmp = malloc(phtab[i].FileSize); - acess_seek(FD, phtab[i].Offset, ACESS_SEEK_SET); - acess_read(FD, tmp, phtab[i].FileSize); + acess__SysSeek(FD, phtab[i].Offset, ACESS_SEEK_SET); + acess__SysRead(FD, tmp, phtab[i].FileSize); //ret->Interpreter = Binary_RegInterp(tmp); LOG("Interpreter '%s'\n", tmp); free(tmp); @@ -168,8 +168,8 @@ void *Elf32Load(int FD, Elf32_Ehdr *hdr) return NULL; } - acess_seek(FD, phtab[i].Offset, ACESS_SEEK_SET); - acess_read(FD, PTRMK(void, addr), phtab[i].FileSize); + acess__SysSeek(FD, phtab[i].Offset, ACESS_SEEK_SET); + acess__SysRead(FD, PTRMK(void, addr), phtab[i].FileSize); memset( PTRMK(char, addr) + phtab[i].FileSize, 0, phtab[i].MemSize - phtab[i].FileSize ); } @@ -211,8 +211,8 @@ void *Elf64Load(int FD, Elf64_Ehdr *hdr) return NULL; } LOG("hdr.phoff = 0x%08llx\n", (long long)hdr->e_phoff); - acess_seek(FD, hdr->e_phoff, ACESS_SEEK_SET); - acess_read(FD, phtab, sizeof(Elf64_Phdr) * hdr->e_phnum); + acess__SysSeek(FD, hdr->e_phoff, ACESS_SEEK_SET); + acess__SysRead(FD, phtab, sizeof(Elf64_Phdr) * hdr->e_phnum); // Count Pages iPageCount = 0; @@ -270,8 +270,8 @@ void *Elf64Load(int FD, Elf64_Ehdr *hdr) //if(ret->Interpreter) continue; tmp = malloc(phtab[i].p_filesz+1); tmp[ phtab[i].p_filesz ] = 0; - acess_seek(FD, phtab[i].p_offset, ACESS_SEEK_SET); - acess_read(FD, tmp, phtab[i].p_filesz); + acess__SysSeek(FD, phtab[i].p_offset, ACESS_SEEK_SET); + acess__SysRead(FD, tmp, phtab[i].p_filesz); //ret->Interpreter = Binary_RegInterp(tmp); LOG("Interpreter '%s'\n", tmp); free(tmp); @@ -295,8 +295,8 @@ void *Elf64Load(int FD, Elf64_Ehdr *hdr) return NULL; } - acess_seek(FD, phtab[i].p_offset, ACESS_SEEK_SET); - acess_read(FD, PTRMK(void, addr), phtab[i].p_filesz); + acess__SysSeek(FD, phtab[i].p_offset, ACESS_SEEK_SET); + acess__SysRead(FD, PTRMK(void, addr), phtab[i].p_filesz); memset( PTRMK(char, addr) + phtab[i].p_filesz, 0, phtab[i].p_memsz - phtab[i].p_filesz ); } diff --git a/AcessNative/ld-acess_src/exports.c b/AcessNative/ld-acess_src/exports.c index d7e49227..dcfc526a 100644 --- a/AcessNative/ld-acess_src/exports.c +++ b/AcessNative/ld-acess_src/exports.c @@ -42,12 +42,12 @@ char *gsExecutablePath = "./ld-acess"; // === CODE === // --- VFS Calls -int acess_chdir(const char *Path) +int acess__SysChdir(const char *Path) { return _Syscall(SYS_CHDIR, ">s", Path); } -int acess_open(const char *Path, int Flags) +int acess__SysOpen(const char *Path, int Flags) { if( strncmp(Path, "$$$$", 4) == 0 ) { @@ -57,7 +57,8 @@ int acess_open(const char *Path, int Flags) return _Syscall(SYS_OPEN, ">s >i", Path, Flags); } -void acess_close(int FD) { +void acess__SysClose(int FD) +{ if(FD & NATIVE_FILE_MASK) { return native_close(FD & (NATIVE_FILE_MASK-1)); } @@ -65,12 +66,12 @@ void acess_close(int FD) { _Syscall(SYS_CLOSE, ">i", FD); } -int acess_reopen(int FD, const char *Path, int Flags) { +int acess__SysReopen(int FD, const char *Path, int Flags) { DEBUG("reopen(0x%x, \"%s\", 0x%x)", FD, Path, Flags); return _Syscall(SYS_REOPEN, ">i >s >i", FD, Path, Flags); } -size_t acess_read(int FD, void *Dest, size_t Bytes) { +size_t acess__SysRead(int FD, void *Dest, size_t Bytes) { if(FD & NATIVE_FILE_MASK) return native_read(FD & (NATIVE_FILE_MASK-1), Dest, Bytes); // if( FD > 2 ) @@ -78,7 +79,7 @@ size_t acess_read(int FD, void *Dest, size_t Bytes) { return _Syscall(SYS_READ, ">i >i 2 ) @@ -86,7 +87,8 @@ size_t acess_write(int FD, const void *Src, size_t Bytes) { return _Syscall(SYS_WRITE, ">i >i >d", FD, Bytes, Bytes, Src); } -int acess_seek(int FD, int64_t Ofs, int Dir) { +int acess__SysSeek(int FD, int64_t Ofs, int Dir) +{ if(FD & NATIVE_FILE_MASK) { return native_seek(FD & (NATIVE_FILE_MASK-1), Ofs, Dir); } @@ -94,14 +96,15 @@ int acess_seek(int FD, int64_t Ofs, int Dir) { return _Syscall(SYS_SEEK, ">i >I >i", FD, Ofs, Dir); } -uint64_t acess_tell(int FD) { +uint64_t acess__SysTell(int FD) +{ if(FD & NATIVE_FILE_MASK) return native_tell( FD & (NATIVE_FILE_MASK-1) ); DEBUG("tell(0x%x)", FD); return _Syscall(SYS_TELL, ">i", FD); } -int acess_ioctl(int fd, int id, void *data) { +int acess__SysIOCtl(int fd, int id, void *data) { int len; DEBUG("ioctl(%i, %i, %p)", fd, id, data); // NOTE: The length here is hacky and could break @@ -111,7 +114,7 @@ int acess_ioctl(int fd, int id, void *data) { len = PAGE_SIZE - ((uintptr_t)data % PAGE_SIZE); return _Syscall(SYS_IOCTL, ">i >i ?d", fd, id, len, data); } -int acess_finfo(int fd, t_sysFInfo *info, int maxacls) { +int acess__SysFInfo(int fd, t_sysFInfo *info, int maxacls) { // DEBUG("offsetof(size, t_sysFInfo) = %i", offsetof(t_sysFInfo, size)); DEBUG("finfo(%i, %p, %i)", fd, info, maxacls); return _Syscall(SYS_FINFO, ">i i", @@ -121,7 +124,7 @@ int acess_finfo(int fd, t_sysFInfo *info, int maxacls) { ); } -int acess_SysReadDir(int fd, char *dest) { +int acess__SysReadDir(int fd, char *dest) { DEBUG("SysReadDir(%i, %p)", fd, dest); return _Syscall(SYS_READDIR, ">i i >s >i", fd, name, flags); @@ -176,7 +173,7 @@ uint64_t acess__SysAllocate(uintptr_t vaddr) } // --- Process Management --- -int acess_clone(int flags, void *stack) +int acess__SysClone(int flags, void *stack) { #ifdef __WIN32__ Warning("Win32 does not support anything like fork(2), cannot emulate"); @@ -212,7 +209,7 @@ int acess_clone(int flags, void *stack) #endif } -int acess_execve(char *path, char **argv, const char **envp) +int acess__SysExecVE(char *path, char **argv, const char **envp) { int i, argc; @@ -289,13 +286,13 @@ int acess__SysSpawn(const char *binary, const char **argv, const char **envp, in return kernel_tid; } -void acess_sleep(void) -{ - DEBUG("%s()", __func__); - _Syscall(SYS_SLEEP, ""); -} +//void acess_sleep(void) +//{ +// DEBUG("%s()", __func__); +// _Syscall(SYS_SLEEP, ""); +//} -int acess_waittid(int TID, int *ExitStatus) +int acess__SysWaitTID(int TID, int *ExitStatus) { DEBUG("%s(%i, %p)", __func__, TID, ExitStatus); return _Syscall(SYS_WAITTID, ">i i >d", DestTID, Length, Data); } -int acess_SysGetMessage(int *SourceTID, int BufLen, void *Data) +int acess__SysGetMessage(int *SourceTID, int BufLen, void *Data) { DEBUG("%s(%p, %p)", __func__, SourceTID, Data); return _Syscall(SYS_GETMSG, "Params[req->NParams]; - retValue = 0; - if( req->NParams >= 1 ) - { - switch(req->Params[0].Type) - { - case ARG_TYPE_INT64: - retValue = *(uint64_t*)dataPtr; - dataPtr += req->Params[0].Length; - break; - case ARG_TYPE_INT32: - retValue = *(uint32_t*)dataPtr; - dataPtr += req->Params[0].Length; - break; - } - } + Debug("req->NParams = %i", req->NParams); + assert(req->NParams >= 2); + // return + assert(req->Params[0].Type == ARG_TYPE_INT64); + assert(req->Params[0].Length == sizeof(uint64_t)); + retValue = *(uint64_t*)dataPtr; + dataPtr += sizeof(uint64_t); + // errno + assert(req->Params[1].Type == ARG_TYPE_INT32); + assert(req->Params[1].Length == sizeof(uint32_t)); + acess__errno = *(uint32_t*)dataPtr; + dataPtr += sizeof(uint32_t); // Write changes to buffers - if( req->NParams - 1 != retCount ) { + if( req->NParams - 2 != retCount ) { fprintf(stderr, "syscalls.c: Return count inbalance (%i - 1 != exp %i) [Call %i]\n", req->NParams, retCount, SyscallID); exit(127); } retCount = 0; - for( i = 1; i < req->NParams; i ++ ) + for( i = 2; i < req->NParams; i ++ ) { #if 0 int j; @@ -276,6 +278,7 @@ uint64_t _Syscall(int SyscallID, const char *ArgTypes, ...) printf(" %02x", ((uint8_t*)dataPtr)[j]); printf("\n"); #endif + assert( req->Params[i].Type == ARG_TYPE_DATA ); memcpy( retPtrs[retCount++], dataPtr, req->Params[i].Length ); dataPtr += req->Params[i].Length; } diff --git a/AcessNative/syscalls.h b/AcessNative/syscalls.h index 21a9cb53..b9661bcf 100644 --- a/AcessNative/syscalls.h +++ b/AcessNative/syscalls.h @@ -35,84 +35,20 @@ typedef struct sRequestHeader { tRequestValue Params[]; } tRequestHeader; -enum eSyscalls { - SYS_NULL, - - SYS_EXIT, - - SYS_OPEN, - SYS_CLOSE, - SYS_READ, - SYS_WRITE, - SYS_SEEK, - SYS_TELL, - SYS_IOCTL, - SYS_FINFO, - SYS_READDIR, - SYS_OPENCHILD, - SYS_GETACL, - SYS_MOUNT, - SYS_REOPEN, - SYS_CHDIR, - - SYS_WAITTID, - SYS_SETUID, - SYS_SETGID, - - SYS_GETTID, - SYS_GETPID, - SYS_GETUID, - SYS_GETGID, - // IPC - SYS_SLEEP, - SYS_AN_FORK, - SYS_AN_SPAWN, - SYS_SENDMSG, - SYS_GETMSG, - SYS_SELECT, - SYS_WAITEVENT, - +enum eSyscalls { + #define _(n) n + #include "syscalls_list.h" + #undef _ N_SYSCALLS }; #ifndef DONT_INCLUDE_SYSCALL_NAMES static const char * casSYSCALL_NAMES[] = { - "SYS_NULL", - - "SYS_EXIT", - - "SYS_OPEN", - "SYS_CLOSE", - "SYS_READ", - "SYS_WRITE", - "SYS_SEEK", - "SYS_TELL", - "SYS_IOCTL", - "SYS_FINFO", - "SYS_READDIR", - "SYS_OPENCHILD", - "SYS_GETACL", - "SYS_MOUNT", - "SYS_REOPEN", - "SYS_CHDIR", - - "SYS_WAITTID", - "SYS_SETUID", - "SYS_SETGID", - - "SYS_GETTID", - "SYS_GETPID", - "SYS_GETUID", - "SYS_GETGID", - - // IPC - "SYS_SLEEP", - "SYS_AN_FORK", - "SYS_SENDMSG", - "SYS_GETMSG", - "SYS_SELECT", - "SYS_WAITEVENT" + #define _(n) #n + #include "syscalls_list.h" + #undef _ + "-" }; #endif diff --git a/AcessNative/syscalls_list.h b/AcessNative/syscalls_list.h new file mode 100644 index 00000000..9ab9098c --- /dev/null +++ b/AcessNative/syscalls_list.h @@ -0,0 +1,37 @@ +_(SYS_NULL), + +_(SYS_EXIT), + +_(SYS_OPEN), +_(SYS_CLOSE), +_(SYS_READ), +_(SYS_WRITE), +_(SYS_SEEK), +_(SYS_TELL), +_(SYS_IOCTL), +_(SYS_FINFO), +_(SYS_READDIR), +_(SYS_OPENCHILD), +_(SYS_GETACL), +_(SYS_MOUNT), +_(SYS_REOPEN), +_(SYS_CHDIR), + +_(SYS_WAITTID), +_(SYS_SETUID), +_(SYS_SETGID), + +_(SYS_GETTID), +_(SYS_GETPID), +_(SYS_GETUID), +_(SYS_GETGID), + +// IPC +_(SYS_SLEEP), +_(SYS_AN_FORK), +_(SYS_AN_SPAWN), +_(SYS_SENDMSG), +_(SYS_GETMSG), +_(SYS_SELECT), +_(SYS_WAITEVENT), +