Rename totem_new_msg_signal() to something more generic.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2553 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Angus Salkeld 2009-11-29 18:42:00 +00:00
parent 27d383276b
commit 29eb20a389
7 changed files with 19 additions and 6 deletions

View File

@ -188,8 +188,9 @@ void totemmrp_callback_token_destroy (
totemsrp_callback_token_destroy (totemsrp_context, handle_out);
}
void totemmrp_new_msg_signal (void) {
totemsrp_new_msg_signal (totemsrp_context);
void totemmrp_event_signal (enum totem_event_type type, int value)
{
totemsrp_event_signal (totemsrp_context, type, value);
}
int totemmrp_ifaces_get (

View File

@ -97,7 +97,7 @@ extern int totemmrp_callback_token_create (
extern void totemmrp_callback_token_destroy (
void *handle_out);
extern void totemmrp_new_msg_signal (void);
extern void totemmrp_event_signal (enum totem_event_type type, int value);
extern int totemmrp_ifaces_get (
unsigned int nodeid,

View File

@ -773,7 +773,7 @@ static int mcast_msg (
int total_size = 0;
pthread_mutex_lock (&mcast_msg_mutex);
totemmrp_new_msg_signal ();
totemmrp_event_signal (TOTEM_EVENT_NEW_MSG, 1);
/*
* Remove zero length iovectors from the list
@ -1307,6 +1307,11 @@ int totempg_ifaces_get (
return (res);
}
void totempg_event_signal (enum totem_event_type type, int value)
{
totemmrp_event_signal (type, value);
}
void* totempg_get_stats (void)
{
return &totempg_stats;

View File

@ -2090,7 +2090,7 @@ originated:
return;
}
int totemsrp_new_msg_signal (void *srp_context)
void totemsrp_event_signal (void *srp_context, enum totem_event_type type, int value)
{
struct totemsrp_instance *instance = (struct totemsrp_instance *)srp_context;

View File

@ -92,7 +92,7 @@ void totemsrp_callback_token_destroy (
void *srp_context,
void **handle_out);
int totemsrp_new_msg_signal (void *srp_context);
void totemsrp_event_signal (void *srp_context, enum totem_event_type type, int value);
extern void totemsrp_net_mtu_adjust (struct totem_config *totem_config);

View File

@ -179,6 +179,11 @@ enum totem_callback_token_type {
TOTEM_CALLBACK_TOKEN_SENT = 2
};
enum totem_event_type {
TOTEM_EVENT_DELIVERY_CONGESTED,
TOTEM_EVENT_NEW_MSG,
};
#define MEMB_RING_ID
struct memb_ring_id {
struct totem_ip_address rep;

View File

@ -145,6 +145,8 @@ extern int totempg_ifaces_get (
extern void* totempg_get_stats (void);
void totempg_event_signal (enum totem_event_type type, int value);
extern const char *totempg_ifaces_print (unsigned int nodeid);
extern unsigned int totempg_my_nodeid_get (void);