From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQHKe-0001NH-Ab for qemu-devel@nongnu.org; Thu, 11 Apr 2013 09:14:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQHKd-0007Jn-2q for qemu-devel@nongnu.org; Thu, 11 Apr 2013 09:14:28 -0400 Received: from mail-qc0-x236.google.com ([2607:f8b0:400d:c01::236]:39513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQHKc-0007Jg-VA for qemu-devel@nongnu.org; Thu, 11 Apr 2013 09:14:27 -0400 Received: by mail-qc0-f182.google.com with SMTP id k19so694962qcs.27 for ; Thu, 11 Apr 2013 06:14:26 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5166B72B.5040704@redhat.com> Date: Thu, 11 Apr 2013 15:14:19 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1364804434-7980-1-git-send-email-qemulist@gmail.com> <1364804434-7980-6-git-send-email-qemulist@gmail.com> <51668A3E.4080307@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/5] hostmem: init/finalize hostmem listener List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: Peter Maydell , Anthony Liguori , Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, Vasilis Liaskovitis , Stefan Hajnoczi Il 11/04/2013 14:08, liu ping fan ha scritto: >>> >> /* clean up network at qemu process termination */ >>> >> atexit(&net_cleanup); >>> >> + atexit(&hostmem_finalize); >> > >> > This should be in hostmem_init. >> > > Ok, thanks. And extra, for the hostmem_init, what about something like > #define block_init(function) module_init(function, MODULE_INIT_BLOCK) Actually, I would prefer that you do not use a global, so the above comment doesn't really apply unless someone overrides me and tell you to use a global. Paolo