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

Re: [Xen-devel] [PATCH for-xen-4.5 v3 04/16] x86: Introduce MultiBoot Data (MBD) type



>>> On 10.10.14 at 13:47, <daniel.kiper@xxxxxxxxxx> wrote:
> On Thu, Oct 09, 2014 at 11:28:04AM +0100, Andrew Cooper wrote:
>> On 08/10/14 18:52, Daniel Kiper wrote:
>> > --- /dev/null
>> > +++ b/xen/arch/x86/boot_info.c
>> > @@ -0,0 +1,59 @@
>> > +/*
>> > + * Copyright (c) 2013, 2014 Oracle Co., Daniel Kiper
>> > + *
>> > + * This program is free software; you can redistribute it and/or modify
>> > + * it under the terms of the GNU General Public License as published by
>> > + * the Free Software Foundation; either version 2 of the License, or
>> > + * (at your option) any later version.
>> > + *
>> > + * This program is distributed in the hope that it will be useful,
>> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> > + * GNU General Public License for more details.
>> > + *
>> > + * You should have received a copy of the GNU General Public License along
>> > + * with this program.  If not, see <http://www.gnu.org/licenses/>.
>> > + */
>> > +
>> > +#include <xen/types.h>
>> > +#include <xen/cache.h>
>> > +#include <xen/init.h>
>> > +#include <xen/multiboot.h>
>> > +
>> > +#include <asm/mbd.h>
>> > +#include <asm/page.h>
>> > +
>> > +static multiboot_info_t __read_mostly mbi;
>> > +
>> > +extern void enable_exception_support(void);
>>
>> No externs in .c files.  This should be in a header file.
> 
> I am still do not understand what is wrong with that. We need
> that function only here. So, why we should put it in a header?

Because any declaration should be seen not only by all consumers,
but also by the producer (unless that is an assembly file of course),
to make sure declaration and definition agree with one another.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.