Coda Distributed File System
Classes | Macros | Functions
dllist.h File Reference
#include "coda_offsetof.h"
Include dependency graph for dllist.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dllist_head
 

Macros

#define INIT_LIST_HEAD(name)   struct dllist_head name = { &name, &name }
 
#define list_entry(ptr, type, member)    ((type *)((char *)(ptr) - offsetof(type, member)))
 
#define list_entry_plusplus(ptr, type, member)    ((type *)((char *)(ptr) - coda_offsetof(type, member)))
 
#define list_for_each(ptr, head)    for (ptr = (head).next; ptr != &(head); ptr = ptr->next)
 

Functions

int list_empty (struct dllist_head *head)
 
void list_del (struct dllist_head *entry)
 
void list_add (struct dllist_head *entry, struct dllist_head *head)
 
void list_head_init (struct dllist_head *ptr)
 

Macro Definition Documentation

◆ INIT_LIST_HEAD

#define INIT_LIST_HEAD (   name)    struct dllist_head name = { &name, &name }

◆ list_entry

#define list_entry (   ptr,
  type,
  member 
)     ((type *)((char *)(ptr) - offsetof(type, member)))

◆ list_entry_plusplus

#define list_entry_plusplus (   ptr,
  type,
  member 
)     ((type *)((char *)(ptr) - coda_offsetof(type, member)))

◆ list_for_each

#define list_for_each (   ptr,
  head 
)     for (ptr = (head).next; ptr != &(head); ptr = ptr->next)

Function Documentation

◆ list_add()

void list_add ( struct dllist_head entry,
struct dllist_head head 
)

◆ list_del()

void list_del ( struct dllist_head entry)

◆ list_empty()

int list_empty ( struct dllist_head head)

◆ list_head_init()

void list_head_init ( struct dllist_head ptr)