From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLoRN-0005hI-4x for qemu-devel@nongnu.org; Thu, 12 Feb 2015 02:44:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLoRK-0007if-09 for qemu-devel@nongnu.org; Thu, 12 Feb 2015 02:44:01 -0500 Received: from mail.ispras.ru ([83.149.199.45]:35776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLoRJ-0007iZ-Np for qemu-devel@nongnu.org; Thu, 12 Feb 2015 02:43:57 -0500 From: "Pavel Dovgaluk" References: <20150122085127.5276.53895.stgit@PASHA-ISP.def.inno> <20150122085328.5276.86561.stgit@PASHA-ISP.def.inno> <54CB69BE.20803@redhat.com> In-Reply-To: <54CB69BE.20803@redhat.com> Date: Thu, 12 Feb 2015 10:43:57 +0300 Message-ID: <000501d04697$aa189c50$fe49d4f0$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [RFC PATCH v8 21/21] replay: recording of the user input List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, alex.bennee@linaro.org, afaerber@suse.de, fred.konrad@greensocs.com > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini > On 22/01/2015 09:53, Pavel Dovgalyuk wrote: > > +void replay_input_event(QemuConsole *src, InputEvent *evt) > > +{ > > + if (replay_mode == REPLAY_MODE_PLAY) { > > + /* Nothing */ > > + } else if (replay_mode == REPLAY_MODE_RECORD) { > > + replay_add_input_event(evt); > > Does replay_add_input_event ultimately call qemu_input_event_send_impl? No, it just adds event to the queue. > > + } else { > > + qemu_input_event_send_impl(src, evt); > > + } > > +} > > + > > Perhaps make this and replay_input_sync_event return a bool and in the > caller do: > > if (replay_input_event(src, evt)) { > qemu_input_event_send_impl(src, evt): > } No, we can't. qemu_input_event_send_impl is called when the queue is saved to the log. Pavel Dovgalyuk