Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / include / linux / kernel.h
index b4562bf..f6dc34a 100644 (file)
@@ -25,16 +25,11 @@ extern const char vx_linux_banner[];
 #define LONG_MAX       ((long)(~0UL>>1))
 #define LONG_MIN       (-LONG_MAX - 1)
 #define ULONG_MAX      (~0UL)
-#define LLONG_MAX      ((long long)(~0ULL>>1))
-#define LLONG_MIN      (-LLONG_MAX - 1)
-#define ULLONG_MAX     (~0ULL)
 
 #define STACK_MAGIC    0xdeadbeef
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
-#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
-#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
 
 #define        KERN_EMERG      "<0>"   /* system is unusable                   */
 #define        KERN_ALERT      "<1>"   /* action must be taken immediately     */
@@ -81,7 +76,7 @@ extern int cond_resched(void);
 # define might_sleep() do { might_resched(); } while (0)
 #endif
 
-#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
+#define might_sleep_if(cond) do { if (unlikely(cond)) might_sleep(); } while (0)
 
 #define abs(x) ({                              \
                int __x = (x);                  \
@@ -120,8 +115,6 @@ extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
        __attribute__ ((format (printf, 3, 4)));
 extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
        __attribute__ ((format (printf, 3, 0)));
-extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
-       __attribute__ ((format (printf, 2, 3)));
 
 extern int sscanf(const char *, const char *, ...)
        __attribute__ ((format (scanf, 2, 3)));
@@ -211,7 +204,6 @@ extern enum system_states {
 extern void dump_stack(void);
 
 #ifdef DEBUG
-/* If you are writing a driver, please use dev_dbg instead */
 #define pr_debug(fmt,arg...) \
        printk(KERN_DEBUG fmt,##arg)
 #else
@@ -340,12 +332,6 @@ struct sysinfo {
 /* Force a compilation error if condition is true */
 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
 
-/* Force a compilation error if condition is true, but also produce a
-   result (of value 0 and type size_t), so the expression can be used
-   e.g. in a structure initializer (or where-ever else comma expressions
-   aren't permitted). */
-#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
-
 /* Trap pasters of __FUNCTION__ at compile-time */
 #define __FUNCTION__ (__func__)