detach stdin/stdout/stderr from child processes, implement a separate logging pipe...
[project/netifd.git] / utils.h
diff --git a/utils.h b/utils.h
index 8ef968a..6500fdf 100644 (file)
--- a/utils.h
+++ b/utils.h
@@ -4,16 +4,6 @@
 #include <libubox/list.h>
 #include <libubox/avl.h>
 
-#ifdef DEBUG
-#define DPRINTF(format, ...) fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__)
-#else
-#define DPRINTF(format, ...) no_debug(format, ## __VA_ARGS__)
-#endif
-
-static inline void no_debug(const char *fmt, ...)
-{
-}
-
 #define __init __attribute__((constructor))
 
 struct vlist_tree;
@@ -44,6 +34,11 @@ void __vlist_init(struct vlist_tree *tree, avl_tree_comp cmp, vlist_update_cb up
 #define vlist_init(tree, cmp, update, type, node, key) \
        __vlist_init(tree, cmp, update, offsetof(type, key) - offsetof(type, node))
 
+static inline void vlist_update(struct vlist_tree *tree)
+{
+       tree->version++;
+}
+
 void vlist_add(struct vlist_tree *tree, struct vlist_node *node);
 void vlist_delete(struct vlist_tree *tree, struct vlist_node *node);
 void vlist_flush(struct vlist_tree *tree);