lkml.org 
[lkml]   [2010]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[RFC][PATCH 4/7] jump_label: More consitent naming
    Now that there's only a few users around, rename things.

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    ---
    include/linux/jump_label.h | 8 ++++----
    kernel/tracepoint.c | 6 +++---
    lib/dynamic_debug.c | 4 ++--
    3 files changed, 9 insertions(+), 9 deletions(-)

    Index: linux-2.6/include/linux/jump_label.h
    ===================================================================
    --- linux-2.6.orig/include/linux/jump_label.h
    +++ linux-2.6/include/linux/jump_label.h
    @@ -25,10 +25,10 @@ extern void jump_label_update(unsigned l
    extern void jump_label_apply_nops(struct module *mod);
    extern int jump_label_text_reserved(void *start, void *end);

    -#define enable_jump_label(key) \
    +#define jump_label_enable(key) \
    jump_label_update((unsigned long)key, JUMP_LABEL_ENABLE);

    -#define disable_jump_label(key) \
    +#define jump_label_disable(key) \
    jump_label_update((unsigned long)key, JUMP_LABEL_DISABLE);

    #else
    @@ -39,12 +39,12 @@ do { \
    goto label; \
    } while (0)

    -#define enable_jump_label(cond_var) \
    +#define jump_label_enable(cond_var) \
    do { \
    *(cond_var) = 1; \
    } while (0)

    -#define disable_jump_label(cond_var) \
    +#define jump_label_disable(cond_var) \
    do { \
    *(cond_var) = 0; \
    } while (0)
    Index: linux-2.6/kernel/tracepoint.c
    ===================================================================
    --- linux-2.6.orig/kernel/tracepoint.c
    +++ linux-2.6/kernel/tracepoint.c
    @@ -265,10 +265,10 @@ static void set_tracepoint(struct tracep
    */
    rcu_assign_pointer(elem->funcs, (*entry)->funcs);
    if (!elem->state && active) {
    - enable_jump_label(&elem->state);
    + jump_label_enable(&elem->state);
    elem->state = active;
    } else if (elem->state && !active) {
    - disable_jump_label(&elem->state);
    + jump_label_disable(&elem->state);
    elem->state = active;
    }
    }
    @@ -285,7 +285,7 @@ static void disable_tracepoint(struct tr
    elem->unregfunc();

    if (elem->state) {
    - disable_jump_label(&elem->state);
    + jump_label_disable(&elem->state);
    elem->state = 0;
    }
    rcu_assign_pointer(elem->funcs, NULL);
    Index: linux-2.6/lib/dynamic_debug.c
    ===================================================================
    --- linux-2.6.orig/lib/dynamic_debug.c
    +++ linux-2.6/lib/dynamic_debug.c
    @@ -142,9 +142,9 @@ static void ddebug_change(const struct d
    dt->num_enabled++;
    dp->flags = newflags;
    if (newflags) {
    - enable_jump_label(&dp->enabled);
    + jump_label_enable(&dp->enabled);
    } else {
    - disable_jump_label(&dp->enabled);
    + jump_label_disable(&dp->enabled);
    }
    if (verbose)
    printk(KERN_INFO



    \
     
     \ /
      Last update: 2010-10-14 23:13    [W:0.044 / U:0.064 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site