changeset 148:86cd551e5b38

add sys_open_impl.cbc
author menikon <e165723@ie.u-ryukyu.ac.jp>
date Mon, 16 Dec 2019 14:18:28 +0900
parents dec1fa964271
children 654f2dadd744
files src/sys_open_impl.cbc
diffstat 1 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/sys_open_impl.cbc	Mon Dec 16 14:18:28 2019 +0900
@@ -0,0 +1,30 @@
+#include "../context.h"
+#interface "SysOpen.h"
+
+// ----
+// typedef struct SysOpenImpl <Type, Isa> impl SysOpen {
+//
+// } SysOpenImpl;
+// ----
+
+SysOpen* createSysOpenImpl(struct Context* cbc_context) {
+    struct SysOpen* sys_open  = new SysOpen();
+    struct SysOpenImpl* sys_open_impl = new SysOpenImpl();
+    sys_open->sys_open = (union Data*)sys_open_impl;
+    sys_open->fd  = 0;
+    sys_open->omode  = 0;
+    sys_open->addr = NULL;
+    sys_open->file = NULL;
+    sys_open->ip = NULL;
+    sys_open->open = C_openSysOpenImpl;
+    sys_open->next = C_nextSysOpenImpl;
+    return sys_open;
+}
+__code openSysOpenImpl(struct SysOpenImpl* sys_open, int fd, int omode, char* addr, struct file* file, struct inode* ip, __code next(...)) {
+
+  goto next(...);
+}
+
+__code nextSysOpenImpl(...) {
+
+}