/*
* YAFFS: Yet another Flash File System . A NAND-flash specific file system.
*
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Charles Manning <charles@aleph1.co.uk>
#define __YAFFS_LIST_H__
-#include "yportenv.h"
-
/*
* This is a simple doubly linked list implementation that matches the
* way the Linux kernel doubly linked list implementation works.
/* Add an element to a list */
-static Y_INLINE void list_add(struct list_head *new_entry,
+static inline void list_add(struct list_head *new_entry,
struct list_head *list)
{
struct list_head *list_next = list->next;
}
-static Y_INLINE void list_add_tail(struct list_head *new_entry,
+static inline void list_add_tail(struct list_head *new_entry,
struct list_head *list)
{
struct list_head *list_prev = list->prev;
/* Take an element out of its current list, with or without
* reinitialising the links.of the entry*/
-static Y_INLINE void list_del(struct list_head *entry)
+static inline void list_del(struct list_head *entry)
{
struct list_head *list_next = entry->next;
struct list_head *list_prev = entry->prev;
}
-static Y_INLINE void list_del_init(struct list_head *entry)
+static inline void list_del_init(struct list_head *entry)
{
list_del(entry);
entry->next = entry->prev = entry;
/* Test if the list is empty */
-static Y_INLINE int list_empty(struct list_head *entry)
+static inline int list_empty(struct list_head *entry)
{
return (entry->next == entry);
}
#define list_for_each_safe(itervar, save_var, list) \
for (itervar = (list)->next, save_var = (list)->next->next; \
- itervar != (list); itervar = save_var, save_var = save_var->next)
+ itervar != (list); \
+ itervar = save_var, save_var = save_var->next)
#endif