summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-10-11 16:37:16 -0400
committerKeith Packard <keithp@keithp.com>2010-10-13 09:24:06 -0700
commit6274dca9d984ad3c553b4901edc3151e770e6c40 (patch)
tree013eae7293e951e1ef5852151c344dc84dd0b295 /dix
parente418cd332c1f458d028df3fdf684011109d0c183 (diff)
dix: optimize CallCallbacks
Move the basic sanity checking to an inline wrapper, which avoids the function call overhead if the callback list is empty. On an XACEful server on a 2.4GHz Core 2 Duo: 1 2 Operation -------- ----------------- ----------------- 20000000.0 25100000.0 ( 1.25) X protocol NoOperation Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix')
-rw-r--r--dix/dixutils.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 470bb5dd7..104363b72 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -729,7 +729,7 @@ _DeleteCallback(
return FALSE;
}
-static void
+void
_CallCallbacks(
CallbackListPtr *pcbl,
pointer call_data)
@@ -871,13 +871,6 @@ DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
}
void
-CallCallbacks(CallbackListPtr *pcbl, pointer call_data)
-{
- if (!pcbl || !*pcbl) return;
- _CallCallbacks(pcbl, call_data);
-}
-
-void
DeleteCallbackList(CallbackListPtr *pcbl)
{
if (!pcbl || !*pcbl) return;