Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ratelimit.h File Reference
#include <linux/param.h>
#include <linux/spinlock.h>

Go to the source code of this file.

Data Structures

struct  ratelimit_state
 

Macros

#define DEFAULT_RATELIMIT_INTERVAL   (5 * HZ)
 
#define DEFAULT_RATELIMIT_BURST   10
 
#define DEFINE_RATELIMIT_STATE(name, interval_init, burst_init)
 
#define __ratelimit(state)   ___ratelimit(state, __func__)
 
#define WARN_ON_RATELIMIT(condition, state)   WARN_ON(condition)
 
#define WARN_RATELIMIT(condition, format,...)
 

Functions

int ___ratelimit (struct ratelimit_state *rs, const char *func)
 

Variables

struct ratelimit_state printk_ratelimit_state
 

Macro Definition Documentation

#define __ratelimit (   state)    ___ratelimit(state, __func__)

Definition at line 42 of file ratelimit.h.

#define DEFAULT_RATELIMIT_BURST   10

Definition at line 8 of file ratelimit.h.

#define DEFAULT_RATELIMIT_INTERVAL   (5 * HZ)

Definition at line 7 of file ratelimit.h.

#define DEFINE_RATELIMIT_STATE (   name,
  interval_init,
  burst_init 
)
Value:
.lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
.interval = interval_init, \
.burst = burst_init, \
}

Definition at line 20 of file ratelimit.h.

#define WARN_ON_RATELIMIT (   condition,
  state 
)    WARN_ON(condition)

Definition at line 64 of file ratelimit.h.

#define WARN_RATELIMIT (   condition,
  format,
  ... 
)
Value:
({ \
int rtn = WARN(condition, format, ##__VA_ARGS__); \
rtn; \
})

Definition at line 67 of file ratelimit.h.

Function Documentation

int ___ratelimit ( struct ratelimit_state rs,
const char func 
)

Definition at line 28 of file ratelimit.c.

Variable Documentation

struct ratelimit_state printk_ratelimit_state