FreeRTOS Emulator with SDL2 Based Graphics and Input Library  1.0
A POSIX wrapper to run FreeRTOS on an x86 machine with some basic input and output libraries aimed at making teaching FreeRTOS simpler.
Simple Linked List Implementation

A simple linked list implementation inspired from the Linux kernel. More...

Classes

struct  list_item
 

Macros

#define ll_get_container(ptr, type, member)    ((type*)((void*)ptr - ((size_t) & ((type*)0)->member)))
 
#define ll_get_first_container(head, type, member)    ll_get_container(head.next, type, member)
 
#define ll_get_last_container(head, type, member)    ll_get_container(head.prev, type, member)
 
#define ll_get_next_container(container_ptr, type, member)    ll_get_container(container_ptr->member.next, type, member)
 
#define ll_get_prev_container(container_ptr, type, member)    ll_get_container(container_ptr->member.prev, type, member)
 
#define ll_del_free(ptr, type, member)    ll_del(ptr); free(ll_get_container(ptr, type, member));
 

Detailed Description

A simple linked list implementation inspired from the Linux kernel.

Macro Definition Documentation

◆ ll_del_free

#define ll_del_free (   ptr,
  type,
  member 
)     ll_del(ptr); free(ll_get_container(ptr, type, member));

◆ ll_get_container

#define ll_get_container (   ptr,
  type,
  member 
)     ((type*)((void*)ptr - ((size_t) & ((type*)0)->member)))

◆ ll_get_first_container

#define ll_get_first_container (   head,
  type,
  member 
)     ll_get_container(head.next, type, member)

◆ ll_get_last_container

#define ll_get_last_container (   head,
  type,
  member 
)     ll_get_container(head.prev, type, member)

◆ ll_get_next_container

#define ll_get_next_container (   container_ptr,
  type,
  member 
)     ll_get_container(container_ptr->member.next, type, member)

◆ ll_get_prev_container

#define ll_get_prev_container (   container_ptr,
  type,
  member 
)     ll_get_container(container_ptr->member.prev, type, member)