view src/interface/IO.h @ 347:ea5ee6e71a3b

add io interface
author anatofuz
date Mon, 02 Mar 2020 14:24:17 +0900
parents src/interface/io.h@36ed64fea8c1
children 1616cb02ecec
line wrap: on
line source

typedef struct IO <Type, Impl> {
    __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;