Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

/projects/cubeos/src_current/kernel/list.h

Go to the documentation of this file.
00001 /*  src/kernel/list.h
00002     CubeOS Version 0.4.90
00003     Copyright (C) 1999,2000 Holger Kenn
00004 
00005     CubeOS is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or any later version.
00009 
00010     CubeOS is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015 */  
00016 /* basic list handling */
00017 
00018 #ifndef _LIST_H
00019 #define _LIST_H
00020 
00025 #define LIST_TYPE_USER 0
00026 #define LIST_TYPE_SYS 1
00027 #define LIST_TYPE_PRIO 2
00028 
00029 typedef struct list_s list;
00030 typedef struct entry_s entry;
00031 
00035 struct entry_s {
00036 list * list;  
00037 entry * prev; 
00038 entry * next; 
00039 void * data;  
00040 int len;      
00041 } ;
00042 
00046 struct list_s
00047 {
00048 entry * head; 
00049 entry * tail; 
00050 int entries;  
00051 int type;     
00052 };
00053 
00054 entry *LIST_head(list *l);
00055 entry *LIST_tail(list *l);
00056 int LIST_entries(list *l);
00057 void LIST_init(list * l);
00058 void LIST_insert_after(entry * e,entry *x);
00059 void LIST_insert_before(entry * e,entry *x);
00060 void LIST_insert_head(list *l,entry *e);
00061 void LIST_insert_tail(list *l,entry *e);
00062 void LIST_delete(entry *e);
00063 void LIST_makeentry(entry *e);
00064 
00065 #endif

Generated on Thu Feb 20 15:38:44 2003 for cubeOS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002