edits
[satune.git] / src / common.h
index d4d86c60d737da55c3a8bd632b9189c37102ecc8..9b7848583f0eebd17bb0c23303af3dfb2590c4fb 100644 (file)
@@ -27,7 +27,7 @@ extern int switch_alloc;
 
 #define model_print_err(fmt, ...) do { model_dprintf(model_err, fmt, ## __VA_ARGS__); } while (0)
 
-
+#define NEXTPOW2(x) (1<<(sizeof(uint)*8-__builtin_clz(x-1)))
 
 #ifdef CONFIG_DEBUG
 #define DEBUG(fmt, ...) do { model_print("*** %15s:%-4d %25s() *** " fmt, __FILE__, __LINE__, __func__, ## __VA_ARGS__); } while (0)