[PATCH 10/22] udev: Use shared NoopDDA to utilize code cache better
Pauli
ext-pauli.nieminen at nokia.com
Wed Dec 29 11:27:22 PST 2010
From: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
Calling function that is in code cache is order of magnitude faster. In
arm non-cached simple function takes about 1us while cached function
takes max 200ns.
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 496bfbf..393723c 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -253,11 +253,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)
{
@@ -290,7 +285,7 @@ config_udev_init(void)
}
udev_enumerate_unref(enumerate);
- RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
+ RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA, wakeup_handler, NULL);
AddGeneralSocket(udev_monitor_get_fd(udev_monitor));
return 1;
@@ -307,7 +302,7 @@ config_udev_fini(void)
udev = udev_monitor_get_udev(udev_monitor);
RemoveGeneralSocket(udev_monitor_get_fd(udev_monitor));
- RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, udev_monitor);
+ RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA, wakeup_handler, udev_monitor);
udev_monitor_unref(udev_monitor);
udev_monitor = NULL;
udev_unref(udev);
--
1.7.0.4
More information about the xorg-devel
mailing list