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

Go to the source code of this file.

Data Structures

struct  lglock
 

Macros

#define br_lock_init(name)   lg_lock_init(name, #name)
 
#define br_read_lock(name)   lg_local_lock(name)
 
#define br_read_unlock(name)   lg_local_unlock(name)
 
#define br_write_lock(name)   lg_global_lock(name)
 
#define br_write_unlock(name)   lg_global_unlock(name)
 
#define DEFINE_BRLOCK(name)   DEFINE_LGLOCK(name)
 
#define DEFINE_STATIC_BRLOCK(name)   DEFINE_STATIC_LGLOCK(name)
 
#define LOCKDEP_INIT_MAP(a, b, c, d)
 
#define DEFINE_LGLOCK(name)
 
#define DEFINE_STATIC_LGLOCK(name)
 

Functions

void lg_lock_init (struct lglock *lg, char *name)
 
void lg_local_lock (struct lglock *lg)
 
void lg_local_unlock (struct lglock *lg)
 
void lg_local_lock_cpu (struct lglock *lg, int cpu)
 
void lg_local_unlock_cpu (struct lglock *lg, int cpu)
 
void lg_global_lock (struct lglock *lg)
 
void lg_global_unlock (struct lglock *lg)
 

Macro Definition Documentation

#define br_lock_init (   name)    lg_lock_init(name, #name)

Definition at line 29 of file lglock.h.

#define br_read_lock (   name)    lg_local_lock(name)

Definition at line 30 of file lglock.h.

#define br_read_unlock (   name)    lg_local_unlock(name)

Definition at line 31 of file lglock.h.

#define br_write_lock (   name)    lg_global_lock(name)

Definition at line 32 of file lglock.h.

#define br_write_unlock (   name)    lg_global_unlock(name)

Definition at line 33 of file lglock.h.

#define DEFINE_BRLOCK (   name)    DEFINE_LGLOCK(name)

Definition at line 35 of file lglock.h.

#define DEFINE_LGLOCK (   name)
Value:
static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \
struct lglock name = { .lock = &name ## _lock }

Definition at line 52 of file lglock.h.

#define DEFINE_STATIC_BRLOCK (   name)    DEFINE_STATIC_LGLOCK(name)

Definition at line 36 of file lglock.h.

#define DEFINE_STATIC_LGLOCK (   name)
Value:
static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \
static struct lglock name = { .lock = &name ## _lock }

Definition at line 57 of file lglock.h.

#define LOCKDEP_INIT_MAP (   a,
  b,
  c,
  d 
)

Definition at line 41 of file lglock.h.

Function Documentation

void lg_global_lock ( struct lglock lg)

Definition at line 63 of file lglock.c.

void lg_global_unlock ( struct lglock lg)

Definition at line 77 of file lglock.c.

void lg_local_lock ( struct lglock lg)

Definition at line 19 of file lglock.c.

void lg_local_lock_cpu ( struct lglock lg,
int  cpu 
)

Definition at line 41 of file lglock.c.

void lg_local_unlock ( struct lglock lg)

Definition at line 30 of file lglock.c.

void lg_local_unlock_cpu ( struct lglock lg,
int  cpu 
)

Definition at line 52 of file lglock.c.

void lg_lock_init ( struct lglock lg,
char name 
)

Definition at line 13 of file lglock.c.