[PATCH xserver 8/9] xfree86: Use threaded input mechanism

Peter Hutterer peter.hutterer at who-t.net
Thu Dec 17 21:33:51 PST 2015


On Thu, Dec 17, 2015 at 04:11:43PM -0800, Keith Packard wrote:
> Switch the XFree86 DDX over to threaded input
> 
> Signed-off-by: Keith Packard <keithp at keithp.com>

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
   Peter

> ---
>  hw/xfree86/common/xf86Events.c | 4 ++--
>  hw/xfree86/common/xf86Helper.c | 2 +-
>  hw/xfree86/common/xf86Init.c   | 3 +++
>  3 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
> index df8c7b6..7191980 100644
> --- a/hw/xfree86/common/xf86Events.c
> +++ b/hw/xfree86/common/xf86Events.c
> @@ -310,7 +310,7 @@ xf86ReadInput(int fd, int ready, void *closure)
>  void
>  xf86AddEnabledDevice(InputInfoPtr pInfo)
>  {
> -    SetNotifyFd(pInfo->fd, xf86ReadInput, X_NOTIFY_READ, pInfo);
> +    InputThreadRegisterDev(pInfo->fd, xf86ReadInput, pInfo);
>  }
>  
>  /*
> @@ -320,7 +320,7 @@ xf86AddEnabledDevice(InputInfoPtr pInfo)
>  void
>  xf86RemoveEnabledDevice(InputInfoPtr pInfo)
>  {
> -    RemoveNotifyFd(pInfo->fd);
> +    InputThreadUnregisterDev(pInfo->fd);
>  }
>  
>  static int *xf86SignalIntercept = NULL;
> diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
> index b506338..0aeefd6 100644
> --- a/hw/xfree86/common/xf86Helper.c
> +++ b/hw/xfree86/common/xf86Helper.c
> @@ -1729,7 +1729,7 @@ xf86SetSilkenMouse(ScreenPtr pScreen)
>       * yet.  Should handle this differently so that alternate async methods
>       * work correctly with this too.
>       */
> -    pScrn->silkenMouse = useSM && FALSE;
> +    pScrn->silkenMouse = useSM && InputThreadEnable;
>      if (serverGeneration == 1)
>          xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n",
>                     pScrn->silkenMouse ? "enabled" : "disabled");
> diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
> index 5281e3e..156f503 100644
> --- a/hw/xfree86/common/xf86Init.c
> +++ b/hw/xfree86/common/xf86Init.c
> @@ -954,6 +954,9 @@ InitInput(int argc, char **argv)
>  
>      xf86Info.vtRequestsPending = FALSE;
>  
> +    /* Enable threaded input */
> +    InputThreadPreInit();
> +
>      mieqInit();
>  
>      /* Initialize all configured input devices */
> -- 
> 2.6.4
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list