TABLE OF CONTENTS
- 1. libram/libram_list_add
- 2. libram/libram_list_delete
- 3. libram/libram_list_first
- 4. libram/libram_list_init
- 5. libram/libram_list_printstats
- 6. libram/libram_list_remove
libram/libram_list_add [ Functions ]
[ Top ] [ libram ] [ Functions ]
NAME
libram_list_add - add node to tail of linked list
SYNOPSIS
void *libram_list_add(struct libram_list *lh, void *node)
DESCRIPTION
libram_list_add adds the node to the tail of the list.
ARGUMENTS
- lh: handle to list
- node: node to add
RETURN
- node: libram_list_add returns the node just added.
SEE ALSO
libram_list(3), libram_list_init(3), libram_list_first(3), libram_list_remove(3), libram_list_delete(3)
libram/libram_list_delete [ Functions ]
[ Top ] [ libram ] [ Functions ]
NAME
libram_list_delete - search node and delete it from list
SYNOPSIS
void *libram_list_delete(struct libram_list *lh, void *node)
DESCRIPTION
libram_list_delete searches for the node and deletes it from the list.
ARGUMENTS
- lh: handle to list
RETURN
- NULL: node not found
- else: libram_list_delete return the node searched
SEE ALSO
libram_list(3), libram_list_init(3), libram_list_first(3), libram_list_add(3), libram_list_remove(3)
libram/libram_list_first [ Functions ]
[ Top ] [ libram ] [ Functions ]
NAME
libram_list_first - returns first entry on list
SYNOPSIS
void *libram_list_first(struct libram_list *lh)
DESCRIPTION
libram_list_first returns the value of the first node of the list without removing the list. It can be used to check if the list is empty.
ARGUMENTS
- lh: handle to list
RETURN
- value: value of first node in list
- NULL: list is empty.
SEE ALSO
libram_list(3), libram_list_init(3), libram_list_add(3), libram_list_remove(3), libram_list_delete(3)
libram/libram_list_init [ Functions ]
[ Top ] [ libram ] [ Functions ]
NAME
libram_list_init - initializes an empty list
SYNOPSIS
void libram_list_init(struct libram_list *lh)
DESCRIPTION
libram_list_init initializes an empty list by setting both head and tail to NULL.
ARGUMENTS
- lh: handle to list
SEE ALSO
libram_list(3), libram_list_first(3), libram_list_add(3), libram_list_remove(3), libram_list_delete(3)
libram/libram_list_printstats [ Functions ]
[ Top ] [ libram ] [ Functions ]
NAME
libram_list_printstats - print info about list statistics
SYNOPSIS
void libram_list_printstats(struct libram_list *lh, FILE *fh)
DESCRIPTION
libram_list_printstats dumps the statistic counters of the struct libram_list to the given file handle fh.
ARGUMENTS
- lh: handle to list
- fh: file handle for output
RETURN
- NULL: node not found
- else: libram_list_delete return the node searched
SEE ALSO
libram_list(3), libram_list_init(3), libram_list_first(3), libram_list_add(3), libram_list_remove(3),
libram/libram_list_remove [ Functions ]
[ Top ] [ libram ] [ Functions ]
NAME
libram_list_remove - remove and return head (first node) of list
SYNOPSIS
void *libram_list_remove(struct libram_list *lh)
DESCRIPTION
libram_list_remove returns the value of the head and removes the head of the list of nodes.
ARGUMENTS
- lh: handle to list
RETURN
- node: head of the list
SEE ALSO
libram_list(3), libram_list_init(3), libram_list_first(3), libram_list_add(3), libram_list_remove(3), libram_list_delete(3)