X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/28c176b668c841a3b7fb093faccf0efa39257603..refs/heads/nov/multiuser:/lunaix-os/includes/lunaix/fs/twimap.h diff --git a/lunaix-os/includes/lunaix/fs/twimap.h b/lunaix-os/includes/lunaix/fs/twimap.h index c9d56a2..3086c63 100644 --- a/lunaix-os/includes/lunaix/fs/twimap.h +++ b/lunaix-os/includes/lunaix/fs/twimap.h @@ -8,15 +8,29 @@ extern struct v_file_ops twimap_file_ops; +#define __TWIMAP_OPS \ + void (*read)(struct twimap* mapping); \ + int (*go_next)(struct twimap* mapping); \ + void (*reset)(struct twimap* mapping); + +struct twimap; +struct twimap_ops +{ + __TWIMAP_OPS +}; + struct twimap { void* index; void* buffer; void* data; size_t size_acc; - void (*read)(struct twimap* mapping); - int (*go_next)(struct twimap* mapping); - void (*reset)(struct twimap* mapping); + union + { + struct twimap_ops ops; + struct { __TWIMAP_OPS }; + }; + }; int