qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 04/11] Add KVM support for S390x


From: malc
Subject: Re: [Qemu-devel] [PATCH 04/11] Add KVM support for S390x
Date: Wed, 2 Dec 2009 11:59:38 +0300 (MSK)

On Wed, 2 Dec 2009, Alexander Graf wrote:

> 
> On 02.12.2009, at 09:42, malc wrote:
> 
> > On Wed, 2 Dec 2009, Alexander Graf wrote:

[..snip..]

> >>>>> 
> >>>>> Why such a name starting with an underscore?
> >>>> 
> >>>> Because that's the internal function that gets used by the exported, 
> >>>> properly named ones. Are there any conventions on how to declare private 
> >>>> functions?
> >>> 
> >>> I don't think there is any convention, but I know malc always complains
> >>> about not introducing names starting with an underscore.
> > 
> > Yeah he does.
> > 
> >> 
> >> Hm - I just wanted to clearly show that this is an internal API, nobody 
> >> should really have to call directly. But I'm open for other naming 
> >> suggestions.
> > 
> > Thing is, in 7.1.3#1 standard says (after explicitly reserving __ _[A-Z]
> > for any use):
> >         -- All  identifiers  that  begin  with  an  underscore are
> >            always reserved for use as identifiers with file  scope
> >            in both the ordinary and tag name spaces.
> > 
> > And i could never really understand (or recall/comprehend when asked
> > and being given an answer) what this entails. (Anyone?)
> 
> I don't get the second part, but the first one clearly says "If you
> use a function beginning underscore, only use it within the file
> you're declaring it at".

6.2.3 describes name spaces.

FWIW here's my interpretation: those names are reserved by implementation
for use in oridnary and tag name spaces, so keep out, feel free to use them
in other name spaces.

Perhaps Mans Rullgard, if he still reads this that is, can enlighten
us.  Unfortuantelly i do not have write access to Usenet anymore so
can not ask this on comp.std.c on my own.

> 
> > So i would go with something imaginative like internal_do_not_use_kvm*,
> > but that's just me. You can go wild here, leading underscore doesn't look
> > attractive though.
> 
> Well I could have gone with kvm_s390_interrupt_generic or
> kvm_s390_interrupt_internal. But I wanted to have a function name
> that doesn't exceed the 80 character limit all by itself ;-).

Oh c'mon those are less than 30 chars :)

-- 
mailto:address@hidden




reply via email to

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