Search code examples
clistpointersnomenclature

What is a linked list that defines no data storage called?


I'm using singly linked lists, in C, without the pointer to the node value. So, instead of:

struct _node 
{
  struct _node * next;
  void* value;
} node;

I have

struct _node 
{
   struct _node * next;
} node;

Is there a special name for lists like that?

EDIT:

Just to explain why these lists are useful (I really don't understand why the downvotes):

struct 
{
  node node;
  int i;
} s;

When I do this, I'm forcing struct s to have a node, but without having to set the void* value.

I'm using this scheme to save my tasks information, which will be on a FIFO list.


Solution

  • This is how the linux kernel implements linked lists for example. Check out this link or this link or many others describing their linked list implementation

    As to your actual question, I don't believe that there is an actual name to that pattern. It's simply a way of doing a generic linked list in C.