changeset 156:8b473f13fd9f

add SysCall interface
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 19 Dec 2019 17:09:38 +0900
parents 2c63276c6b04
children 2fc7ed85e76c b948cf7a881d
files src/interface/SysCall.dg
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/interface/SysCall.dg	Thu Dec 19 17:09:38 2019 +0900
@@ -0,0 +1,11 @@
+typedef struct SysCall<Type,Impl>{
+    union Data* sys_call;
+    union Data* arg1;
+    union Data* arg2;
+    union Data* arg3;
+    union Data* context;
+    int ret;
+    __code ret(__code next(int ret, ...));
+    __code sleep(Impl* sys_call, __code next(union Data* context, ...));
+    __code exec(Impl* sys_call,union Data* arg1,union Data* arg2,union Data* aeg3,__code next(...));
+} syscall;