Change checkpoint to calculate number of blocks required instead of using a hardcoded...
[yaffs2.git] / yportenv.h
index de7f38ea4c4742590ca6076f4511cd7d57660aee..8b80c6d6889a6390eb41debb33345cce33b4b0b6 100644 (file)
@@ -32,6 +32,7 @@
 #endif
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #define TSTR(x) KERN_WARNING x
 #define TOUT(p) printk p
 
+#define yaffs_trace(mask, fmt, args...) \
+       do { if ((mask) & (yaffs_traceMask|YAFFS_TRACE_ERROR)) \
+               printk(KERN_WARNING "yaffs: " fmt, ## args); \
+       } while (0)
+
+#define compile_time_assertion(assertion) \
+       ({ int x = __builtin_choose_expr(assertion, 0, (void)0); (void) x; })
+
 #elif defined CONFIG_YAFFS_DIRECT
 
 /* Direct interface */
 
 #endif
 
-extern unsigned yaffs_traceMask;
+/* see yaffs_fs.c */
+extern unsigned int yaffs_traceMask;
+extern unsigned int yaffs_wr_attempts;
 
 /*
  * Tracing flags.