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
+2
View File
@@ -9,11 +9,13 @@ void glock(gui *_gui)
{
struct gui *g = _gui;
if (pthread_mutex_lock(g->lock)) ERR("mutex error\n");
xlock(g->x);
}
void gunlock(gui *_gui)
{
struct gui *g = _gui;
xunlock(g->x);
if (pthread_mutex_unlock(g->lock)) ERR("mutex error\n");
}