[Top][All Lists]

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

Re: [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists

From: Anthony Liguori
Subject: Re: [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists
Date: Thu, 11 Mar 2010 08:11:11 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 03/11/2010 07:25 AM, Paolo Bonzini wrote:
On 03/11/2010 01:57 PM, Paul Brook wrote:
+struct QEMUNotifier
>  +{
>  +    void (*notify)(QEMUNotifier *notifier);
>  +};

I suggest combining this with QEMUBH.

I didn't understand this suggestion exactly, but I think it's related that I didn't understand the advantage of making QEMUNotifier a struct. Instead of using container_of, reusing QEMUBHFunc (renamed to QEMUCallbackFunc maybe?) in QEMUNotifierNode like this:

I like treating a slot as a single object instead of as function pointer/opaque pair. It gives us better type safety and reduces the amount of parameters that need to be passed around.


Anthony Liguori

reply via email to

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