[Xcb] [RFC] [PATCH 0/4] pthread cancellation
Rémi Denis-Courmont
remi at remlab.net
Thu Jan 7 09:24:44 PST 2010
Hello,
As sorta promised last month, here is a partial patch series for libxcb to
support POSIX thread cancellation. Of course, this only works with deferred
cancellation. (Asynchronous cancellation is safe only with pure computation
and no calls to the C run-time. It only makes sense in long computationally-
intensive code paths.)
The first patch disables cancellation around every mandatory POSIX
cancellation points, optional POSIX cancellation points, and external library
calls (Xau and Xdmcp). It is self-sufficient. With it, XCB becomes safe with
regards to deferred thread cancellation, by not having any cancellation point.
The next patches introduces proper cancellation support for parts of the
connect and disconnect code paths. This is easier to start with than the I/O
paths. Obviously, this is incomplete.
The following changes since commit be7e528eae62ddee14fa50f2c0e9036bafbc9f81:
Rémi Denis-Courmont (1):
xcb_connect_to_fd: fix descriptor leak on memory error path
are not available in any git repository.
Rémi Denis-Courmont (4):
Disable cancellation around every (potential) cancellation point...
xcb_connect*: make cancellation point instead of disabling cancellation
xcb_connect*: cancel thread immediately during connect()
xcb_disconnect: cancellation point
src/xcb.h | 9 ++++++++-
src/xcb_auth.c | 22 ++++++++++++++++++----
src/xcb_conn.c | 31 +++++++++++++++++++++++++++----
src/xcb_in.c | 14 ++++++++++++--
src/xcb_out.c | 18 ++++++++++++++++++
src/xcb_util.c | 53 ++++++++++++++++++++++++++++++++++++++---------------
6 files changed, 121 insertions(+), 26 deletions(-)
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the Xcb
mailing list