git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: kprintf now goes into dedicated pseudo-dev rather than flooding the framebuffer
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
fs
/
twifs.h
diff --git
a/lunaix-os/includes/lunaix/fs/twifs.h
b/lunaix-os/includes/lunaix/fs/twifs.h
index 2ee5390b65cfe240e787fcfc53d22dbee5714797..50579aeed5d6eb580a3af755cfd98116eb785e62 100644
(file)
--- a/
lunaix-os/includes/lunaix/fs/twifs.h
+++ b/
lunaix-os/includes/lunaix/fs/twifs.h
@@
-1,6
+1,7
@@
#ifndef __LUNAIX_TWIFS_H
#define __LUNAIX_TWIFS_H
#ifndef __LUNAIX_TWIFS_H
#define __LUNAIX_TWIFS_H
+#include <lunaix/ds/ldga.h>
#include <lunaix/fs.h>
#include <lunaix/fs/twimap.h>
#include <lunaix/spike.h>
#include <lunaix/fs.h>
#include <lunaix/fs/twimap.h>
#include <lunaix/spike.h>
@@
-34,6
+35,12
@@
struct twifs_node
(type) twinode->data; \
})
(type) twinode->data; \
})
+#define EXPORT_TWIFS_PLUGIN(label, plg_init) \
+ export_ldga_el(twiplugin_inits, label, ptr_t, plg_init)
+
+void
+twifs_register_plugins();
+
void
twifs_init();
void
twifs_init();
@@
-52,4
+59,11
@@
twifs_rm_node(struct twifs_node* node);
struct twimap*
twifs_mapping(struct twifs_node* parent, void* data, const char* fmt, ...);
struct twimap*
twifs_mapping(struct twifs_node* parent, void* data, const char* fmt, ...);
+#define twimap_entry_simple(parent, name, data, read_cb) \
+ ({ \
+ struct twimap* map = twifs_mapping((parent), (data), (name)); \
+ map->read = (read_cb); \
+ map; \
+ })
+
#endif /* __LUNAIX_TWIFS_H */
#endif /* __LUNAIX_TWIFS_H */