Linked List
Linked List implementation in C
Data Structures | Typedefs | Functions
Linked_list.h File Reference

Defines the prototypes of the linked list. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
Include dependency graph for Linked_list.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  list_t
 Linked list structure definition. More...
 
struct  node_t
 Node structure definition. More...
 

Typedefs

typedef struct list_t list_t
 
typedef struct node_t node_t
 

Functions

void list_init (list_t *list, size_t dataSize)
 
void list_free (list_t *list)
 
void list_destroy (list_t *list)
 
void list_push (list_t *list, const void *data)
 
void list_push_front (list_t *list, const void *data)
 
uint8_t list_pop (list_t *list, void *data)
 
uint8_t list_pop_front (list_t *list, void *data)
 
uint8_t list_get_by_index (list_t *list, uint8_t index, void *data)
 
void list_print (list_t *list, void(*printFn)(const void *data))
 
void list_for_each (list_t *list, void(*eachFn)(const void *data, void *arg), void *arg)
 
uint8_t list_size (list_t *list)
 

Detailed Description

Defines the prototypes of the linked list.

This is the header file for the definition of the node and linked list structures and typedefs as well as the function prototypes of the methods of the linked list.

Typedef Documentation

◆ list_t

typedef struct list_t list_t

Linked list type definition

◆ node_t

typedef struct node_t node_t

Node type definition