1. 20 Aug, 2013 1 commit
  2. 10 May, 2013 1 commit
  3. 14 Mar, 2012 1 commit
  4. 15 Apr, 2010 1 commit
    • Jamey Sharp's avatar
      Move XID and sync handling from SyncHandle to LockDisplay to fix races. · a6d974dc
      Jamey Sharp authored
      XID and sync handling happened via _XPrivSyncHandler, assigned to
      dpy->synchandler and called from SyncHandle.  _XPrivSyncHandler thus ran
      without the Display lock, so manipulating the Display caused races, and
      these races led to assertions in multithreaded code (demonstrated via
      In the XTHREADS case, after you've called XInitThreads, we can hook
      LockDisplay and UnlockDisplay.  Use that to run _XIDHandler and
      _XSeqSyncHandler from LockDisplay rather than SyncHandle; we then know
      that we hold the lock, and thus we can avoid races.  We think it makes
      sense to do these both from LockDisplay rather than UnlockDisplay, so
      that you know you have valid sync and a valid XID before you start
      setting up the request you locked to prepare.
      In the !XTHREADS case, or if you haven't called XInitThreads, you don't
      get to use Xlib from multiple threads, so we can use the logic we have
      now (with synchandler and savedsynchandler) without any concern about
      This approach gets a bit exciting when the XID and sequence sync
      handlers drop and re-acquire the Display lock. Reacquisition will re-run
      the handlers, but they return immediately unless they have work to do,
      so they can't recurse more than once.  In the worst case, if both of
      them have work to do, we can nest the Display lock three deep.  In the
      case of the _XIDHandler, we drop the lock to call xcb_generate_id, which
      takes the socket back if it needs to request more XIDs, and taking the
      socket back will reacquire the lock; we take care to avoid letting
      _XIDHandler run again and re-enter XCB from the return_socket callback
      (which causes Very Bad Things, and is Not Allowed).
      Tested with ico (with 1 and 20 threads), and with several test programs
      for XID and sequence sync.  Tested with and without XInitThreads(), and
      with and without XCB.
      Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=23192Signed-off-by: Jamey Sharp's avatarJamey Sharp <jamey@minilop.net>
      Signed-off-by: Josh Triplett's avatarJosh Triplett <josh@freedesktop.org>
  5. 15 Jan, 2010 1 commit
  6. 06 Apr, 2009 1 commit
  7. 28 Jan, 2009 1 commit
    • Paulo Cesar Pereira de Andrade's avatar
      Janitor: ansification, make distcheck, compiler warnings. · 8ba0ca32
      Paulo Cesar Pereira de Andrade authored
        Only convert to use "ansi prototypes" the functions warned from
      compilation with "./autogen.sh --prefix=/usr", on a Linux computer.
        Also, only address "trivial" compiler warning fixes in this commit.
        The new .gitignore is the output of a command like:
      % find . -name .gitignore -exec cat {} \; | sort | uniq
      and only the toplevel .gitignore file was kept.
  8. 17 Jun, 2008 1 commit
  9. 21 Apr, 2008 1 commit
  10. 04 Oct, 2006 1 commit
  11. 19 Feb, 2006 1 commit
  12. 08 Nov, 2005 1 commit
  13. 13 May, 2005 1 commit
  14. 23 Apr, 2004 1 commit
  15. 14 Nov, 2003 1 commit