Whamcloud - gitweb
LU-11085 nodemap: switch interval tree to in-kernel impl.
[fs/lustre-release.git] / libcfs / include / libcfs / libcfs.h
index a172dda..5fa92df 100644 (file)
 #include <libcfs/libcfs_string.h>
 #include <libcfs/libcfs_workitem.h>
 #include <libcfs/libcfs_hash.h>
-#include <libcfs/libcfs_heap.h>
 #include <libcfs/libcfs_fail.h>
 #include "curproc.h"
 
 #define LIBCFS_VERSION "0.7.1"
 
-#define PO2_ROUNDUP_TYPED(x, po2, type) (-(-(type)(x) & -(type)(po2)))
-#define LOWEST_BIT_SET(x) ((x) & ~((x) - 1))
-
 /* Sparse annotations */
 #if !defined(__must_hold)
 # ifdef __CHECKER__
@@ -129,4 +125,17 @@ do {                                                                       \
                );                                                      \
 } while (0)
 
+/* atomic-context safe vfree */
+void libcfs_vfree_atomic(const void *addr);
+
+/* interval tree */
+
+#ifdef HAVE_INTERVAL_TREE_CACHED
+#define interval_tree_root rb_root_cached
+#define INTERVAL_TREE_ROOT RB_ROOT_CACHED
+#else
+#define interval_tree_root rb_root
+#define INTERVAL_TREE_ROOT RB_ROOT
+#endif /* HAVE_INTERVAL_TREE_CACHED */
+
 #endif /* _LIBCFS_LIBCFS_H_ */