#define DEBUG 1
#include <acess.h>
#include <threads.h>
+#include <events.h>
#include "../syscalls.h"
// === IMPORTS ===
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);
+);
+
+SYSCALL1(Syscall_WaitEvent, "i", int,
+ return Threads_WaitEvents(a0);
+);
+
const tSyscallHandler caSyscalls[] = {
Syscall_Null,
Syscall_Exit,
Syscall_Sleep,
Syscall_AN_Fork,
- NULL,
- NULL,
- Syscall_select
+ Syscall_SendMessage,
+ Syscall_GetMessage,
+ Syscall_select,
+ Syscall_WaitEvent
};
const int ciNumSyscalls = sizeof(caSyscalls)/sizeof(caSyscalls[0]);
/**
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);