feat: twifs - pseudo file system for lunaix kernel state exposure
[lunaix-os.git] / lunaix-os / includes / lunaix / ds / hstr.h
index 48640529680ce270fbb68c0c41580acc31337be9..5fb84d94bc36f0354b0088d761f53ccea0c8df49 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <lib/hash.h>
 
+#define HSTR_FULL_HASH 32
+
 struct hstr
 {
     unsigned int hash;
@@ -13,9 +15,11 @@ struct hstr
 #define HSTR(str, length)                                                      \
     (struct hstr)                                                              \
     {                                                                          \
-        .len = length, .value = str                                            \
+        .len = (length), .value = (str)                                        \
     }
 
+#define HSTR_EQ(str1, str2) ((str1)->hash == (str2)->hash)
+
 inline void
 hstr_rehash(struct hstr* hash_str, unsigned int truncate_to)
 {