Multiuser, Capabilities and Access Controls (#54)
[lunaix-os.git] / lunaix-os / includes / lunaix / fs / twimap.h
index c9d56a2aaa6a1de1dcd8a8a29cdf74ed88b43808..3086c633c44d41b46be2e7ffadd9cd8a9f60a76b 100644 (file)
@@ -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