|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 1/7] Add support for generic notifier lists |
Date: | Thu, 11 Mar 2010 08:54:23 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0 |
On 03/11/2010 08:19 AM, Paul Brook wrote:
On 03/11/2010 06:57 AM, Paul Brook wrote:+struct QEMUNotifier +{ + void (*notify)(QEMUNotifier *notifier); +};I suggest combining this with QEMUBH.I take it your not opposed to converting QEMUBH to be a QEMUNotifier? If so, I'm happy to do it.It's unclear to me why you've invented a new thing in the first place.
This style of callback has a number of advantages: - It provides better type safety since - It's a more compact representation- It maps to a function object (functor) which is a pretty common pattern in most high level languages
Regards, Anthony Liguori
Paul
[Prev in Thread] | Current Thread | [Next in Thread] |