This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fatfs and io disk misc patches


On Thu, Jul 01, 2004 at 11:40:09AM +0200, Savin Zlobec wrote:
> Andrew Lunn wrote:
> 
> >On Thu, Jun 24, 2004 at 11:14:11AM +0200, Savin Zlobec wrote:
> > 
> >
> >>+2004-06-24  Savin Zlobec  <savin@elatec.si> 
> >>+
> >>+        * src/synthdisk.c:
> >>+        Removed static keyword before DISK_CHANNEL macro (which
> >>+        has changed).
> >>+
> >>2004-01-15  Nick Garnett  <nickg@calivar.com>
> >>
> >>	* cdl/synthdisk.cdl:
> >>Index: devs/disk/synth/current/src/synthdisk.c
> >>===================================================================
> >>RCS file: 
> >>/cvs/ecos/ecos/packages/devs/disk/synth/current/src/synthdisk.c,v
> >>retrieving revision 1.1
> >>diff -u -w -r1.1 synthdisk.c
> >>--- devs/disk/synth/current/src/synthdisk.c	19 Jan 2004 14:35:01 -0000 
> >>1.1
> >>+++ devs/disk/synth/current/src/synthdisk.c	24 Jun 2004 08:38:44 -0000
> >>@@ -123,7 +123,7 @@
> >>    filefd:        -1,                                                    
> >>    \
> >>    filename:      CYGDAT_IO_DISK_ECOSYNTH_DISK##_number_##_FILENAME      
> >>    \
> >>};                                                                        
> >>\
> >>-static DISK_CHANNEL(synth_disk_channel##_number_,                        
> >>\
> >>+DISK_CHANNEL(synth_disk_channel##_number_,                               
> >>\
> >>                    synth_disk_funs,                                      
> >>                    \
> >>                    synth_disk_info##_number_,                            
> >>                    \
> >>                    _mbr_supp_                                            
> >>                    \
> >>   
> >>
> >
> >I don't know if this is the correct fix. You polute the name space. I
> >don't think synth_disk##_number_ needs to be a global symbol, so
> >static is correct. The macro defines two variables and only the first
> >is being made static. Probably there needs to be two macros, one for
> >the cyg_disk_info_t variable and a second for the dock_channel.
> > 
> >
> With the new implementation (malloc-less) the DISK_CHANNEL macro
> is composed of devtab entry array (partitions devtabs), disk_channel array
> (partitions disk channels), cyg_disk_info_t (disk info shared by all 
> disk channels)
> and the master disk channel . I've made them all static, thats why I removed
> the static keywork before the macro usage in synthdisk.c. I don't think that
> having multiple macros is a meaningfull solution, since the declarations are
> interdependent and by declaring then separatly one would not gain anything.
> But I realize that this doesn't fit well into the current concept.

OK. So this is actually part of the malloc-less patch which you have
not sent yet. That explains the confusion. I will keep this in my mbox
until you send the complete patch.

> >It looks like there are a few other name space polution problems as
> >well. There are some types without cyg_ prefixes. It would be nice to
> >clean this up.
>
> I agree. I've found the block devtab entry synth_disk_io##_number_
> in synthdisk.c which can be made static, can you point out  the odhers.

I was talking about types, not variables:

disk_callbacks_t, disk_channel, disk_funs all in disk.h

They way to find variables is to use objdump --syms and look for F or
D etc in the third column. Upper case flags are global, lowercase are
local.

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]