[PATCH 1/2] dix: Better document Dispatch(), WaitForSomething() and alike

Fernando Carrijo fcarrijo at yahoo.com.br
Tue Aug 3 23:41:11 PDT 2010


Tiago Vignatti <tiago.vignatti at nokia.com> wrote:

> > --- a/dix/dispatch.c
> > +++ b/dix/dispatch.c
> > @@ -240,6 +240,20 @@ long           SmartLastPrint;
> >  void        Dispatch(void);
> >  void        InitProcVectors(void);
> > 
> > +/**
> > + * Select the next client to be served.
> > + *
> > + * The chosen client will be picked up from the array of all clients ready for
> > + * input and/or output; and will be the one with highest dynamic priority.
>                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>                                            I don't understand this.

You mean my words or the idea they convey? Or both? Sorry, I really don't know
how to make it clearer. Anyone who candidate to help me out with my English will
be more than welcome.

> > diff --git a/os/connection.c b/os/connection.c
> > index c143fb6..f89eac5 100644
> > --- a/os/connection.c
> > +++ b/os/connection.c
> > @@ -1054,6 +1054,10 @@ AddGeneralSocket(int fd)
> >         FD_SET(fd, &SavedAllSockets);
> >  }
> > 
> > +/* Adds the device fd to the set of fds representing enabled devices
> > + * which will be checked by select() the next time WaitForSomething()
> > + * loops over it in search of input data.
> > + */
> 
> maybe we should change AddEnabledDevice to AddInputDevice or something that
> says it concerns only input devices.

If I did that, I'd feel tempted to keep the symmetry of the naming scheme by
also changing all occurrences of EnabledDevice in the server code. And to be
honest, that sounds to me as deserving its own patch series. I can do that, but
if you don't mind, I'll leave it for the future. Maybe after _this_ series goes
upstream and I realize that X folks as a whole do encourage code documentation.

> Just one commentary on the top of this email that you may want to improve, but
> for this patch and for the next one fixing the indentation:
> 
> Reviewed-by: Tiago Vignatti <tiago.vignatti at nokia.com>

Thanks for reviewing, Tiago.



More information about the xorg-devel mailing list