qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [patch] add byteordered types


From: Anthony Liguori
Subject: Re: [Qemu-devel] [patch] add byteordered types
Date: Wed, 27 Aug 2008 10:49:34 -0500
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Gerd Hoffmann wrote:
M. Warner Losh wrote:
In message: <address@hidden>
            Gerd Hoffmann <address@hidden> writes:
: Paul Brook wrote:
: > On Wednesday 27 August 2008, Gerd Hoffmann wrote:
: >> +static inline le16 write_le16(uint16_t cpu) \
: > : > This is IMHO a bad name for this function. It doesn't write anything. : : I'm not that happy the name too and certainly open for better
: suggestions I could use instead of read/write.
: : The alternatives I can think of are not very nice either: : : (1) get/set -- same problem as read/write.
:  (2) make_foo() instead of write_foo() -- "make" is too generic IMHO.
:  (3) create_foo() instead of write_foo() -- no nice symmetric
:      replacement for read_foo().
: : better ideas anyone?

Using the existing names that linux/FreeBSD/NetBSD/OpenBSD are using?

cpu_to_* is taken already by the not-typechecked macros.  And converting
the whole qemu tree in one go so we could reuse the names is a bit
unrealistic IMHO.

Personally, I dislike the whole struct thing. I even further dislike having multiple sets of conversion functions that are used in different places in the code.

Are we sure that this is something that we want to do?

Regards,

Anthony Liguori

cheers,
  Gerd







reply via email to

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