lkml.org 
[lkml]   [2011]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 6/5] llist: Add llist_next()
    From
    Date
    Subject: llist: Add llist_next()
    From: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Date: Mon Sep 12 13:12:28 CEST 2011

    So we don't have to expose the struct list_node members

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    ---
    include/linux/llist.h | 5 +++++
    kernel/irq_work.c | 2 +-
    2 files changed, 6 insertions(+), 1 deletion(-)
    Index: linux-2.6/include/linux/llist.h
    ===================================================================
    --- linux-2.6.orig/include/linux/llist.h
    +++ linux-2.6/include/linux/llist.h
    @@ -144,6 +144,11 @@ static inline bool llist_empty(const str
    return ACCESS_ONCE(head->first) == NULL;
    }

    +static inline struct llist_node *llist_next(struct llist_node *node)
    +{
    + return node->next;
    +}
    +
    /**
    * llist_add - add a new entry
    * @new: new entry to be added
    Index: linux-2.6/kernel/irq_work.c
    ===================================================================
    --- linux-2.6.orig/kernel/irq_work.c
    +++ linux-2.6/kernel/irq_work.c
    @@ -110,7 +110,7 @@ void irq_work_run(void)
    while (llnode != NULL) {
    work = llist_entry(llnode, struct irq_work, llnode);

    - llnode = llnode->next;
    + llnode = llist_next(llnode);

    /*
    * Clear the PENDING bit, after this point the @work


    \
     
     \ /
      Last update: 2011-09-12 16:09    [W:3.194 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site