When lib_exit returns -1 (indicating the totem queue is full and unable
to send new messages), the ipc system should allow the transmission of
totem messages in this condition.  However, with the current code, a
global lock is held during this period, locking out the ability to send
totem messages and resulting in a repeating loop if lib_exit_fn returns
-1 because it expects totem message queue space to become available.

Patch attached to fix.

Regards
-steve
Index: exec/ipc.c
===================================================================
--- exec/ipc.c	(revision 1641)
+++ exec/ipc.c	(working copy)
@@ -704,7 +704,9 @@
 	 * This is the dispatch conn_io
 	 */
 	if (conn_io->conn_info->conn_io_dispatch == conn_io) {
+		ipc_serialize_unlock_fn ();
 		for (;;) {
+			ipc_serialize_lock_fn ();
 			if (conn_io_refcnt_value (conn_io) == 0) {
 				res = 0; // TODO
 				/*
@@ -725,8 +727,8 @@
 					pthread_exit (0);
 				}
 			} /* refcnt == 0 */
+			ipc_serialize_unlock_fn ();
 			usleep (1000);
-	printf ("sleep 2\n");
 		} /* for (;;) */
 	} /* dispatch conn_io */
 
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to