Received: from eggs.gnu.org ([2001:4830:134:3::10]:50341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9P1a-0006bN-3n for qemu-devel@nongnu.org; Thu, 08 Jan 2015 21:10:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9P1V-0007uO-4i for qemu-devel@nongnu.org; Thu, 08 Jan 2015 21:10:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9P1U-0007uI-Tr for qemu-devel@nongnu.org; Thu, 08 Jan 2015 21:10:01 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0929x1g010724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 8 Jan 2015 21:09:59 -0500 Date: Fri, 9 Jan 2015 10:10:46 +0800 From: Fam Zheng Message-ID: <20150109021046.GA6087@fam-t430.nay.redhat.com> References: <1420711408-15766-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1420711408-15766-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/4] qemu-timer: introduce usable pointer-free API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Thu, 01/08 11:03, Paolo Bonzini wrote: > The current pointer free API for timers is very low level. Introduce > a new API that matches timer_new_ns/us/ms and also a new API timer_deinit > that can be used instead of timer_free. > > Finally, mechanically change timer macro names in vmstate, to make it > clear that they accept a pointer. > > This prepares for conversion of timers from QEMUTimer * to QEMUTimer. Novice question: what's the advantage, please? Fam > > Paolo > > Paolo Bonzini (4): > qemu-timer: rename timer_init to timer_init_tl > qemu-timer: add timer_init and timer_init_ns/us/ms > qemu-timer: introduce timer_deinit > vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR* > > hw/acpi/ich9.c | 2 +- > hw/acpi/piix4.c | 2 +- > hw/arm/stellaris.c | 2 +- > hw/block/fdc.c | 2 +- > hw/char/cadence_uart.c | 2 +- > hw/char/serial.c | 4 +- > hw/core/ptimer.c | 2 +- > hw/dma/pl330.c | 2 +- > hw/input/lm832x.c | 2 +- > hw/intc/armv7m_nvic.c | 2 +- > hw/isa/vt82c686.c | 2 +- > hw/misc/macio/cuda.c | 2 +- > hw/net/pcnet.c | 2 +- > hw/sd/sdhci.c | 4 +- > hw/timer/a9gtimer.c | 2 +- > hw/timer/arm_mptimer.c | 2 +- > hw/timer/hpet.c | 2 +- > hw/timer/mc146818rtc.c | 4 +- > hw/usb/hcd-ehci.c | 2 +- > hw/usb/hcd-ohci.c | 2 +- > hw/usb/hcd-uhci.c | 2 +- > hw/usb/hcd-xhci.c | 2 +- > hw/usb/redirect.c | 2 +- > hw/watchdog/wdt_i6300esb.c | 2 +- > hw/watchdog/wdt_ib700.c | 2 +- > include/block/aio.h | 2 +- > include/migration/vmstate.h | 18 +++++++-- > include/qemu/timer.h | 94 ++++++++++++++++++++++++++++++++++++++++++--- > qemu-timer.c | 20 +++++++--- > target-arm/machine.c | 4 +- > 30 files changed, 149 insertions(+), 45 deletions(-) > > -- > 2.1.0 > >