From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWT2s-0004ai-B7 for qemu-devel@nongnu.org; Fri, 02 Dec 2011 08:20:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWT2q-0001YF-OG for qemu-devel@nongnu.org; Fri, 02 Dec 2011 08:20:54 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:48043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWT2q-0001YA-Dq for qemu-devel@nongnu.org; Fri, 02 Dec 2011 08:20:52 -0500 Received: by ghbg19 with SMTP id g19so3657939ghb.4 for ; Fri, 02 Dec 2011 05:20:51 -0800 (PST) Message-ID: <4ED8D0B0.1050400@codemonkey.ws> Date: Fri, 02 Dec 2011 07:20:48 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1322687028-29714-1-git-send-email-aliguori@us.ibm.com> <1322687028-29714-15-git-send-email-aliguori@us.ibm.com> <4ED7A159.20902@redhat.com> <4ED82799.20806@codemonkey.ws> <4ED8C622.3000603@redhat.com> In-Reply-To: <4ED8C622.3000603@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 14/18] rtc: add a dynamic property for retrieving the date List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Markus Armbruster , Luiz Capitulino On 12/02/2011 06:35 AM, Gerd Hoffmann wrote: >> The readme has quite a lot of detail about the syntax. The parser is >> pretty complete already. >> >> https://github.com/aliguori/qidl/blob/master/qc.md > > Ah, nice. Any plans to support lists there, so it is possible to save > the state of (multiple) in-flight transactions? I had support for lists locally and just pushed it. It is based on GSList and uses a marker to indicate the type. So: struct MyDevice { int32_t reg1; int32_t reg2; GSList _type_is(MyRequest) *pending_requests; }; This is nice and works and extends to any list type but the syntax is awkward. So I also swizzled things so that we run through the preprocessor first such that we can do: #define QSList(a) GSList _type_is(MyRequest) struct MyDevice { int32_t reg1; int32_t reg2; QSList(MyRequest) *pending_requests; }; Regards, Anthony Liguori >> But I want to get us moving on QOM first before I go any further with >> this. We can always go back and remove the manually written visit >> functions. > > Sure, one step at a time. It helps when reviewing to have a rough idea > of the big pixture though ... > > cheers, > Gerd > >