From: Christoph Egger <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>,
Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: size_t and printk and Xen
Date: Mon, 13 Oct 2008 12:02:09 +0200 [thread overview]
Message-ID: <200810131202.09673.Christoph.Egger@amd.com> (raw)
In-Reply-To: <9aa34f3c-2ab0-4425-b4d4-0994cc7fa6fb@default>
On Sunday 12 October 2008 20:12:33 Dan Magenheimer wrote:
> > >> I'm no particular fan of size_t in hypervisor interfaces
> > >> though. So, for
> > >> example, switching xmalloc() interfaces to use unsigned int
> > >> instead would be
> > >> fine by me, and this would sidestep the issue perhaps?
> > >
> > > I think C99 size_t may have compile-time type-checking uses so
> > > I'd be hesitant to remove it entirely.
> >
> > Can you give a concrete example of how it helps us to use it
> > within the
> > xmalloc interfaces? As far as I'm aware it's not useful at
> > all, but I could
> > certainly be wrong as this aspect of the C spec is not
> > something I've ever
> > really investigated.
>
> No, I can't. IIRC it has something to do with portability to
> unusual platforms. Perhaps someone else with more knowledge
> of C99 can comment on whether size_t is useful in Xen or we
> should just avoid using it.
NetBSD uses %zi for ssize_t and %zu for size_t.
%z doesn't exist.
Christoph
--
AMD Saxony, Dresden, Germany
Operating System Research Center
Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
Dr. Hans-R. Deppe, Thomas McCoy
prev parent reply other threads:[~2008-10-13 10:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-11 14:05 size_t and printk and Xen Dan Magenheimer
2008-10-12 9:22 ` Keir Fraser
2008-10-12 9:41 ` Keir Fraser
2008-10-12 17:44 ` Dan Magenheimer
2008-10-12 17:57 ` Keir Fraser
2008-10-12 18:12 ` Dan Magenheimer
2008-10-13 10:02 ` Christoph Egger [this message]
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=200810131202.09673.Christoph.Egger@amd.com \
--to=christoph.egger@amd.com \
--cc=dan.magenheimer@oracle.com \
--cc=keir.fraser@eu.citrix.com \
--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.