From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45463 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pf5LF-0002qS-Ut for qemu-devel@nongnu.org; Tue, 18 Jan 2011 01:47:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pf5LD-0007dG-MA for qemu-devel@nongnu.org; Tue, 18 Jan 2011 01:46:56 -0500 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:59285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pf5LC-0007as-Uj for qemu-devel@nongnu.org; Tue, 18 Jan 2011 01:46:55 -0500 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp04.in.ibm.com (8.14.4/8.13.1) with ESMTP id p0I6kovL031945 for ; Tue, 18 Jan 2011 12:16:50 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0I6knTp2949194 for ; Tue, 18 Jan 2011 12:16:50 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0I6kmJc006109 for ; Tue, 18 Jan 2011 12:16:49 +0530 Date: Tue, 18 Jan 2011 12:16:46 +0530 From: Arun R Bharadwaj Subject: Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API Message-ID: <20110118064646.GD21383@linux.vnet.ibm.com> References: <20110113120837.4487.95784.stgit@localhost6.localdomain6> <20110113121458.4487.925.stgit@localhost6.localdomain6> <20110118044334.GC21383@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Reply-To: arun@linux.vnet.ibm.com List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, aliguori@linux.vnet.ibm.com, jvrao@linux.vnet.ibm.com, qemu-devel@nongnu.org, aneesh.kumar@linux.vnet.ibm.com * Stefan Hajnoczi [2011-01-18 06:31:34]: > On Tue, Jan 18, 2011 at 4:43 AM, Arun R Bharadwaj > wrote: > > * Stefan Hajnoczi [2011-01-17 09:56:58]: > > > >> On Thu, Jan 13, 2011 at 12:14 PM, Arun R Bharadwaj > >> wrote: > >> > +static void threadlet_io_completion_signal_handler(int signum) > >> > +{ > >> > + =A0 =A0qemu_service_io(); > >> > +} > >> > + > >> > +static void threadlet_register_signal_handler(void) > >> > +{ > >> > + =A0 =A0struct sigaction act; > >> > + =A0 =A0sigfillset(&act.sa_mask); > >> > + =A0 =A0act.sa_flags =3D 0; /* do not restart syscalls to interru= pt select() */ > >> > + =A0 =A0act.sa_handler =3D threadlet_io_completion_signal_handler= ; > >> > + =A0 =A0sigaction(SIGUSR2, &act, NULL); > >> > +} > >> > + > >> > +void threadlet_init(void) > >> > +{ > >> > + =A0 =A0threadlet_register_signal_handler(); > >> > +} > >> > >> This would be the right place to create qemu-threadlet.c, instead of > >> adding the thread_init() prototype to qemu-thread.h and then includi= ng > >> that in vl.c. > >> > >> Stefan > > > > I did not follow your comment here. How can we avoid including > > threadler_init() in vl.c? >=20 > Instead of adding threadlet_init() and related functions to > posix-aio-compat.c and adding the prototype to qemu-thread.h, why not > just create qemu-threadlet.c/qemu-threadlet.h and put these functions > there instead? >=20 > Stefan Got it. So you mean I merge patch 8 and patch 10 into a single patch. But wouldn't this mean we are moving code and adding new API in the same patch? Anthony did not want this from what I recall. But I can do it if you feel it makes things simple. -arun