lkml.org 
[lkml]   [2004]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/4] move struct list_head to linux/types.h

This moves the definition and the initializer of struct list_head from
linux/list.h to linux/types.h.
I exented the protection via __KERNEL__ to include sector_t and pgoff_t,
I don't think they are relevant for user space.

list.h | 6 ------
types.h | 9 +++++++++
2 files changed, 9 insertions(+), 6 deletions(-)

Index: linux-2.6-inc/include/linux/types.h
===================================================================
--- linux-2.6-inc.orig/include/linux/types.h 2004-05-10 19:17:33.000000000 +0200
+++ linux-2.6-inc/include/linux/types.h 2004-10-14 02:06:33.646151715 +0200
@@ -123,6 +123,7 @@ typedef __u64 u_int64_t;
typedef __s64 int64_t;
#endif

+#ifdef __KERNEL__
/*
* The type used for indexing onto a disc or disc partition.
* If required, asm/types.h can override it and define
@@ -140,6 +141,14 @@ typedef unsigned long sector_t;
#define pgoff_t unsigned long
#endif

+struct list_head {
+ struct list_head *next, *prev;
+};
+
+#define LIST_HEAD_INIT(name) { .next = &(name), .prev = &(name) }
+
+#endif /* __KERNEL__ */
+
#endif /* __KERNEL_STRICT_NAMES */

/*
Index: linux-2.6-inc/include/linux/list.h
===================================================================
--- linux-2.6-inc.orig/include/linux/list.h 2004-08-14 13:01:14.000000000 +0200
+++ linux-2.6-inc/include/linux/list.h 2004-10-14 02:05:30.053176848 +0200
@@ -25,12 +25,6 @@
* using the generic single-entry routines.
*/

-struct list_head {
- struct list_head *next, *prev;
-};
-
-#define LIST_HEAD_INIT(name) { &(name), &(name) }
-
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.020 / U:17.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site