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

Go to the source code of this file.

Data Structures

struct  fprop_global
 
struct  fprop_local_single
 
struct  fprop_local_percpu
 

Macros

#define FPROP_FRAC_SHIFT   10
 
#define FPROP_FRAC_BASE   (1UL << FPROP_FRAC_SHIFT)
 
#define INIT_FPROP_LOCAL_SINGLE(name)
 

Functions

int fprop_global_init (struct fprop_global *p)
 
void fprop_global_destroy (struct fprop_global *p)
 
bool fprop_new_period (struct fprop_global *p, int periods)
 
int fprop_local_init_single (struct fprop_local_single *pl)
 
void fprop_local_destroy_single (struct fprop_local_single *pl)
 
void __fprop_inc_single (struct fprop_global *p, struct fprop_local_single *pl)
 
void fprop_fraction_single (struct fprop_global *p, struct fprop_local_single *pl, unsigned long *numerator, unsigned long *denominator)
 
int fprop_local_init_percpu (struct fprop_local_percpu *pl)
 
void fprop_local_destroy_percpu (struct fprop_local_percpu *pl)
 
void __fprop_inc_percpu (struct fprop_global *p, struct fprop_local_percpu *pl)
 
void __fprop_inc_percpu_max (struct fprop_global *p, struct fprop_local_percpu *pl, int max_frac)
 
void fprop_fraction_percpu (struct fprop_global *p, struct fprop_local_percpu *pl, unsigned long *numerator, unsigned long *denominator)
 

Macro Definition Documentation

#define FPROP_FRAC_BASE   (1UL << FPROP_FRAC_SHIFT)

Definition at line 21 of file flex_proportions.h.

#define FPROP_FRAC_SHIFT   10

Definition at line 20 of file flex_proportions.h.

#define INIT_FPROP_LOCAL_SINGLE (   name)
Value:
{ .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
}

Definition at line 50 of file flex_proportions.h.

Function Documentation

void __fprop_inc_percpu ( struct fprop_global p,
struct fprop_local_percpu pl 
)

Definition at line 219 of file flex_proportions.c.

void __fprop_inc_percpu_max ( struct fprop_global p,
struct fprop_local_percpu pl,
int  max_frac 
)

Definition at line 258 of file flex_proportions.c.

void __fprop_inc_single ( struct fprop_global p,
struct fprop_local_single pl 
)

Definition at line 130 of file flex_proportions.c.

void fprop_fraction_percpu ( struct fprop_global p,
struct fprop_local_percpu pl,
unsigned long numerator,
unsigned long denominator 
)

Definition at line 226 of file flex_proportions.c.

void fprop_fraction_single ( struct fprop_global p,
struct fprop_local_single pl,
unsigned long numerator,
unsigned long denominator 
)

Definition at line 138 of file flex_proportions.c.

void fprop_global_destroy ( struct fprop_global p)

Definition at line 50 of file flex_proportions.c.

int fprop_global_init ( struct fprop_global p)

Definition at line 37 of file flex_proportions.c.

void fprop_local_destroy_percpu ( struct fprop_local_percpu pl)

Definition at line 183 of file flex_proportions.c.

void fprop_local_destroy_single ( struct fprop_local_single pl)

Definition at line 101 of file flex_proportions.c.

int fprop_local_init_percpu ( struct fprop_local_percpu pl)

Definition at line 171 of file flex_proportions.c.

int fprop_local_init_single ( struct fprop_local_single pl)

Definition at line 93 of file flex_proportions.c.

bool fprop_new_period ( struct fprop_global p,
int  periods 
)

Definition at line 63 of file flex_proportions.c.