patch-2.1.69 linux/include/linux/list.h

Next file: linux/include/linux/tty.h
Previous file: linux/include/linux/dcache.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.68/linux/include/linux/list.h linux/include/linux/list.h
@@ -1,6 +1,8 @@
 #ifndef _LINUX_LIST_H
 #define _LINUX_LIST_H
 
+#ifdef __KERNEL__
+
 /*
  * Simple doubly linked list implementation.
  *
@@ -28,7 +30,7 @@
  * This is only for internal list manipulation where we know
  * the prev/next entries already!
  */
-static inline void __list_add(struct list_head * new,
+static __inline__ void __list_add(struct list_head * new,
 	struct list_head * prev,
 	struct list_head * next)
 {
@@ -41,7 +43,7 @@
 /*
  * Insert a new entry after the specified head..
  */
-static inline void list_add(struct list_head *new, struct list_head *head)
+static __inline__ void list_add(struct list_head *new, struct list_head *head)
 {
 	__list_add(new, head, head->next);
 }
@@ -53,18 +55,19 @@
  * This is only for internal list manipulation where we know
  * the prev/next entries already!
  */
-static inline void __list_del(struct list_head * prev, struct list_head * next)
+static __inline__ void __list_del(struct list_head * prev,
+				  struct list_head * next)
 {
 	next->prev = prev;
 	prev->next = next;
 }
 
-static inline void list_del(struct list_head *entry)
+static __inline__ void list_del(struct list_head *entry)
 {
 	__list_del(entry->prev, entry->next);
 }
 
-static inline int list_empty(struct list_head *head)
+static __inline__ int list_empty(struct list_head *head)
 {
 	return head->next == head;
 }
@@ -72,7 +75,7 @@
 /*
  * Splice in "list" into "head"
  */
-static inline void list_splice(struct list_head *list, struct list_head *head)
+static __inline__ void list_splice(struct list_head *list, struct list_head *head)
 {
 	struct list_head *first = list->next;
 
@@ -90,5 +93,7 @@
 
 #define list_entry(ptr, type, member) \
 	((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
+
+#endif /* __KERNEL__ */
 
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov