[Xcb] problem with xcb_poll_for_reply (or xcb_wait_for_reply)

Barton C Massey bart at cs.pdx.edu
Thu Aug 14 13:38:23 PDT 2008


Martian! :-)

Let me think about this one for a bit and discuss it with
some folks.  I've never seen anybody do anything like this
before, and it never occurred to me that it might be a good
idea.  I'll get back to you.

	Bart

In message <20080814121718.GB22372 at abydos.adm.naquadah.org> you wrote:
> 
> --===============1804504044==
> Content-Type: multipart/signed; micalg=pgp-sha1;
> 	protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh"
> Content-Disposition: inline
> 
> 
> --jI8keyz6grp/JLjh
> Content-Type: text/plain; charset=utf-8
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
> 
> At 1218051831 time_t, Julien Danjou wrote:
> > Maybe exporting a dumb file descriptor which can be selected to *know*
> > they're events in the XCB queue would be better (something like
> > timerfd?).
> 
> Well, finally I took one hour this morning to implement this idea.
> 
> I had no clue on how to get this done right. I was think about using the
> eventfd interface, but since it's Linux-only, I dropped the idea.
> I also was thinking about a giraffe, but I dropped the idea too.
> 
> Finally, I found that pipe(7) was the best choice. YMMV.
> 
> This patch has been tested with awesome. For those who doubt about it,
> it perfectly works as expected, and kill the problem me and Vincent were
> talking about. The (almost) only change needed for me was to poll() and
> the event fd rather then the old xfd so changing:
> 
> -    xfd =3D xcb_get_file_descriptor(globalconf.connection);
> +    xfd =3D xcb_get_event_file_descriptor(globalconf.connection);
> 
> And continue to poll() on this so-called xfd.
> 
> I'd like to hear comments, critics, etc, etc before I blindly pushed it
> on master with you yelling at me. :-)
> 
> Cheers,
> --=20
> Julien Danjou
> // =E1=90=B0 <julien at danjou.info>   http://julien.danjou.info
> // 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
> 
> --jI8keyz6grp/JLjh
> Content-Type: application/pgp-signature; name="signature.asc"
> Content-Description: Digital signature
> Content-Disposition: inline
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> 
> iEYEARECAAYFAkikIk4ACgkQpGK1HsL+5c32WQCdEVXVEpX0Hy3VNdyFQZHehx2X
> ZDAAoMm/lnlsGOG/Q1mKDKvuZf0OBMFC
> =pXPH
> -----END PGP SIGNATURE-----
> 
> --jI8keyz6grp/JLjh--
> 
> --===============1804504044==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
> --===============1804504044==--


More information about the Xcb mailing list