All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: pointers in public headers
Date: Fri, 25 Aug 2006 16:13:06 +0100	[thread overview]
Message-ID: <44EF2FA2.76E4.0078.0@novell.com> (raw)
In-Reply-To: <C114C451.15B3%Keir.Fraser@cl.cam.ac.uk>

>Io/xs_wire.h does not define a hypervisor interface so no need for guest
>handles there.

Good.

>The rest are all x86-specific, and represent pointers that
>don't really cleanly fit into the guest handle model and its accessor
>macros. Since on x86 the guest handle stuff is really only an enforcement
>method for ensuring we use the correct accessors I just left the tricky few
>as they were. Are you trying to macro/typedef the world for compat
>compilation, and these are annoying for you? :-) If so we could hide them
>behind a different macro -- we'd need to do that anyway to avoid breaking
>API compatibility.

Yes, they present a lurking problem once the converted structures get
accessed - clearly any kind of pointer is invalid when considering compatibility
mode guests. I could certainly try to make the script catch them and convert
them (to a integer type), but then the automation of copying the respective
fields will trigger compiler warnings about converting integrals to/from
pointers of different size.
So, yes, some kind of macro would help, but I can't see how you would
want to get away with not breaking API compatibility (which requires to
leave a pointer in there somehow) but eliminating the pointer.

Jan

  reply	other threads:[~2006-08-25 15:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-25  7:05 pointers in public headers Jan Beulich
2006-08-25  7:41 ` Keir Fraser
2006-08-25 13:15   ` Jan Beulich
2006-08-25 14:14     ` Keir Fraser
2006-08-25 15:13       ` Jan Beulich [this message]
2006-08-25 15:25         ` Keir Fraser
2006-08-25 15:40           ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44EF2FA2.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.