Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

static_list.h

Go to the documentation of this file.
00001 #ifndef __STATIC_LIST_H 
00002 #define __STATIC_LIST_H 
00003 
00004 #include <stdlib.h>
00005 #include <stdio.h>
00006 #include <unistd.h>
00007 #include <pthread.h>
00008 
00009 
00010 struct static_list{
00011    size_t elements;
00012    void **head_of_list; 
00013    pthread_mutex_t list_mutex;
00014 };
00015 typedef struct static_list static_list;
00016 
00017 
00018 int static_list_init(static_list **new_static_list, 
00019                                       size_t elements);
00020 
00021 void static_list_destroy(static_list *list_to_destroy);
00022         
00023 int static_list_insert(static_list *new_static_list,
00024                                           void *pntr_to_add);
00025 
00026 int static_list_remove(static_list *new_static_list, void *pntr_to_del);
00027 
00028 void *static_list_rand_search(static_list *new_static_list,
00029                                                 int (generic_search)());
00030 
00031 
00032 
00033 #endif

Generated on Wed Nov 10 00:26:48 2004 for alsad by doxygen 1.3.6