From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3dIH-0006DL-7G for qemu-devel@nongnu.org; Mon, 11 May 2009 17:44:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3dIB-0006BQ-JQ for qemu-devel@nongnu.org; Mon, 11 May 2009 17:44:16 -0400 Received: from [199.232.76.173] (port=33842 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3dIB-0006BG-Aj for qemu-devel@nongnu.org; Mon, 11 May 2009 17:44:11 -0400 Received: from 2.mail-out.ovh.net ([91.121.26.226]:56582) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M3dIA-00082H-3j for qemu-devel@nongnu.org; Mon, 11 May 2009 17:44:11 -0400 Date: Mon, 11 May 2009 23:37:47 +0200 From: Jean-Christophe PLAGNIOL-VILLARD Subject: Re: [Qemu-devel] [PATCH 1/4] Add module infrastructure to QEMU Message-ID: <20090511213747.GA18336@game.jcrosoft.org> References: <1242052009-27339-1-git-send-email-aliguori@us.ibm.com> <1242052009-27339-2-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1242052009-27339-2-git-send-email-aliguori@us.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Paul Brook > diff --git a/module.h b/module.h > new file mode 100644 > index 0000000..5aa3eaa > --- /dev/null > +++ b/module.h > @@ -0,0 +1,41 @@ > +/* > + * QEMU Module Infrastructure > + * > + * Copyright IBM, Corp. 2009 > + * > + * Authors: > + * Anthony Liguori > + * > + * This work is licensed under the terms of the GNU GPL, version 2. See > + * the COPYING file in the top-level directory. > + * > + */ > + > +#ifndef QEMU_MODULE_H > +#define QEMU_MODULE_H > + > +#define module_init(function, priority) \ > +static void __attribute__((constructor)) qemu_init_ ## function(void) { \ > + register_module_init(function, priority); \ > +} > + > +#define module_exit(function, priority) \ > +static void __attribute__((constructor)) qemu_exit_ ## function(void) { \ constructor? ;-) Best Regards, J.