Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
heartbeat.h File Reference

Go to the source code of this file.

Data Structures

struct  r2hb_callback_func
 

Macros

#define R2HB_REGION_TIMEOUT_MS   2000
 
#define R2HB_MAX_REGION_NAME_LEN   32
 
#define R2HB_LIVE_THRESHOLD   2
 
#define R2HB_DEFAULT_DEAD_THRESHOLD   31
 
#define R2HB_MIN_DEAD_THRESHOLD   2
 
#define R2HB_MAX_WRITE_TIMEOUT_MS   (R2HB_REGION_TIMEOUT_MS * (r2hb_dead_threshold - 1))
 
#define R2HB_CB_MAGIC   0x51d1e4ec
 

Typedefs

typedef voidr2hb_cb_func )(struct r2nm_node *, int, void *)
 

Enumerations

enum  r2hb_callback_type { R2HB_NODE_DOWN_CB = 0, R2HB_NODE_UP_CB, R2HB_NUM_CB }
 

Functions

struct config_groupr2hb_alloc_hb_set (void)
 
void r2hb_free_hb_set (struct config_group *group)
 
void r2hb_setup_callback (struct r2hb_callback_func *hc, enum r2hb_callback_type type, r2hb_cb_func *func, void *data, int priority)
 
int r2hb_register_callback (const char *region_uuid, struct r2hb_callback_func *hc)
 
void r2hb_unregister_callback (const char *region_uuid, struct r2hb_callback_func *hc)
 
void r2hb_fill_node_map (unsigned long *map, unsigned bytes)
 
void r2hb_exit (void)
 
int r2hb_init (void)
 
int r2hb_check_node_heartbeating_from_callback (u8 node_num)
 
void r2hb_stop_all_regions (void)
 
int r2hb_get_all_regions (char *region_uuids, u8 numregions)
 
int r2hb_global_heartbeat_active (void)
 
void r2hb_manual_set_node_heartbeating (int)
 

Variables

unsigned int r2hb_dead_threshold
 

Macro Definition Documentation

#define R2HB_CB_MAGIC   0x51d1e4ec

Definition at line 44 of file heartbeat.h.

#define R2HB_DEFAULT_DEAD_THRESHOLD   31

Definition at line 38 of file heartbeat.h.

#define R2HB_LIVE_THRESHOLD   2

Definition at line 35 of file heartbeat.h.

#define R2HB_MAX_REGION_NAME_LEN   32

Definition at line 32 of file heartbeat.h.

#define R2HB_MAX_WRITE_TIMEOUT_MS   (R2HB_REGION_TIMEOUT_MS * (r2hb_dead_threshold - 1))

Definition at line 41 of file heartbeat.h.

#define R2HB_MIN_DEAD_THRESHOLD   2

Definition at line 40 of file heartbeat.h.

#define R2HB_REGION_TIMEOUT_MS   2000

Definition at line 30 of file heartbeat.h.

Typedef Documentation

typedef void( r2hb_cb_func)(struct r2nm_node *, int, void *)

Definition at line 54 of file heartbeat.h.

Enumeration Type Documentation

Enumerator:
R2HB_NODE_DOWN_CB 
R2HB_NODE_UP_CB 
R2HB_NUM_CB 

Definition at line 47 of file heartbeat.h.

Function Documentation

struct config_group* r2hb_alloc_hb_set ( void  )
read

Definition at line 317 of file heartbeat.c.

int r2hb_check_node_heartbeating_from_callback ( u8  node_num)

Definition at line 425 of file heartbeat.c.

void r2hb_exit ( void  )

Definition at line 93 of file heartbeat.c.

void r2hb_fill_node_map ( unsigned long map,
unsigned  bytes 
)

Definition at line 121 of file heartbeat.c.

void r2hb_free_hb_set ( struct config_group group)

Definition at line 336 of file heartbeat.c.

int r2hb_get_all_regions ( char region_uuids,
u8  numregions 
)
int r2hb_global_heartbeat_active ( void  )

Definition at line 450 of file heartbeat.c.

int r2hb_init ( void  )

Definition at line 97 of file heartbeat.c.

void r2hb_manual_set_node_heartbeating ( int  )

Definition at line 457 of file heartbeat.c.

int r2hb_register_callback ( const char region_uuid,
struct r2hb_callback_func hc 
)

Definition at line 367 of file heartbeat.c.

void r2hb_setup_callback ( struct r2hb_callback_func hc,
enum r2hb_callback_type  type,
r2hb_cb_func func,
void data,
int  priority 
)

Definition at line 352 of file heartbeat.c.

void r2hb_stop_all_regions ( void  )

Definition at line 441 of file heartbeat.c.

void r2hb_unregister_callback ( const char region_uuid,
struct r2hb_callback_func hc 
)

Definition at line 405 of file heartbeat.c.

Variable Documentation

unsigned int r2hb_dead_threshold

Definition at line 62 of file heartbeat.c.