#ifndef _ATALK_LIST_H
#define _ATALK_LIST_H
-/* test for inline */
-#ifndef __inline__
-#define __inline__
-#endif
-
/*
* Simple doubly linked list implementation.
*
* 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)
{
* Insert a new entry after the specified head.
* This is good for implementing stacks.
*/
-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);
}
* Insert a new entry before the specified head.
* This is useful for implementing queues.
*/
-static __inline__ void list_add_tail(struct list_head *new, struct list_head *head)
+static inline void list_add_tail(struct list_head *new, struct list_head *head)
{
__list_add(new, head->prev, head);
}
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
-static __inline__ void __list_del(struct list_head * prev,
+static inline void __list_del(struct list_head * prev,
struct list_head * next)
{
next->prev = prev;
* @entry: the element to delete from the list.
* Note: list_empty on entry does not return true after this, the entry is in an undefined state.
*/
-static __inline__ void list_del(struct list_head *entry)
+static inline void list_del(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
}
* list_del_init - deletes entry from list and reinitialize it.
* @entry: the element to delete from the list.
*/
-static __inline__ void list_del_init(struct list_head *entry)
+static inline void list_del_init(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
ATALK_INIT_LIST_HEAD(entry);
* list_empty - tests whether a list is empty
* @head: the list to test.
*/
-static __inline__ int list_empty(struct list_head *head)
+static inline int list_empty(struct list_head *head)
{
return head->next == head;
}
* @list: the new list to add.
* @head: the place to add it in the first list.
*/
-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;