Disable the kernel in all the "empty" preset templates.
[bertos.git] / bertos / cfg / macros.h
index 4f77b21e6c6c7227492156dea2329e59b9e6f6cf..caa2340f4792bedae0214eabbeb94b3bd73bea68 100644 (file)
  */
 #define DIV_ROUND(dividend, divisor)  (((dividend) + (divisor) / 2) / (divisor))
 
+/**
+ * Perform an integer division rounding the result to the upper int value.
+ * \note \a divisor should preferibly be a costant, otherwise this macro generates
+ * 2 division. Also divisor is evaluated twice.
+ */
+#define DIV_ROUNDUP(dividend, divisor)  (((dividend) + (divisor) - 1) / (divisor))
+
 /** Round up \a x to an even multiple of the 2's power \a pad. */
 #define ROUND_UP2(x, pad) (((x) + ((pad) - 1)) & ~((pad) - 1))