X threading handling

This commit is contained in:
Cedric Roux
2016-04-29 18:29:04 +02:00
parent 3bba991e77
commit 88bef83d8b
4 changed files with 26 additions and 0 deletions
+17
View File
@@ -6,6 +6,23 @@
#include <stdlib.h>
#include <string.h>
void x_init_threading(void)
{
if (XInitThreads() == False) abort();
}
void xlock(x_connection *_x)
{
struct x_connection *x = _x;
XLockDisplay(x->d);
}
void xunlock(x_connection *_x)
{
struct x_connection *x = _x;
XUnlockDisplay(x->d);
}
int x_connection_fd(x_connection *_x)
{
struct x_connection *x = _x;