Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19625
b: refs/heads/master
c: 490d6ab
h: refs/heads/master
i:
  19623: f639f4b
v: v3
  • Loading branch information
Zach Brown authored and Linus Torvalds committed Feb 3, 2006
1 parent 0a56e3c commit 2efb56b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bcc68b8616bcac47dbfc414398e382b3b10faf4c
refs/heads/master: 490d6ab170c94a7a59870f528d765131b8963e79
14 changes: 10 additions & 4 deletions trunk/include/linux/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ struct list_head {
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)

#define INIT_LIST_HEAD(ptr) do { \
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
static inline void INIT_LIST_HEAD(struct list_head *list)
{
list->next = list;
list->prev = list;
}

/*
* Insert a new entry between two known consecutive entries.
Expand Down Expand Up @@ -534,7 +536,11 @@ struct hlist_node {
#define HLIST_HEAD_INIT { .first = NULL }
#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }
#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
#define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL)
static inline void INIT_HLIST_NODE(struct hlist_node *h)
{
h->next = NULL;
h->pprev = NULL;
}

static inline int hlist_unhashed(const struct hlist_node *h)
{
Expand Down

0 comments on commit 2efb56b

Please sign in to comment.