[PATCH 03/11] dbus: Don't register empty block handler

Pauli ext-pauli.nieminen at nokia.com
Fri Dec 31 09:31:01 PST 2010


From: Pauli Nieminen <ext-pauli.nieminen at nokia.com>

This reduces about 1us runtime for each main loop iteration on ARM.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
 config/dbus-core.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/config/dbus-core.c b/config/dbus-core.c
index 4c5e10f..01eb6e7 100644
--- a/config/dbus-core.c
+++ b/config/dbus-core.c
@@ -61,11 +61,6 @@ wakeup_handler(pointer data, int err, pointer read_mask)
     }
 }
 
-static void
-block_handler(pointer data, struct timeval **tv, pointer read_mask)
-{
-}
-
 /**
  * Disconnect (if we haven't already been forcefully disconnected), clean up
  * after ourselves, and call all registered disconnect hooks.
@@ -86,7 +81,7 @@ teardown(void)
     if (bus_info.connection)
         dbus_connection_unref(bus_info.connection);
 
-    RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
+    RemoveWakeupHandler(wakeup_handler, &bus_info);
     if (bus_info.fd != -1)
         RemoveGeneralSocket(bus_info.fd);
     bus_info.fd = -1;
@@ -164,7 +159,7 @@ connect_to_bus(void)
     dbus_error_free(&error);
     AddGeneralSocket(bus_info.fd);
 
-    RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
+    RegisterWakeupHandler(wakeup_handler, &bus_info);
 
     for (hook = bus_info.hooks; hook; hook = hook->next) {
         if (hook->connect)
-- 
1.7.0.4



More information about the xorg-devel mailing list