Add ddxInputThread call from os layer into ddx layer

Allows ddx's to run additional code as necessary to set up the
input thread.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 4ad21c3247)
This commit is contained in:
Alan Coopersmith 2019-02-21 15:22:57 -08:00 committed by Matt Turner
parent bb405cdc85
commit e3f26605d8
9 changed files with 67 additions and 0 deletions

View File

@ -838,6 +838,15 @@ ddxGiveUp(enum ExitCode error)
AbortDDX(error);
}
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
/** This function is called in Xserver/os/osinit.c from \a OsInit(). */
void
OsVendorInit(void)

View File

@ -100,6 +100,15 @@ CloseInput(void)
KdCloseInput();
}
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
#ifdef DDXBEFORERESET
void
ddxBeforeReset(void)

View File

@ -232,6 +232,15 @@ ddxBeforeReset(void)
}
#endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
void
ddxUseMsg(void)
{

View File

@ -1444,3 +1444,12 @@ ddxBeforeReset(void)
{
}
#endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif

View File

@ -169,3 +169,12 @@ ddxBeforeReset(void)
return;
}
#endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif

View File

@ -72,6 +72,15 @@ ddxBeforeReset(void)
{
return;
}
#endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
_X_NORETURN

View File

@ -151,6 +151,15 @@ ddxBeforeReset(void)
}
#endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
int
main(int argc, char *argv[], char *envp[])
{

View File

@ -556,6 +556,8 @@ extern _X_EXPORT void
AbortDDX(enum ExitCode error);
extern _X_EXPORT void
ddxGiveUp(enum ExitCode error);
extern _X_EXPORT void
ddxInputThreadInit(void);
extern _X_EXPORT int
TimeSinceLastInputEvent(void);

View File

@ -318,6 +318,8 @@ InputThreadDoWork(void *arg)
sigfillset(&set);
pthread_sigmask(SIG_BLOCK, &set, NULL);
ddxInputThreadInit();
inputThreadInfo->running = TRUE;
#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)