AcessNative - Updated syscall names
authorJohn Hodge <[email protected]>
Tue, 2 Jul 2013 15:54:59 +0000 (23:54 +0800)
committerJohn Hodge <[email protected]>
Tue, 2 Jul 2013 15:54:59 +0000 (23:54 +0800)
AcessNative/ld-acess_src/exports.c
AcessNative/syscalls_list.h
Usermode/Libraries/Makefile.cfg
Usermode/Libraries/ld-acess.so_src/include_exp/acess/_native_syscallmod.h

index 756feba..d71476d 100644 (file)
@@ -71,6 +71,14 @@ int acess__SysReopen(int FD, const char *Path, int Flags) {
        return _Syscall(SYS_REOPEN, ">i >s >i", FD, Path, Flags);
 }
 
+int acess__SysCopyFD(int srcfd, int dstfd) {
+       return _Syscall(SYS_COPYFD, ">i >i", srcfd, dstfd);
+}
+
+int acess__SysFDFlags(int fd, int mask, int newflags) {
+       return _Syscall(SYS_FDFLAGS, ">i >i >i", fd, mask, newflags);
+}
+
 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);
@@ -356,8 +364,8 @@ int acess__SysWaitTID(int TID, int *ExitStatus)
 int acess_setuid(int ID) { return _Syscall(SYS_SETUID, ">i", ID); }
 int acess_setgid(int ID) { return _Syscall(SYS_SETGID, ">i", ID); }
 int acess_gettid(void) { return _Syscall(SYS_GETTID, ""); }
-int acess_getpid(void) { return _Syscall(SYS_GETPID, ""); }
-int acess_getuid(void) { return _Syscall(SYS_GETUID, ""); }
+int acess__SysGetPID(void) { return _Syscall(SYS_GETPID, ""); }
+int acess__SysGetUID(void) { return _Syscall(SYS_GETUID, ""); }
 int acess_getgid(void) { return _Syscall(SYS_GETGID, ""); }
 
 int acess__SysSendMessage(int DestTID, int Length, void *Data)
@@ -439,9 +447,10 @@ const tSym caBuiltinSymbols[] = {
        
        DEFSYM(_SysWaitTID),
        DEFSYM(gettid),
+       DEFSYM(_SysGetPID),
        DEFSYM(setuid),
        DEFSYM(setgid),
-       DEFSYM(getuid),
+       DEFSYM(_SysGetUID),
        DEFSYM(getgid),
 
        DEFSYM(_SysSendMessage),
index 9ab9098..209380b 100644 (file)
@@ -4,6 +4,9 @@ _(SYS_EXIT),
 
 _(SYS_OPEN),
 _(SYS_CLOSE),
+_(SYS_REOPEN),
+_(SYS_COPYFD),
+_(SYS_FDFLAGS),
 _(SYS_READ),
 _(SYS_WRITE),
 _(SYS_SEEK),
@@ -14,7 +17,6 @@ _(SYS_READDIR),
 _(SYS_OPENCHILD),
 _(SYS_GETACL),
 _(SYS_MOUNT),
-_(SYS_REOPEN),
 _(SYS_CHDIR),
 
 _(SYS_WAITTID),
index 330f55b..4bb2c99 100644 (file)
@@ -16,9 +16,9 @@ ifeq ($(ARCHDIR),native)
   CFLAGS += -fPIC
  endif
 else
-CPPFLAGS := -ffreestanding
-CFLAGS   := -fno-stack-protector -fPIC
-LDFLAGS  := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name`
+ CPPFLAGS := -ffreestanding
+ CFLAGS   := -fno-stack-protector -fPIC
+ LDFLAGS  := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name`
 endif
 LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/
 
index c368a29..a12d964 100644 (file)
@@ -5,9 +5,9 @@
 #define _SysWaitEvent  acess__SysWaitEvent
 #define _SysWaitTID    acess__SysWaitTID
 #define gettid acess_gettid
-#define getpid acess_getpid
-#define getuid acess_getuid
-#define getgid acess_getgid
+#define _SysGetPID     acess__SysGetPID
+#define _SysGetUID     acess__SysGetUID
+#define _SysGetGID     acess__SysGetGID
 #define setuid acess_setuid
 #define setgid acess_setgid
 #define _SysSetName    acess__SysSetName
@@ -28,6 +28,8 @@
 #define _SysOpen       acess__SysOpen
 #define _SysOpenChild  acess__SysOpenChild
 #define _SysReopen     acess__SysReopen
+#define _SysCopyFD     acess__SysCopyFD
+#define _SysFDFlags    acess__SysFDFlags
 #define _SysClose      acess__SysClose
 #define _SysRead       acess__SysRead
 #define _SysWrite      acess__SysWrite

UCC git Repository :: git.ucc.asn.au