linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: bill_carson@126.com (rocky)
To: linux-arm-kernel@lists.infradead.org
Subject: Query about cplusplus in linkage.h
Date: Sat, 20 Nov 2010 12:17:02 +0800 (CST)	[thread overview]
Message-ID: <13701df.df91.12c677fe0fd.Coremail.bill_carson@126.com> (raw)

Hi, all

I am a little confused about the following definition :

--------------include/linux/linkage.h-----------
#ifdef __cplusplus
#define CPP_ASMLINKAGE extern "C"
#else
#define CPP_ASMLINKAGE
#endif

#ifndef asmlinkage
#define asmlinkage CPP_ASMLINKAGE
#endif

all system call functions are marked with asmlinkage, as well as other kernel function like printk/schedule/do_softirq


so every asmlinkage function has extern "C"  attribute if cplusplus is defined, which definitely happens  when compiling C++ code.

I dont get it when cplusplus is needed when compiling kernel?

Can anyone help me out of this little misunderstanding?

Thansk




		

             reply	other threads:[~2010-11-20  4:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-20  4:17 rocky [this message]
2010-11-22  8:30 ` Query about cplusplus in linkage.h Baruch Siach
2010-11-22 15:07   ` rocky
2010-11-23  5:46     ` Baruch Siach
2010-11-23  6:06       ` rocky

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=13701df.df91.12c677fe0fd.Coremail.bill_carson@126.com \
    --to=bill_carson@126.com \
    --cc=linux-arm-kernel@lists.infradead.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).