From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37635 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKTus-0006zW-LU for qemu-devel@nongnu.org; Fri, 04 Jun 2010 06:14:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKTur-0006hZ-Ae for qemu-devel@nongnu.org; Fri, 04 Jun 2010 06:14:18 -0400 Received: from mail-yw0-f197.google.com ([209.85.211.197]:41567) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKTur-0006hT-7o for qemu-devel@nongnu.org; Fri, 04 Jun 2010 06:14:17 -0400 Received: by ywh35 with SMTP id 35so804306ywh.29 for ; Fri, 04 Jun 2010 03:14:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1275644132-22176-1-git-send-email-kraxel@redhat.com> References: <1275644132-22176-1-git-send-email-kraxel@redhat.com> Date: Fri, 4 Jun 2010 11:14:15 +0100 Message-ID: Subject: Re: [Qemu-devel] [PATCH] Add exit notifiers. From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Fri, Jun 4, 2010 at 10:35 AM, Gerd Hoffmann wrote: > Hook up any cleanup work which needs to be done here. =A0Advantages over > using atexit(3): > > =A0(1) You get passed in a pointer to the notifier. =A0If you embed that > =A0 =A0 =A0into your state struct you can use container_of() to get get y= our > =A0 =A0 =A0state info. > =A0(2) You can unregister, say when un-plugging a device. This looks useful to me. Just yesterday I added an atexit(3) case for some local hacking. > diff --git a/roms/seabios b/roms/seabios > index 8f469b9..7d09d0e 160000 > --- a/roms/seabios > +++ b/roms/seabios > @@ -1 +1 @@ > -Subproject commit 8f469b9676127ba6bb52609d89ec774e61db0ee1 > +Subproject commit 7d09d0e3ba11310e973d4302c7fcc3fc2184e04c This hunk seems unrelated to your commit. > diff --git a/vl.c b/vl.c > index ac1a998..1577566 100644 > --- a/vl.c > +++ b/vl.c > @@ -2127,6 +2130,21 @@ static BOOL WINAPI qemu_ctrl_handler(DWORD type) > > =A0#ifndef _WIN32 > > +void qemu_add_exit_notifier(Notifier *notify) Why #ifndef _WIN32? I think this patch will break _WIN32 builds. Stefan