X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/cbc8fdbfe473e23e19690204418e19999a9522d1..0fd474df7001837bde53da0e42e83081827c9641:/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