# HG changeset patch # User anatofuz # Date 1583126657 -32400 # Node ID ea5ee6e71a3bae0b784d6fd8941d8ee5fa5bd01e # Parent 36ed64fea8c13f4cbade2c5e07f466b1097c0acb add io interface diff -r 36ed64fea8c1 -r ea5ee6e71a3b src/impl/ConsoleIO.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/impl/ConsoleIO.h Mon Mar 02 14:24:17 2020 +0900 @@ -0,0 +1,5 @@ +typedef struct ConsoleIO impl IO { + __code consoleread1(Type* IO, int n, int target, char* dst, struct inode* ip, __code next(...)); + __code consoleread2(Type* IO, struct inode* ip, __code next(...)); + __code next(....); +} ConsoleIO; diff -r 36ed64fea8c1 -r ea5ee6e71a3b src/interface/IO.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/interface/IO.h Mon Mar 02 14:24:17 2020 +0900 @@ -0,0 +1,6 @@ +typedef struct IO { + __code read(Impl* io, struct file* file, char* addr, __code next(...)); + __code write(Impl* io, struct file* file, char* addr, int n, __code next(...)); + __code close(Impl* io, struct file* file, int fd, __code next(...)); + __code next(...); +} IO; diff -r 36ed64fea8c1 -r ea5ee6e71a3b src/interface/io.h --- a/src/interface/io.h Mon Mar 02 14:19:49 2020 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -typedef struct IO { - __code read(Impl* io, char* addr, __code next(...)); - __code write(Impl* io, char* addr, int n, __code next(...)); - __code close(Impl* io,int fd, __code next(...)); - __code next(...); -} IO;