- *
- * This file is just holds extra declarations used during development.
- * Most of these are from kernel includes placed here so we can use them in
- * applications.
- *
- * $Id: devextras.h,v 1.1 2004-11-03 08:14:07 charles Exp $
- *
- */
-
-#ifndef __EXTRAS_H__
-#define __EXTRAS_H__
-
-#if defined WIN32
-#define __inline__ __inline
-#define new newHack
-#endif
-
-#if !(defined __KERNEL__) || (defined WIN32)
-
-// User space defines
-
-typedef unsigned char __u8;
-typedef unsigned short __u16;
-typedef unsigned __u32;
-
-
-/*
- * Simple doubly linked list implementation.
- *
- * Some of the internal functions ("__xxx") are useful when
- * manipulating whole lists rather than single entries, as
- * sometimes we already know the next/prev entries and we can
- * generate better code by using them directly rather than
- * using the generic single-entry routines.
- */
-
- #define prefetch(x) 1
-
-
-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)
-
-#define INIT_LIST_HEAD(ptr) do { \
- (ptr)->next = (ptr); (ptr)->prev = (ptr); \
-} while (0)
-
-/*
- * Insert a new entry between two known consecutive entries.
- *
- * This is only for internal list manipulation where we know
- * the prev/next entries already!
- */
-static __inline__ void __list_add(struct list_head * new,
- struct list_head * prev,
- struct list_head * next)
-{
- next->prev = new;
- new->next = next;
- new->prev = prev;
- prev->next = new;
-}
-
-/**
- * list_add - add a new entry
- * @new: new entry to be added
- * @head: list head to add it after
- *
- * Insert a new entry after the specified head.
- * This is good for implementing stacks.