summaryrefslogtreecommitdiff
path: root/test/grail.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/grail.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/grail.c')
-rw-r--r--test/grail.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/grail.c b/test/grail.c
index 85c5bd4..361fd22 100644
--- a/test/grail.c
+++ b/test/grail.c
@@ -57,8 +57,10 @@ static void tp_gesture(struct grail *ge, const struct grail_event *ev)
57 57
58static void loop_device(struct grail *ge, int fd) 58static void loop_device(struct grail *ge, int fd)
59{ 59{
60 while (!grail_idle(ge, fd, 5000)) 60 while (!grail_idle(ge, fd, 5000)) {
61 grail_pull(ge, fd); 61 grail_pull(ge, fd);
62 fprintf(stderr, "launched\n");
63 }
62} 64}
63 65
64int main(int argc, char *argv[]) 66int main(int argc, char *argv[])