Re: [PATCH] ia64: Depend on non-static printk for cmpxchg debug

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

 



On Fri, Feb 26, 2021 at 01:47:20PM +0000, Chris Down wrote:
> Chris Down writes:
> > I must confess I have no idea of the history of why it was `extern int`
> > in the first place -- my fear was somehow we use cmpxchg.h from a
> > different context.  Do you have any idea? :-)
> 
> Ok, found where it's introduced in the pre-git archives: "New file
> asm-ia64/intrinsics.h." from David Mosberger <davidm@xxxxxxxxxxxxxxxx>, Dec
> 9 2002. No indication why it's extern, but it's been there since the dawn of
> ia64.

It's just a quirk of C.  'extern' is only meaningful when applied to
variables.  In the context of functions,

extern int printk(char *fmt);
int printk(char *fmt);

are completely equivalent.  Unless (as you've seen) there's then a
static definition following the extern declaration.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux