Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
88bef83d
Commit
88bef83d
authored
Apr 29, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X threading handling
parent
3bba991e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
0 deletions
+26
-0
common/utils/T/tracer/gui/gui.c
common/utils/T/tracer/gui/gui.c
+2
-0
common/utils/T/tracer/gui/init.c
common/utils/T/tracer/gui/init.c
+2
-0
common/utils/T/tracer/gui/x.c
common/utils/T/tracer/gui/x.c
+17
-0
common/utils/T/tracer/gui/x.h
common/utils/T/tracer/gui/x.h
+5
-0
No files found.
common/utils/T/tracer/gui/gui.c
View file @
88bef83d
...
...
@@ -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
"
);
}
...
...
common/utils/T/tracer/gui/init.c
View file @
88bef83d
...
...
@@ -12,6 +12,8 @@ gui *gui_init(void)
{
struct
gui
*
ret
;
x_init_threading
();
ret
=
calloc
(
1
,
sizeof
(
struct
gui
));
if
(
ret
==
NULL
)
OOM
;
...
...
common/utils/T/tracer/gui/x.c
View file @
88bef83d
...
...
@@ -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
;
...
...
common/utils/T/tracer/gui/x.h
View file @
88bef83d
...
...
@@ -6,6 +6,11 @@
typedef
void
x_connection
;
typedef
void
x_window
;
void
x_init_threading
(
void
);
void
xlock
(
x_connection
*
x
);
void
xunlock
(
x_connection
*
x
);
x_connection
*
x_open
(
void
);
x_window
*
x_create_window
(
x_connection
*
x
,
int
width
,
int
height
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment