[PATCH xserver 2/9] Remove SIGIO support for input [v2]

Peter Hutterer peter.hutterer at who-t.net
Thu Dec 17 20:17:01 PST 2015


On Thu, Dec 17, 2015 at 04:11:37PM -0800, Keith Packard wrote:
> This removes all of the SIGIO handling support used for input
> throughout the X server, preparing the way for using threads for input
> handling instead.
> 
> Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls
> to stub functions input_lock/input_unlock so that we don't lose this
> information.
> 
> xfree86 SIGIO support is reworked to use internal versions of
> OsBlockSIGIO and OsReleaseSIGIO.
> 
> v2: Don't change locking order (Peter Hutterer)
> 
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  Xi/exevents.c                             |   4 +-
>  config/config.c                           |   4 +-
>  configure.ac                              |  14 ---
>  dix/devices.c                             |  10 +-
>  dix/ptrveloc.c                            |   4 +-
>  dix/touch.c                               |   8 +-
>  hw/dmx/input/dmxevents.c                  |  24 ++---
>  hw/kdrive/ephyr/ephyr.c                   |   4 +-
>  hw/kdrive/src/kinput.c                    |  74 ++-----------
>  hw/xfree86/common/xf86Config.c            |  24 -----
>  hw/xfree86/common/xf86Cursor.c            |   8 +-
>  hw/xfree86/common/xf86Events.c            |  32 +++---
>  hw/xfree86/common/xf86Helper.c            |   2 +-
>  hw/xfree86/common/xf86Init.c              |   6 +-
>  hw/xfree86/common/xf86PM.c                |   8 +-
>  hw/xfree86/common/xf86Xinput.c            |   8 +-
>  hw/xfree86/os-support/shared/sigio.c      |  57 +++++-----
>  hw/xfree86/os-support/shared/sigiostubs.c |  23 -----
>  hw/xfree86/os-support/xf86_OSproc.h       |   4 -
>  include/input.h                           |   3 +
>  include/os.h                              |   6 --
>  include/xorg-config.h.in                  |   3 -
>  mi/mieq.c                                 |   6 +-
>  mi/mipointer.c                            |   4 +-
>  os/utils.c                                |  55 +---------
>  test/Makefile.am                          |   2 +-
>  test/os.c                                 | 166 ------------------------------
>  xkb/xkbActions.c                          |   4 +-
>  28 files changed, 103 insertions(+), 464 deletions(-)
>  delete mode 100644 test/os.c
> 

..

> @@ -291,18 +291,16 @@ xf86Wakeup(void *blockData, int err, void *pReadmask)
>  }
>  
>  /*
> - * xf86SigioReadInput --
> - *    signal handler for the SIGIO signal.
> + * xf86ReadInput --
> + *    input thread handler
>   */
> +
>  static void
> -xf86SigioReadInput(int fd, void *closure)
> +xf86ReadInput(int fd, int ready, void *closure)
>  {
> -    int errno_save = errno;
>      InputInfoPtr pInfo = closure;
>  
>      pInfo->read_input(pInfo);
> -
> -    errno = errno_save;
>  }

don't know what the point of saving errno is here, but this should be a
separate patch, you're changing functionality here.

> diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
> index c42e93e..b506338 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 && xf86Info.useSIGIO && xf86SIGIOSupported();
> +    pScrn->silkenMouse = useSM && FALSE;

the FALSE needs a comment, otherwise it's confusing.

>      if (serverGeneration == 1)
>          xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n",
>                     pScrn->silkenMouse ? "enabled" : "disabled");


> diff --git a/include/input.h b/include/input.h
> index 5bc60f0..75887b7 100644
> --- a/include/input.h
> +++ b/include/input.h
> @@ -718,4 +718,7 @@ static inline void input_lock(void) {
>  static inline void input_unlock(void) {
>  }
>  
> +static inline void input_force_unlock(void) {
> +}

shouldn't this be in the previous patch?

Cheers,
   Peter


More information about the xorg-devel mailing list