XenevaOS
Loading...
Searching...
No Matches
Classes | Macros
list_nulls.h File Reference
#include <linux/poison.h>
#include <linux/const.h>
Include dependency graph for list_nulls.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hlist_nulls_head
 
struct  hlist_nulls_node
 

Macros

#define NULLS_MARKER(value)   (1UL | (((long)value) << 1))
 
#define INIT_HLIST_NULLS_HEAD(ptr, nulls)    ((ptr)->first = (struct hlist_nulls_node *) NULLS_MARKER(nulls))
 
#define HLIST_NULLS_HEAD_INIT(nulls)   {.first = (struct hlist_nulls_node *)NULLS_MARKER(nulls)}
 
#define hlist_nulls_entry(ptr, type, member)   container_of(ptr,type,member)
 
#define hlist_nulls_entry_safe(ptr, type, member)
 
#define hlist_nulls_for_each_entry(tpos, pos, head, member)
 
#define hlist_nulls_for_each_entry_from(tpos, pos, member)
 

Macro Definition Documentation

◆ hlist_nulls_entry

#define hlist_nulls_entry (   ptr,
  type,
  member 
)    container_of(ptr,type,member)

◆ hlist_nulls_entry_safe

#define hlist_nulls_entry_safe (   ptr,
  type,
  member 
)
Value:
({ typeof(ptr) ____ptr = (ptr); \
!is_a_nulls(____ptr) ? hlist_nulls_entry(____ptr, type, member) : NULL; \
})
#define NULL
Definition actypes.h:561
#define hlist_nulls_entry(ptr, type, member)
Definition list_nulls.h:33

◆ hlist_nulls_for_each_entry

#define hlist_nulls_for_each_entry (   tpos,
  pos,
  head,
  member 
)
Value:
for (pos = (head)->first; \
(!is_a_nulls(pos)) && \
({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1;}); \
pos = pos->next)
int const struct list_head const struct list_head struct list_head * head
Definition list_sort.h:13

hlist_nulls_for_each_entry - iterate over list of given type @tpos: the type * to use as a loop cursor. @pos: the &struct hlist_node to use as a loop cursor. @head: the head for your list. @member: the name of the hlist_node within the struct.

◆ hlist_nulls_for_each_entry_from

#define hlist_nulls_for_each_entry_from (   tpos,
  pos,
  member 
)
Value:
for (; (!is_a_nulls(pos)) && \
({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1;}); \
pos = pos->next)

hlist_nulls_for_each_entry_from - iterate over a hlist continuing from current point @tpos: the type * to use as a loop cursor. @pos: the &struct hlist_node to use as a loop cursor. @member: the name of the hlist_node within the struct.

◆ HLIST_NULLS_HEAD_INIT

#define HLIST_NULLS_HEAD_INIT (   nulls)    {.first = (struct hlist_nulls_node *)NULLS_MARKER(nulls)}

◆ INIT_HLIST_NULLS_HEAD

#define INIT_HLIST_NULLS_HEAD (   ptr,
  nulls 
)     ((ptr)->first = (struct hlist_nulls_node *) NULLS_MARKER(nulls))

◆ NULLS_MARKER

#define NULLS_MARKER (   value)    (1UL | (((long)value) << 1))