[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface |
Date: |
Thu, 2 Jun 2011 19:38:42 +1000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jun 01, 2011 at 08:45:56AM -0700, Richard Henderson wrote:
> On 06/01/2011 08:35 AM, Eduard - Gabriel Munteanu wrote:
> > Maybe it's not nice, but you're missing the fact upcasting gives you
> > some type safety. With opaques you have none.
>
> Lol. Do you understand what container_of does?
> This is not dynamic_cast<> with RTTI.
>
> You can put any type name in there that you like,
> so long as it has a field name to match. The type
> of the field you give doesn't even have to match
> the type of the pointer that you pass in.
Uh, if that's true, that's a bug in the container_of implementation.
The ccan container_of implementation, for example, certainly does
check that the given field has type matching the pointer.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
- [Qemu-devel] [RFC PATCH 03/13] AMD IOMMU emulation, (continued)
- [Qemu-devel] [RFC PATCH 03/13] AMD IOMMU emulation, Eduard - Gabriel Munteanu, 2011/06/01
- [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
- Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
- Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface, Richard Henderson, 2011/06/01
- Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
- Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface, Richard Henderson, 2011/06/01
- Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface,
David Gibson <=
[Qemu-devel] [RFC PATCH 04/13] ide: use the DMA memory access interface for PCI IDE controllers, Eduard - Gabriel Munteanu, 2011/06/01
[Qemu-devel] [RFC PATCH 05/13] rtl8139: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
[Qemu-devel] [RFC PATCH 06/13] eepro100: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
[Qemu-devel] [RFC PATCH 07/13] ac97: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
[Qemu-devel] [RFC PATCH 08/13] es1370: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
[Qemu-devel] [RFC PATCH 09/13] e1000: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
[Qemu-devel] [RFC PATCH 10/13] lsi53c895a: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
[Qemu-devel] [RFC PATCH 11/13] pcnet: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
[Qemu-devel] [RFC PATCH 12/13] usb-uhci: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01
[Qemu-devel] [RFC PATCH 13/13] usb-ohci: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/06/01