WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] size_t and printk and Xen

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] size_t and printk and Xen
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Mon, 13 Oct 2008 12:02:09 +0200
Cc: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 13 Oct 2008 03:02:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9aa34f3c-2ab0-4425-b4d4-0994cc7fa6fb@default>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <9aa34f3c-2ab0-4425-b4d4-0994cc7fa6fb@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.7
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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>