• Andrew Morton's avatar
    [PATCH] Add printk_timed_ratelimit() · f46c4833
    Andrew Morton authored
    printk_ratelimit() has global state which makes it not useful for callers
    which wish to perform ratelimiting at a particular frequency.
    
    Add a printk_timed_ratelimit() which utilises caller-provided state storage to
    permit more flexibility.
    
    This function can in fact be used for things other than printk ratelimiting
    and is perhaps poorly named.
    
    Cc: Ulrich Drepper <drepper@redhat.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    f46c4833
printk.c 27.9 KB