list.h 639 Bytes
Newer Older
Benoit Steiner's avatar
Benoit Steiner committed
1 2 3 4 5 6 7 8 9 10
/* VideoLAN VLANbridge: List management module
 *
 * Definition file
 *
 * You need to include "performer.h" before this file
*/


#ifndef _LIST_H
#define _LIST_H
Benoit Steiner's avatar
Benoit Steiner committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30


struct cell
{ struct cell *next;
  struct cell *previous;
  struct s_performer *performer;
};

struct list
{ int size;
  struct cell first; /* Not used to store datas but to improve performance */
  struct cell last;  /* id */
};

struct list * create_list ();
void destroy_list ();

int add_to_list (struct list *l, struct s_performer* p);
int delete_from_list (struct list *l, pthread_t id);
int find_in_list (struct list *l, pthread_t id, struct cell **answer);
Benoit Steiner's avatar
Benoit Steiner committed
31 32 33


#endif