aboutsummaryrefslogtreecommitdiffstats
path: root/src/gevent
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-02-02 20:00:34 +0100
committerJoel Bodenmann <joel@unormal.org>2014-02-02 20:00:34 +0100
commitd299756abaf5813850ec732be3d71d96b9fa32fc (patch)
tree7133e28e8134af1daaa269785cb2d382d88fe7ba /src/gevent
parente50b495c48648bf53621a4afc63682579387ba4f (diff)
parentd2de6c351785f323fd4b2a4e337a95bda4c9a626 (diff)
downloaduGFX-d299756abaf5813850ec732be3d71d96b9fa32fc.tar.gz
uGFX-d299756abaf5813850ec732be3d71d96b9fa32fc.tar.bz2
uGFX-d299756abaf5813850ec732be3d71d96b9fa32fc.zip
Merge branch 'master' into gfile
Diffstat (limited to 'src/gevent')
-rw-r--r--src/gevent/gevent.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gevent/gevent.c b/src/gevent/gevent.c
index 6681fb53..779f63a0 100644
--- a/src/gevent/gevent.c
+++ b/src/gevent/gevent.c
@@ -46,10 +46,16 @@ static void deleteAssignments(GListener *pl, GSourceHandle gsh) {
}
}
-void _geventInit(void) {
+void _geventInit(void)
+{
gfxMutexInit(&geventMutex);
}
+void _geventDeinit(void)
+{
+ gfxMutexDestroy(&geventMutex);
+}
+
void geventListenerInit(GListener *pl) {
gfxSemInit(&pl->waitqueue, 0, MAX_SEMAPHORE_COUNT); // Next wait'er will block
gfxSemInit(&pl->eventlock, 1, 1); // Only one thread at a time looking at the event buffer