Skip to content

Commit

Permalink
async: use list_move_tail
Browse files Browse the repository at this point in the history
list.h provides a dedicated primitive for
"list_del followed by list_add_tail"... list_move_tail.

Signed-off-by: Arjan van de Ven <[email protected]>
Signed-off-by: Stefan Richter <[email protected]>
  • Loading branch information
Stefan Richter authored and fenrus75 committed Feb 8, 2009
1 parent 766ccb9 commit f7de762
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ static void run_one_entry(void)
entry = list_first_entry(&async_pending, struct async_entry, list);

/* 2) move it to the running queue */
list_del(&entry->list);
list_add_tail(&entry->list, entry->running);
list_move_tail(&entry->list, entry->running);
spin_unlock_irqrestore(&async_lock, flags);

/* 3) run it (and print duration)*/
Expand Down

0 comments on commit f7de762

Please sign in to comment.