[PATCH] Add configuration option for use of SIGIO handlers for input events

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 15 23:21:23 PDT 2009


On Tue, Sep 15, 2009 at 09:13:48PM -0700, Alan Coopersmith wrote:
> Boolean option to enable/disable SIGIO handlers is set by the first
> of these found:
>   - UseSIGIO option is set in xorg.conf ServerFlags
>   - Default set at build time by ./configure --enable-use-sigio-by-default
>   - Platform default value: Solaris = no, all others = yes
> 
> This matches the current settings on all platforms except Solaris.
> This reverts Solaris (for now) to the settings used in Xorg 1.6, before
> SIGIO support for Solaris was added, due to some system level bugs that
> won't be resolved in time for Xorg 1.7 release, but allows us to enable
> when those are resolved (or when we need to test if they're resolved).
> See http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6879897
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>

Thanks for changing that, will be pushed soon. One comment below.

> --- a/hw/xfree86/os-support/shared/sigio.c
> +++ b/hw/xfree86/os-support/shared/sigio.c
> @@ -145,6 +145,10 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
>      int blocked;
>      int installed = FALSE;
>  
> +    if (!xf86Info.useSIGIO) {
> +	return 0;
> +    }
> +
>      for (i = 0; i < MAX_FUNCS; i++)
>      {
>  	if (!xf86SigIOFuncs[i].f)
> @@ -216,6 +220,10 @@ xf86RemoveSIGIOHandler(int fd)
>      int maxfd;
>      int ret;
>  
> +    if (!xf86Info.useSIGIO) {
> +	return 0;
> +    }
> +
>      max = 0;
>      maxfd = -1;
>      ret = 0;

I think our coding style--insofar as we have any--is to not use {} for
single-line ifs. I'll change both to
> +    if (!xf86Info.useSIGIO)
> +	return 0;
before pushing. Don't worry about sending another version.

Cheers,
  Peter



More information about the xorg-devel mailing list