From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NYzpo-00078t-Id for qemu-devel@nongnu.org; Sun, 24 Jan 2010 05:36:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NYzpj-00076J-PD for qemu-devel@nongnu.org; Sun, 24 Jan 2010 05:36:48 -0500 Received: from [199.232.76.173] (port=33330 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYzpj-000769-Gv for qemu-devel@nongnu.org; Sun, 24 Jan 2010 05:36:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15102) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NYzpj-0008FX-2o for qemu-devel@nongnu.org; Sun, 24 Jan 2010 05:36:43 -0500 Message-ID: <4B5C22B7.5090001@redhat.com> Date: Sun, 24 Jan 2010 12:36:39 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1264108180-3666-1-git-send-email-lcapitulino@redhat.com> <1264108180-3666-9-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1264108180-3666-9-git-send-email-lcapitulino@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 08/11] QMP: Asynchronous messages enable/disable support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, armbru@redhat.com On 01/21/2010 11:09 PM, Luiz Capitulino wrote: > This commit disables asynchronous messages by default and > introduces two new QMP commands: async_msg_enable and > async_msg_disable. > > Each QMP Monitor has its own set of asynchronous messages, > so for example, if QEMU is run with two QMP Monitors async > messages setup in one of them doesn't affect the other. > > To implement this design a bitmap is introduced to the > Monitor struct, each async message is represented by one bit. > > A bitmap is an overkill here, an array of booleans should suffice. > > +#define EVENTS_BITMAP_SIZE (QEVENT_MAX / 8) > Doesn't that underflow if QEVENT_MAX is not a multiple of 8? -- error compiling committee.c: too many arguments to function