* [ECOS] file system initialize
@ 2001-07-16 23:10 james chen
2001-07-17 7:40 ` Jonathan Larmour
0 siblings, 1 reply; 4+ messages in thread
From: james chen @ 2001-07-16 23:10 UTC (permalink / raw)
To: ecos-discuss
Hi,
I use MTAB_ENTRY to static mount a fs. when I debug my fs, I found
that fs->mount is called before dlmalloc initialize. so malloc called
failure in mount. may be the init priority of
fileio_initializer(io\fileio\src\misc.cxx) must be changed, can anyone tell
me how to change it!
static Cyg_Fileio_Init_Class fileio_initializer
CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO); ???
Best Regards,
james
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] file system initialize
2001-07-16 23:10 [ECOS] file system initialize james chen
@ 2001-07-17 7:40 ` Jonathan Larmour
2001-07-17 17:19 ` james chen
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Larmour @ 2001-07-17 7:40 UTC (permalink / raw)
To: james chen; +Cc: ecos-discuss
james chen wrote:
>
> Hi,
> I use MTAB_ENTRY to static mount a fs. when I debug my fs, I found
> that fs->mount is called before dlmalloc initialize. so malloc called
> failure in mount. may be the init priority of
> fileio_initializer(io\fileio\src\misc.cxx) must be changed, can anyone tell
> me how to change it!
>
> static Cyg_Fileio_Init_Class fileio_initializer
> CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO); ???
fileio _should_ be initialized before dlmalloc. dlmalloc is initialized
with priority "CYGBLD_ATTRIB_INIT_BEFORE(CYG_INIT_LIBC)", which is (from
infra/current/include/cyg_type.h) 49900.
CYG_INIT_IO is 49000.
Did you compile all of eCos with -finit-priority? Perhaps your tools don't
support it properly. What version of gcc/binutils you got?
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] file system initialize
2001-07-17 7:40 ` Jonathan Larmour
@ 2001-07-17 17:19 ` james chen
2001-07-18 6:33 ` Jonathan Larmour
0 siblings, 1 reply; 4+ messages in thread
From: james chen @ 2001-07-17 17:19 UTC (permalink / raw)
To: Jonathan Larmour; +Cc: ecos-discuss
> james chen wrote:
> >
> > Hi,
> > I use MTAB_ENTRY to static mount a fs. when I debug my fs, I found
> > that fs->mount is called before dlmalloc initialize. so malloc called
> > failure in mount. may be the init priority of
> > fileio_initializer(io\fileio\src\misc.cxx) must be changed, can anyone
tell
> > me how to change it!
> >
> > static Cyg_Fileio_Init_Class fileio_initializer
> > CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO); ???
>
> fileio _should_ be initialized before dlmalloc. dlmalloc is initialized
> with priority "CYGBLD_ATTRIB_INIT_BEFORE(CYG_INIT_LIBC)", which is (from
> infra/current/include/cyg_type.h) 49900.
>
> CYG_INIT_IO is 49000.
>
> Did you compile all of eCos with -finit-priority? Perhaps your tools don't
> support it properly. What version of gcc/binutils you got?
>
my gcc/binutils is arm-elf-gcc with version 2.95 and I have
enable -finit-priority. during my own file system initializing, I need to
call malloc. so now I have to use dynamic mount instead of static mount, am
I right?
Thanks in advance!
Brs
james
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] file system initialize
2001-07-17 17:19 ` james chen
@ 2001-07-18 6:33 ` Jonathan Larmour
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2001-07-18 6:33 UTC (permalink / raw)
To: james chen; +Cc: ecos-discuss
james chen wrote:
>
> > james chen wrote:
> > >
> > > Hi,
> > > I use MTAB_ENTRY to static mount a fs. when I debug my fs, I found
> > > that fs->mount is called before dlmalloc initialize. so malloc called
> > > failure in mount. may be the init priority of
> > > fileio_initializer(io\fileio\src\misc.cxx) must be changed, can anyone
> tell
> > > me how to change it!
> > >
> > > static Cyg_Fileio_Init_Class fileio_initializer
> > > CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO); ???
> >
> > fileio _should_ be initialized before dlmalloc. dlmalloc is initialized
> > with priority "CYGBLD_ATTRIB_INIT_BEFORE(CYG_INIT_LIBC)", which is (from
> > infra/current/include/cyg_type.h) 49900.
> >
> > CYG_INIT_IO is 49000.
> >
> > Did you compile all of eCos with -finit-priority? Perhaps your tools don't
> > support it properly. What version of gcc/binutils you got?
> >
> my gcc/binutils is arm-elf-gcc with version 2.95 and I have
> enable -finit-priority. during my own file system initializing, I need to
> call malloc. so now I have to use dynamic mount instead of static mount, am
> I right?
In general "libc" stuff has to be set up after the I/O stuff because of
stdio. However that is somewhat historical, and I could probably change the
memory allocator initializer priority to be something earlier now. I'll do
that, and you can do that too by editing
services/memalloc/common/current/src/heapgen.tcl and changing the
CYG_INIT_LIBC to CYG_INIT_IO.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-07-18 6:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-16 23:10 [ECOS] file system initialize james chen
2001-07-17 7:40 ` Jonathan Larmour
2001-07-17 17:19 ` james chen
2001-07-18 6:33 ` Jonathan Larmour
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 read-only IMAP folder(s) and NNTP newsgroup(s).