summaryrefslogtreecommitdiff
path: root/test/touch.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@bitmath.org>2010-07-30 15:29:38 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-05 22:48:38 +0200
commit342a43e7b2ceec1dd200bffa24b052fec33f5bdc (patch)
tree291938b98037efe6e0def19e7457b9a947c484f1 /test/touch.c
parente0eb1015bf30fd0913db571b000ba6a83ea22660 (diff)
Introduce threading
In order to enable deferred events from grail, but the event processing in a separate thread, and have the calling thread return as quickly as possible. Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
Diffstat (limited to 'test/touch.c')
-rw-r--r--test/touch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/touch.c b/test/touch.c
index bc10b54..1dd9cd4 100644
--- a/test/touch.c
+++ b/test/touch.c
@@ -53,8 +53,10 @@ static void loop_device(struct touch_dev *dev, int fd)
53 struct touch_engine engine; 53 struct touch_engine engine;
54 touch_engine_init(&engine, tp_event, tp_sync, 0); 54 touch_engine_init(&engine, tp_event, tp_sync, 0);
55 touch_engine_attach(&engine, dev); 55 touch_engine_attach(&engine, dev);
56 while (!touch_dev_idle(dev, fd, 5000)) 56 while (!touch_dev_idle(dev, fd, 5000)) {
57 touch_dev_pull(dev, fd); 57 touch_dev_fetch(dev, fd);
58 touch_dev_process(dev);
59 }
58 touch_engine_detach(&engine, dev); 60 touch_engine_detach(&engine, dev);
59} 61}
60 62