Add the 'current_kthread' helper
[akaros.git] / kern / include / bitops.h
index ae53c80..e60e198 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef ROS_KERN_BITOPS_H
-#define ROS_KERN_BITOPS_H
+#pragma once
 
 #define BIT(nr)                        (1UL << (nr))
 #define BIT_MASK(nr)           (1UL << ((nr) % BITS_PER_LONG))
@@ -112,7 +111,7 @@ static inline void CLR_BITMASK_RANGE(uint8_t* m, size_t beg, size_t end)
 
 
 /* Runs *work on every bit in the bitmask, passing *work the value of the bit
- * that is set.  Optionally clears the bit from the bitmask. 
+ * that is set.  Optionally clears the bit from the bitmask.
  *
  * We need this to be a macro, so that the calling code doesn't need the
  * address for work_fn.  This matters for code that has nested functions that
@@ -128,6 +127,5 @@ static inline void CLR_BITMASK_RANGE(uint8_t* m, size_t beg, size_t end)
                if (present)                                                           \
                        (work_fn)(i);                                                      \
        }                                                                          \
-}                                                                              
+}
 #endif
-#endif /* ROS_KERN_BITOPS_H */