diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-03-04 11:51:29 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-03-04 11:51:29 +0100 |
| commit | e02c4fd3142dfb9412531bbfabd510a2a7c6ea46 (patch) | |
| tree | 61b64506b2c016e050f940a89d1ffd36b7c00fdf /include/linux/list.h | |
| parent | ae1f30384baef4056438d81b305a6a5199b0d16c (diff) | |
| parent | ac91d85456372a90af5b85eb6620fd2efb1e431b (diff) | |
Merge branch 'tip/tracing/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/urgent
Diffstat (limited to 'include/linux/list.h')
| -rw-r--r-- | include/linux/list.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index 969f6e92d089..5d9c6558e8ab 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -206,6 +206,20 @@ static inline int list_empty_careful(const struct list_head *head) } /** + * list_rotate_left - rotate the list to the left + * @head: the head of the list + */ +static inline void list_rotate_left(struct list_head *head) +{ + struct list_head *first; + + if (!list_empty(head)) { + first = head->next; + list_move_tail(first, head); + } +} + +/** * list_is_singular - tests whether a list has just one entry. * @head: the list to test. */ |
