Files
openairinterface5g/common/utils/T/tracer/gui/gui.c
T
Cedric Roux bd50539fda Revert "instrument X using gcc's -finstrument-functions"
This reverts commit 4911b107da.

The idea was to keep the stuff in the git history.
2016-05-01 14:13:15 +02:00

33 lines
490 B
C

#include "gui.h"
#include "gui_defs.h"
#include "x.h"
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
void glock(gui *_gui)
{
struct gui *g = _gui;
if (pthread_mutex_lock(g->lock)) ERR("mutex error\n");
}
void gunlock(gui *_gui)
{
struct gui *g = _gui;
if (pthread_mutex_unlock(g->lock)) ERR("mutex error\n");
}
int new_color(gui *_gui, char *color)
{
struct gui *g = _gui;
int ret;
glock(g);
ret = x_new_color(g->x, color);
gunlock(g);
return ret;
}