[PATCH v4 12/12] selinux: Don't register empty block handler
Pauli
ext-pauli.nieminen at nokia.com
Wed Jan 5 04:59:13 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>
---
Xext/xselinux_hooks.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
index 560e1e9..d46c2d9 100644
--- a/Xext/xselinux_hooks.c
+++ b/Xext/xselinux_hooks.c
@@ -804,11 +804,6 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
static int netlink_fd;
static void
-SELinuxBlockHandler(void *data, struct timeval **tv, void *read_mask)
-{
-}
-
-static void
SELinuxWakeupHandler(void *data, int err, void *read_mask)
{
if (FD_ISSET(netlink_fd, (fd_set *)read_mask))
@@ -838,8 +833,7 @@ SELinuxFlaskReset(void)
/* Tear down SELinux stuff */
audit_close(audit_fd);
avc_netlink_release_fd();
- RemoveBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler,
- NULL);
+ RemoveWakeupHandler(SELinuxWakeupHandler, NULL);
RemoveGeneralSocket(netlink_fd);
avc_destroy();
@@ -908,8 +902,7 @@ SELinuxFlaskInit(void)
netlink_fd = avc_netlink_acquire_fd();
AddGeneralSocket(netlink_fd);
- RegisterBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler,
- NULL);
+ RegisterWakeupHandler(SELinuxWakeupHandler, NULL);
/* Register callbacks */
ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL);
--
1.7.0.4
More information about the xorg-devel
mailing list