Whamcloud - gitweb
LU-398 libcfs: Add libcfs heap, a binary heap implementation
[fs/lustre-release.git] / libcfs / include / libcfs / libcfs.h
index 7ce9c66..5b6cc66 100644 (file)
 #define ARRAY_SIZE(a) ((sizeof (a)) / (sizeof ((a)[0])))
 #endif
 
+#if !defined(swap)
+#define swap(x,y) do { typeof(x) z = x; x = y; y = z; } while (0)
+#endif
+
 #if !defined(container_of)
 /* given a pointer @ptr to the field @member embedded into type (usually
  * struct) @type, return pointer to the embedding instance of @type. */
@@ -314,6 +318,7 @@ void cfs_get_random_bytes(void *buf, int size);
 #include <libcfs/libcfs_kernelcomm.h>
 #include <libcfs/libcfs_workitem.h>
 #include <libcfs/libcfs_hash.h>
+#include <libcfs/libcfs_heap.h>
 #include <libcfs/libcfs_fail.h>
 #include <libcfs/params_tree.h>
 #include <libcfs/libcfs_crypto.h>