[PATCH 05/11] kdrive/linux: Don't register empty block handler

Pauli ext-pauli.nieminen at nokia.com
Fri Dec 31 09:31:03 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>
---
 hw/kdrive/linux/linux.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c
index 9863c14..04c1fdc 100644
--- a/hw/kdrive/linux/linux.c
+++ b/hw/kdrive/linux/linux.c
@@ -179,11 +179,6 @@ LinuxSetSwitchMode (int mode)
     }
 }
 
-static void
-LinuxApmBlock (pointer blockData, OSTimePtr pTimeout, pointer pReadmask)
-{
-}
-
 static Bool LinuxApmRunning;
 
 static void
@@ -258,7 +253,7 @@ LinuxEnable (void)
     {
 	LinuxApmRunning = TRUE;
 	fcntl (LinuxApmFd, F_SETFL, fcntl (LinuxApmFd, F_GETFL) | NOBLOCK);
-	RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
+	RegisterWakeupHandler (LinuxApmWakeup, 0);
 	AddEnabledDevice (LinuxApmFd);
     }
 
@@ -294,7 +289,7 @@ LinuxDisable (void)
     enabled = FALSE;
     if (LinuxApmFd >= 0)
     {
-	RemoveBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
+	RemoveWakeupHandler (LinuxApmWakeup, 0);
 	RemoveEnabledDevice (LinuxApmFd);
 	close (LinuxApmFd);
 	LinuxApmFd = -1;
-- 
1.7.0.4



More information about the xorg-devel mailing list