Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94108
b: refs/heads/master
c: 9960257
h: refs/heads/master
v: v3
  • Loading branch information
Masami Hiramatsu authored and Linus Torvalds committed Apr 28, 2008
1 parent 1e5e666 commit 5a306eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d8d996e0ca5b4093203d3f050b0f70b5c949ae8
refs/heads/master: 99602572812442d47403d85f376ad51298dd82a6
9 changes: 9 additions & 0 deletions trunk/include/linux/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,15 @@ static inline int list_empty_careful(const struct list_head *head)
return (next == head) && (next == head->prev);
}

/**
* list_is_singular - tests whether a list has just one entry.
* @head: the list to test.
*/
static inline int list_is_singular(const struct list_head *head)
{
return !list_empty(head) && (head->next == head->prev);
}

static inline void __list_splice(struct list_head *list,
struct list_head *head)
{
Expand Down

0 comments on commit 5a306eb

Please sign in to comment.