[IPV6]: ip6_output annotations
[safe/jmp/linux-2.6] / include / linux / types.h
index dcb13f8..9f11fdd 100644 (file)
@@ -2,12 +2,13 @@
 #define _LINUX_TYPES_H
 
 #ifdef __KERNEL__
-#include <linux/config.h>
 
 #define BITS_TO_LONGS(bits) \
        (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
 #define DECLARE_BITMAP(name,bits) \
        unsigned long name[BITS_TO_LONGS(bits)]
+
+#define BITS_PER_BYTE 8
 #endif
 
 #include <linux/posix_types.h>
@@ -32,6 +33,8 @@ typedef __kernel_clockid_t    clockid_t;
 typedef __kernel_mqd_t         mqd_t;
 
 #ifdef __KERNEL__
+typedef _Bool                  bool;
+
 typedef __kernel_uid32_t       uid_t;
 typedef __kernel_gid32_t       gid_t;
 typedef __kernel_uid16_t        uid16_t;
@@ -123,8 +126,17 @@ typedef            __u64           u_int64_t;
 typedef                __s64           int64_t;
 #endif
 
-/*
+/* this is a special 64bit data type that is 8-byte aligned */
+#define aligned_u64 unsigned long long __attribute__((aligned(8)))
+#define aligned_be64 __be64 __attribute__((aligned(8)))
+#define aligned_le64 __le64 __attribute__((aligned(8)))
+
+/**
  * The type used for indexing onto a disc or disc partition.
+ *
+ * Linux always considers sectors to be 512 bytes long independently
+ * of the devices real block size.
+ *
  * If required, asm/types.h can override it and define
  * HAVE_SECTOR_T
  */
@@ -132,6 +144,10 @@ typedef            __s64           int64_t;
 typedef unsigned long sector_t;
 #endif
 
+#ifndef HAVE_BLKCNT_T
+typedef unsigned long blkcnt_t;
+#endif
+
 /*
  * The type of an index into the pagecache.  Use a #define so asm/types.h
  * can override it.
@@ -148,7 +164,12 @@ typedef unsigned long sector_t;
  */
 
 #ifdef __CHECKER__
-#define __bitwise __attribute__((bitwise))
+#define __bitwise__ __attribute__((bitwise))
+#else
+#define __bitwise__
+#endif
+#ifdef __CHECK_ENDIAN__
+#define __bitwise __bitwise__
 #else
 #define __bitwise
 #endif
@@ -162,6 +183,17 @@ typedef __u64 __bitwise __le64;
 typedef __u64 __bitwise __be64;
 #endif
 
+#ifdef __KERNEL__
+typedef unsigned __bitwise__ gfp_t;
+
+#ifdef CONFIG_RESOURCES_64BIT
+typedef u64 resource_size_t;
+#else
+typedef u32 resource_size_t;
+#endif
+
+#endif /* __KERNEL__ */
+
 struct ustat {
        __kernel_daddr_t        f_tfree;
        __kernel_ino_t          f_tinode;