From: John Hodge Date: Wed, 14 Mar 2012 06:07:44 +0000 (+0800) Subject: AcessNative - Implementing SendMessage/GetMessage X-Git-Tag: rel0.15~729 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=a448627c1d3d7bd7ad98c1d1251dc46492a6ef43;p=tpg%2Facess2.git AcessNative - Implementing SendMessage/GetMessage --- diff --git a/AcessNative/acesskernel_src/Makefile b/AcessNative/acesskernel_src/Makefile index ef63ff2b..4cc939ec 100644 --- a/AcessNative/acesskernel_src/Makefile +++ b/AcessNative/acesskernel_src/Makefile @@ -13,7 +13,7 @@ endif KERNEL_SRC = ../../KernelLand/Kernel/ -KERNEL_OBJ := logging.o adt.o lib.o drvutil.o debug.o +KERNEL_OBJ := logging.o adt.o lib.o drvutil.o debug.o messages.o KERNEL_OBJ += vfs/main.o vfs/open.o vfs/acls.o vfs/io.o vfs/dir.o KERNEL_OBJ += vfs/nodecache.o vfs/mount.o vfs/memfile.o vfs/select.o KERNEL_OBJ += vfs/fs/root.o vfs/fs/devfs.o diff --git a/AcessNative/acesskernel_src/syscalls.c b/AcessNative/acesskernel_src/syscalls.c index a4692776..fa473b27 100644 --- a/AcessNative/acesskernel_src/syscalls.c +++ b/AcessNative/acesskernel_src/syscalls.c @@ -189,6 +189,16 @@ SYSCALL1(Syscall_AN_Fork, "d", int *, return *a0; ); +SYSCALL2(Syscall_SendMessage, "id", int, void *, + return Proc_SendMessage(a0, Sizes[1], a1); +); + +SYSCALL2(Syscall_GetMessage, "dd", Uint *, void *, + if( Sizes[0] < sizeof(*a0) ) + return -1; + return Proc_GetMessage(a0, a1); +); + const tSyscallHandler caSyscalls[] = { Syscall_Null, Syscall_Exit, @@ -219,8 +229,8 @@ const tSyscallHandler caSyscalls[] = { Syscall_Sleep, Syscall_AN_Fork, - NULL, - NULL, + Syscall_SendMessage, + Syscall_GetMessage, Syscall_select }; const int ciNumSyscalls = sizeof(caSyscalls)/sizeof(caSyscalls[0]); @@ -377,7 +387,7 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength) ret->Params[retValueCount].Flags = 0; ret->Params[retValueCount].Length = Request->Params[i].Length; - LOG("Syscalls", "Ret %i: Type %i, Len %i", + LOG("Ret %i: Type %i, Len %i", i, Request->Params[i].Type, Request->Params[i].Length); memcpy(inData, returnData[i], Request->Params[i].Length);