X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Fydirectenv.h;h=ad4efab710e036d3904a256c0e43add08c9d46cc;hb=05f5305b2d17b0e2889338724b864cf80f309437;hp=536ff22068c4a2d1be86b151133023fc55f8d94f;hpb=fb1a7ee223619260cfd9b6366fd78747cc572cd5;p=yaffs2.git diff --git a/direct/ydirectenv.h b/direct/ydirectenv.h index 536ff22..ad4efab 100644 --- a/direct/ydirectenv.h +++ b/direct/ydirectenv.h @@ -47,34 +47,27 @@ void yaffs_qsort(void *aa, size_t n, size_t es, #define YAFFS_PATH_DIVIDERS "/" -#ifdef NO_Y_INLINE -#define Y_INLINE +#ifdef NO_inline +#define inline #else -#define Y_INLINE __inline__ +#define inline __inline__ #endif -#define kmalloc(x,flags) yaffs_malloc(x) -#define kfree(x) yaffs_free(x) -#define vmalloc(x) yaffs_malloc(x) -#define vfree(x) yaffs_free(x) +#define kmalloc(x,flags) yaffsfs_malloc(x) +#define kfree(x) yaffsfs_free(x) +#define vmalloc(x) yaffsfs_malloc(x) +#define vfree(x) yaffsfs_free(x) #define cond_resched() do {} while(0) - - -//#define YINFO(s) YPRINTF(( __FILE__ " %d %s\n",__LINE__,s)) -//#define YALERT(s) YINFO(s) - - -#define TENDSTR "\n" -#define TSTR(x) x -#define TCONT(x) x -#define TOUT(p) printf p +#define yaffs_trace(msk, fmt, ...) do { \ + if(yaffs_trace_mask & (msk)) \ + printf("yaffs: " fmt "\n", ##__VA_ARGS__); \ +} while(0) #define YAFFS_LOSTNFOUND_NAME "lost+found" #define YAFFS_LOSTNFOUND_PREFIX "obj" -//#define YPRINTF(x) printf x #include "yaffscfg.h"