mirror of
https://github.com/X11Libre/xserver.git
synced 2026-01-26 05:57:53 +00:00
dix: drop DDXBEFORERESET symbol
Reduce complexity for things that really don't matter much: The ddxBeforeReset() function is called when the Xserver going to reset (new server generation). Right now, the only DDX really needing that is Xwin, on all the others it's just no-op. We've got an extra complicated build logic, which ifdef's out this all when Xwin isn't built at all. The saving is extremely minimal - just skipping few stub functions, which in most sessions aren't even called. Therefore, get rid of this extra complexity that isn't giving us any notable gain. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
8e83caecde
commit
967ae609b6
@ -576,9 +576,7 @@ Dispatch(void)
|
||||
}
|
||||
dispatchException &= ~DE_PRIORITYCHANGE;
|
||||
}
|
||||
#if defined(DDXBEFORERESET)
|
||||
ddxBeforeReset();
|
||||
#endif
|
||||
KillAllClients();
|
||||
dispatchException &= ~DE_RESET;
|
||||
SmartScheduleLatencyLimited = 0;
|
||||
|
||||
@ -111,13 +111,6 @@ ddxInputThreadInit(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DDXBEFORERESET
|
||||
void
|
||||
ddxBeforeReset(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
ddxUseMsg(void)
|
||||
{
|
||||
|
||||
@ -4,6 +4,7 @@ srcs = [
|
||||
'ephyrcursor.c',
|
||||
'ephyr_draw.c',
|
||||
'hostx.c',
|
||||
'../../stubs/ddxBeforeReset.c',
|
||||
]
|
||||
|
||||
xephyr_dep = [
|
||||
|
||||
12
hw/stubs/ddxBeforeReset.c
Normal file
12
hw/stubs/ddxBeforeReset.c
Normal file
@ -0,0 +1,12 @@
|
||||
/* SPDX-License-Identifier: MIT OR X11
|
||||
*
|
||||
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||
*/
|
||||
#include <dix-config.h>
|
||||
|
||||
#include "os/ddx_priv.h"
|
||||
|
||||
void
|
||||
ddxBeforeReset(void)
|
||||
{
|
||||
}
|
||||
@ -269,14 +269,6 @@ OsVendorFatalError(const char *f, va_list args)
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(DDXBEFORERESET)
|
||||
void
|
||||
ddxBeforeReset(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if INPUTTHREAD
|
||||
/** This function is called in Xserver/os/inputthread.c when starting
|
||||
the input thread. */
|
||||
|
||||
@ -3,6 +3,7 @@ srcs = [
|
||||
'InitOutput.c',
|
||||
'../../mi/miinitext.c',
|
||||
'../../mi/miinitext.h',
|
||||
'../stubs/ddxBeforeReset.c',
|
||||
]
|
||||
|
||||
xvfb_server = executable(
|
||||
|
||||
@ -22,6 +22,7 @@ srcs_xorg_common = [
|
||||
'xf86Mode.c',
|
||||
'xorgHelper.c',
|
||||
'xf86Extensions.c',
|
||||
'../../stubs/ddxBeforeReset.c',
|
||||
]
|
||||
|
||||
xorg_sdk_headers = [
|
||||
|
||||
@ -1325,13 +1325,6 @@ xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DDXBEFORERESET
|
||||
void
|
||||
ddxBeforeReset(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#if INPUTTHREAD
|
||||
/** This function is called in Xserver/os/inputthread.c when starting
|
||||
the input thread. */
|
||||
|
||||
@ -166,14 +166,6 @@ OsVendorFatalError(const char *f, va_list args)
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(DDXBEFORERESET)
|
||||
void
|
||||
ddxBeforeReset(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if INPUTTHREAD
|
||||
/** This function is called in Xserver/os/inputthread.c when starting
|
||||
the input thread. */
|
||||
|
||||
@ -18,6 +18,7 @@ srcs = [
|
||||
'../../mi/miinitext.h',
|
||||
'xcb.c',
|
||||
'xkb.c',
|
||||
'../stubs/ddxBeforeReset.c',
|
||||
]
|
||||
|
||||
xcb_dep = dependency('xcb', required: true)
|
||||
|
||||
@ -55,6 +55,7 @@ srcs_libxquartz = [
|
||||
'quartzRandR.c',
|
||||
'../../mi/miinitext.c',
|
||||
'../../mi/miinitext.h',
|
||||
'../stubs/ddxBeforeReset.c',
|
||||
]
|
||||
|
||||
libxquartz_defs = [
|
||||
|
||||
@ -143,12 +143,10 @@ void XwinExtensionInit(void)
|
||||
LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE);
|
||||
}
|
||||
|
||||
#if defined(DDXBEFORERESET)
|
||||
/*
|
||||
* Called right before KillAllClients when the server is going to reset,
|
||||
* allows us to shutdown our separate threads cleanly.
|
||||
*/
|
||||
|
||||
void
|
||||
ddxBeforeReset(void)
|
||||
{
|
||||
@ -156,7 +154,6 @@ ddxBeforeReset(void)
|
||||
|
||||
winClipboardShutdown();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if INPUTTHREAD
|
||||
/** This function is called in Xserver/os/inputthread.c when starting
|
||||
|
||||
@ -266,7 +266,6 @@ conf_data.set('HAVE_LIBUNWIND', get_option('libunwind'))
|
||||
conf_data.set('HAVE_APM', (build_apm or build_acpi) ? '1' : false)
|
||||
conf_data.set('HAVE_ACPI', build_acpi ? '1' : false)
|
||||
|
||||
conf_data.set('DDXBEFORERESET', build_xwin ? '1' : false)
|
||||
enable_debugging = get_option('buildtype') == 'debug'
|
||||
conf_data.set('DEBUG', enable_debugging ? '1' : false)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user