Received: from eggs.gnu.org ([2001:4830:134:3::10]:58526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Pol-0002xz-4g for qemu-devel@nongnu.org; Mon, 22 Jul 2013 19:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1Pog-0003vN-VJ for qemu-devel@nongnu.org; Mon, 22 Jul 2013 19:47:02 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45805 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Pog-0003v8-NF for qemu-devel@nongnu.org; Mon, 22 Jul 2013 19:46:58 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 23 Jul 2013 01:46:08 +0200 Message-Id: <1374536796-13983-28-git-send-email-afaerber@suse.de> In-Reply-To: <1374536796-13983-1-git-send-email-afaerber@suse.de> References: <1374536796-13983-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 27/55] sysbus: Document SysBusDeviceClass::init and realize semantics List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hu Tao , =?UTF-8?q?Andreas=20F=C3=A4rber?= From: Hu Tao Signed-off-by: Hu Tao [AF: Syntax and wording changes] Signed-off-by: Andreas F=C3=A4rber --- include/hw/sysbus.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index 7c2e316..8c17165 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -23,8 +23,20 @@ typedef struct SysBusDevice SysBusDevice; #define SYS_BUS_DEVICE_GET_CLASS(obj) \ OBJECT_GET_CLASS(SysBusDeviceClass, (obj), TYPE_SYS_BUS_DEVICE) =20 +/** + * SysBusDeviceClass: + * @init: Callback function invoked when the #DeviceState.realized prope= rty + * is changed to %true. Deprecated, new types inheriting directly from + * TYPE_SYS_BUS_DEVICE should use #DeviceClass.realize instead, new leaf + * types should consult their respective parent type. + * + * SysBusDeviceClass is not overriding #DeviceClass.realize, so derived + * classes overriding it are not required to invoke its implementation. + */ typedef struct SysBusDeviceClass { + /*< private >*/ DeviceClass parent_class; + /*< public >*/ =20 int (*init)(SysBusDevice *dev); } SysBusDeviceClass; --=20 1.8.1.4