qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] Add module infrastructure to QEMU


From: Jean-Christophe PLAGNIOL-VILLARD
Subject: Re: [Qemu-devel] [PATCH 1/4] Add module infrastructure to QEMU
Date: Mon, 11 May 2009 23:37:47 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

> 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   <address@hidden>
> + *
> + * 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]