summaryrefslogtreecommitdiff
path: root/src/xcbint.h
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2006-10-04 15:01:00 -0700
committerJamey Sharp <jamey@minilop.net>2006-10-04 15:01:00 -0700
commit40589db8124b8c72894deb86a825c6117b0a2cd2 (patch)
treec1b2e534c778d8546de46d0683d5968704bc198f /src/xcbint.h
parent57b0cd8fea498a32ff2322583c7278d5e86aa4e8 (diff)
Add xcb_xlib_lock and xcb_xlib_unlock, a special-purpose two-level recursive lock just for libX11.
Diffstat (limited to 'src/xcbint.h')
-rw-r--r--src/xcbint.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/xcbint.h b/src/xcbint.h
index 1dc6f93..d81e787 100644
--- a/src/xcbint.h
+++ b/src/xcbint.h
@@ -113,6 +113,15 @@ int _xcb_in_read(xcb_connection_t *c);
int _xcb_in_read_block(xcb_connection_t *c, void *buf, int nread);
+/* xcb_xlib.c */
+
+typedef struct _xcb_xlib {
+ int lock;
+ pthread_t thread;
+ pthread_cond_t cond;
+} _xcb_xlib;
+
+
/* xcb_xid.c */
typedef struct _xcb_xid {
@@ -150,6 +159,7 @@ struct xcb_connection_t {
/* I/O data */
pthread_mutex_t iolock;
+ _xcb_xlib xlib;
_xcb_in in;
_xcb_out out;
@@ -159,8 +169,6 @@ struct xcb_connection_t {
};
void _xcb_conn_shutdown(xcb_connection_t *c);
-void _xcb_lock_io(xcb_connection_t *c);
-void _xcb_unlock_io(xcb_connection_t *c);
int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vector, int *count);
@@ -172,4 +180,10 @@ int _xcb_get_auth_info(int fd, xcb_auth_info_t *info);
#pragma GCC visibility pop
#endif
+
+/* xcb_conn.c symbols visible to xcb-xlib */
+
+void _xcb_lock_io(xcb_connection_t *c);
+void _xcb_unlock_io(xcb_connection_t *c);
+
#endif