diff options
author | John Crispin <blogic@openwrt.org> | 2013-11-18 14:15:19 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-11-18 15:25:21 +0400 |
commit | bc8167eb99bc6febc96f4dab0bbce32186f30c16 (patch) | |
tree | 91d4dbb3a0045a1ab0af58da6c3728ababf44cf3 /safe_list.c | |
parent | a34c8f6918c291275ded2b6fd9b94ac91722ded2 (diff) |
runqueue: add a function that allows adding jobs to the front of the runqueue
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'safe_list.c')
-rw-r--r-- | safe_list.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/safe_list.c b/safe_list.c index f26b4dd..16f57e0 100644 --- a/safe_list.c +++ b/safe_list.c @@ -86,6 +86,12 @@ void safe_list_add(struct safe_list *list, struct safe_list *head) list_add_tail(&list->list, &head->list); } +void safe_list_add_first(struct safe_list *list, struct safe_list *head) +{ + list->i = NULL; + list_add(&list->list, &head->list); +} + void safe_list_del(struct safe_list *list) { struct safe_list_iterator *i, *next_i, **tail; |