OpenFPGA/vpr7_x2p/libarchfpgavpr7/SRC/linkedlist.h

37 lines
683 B
C
Raw Normal View History

2018-07-26 12:28:21 -05:00
#ifndef LINKEDLIST_H
#define LINKEDLIST_H
2019-10-24 22:01:11 -05:00
#include "util.h"
2018-07-26 12:28:21 -05:00
/*General Purpose Linked List*/
typedef struct s_llist t_llist;
struct s_llist
{
void* dptr;
t_llist* next;
};
/***** Subroutines *****/
t_llist* create_llist(int len);
t_llist* insert_llist_node(t_llist* cur);
t_llist* insert_llist_node_before_head(t_llist* old_head);
void remove_llist_node(t_llist* cur);
t_llist* cat_llists(t_llist* head1,
t_llist* head2);
t_llist* search_llist_tail(t_llist* head);
int find_length_llist(t_llist* head);
2018-09-17 12:25:54 -05:00
boolean check_dptr_exist_in_llist(t_llist* head, void* data_ptr);
2018-07-26 12:28:21 -05:00
void free_llist(t_llist* head);
t_llist* reverse_llist(t_llist* head);
#endif