From: malc <av1474@comtv.ru>
To: Markus Armbruster <armbru@redhat.com>
Cc: Carsten Otte <cotte@de.ibm.com>, Alexander Graf <agraf@suse.de>,
Aurelien Jarno <aurelien@aurel32.net>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 04/11] Add KVM support for S390x
Date: Wed, 2 Dec 2009 12:48:54 +0300 (MSK) [thread overview]
Message-ID: <Pine.LNX.4.64.0912021245150.3837@linmac.oyster.ru> (raw)
In-Reply-To: <m34oo990pr.fsf@crossbow.pond.sub.org>
On Wed, 2 Dec 2009, Markus Armbruster wrote:
> malc <av1474@comtv.ru> writes:
>
> > On Wed, 2 Dec 2009, Alexander Graf wrote:
> >
> >>
> >> On 02.12.2009, at 09:12, Aurelien Jarno wrote:
> >>
> >> > On Mon, Nov 30, 2009 at 11:25:03PM +0100, Alexander Graf wrote:
> >> >>
> >> >> On 30.11.2009, at 19:18, Aurelien Jarno wrote:
> >> >>
> >> >>> On Thu, Nov 26, 2009 at 02:23:13PM +0100, Alexander Graf wrote:
> [...]
> >> >>>> +
> >> >>>> +static void _kvm_s390_interrupt(CPUState *env, int type, uint32_t parm, uint64_t parm64, int vm)
> >> >>>> +{
> >> >>>
> >> >>> 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?)
>
> Later in 7.1.3:
>
> If the program declares or defines an identifier in a context in
> which it is reserved (other than as allowed by 7.1.4), or defines a
> reserved identifier as a macro name, the behavior is undefined.
>
> This gives implementations of the standard (compiler + libc) license to
> use reserved identifiers for their own purposes. If they clash with the
> user's identifiers, and things break, the user gets to keep the pieces.
Yes, that's how i would interpret it too (as stated in another message)
>
> Now, it's quite unlikely that _kvm_s390_interrupt() clashes with
> anything in practice. It does, however, set a bad example.
Indeed.
>
> > 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.
>
> Why not kvm_s390_interrupt_internal(), or even kvm_s390_interrupt_()?
>
--
mailto:av1474@comtv.ru
next prev parent reply other threads:[~2009-12-02 9:49 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-26 13:23 [Qemu-devel] [PATCH 00/11] S390x KVM support v4 Alexander Graf
2009-11-26 13:23 ` [Qemu-devel] [PATCH 01/11] S/390 CPU fake emulation Alexander Graf
2009-11-30 18:18 ` Aurelien Jarno
2009-11-30 22:30 ` Alexander Graf
2009-12-01 9:46 ` Carsten Otte
2009-12-01 10:11 ` Alexander Graf
2009-12-01 18:45 ` Blue Swirl
2009-12-02 7:55 ` Carsten Otte
2009-12-02 14:41 ` Paul Brook
2009-12-02 8:17 ` Aurelien Jarno
2009-12-02 8:30 ` Alexander Graf
2009-11-26 13:23 ` [Qemu-devel] [PATCH 02/11] S/390 host/target build system support Alexander Graf
2009-11-26 13:23 ` [Qemu-devel] [PATCH 03/11] S/390 fake TCG implementation Alexander Graf
2009-11-30 18:18 ` Aurelien Jarno
2009-11-30 22:27 ` Alexander Graf
2009-12-02 8:16 ` Aurelien Jarno
2009-12-02 8:29 ` Alexander Graf
2009-12-02 8:41 ` Aurelien Jarno
2009-12-02 8:44 ` Alexander Graf
2009-11-26 13:23 ` [Qemu-devel] [PATCH 04/11] Add KVM support for S390x Alexander Graf
2009-11-30 18:18 ` Aurelien Jarno
2009-11-30 22:25 ` Alexander Graf
2009-12-02 8:12 ` Aurelien Jarno
2009-12-02 8:28 ` Alexander Graf
2009-12-02 8:42 ` malc
2009-12-02 8:47 ` Alexander Graf
2009-12-02 8:59 ` malc
2009-12-02 9:36 ` Markus Armbruster
2009-12-02 9:48 ` malc [this message]
2009-11-26 13:23 ` [Qemu-devel] [PATCH 05/11] Allocate physical memory in low virtual address space Alexander Graf
2009-11-30 18:18 ` Aurelien Jarno
2009-11-30 22:21 ` Alexander Graf
2009-12-01 9:12 ` Carsten Otte
2009-11-26 13:23 ` [Qemu-devel] [PATCH 06/11] Add support for S390x system emulation Alexander Graf
2009-11-30 18:18 ` Aurelien Jarno
2009-11-30 22:19 ` Alexander Graf
2009-12-02 8:09 ` Aurelien Jarno
2009-12-02 8:27 ` Alexander Graf
2009-12-02 8:37 ` Aurelien Jarno
2009-12-02 8:41 ` Alexander Graf
2009-12-01 9:17 ` Carsten Otte
2009-11-26 13:23 ` [Qemu-devel] [PATCH 07/11] Add S390x virtio machine bus Alexander Graf
2009-11-26 13:23 ` [Qemu-devel] [PATCH 08/11] Add S390x virtio machine description Alexander Graf
2009-11-30 18:18 ` Aurelien Jarno
2009-11-26 13:23 ` [Qemu-devel] [PATCH 09/11] S390 GDB stub Alexander Graf
2009-11-26 13:23 ` [Qemu-devel] [PATCH 10/11] Set default console to virtio on S390x Alexander Graf
2009-11-26 13:23 ` [Qemu-devel] [PATCH 11/11] Add S390 maintainer information Alexander Graf
2009-11-30 18:18 ` [Qemu-devel] [PATCH 00/11] S390x KVM support v4 Aurelien Jarno
-- strict thread matches above, loose matches on Subject: below --
2009-12-05 11:44 [Qemu-devel] [PATCH 00/11] S390x KVM support v5 Alexander Graf
2009-12-05 11:44 ` [Qemu-devel] [PATCH 04/11] Add KVM support for S390x Alexander Graf
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=Pine.LNX.4.64.0912021245150.3837@linmac.oyster.ru \
--to=av1474@comtv.ru \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=cotte@de.ibm.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).