From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39113 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrpKZ-0000B6-4s for qemu-devel@nongnu.org; Tue, 22 Feb 2011 05:18:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrpKX-0005eB-PI for qemu-devel@nongnu.org; Tue, 22 Feb 2011 05:18:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrpKX-0005dy-GW for qemu-devel@nongnu.org; Tue, 22 Feb 2011 05:18:53 -0500 From: Amit Shah Date: Tue, 22 Feb 2011 15:48:29 +0530 Message-Id: Subject: [Qemu-devel] [PATCH 0/7] New iohandler API List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu list Cc: Amit Shah , Gerd Hoffmann Hello, This is a new iohandler API implementation. It gets rid of the multiple callbacks and switches to just one callback with an event mask that triggered the callback. qemu-char.c has been trivially updated to replace all usage of qemu_set_fd_handler* functions to the new api. Future work includes removing the qemu_set_fd_handler* functions and getting rid of #include "qemu-char.h" from all the src files that don't need it (most of them). The users of the char api can then be also converted over to a new api in similar fashion, deprecating the usage of can_read callbacks altogether. I tested this series in two scenarios: monitor on stdio and by running the virtio-serial testsuite, which uses unix sockets and does open/close/read/write/poll calls on the sockets. It all works fine. Please review and apply. Amit Shah (7): iohandlers: Mark current implementation as 'old' iohandlers: Introduce a new API char: tcp: Use new iohandler api char: udp: Use new iohandler api char: fd: Use new iohandler api char: stdio: Use new iohandler api char: pty: Use new iohandler api iohandler.h | 28 +++++++++++ qemu-char.c | 140 +++++++++++++++++++++++++++++++++++++++++++---------- vl.c | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 291 insertions(+), 31 deletions(-) create mode 100644 iohandler.h -- 1.7.4