types.h
changeset 117 1c213cbf9da9
parent 116 4ec6e2a55c34
child 118 832743d47157
     1.1 --- a/types.h	Fri Feb 08 11:19:36 2008 -0500
     1.2 +++ b/types.h	Fri Feb 08 14:39:34 2008 -0500
     1.3 @@ -13,14 +13,26 @@
     1.4  void *array_add(struct array *array, int size);
     1.5  
     1.6  
     1.7 -void list_init(uint32_t *list);
     1.8 -void list_set(uint32_t *list, struct array *pool, struct array *items);
     1.9 -uint32_t *list_first(uint32_t *list, struct array *pool);
    1.10 -uint32_t *list_next(uint32_t *list);
    1.11 +struct list_head {
    1.12 +	uint list_ptr : 30;
    1.13 +	uint flags    : 2;
    1.14 +};
    1.15 +
    1.16 +struct list {
    1.17 +	uint data  : 30;
    1.18 +	uint flags : 2;
    1.19 +};
    1.20 +
    1.21 +void list_set_empty(struct list_head *head);
    1.22 +void list_set_ptr(struct list_head *head, uint32_t ptr);
    1.23 +void list_set_array(struct list_head *head, struct array *pool, struct array *items);
    1.24 +
    1.25 +struct list *list_first(struct list_head *head, struct array *pool);
    1.26 +struct list *list_next(struct list *list);
    1.27 +
    1.28  void list_remap_pool(struct array *pool, uint32_t *map);
    1.29 -void list_remap_if_immediate(uint32_t *list, uint32_t *map);
    1.30 -#define LIST_VALUE(list) (*(list) & RAZOR_ENTRY_MASK)
    1.31 -#define LIST_FLAGS(list) (*(list) & ~RAZOR_ENTRY_MASK)
    1.32 +void list_remap_head(struct list_head *list, uint32_t *map);
    1.33 +
    1.34  
    1.35  struct hashtable {
    1.36  	struct array buckets;