Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
notifier.h File Reference
#include <linux/errno.h>
#include <linux/mutex.h>
#include <linux/rwsem.h>
#include <linux/srcu.h>

Go to the source code of this file.

Data Structures

struct  notifier_block
 
struct  atomic_notifier_head
 
struct  blocking_notifier_head
 
struct  raw_notifier_head
 
struct  srcu_notifier_head
 

Macros

#define ATOMIC_INIT_NOTIFIER_HEAD(name)
 
#define BLOCKING_INIT_NOTIFIER_HEAD(name)
 
#define RAW_INIT_NOTIFIER_HEAD(name)
 
#define srcu_cleanup_notifier_head(name)   cleanup_srcu_struct(&(name)->srcu);
 
#define ATOMIC_NOTIFIER_INIT(name)
 
#define BLOCKING_NOTIFIER_INIT(name)
 
#define RAW_NOTIFIER_INIT(name)
 
#define ATOMIC_NOTIFIER_HEAD(name)
 
#define BLOCKING_NOTIFIER_HEAD(name)
 
#define RAW_NOTIFIER_HEAD(name)
 

Functions

void srcu_init_notifier_head (struct srcu_notifier_head *nh)
 

Macro Definition Documentation

#define ATOMIC_INIT_NOTIFIER_HEAD (   name)
Value:
do { \
spin_lock_init(&(name)->lock); \
(name)->head = NULL; \
} while (0)

Definition at line 76 of file notifier.h.

#define ATOMIC_NOTIFIER_HEAD (   name)
Value:
ATOMIC_NOTIFIER_INIT(name)

Definition at line 103 of file notifier.h.

#define ATOMIC_NOTIFIER_INIT (   name)
Value:
{ \
.lock = __SPIN_LOCK_UNLOCKED(name.lock), \
.head = NULL }

Definition at line 93 of file notifier.h.

#define BLOCKING_INIT_NOTIFIER_HEAD (   name)
Value:
do { \
init_rwsem(&(name)->rwsem); \
(name)->head = NULL; \
} while (0)

Definition at line 80 of file notifier.h.

#define BLOCKING_NOTIFIER_HEAD (   name)
Value:
BLOCKING_NOTIFIER_INIT(name)

Definition at line 106 of file notifier.h.

#define BLOCKING_NOTIFIER_INIT (   name)
Value:
{ \
.head = NULL }

Definition at line 96 of file notifier.h.

#define RAW_INIT_NOTIFIER_HEAD (   name)
Value:
do { \
(name)->head = NULL; \
} while (0)

Definition at line 84 of file notifier.h.

#define RAW_NOTIFIER_HEAD (   name)
Value:
RAW_NOTIFIER_INIT(name)

Definition at line 109 of file notifier.h.

#define RAW_NOTIFIER_INIT (   name)
Value:
{ \
.head = NULL }

Definition at line 99 of file notifier.h.

#define srcu_cleanup_notifier_head (   name)    cleanup_srcu_struct(&(name)->srcu);

Definition at line 90 of file notifier.h.

Function Documentation

void srcu_init_notifier_head ( struct srcu_notifier_head nh)

srcu_init_notifier_head - Initialize an SRCU notifier head : Pointer to head of the srcu notifier chain

Unlike other sorts of notifier heads, SRCU notifier heads require dynamic initialization. Be sure to call this routine before calling any of the other SRCU notifier routines for this head.

If an SRCU notifier head is deallocated, it must first be cleaned up by calling srcu_cleanup_notifier_head(). Otherwise the head's per-cpu data (used by the SRCU mechanism) will leak.

Definition at line 519 of file notifier.c.