From 342a43e7b2ceec1dd200bffa24b052fec33f5bdc Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 30 Jul 2010 15:29:38 +0200 Subject: 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 --- test/touch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/touch.c') 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) struct touch_engine engine; touch_engine_init(&engine, tp_event, tp_sync, 0); touch_engine_attach(&engine, dev); - while (!touch_dev_idle(dev, fd, 5000)) - touch_dev_pull(dev, fd); + while (!touch_dev_idle(dev, fd, 5000)) { + touch_dev_fetch(dev, fd); + touch_dev_process(dev); + } touch_engine_detach(&engine, dev); } -- cgit v1.2.3