[PATCH v2 03/12] udev: Don't register empty block handler

Pauli ext-pauli.nieminen at nokia.com
Tue Jan 4 03:06:24 PST 2011


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/udev.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/config/udev.c b/config/udev.c
index 9445ed6..442c159 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -254,11 +254,6 @@ wakeup_handler(pointer data, int err, pointer read_mask)
     }
 }
 
-static void
-block_handler(pointer data, struct timeval **tv, pointer read_mask)
-{
-}
-
 int
 config_udev_init(void)
 {
@@ -291,7 +286,7 @@ config_udev_init(void)
     }
     udev_enumerate_unref(enumerate);
 
-    RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
+    RegisterWakeupHandler(wakeup_handler, NULL);
     AddGeneralSocket(udev_monitor_get_fd(udev_monitor));
 
     return 1;
@@ -308,7 +303,7 @@ config_udev_fini(void)
     udev = udev_monitor_get_udev(udev_monitor);
 
     RemoveGeneralSocket(udev_monitor_get_fd(udev_monitor));
-    RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
+    RemoveWakeupHandler(wakeup_handler, NULL);
     udev_monitor_unref(udev_monitor);
     udev_monitor = NULL;
     udev_unref(udev);
-- 
1.7.0.4



More information about the xorg-devel mailing list