Explorar o código

Merge trunk revision 2553:
r2553 | asalkeld | 2009-11-29 11:42:00 -0700 (Sun, 29 Nov 2009) | 3 lines

Rename totem_new_msg_signal() to something more generic.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2608 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake %!s(int64=16) %!d(string=hai) anos
pai
achega
1ce8f25fd4

+ 3 - 2
exec/totemmrp.c

@@ -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 (

+ 1 - 1
exec/totemmrp.h

@@ -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,

+ 6 - 1
exec/totempg.c

@@ -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;

+ 1 - 1
exec/totemsrp.c

@@ -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;
 

+ 1 - 1
exec/totemsrp.h

@@ -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);
 

+ 5 - 0
include/corosync/totem/totem.h

@@ -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;

+ 2 - 0
include/corosync/totem/totempg.h

@@ -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);