changeset 147:dec1fa964271

add Sysopen
author menikon <e165723@ie.u-ryukyu.ac.jp>
date Fri, 13 Dec 2019 17:19:06 +0900
parents bb1b0676e27b
children 86cd551e5b38
files src/impl/FileRead.h src/impl/PipeRead.h src/impl/SysOpenImpl.h src/interface/SysOpen.h src/interface/SysRead.h
diffstat 5 files changed, 23 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/impl/FileRead.h	Thu Dec 12 14:28:15 2019 +0900
+++ b/src/impl/FileRead.h	Fri Dec 13 17:19:06 2019 +0900
@@ -1,6 +1,3 @@
 typedef struct FileRead<Type, Isa> impl SysRead {
   struct file* f;
-  int r;
-  __code cbc_fileread1(Type* file_read, struct file* f,int r,__code next(r,...));
-  __code next(...);
 } FileRead;
--- a/src/impl/PipeRead.h	Thu Dec 12 14:28:15 2019 +0900
+++ b/src/impl/PipeRead.h	Fri Dec 13 17:19:06 2019 +0900
@@ -1,15 +1,5 @@
 typedef struct PipeRead<Type, Isa> impl SysRead {
-  struct pipe* p;
-  int i;
-  int n;
-  __code cbc_piperead1(Type* sys_read, struct pipe* p, __code next(...));
-  __code cbc_piperead2(Type* sys_read, int i, int n,struct pipe* p, __code next(...));
-  __code cbc_piperead3(Type* sys_read, struct pipe* p, int i, __code next(...));
-  __code next(...);
+  struct CbCPipe *pipe;
+  struct String *addr;
+  struct Integer* i;
 } PipeRead;
-
-/*
- __code cbc_piperead1(Impl* sys_read, struct pipe* p);
- __code cbc_piperead2(Impl* sys_read, int i, int n,struct pipe* p);
- __code cbc_piperead3(Impl* sys_read, struct pipe* p, int i);
-*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/impl/SysOpenImpl.h	Fri Dec 13 17:19:06 2019 +0900
@@ -0,0 +1,3 @@
+typedef struct SysOpenImpl <Type, Isa> impl SysOpen {
+
+} SysOpenImpl;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/interface/SysOpen.h	Fri Dec 13 17:19:06 2019 +0900
@@ -0,0 +1,12 @@
+typedef struct SysOpen<Type, Impl>{
+  union  Data* sys_open;
+   int fd;
+   int omode;
+   char* addr;
+   struct file* file;
+   struct inode* ip;
+
+   __code open(Impl* sys_open, int fd, int omode, char* addr, struct file* file, struct inode* ip, __code next(...));
+
+   __code next(...);
+} SysOpen;
--- a/src/interface/SysRead.h	Thu Dec 12 14:28:15 2019 +0900
+++ b/src/interface/SysRead.h	Fri Dec 13 17:19:06 2019 +0900
@@ -1,9 +1,9 @@
 typedef struct SysRead<Type, Impl>{
-   union Data* sys_read;
-   union Data* impl;
+   union  Data* sys_read;
+   int num;
    char* addr;
-   int n;
-
-   __code read(Impl* sys_read, union Data* impl, char* addr, int n, __code next(int ret,...));
+   struct file* file;
+   __code read(Impl* sys_read, __code next(...));
+   //__code ret(Impl* cbc_sys_file, UInteger* num);
    __code next(...);
 } SysRead;