view src/impl/file_impl_inode.cbc @ 231:08cd784ddbc0

rename inode.h
author menikon
date Sat, 25 Jan 2020 20:37:53 +0900
parents 4265c6e825af
children a7fc5edea925
line wrap: on
line source

#include "../../context.h"
#interface "file.h"
#interface "inode_impl.h"

// ----
// typedef struct inode_impl<Impl, Isa> impl file {
//
// } inode_impl;
// ----

file* createinode(struct Context* cbc_context) {
    struct file* file  = new file();
    struct inode_impl* inode_impl = new inode_impl();
    file->file = (union Data*)inode_impl;
    inode_impl->st = NULL;
    inode_impl->ip = NULL;
    file->statinode = C_statinode_impl;
    inode_impl->cbc_statinode = C_cbc_statinode_impl;
    file->read = C_readinode_impl;
    file->write = C_writeinode_impl;
    file->close = C_closeinode_impl;
    return file;
}
__code statinode(struct inode* ip, struct stat* st, __code next(int ret, ...)) { //:skip

    goto cbc_statinode(ip, st, next(ret, ...));
}

__code cbc_statinode((struct inode* ip, struct stat* st, __code next(int ret, ...)){

    goto next(...);
}

__code readinode(struct inode* file, char* addr, __code next(...)) {

    goto next(...);
}

__code writeinode(struct inode* file, char* addr, int n, __code next(...)) {

    goto next(...);
}

__code closeinode(struct inode* file,int fd, __code next(...)) {

    goto next(...);
}