Re: how does Fiasco achieve C++ support

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
On Fri Jun 26, 2015 at 19:01:21 -0400, Yuxin Ren wrote:
> Hi,
> 
>  I just want to make sure that you do not misunderstand my questions.
> All my questions are related the user level, that is l4re, not the kernel.

Ok, I see, when you mention Fiasco I always think of the kernel. So for
userland:

Regarding new/delete: No changes
Regarding modifying libstdc++, libsupc++ and libgcc: No changes, except
libgcc on ARM where Linux specific atomic ops are exchanged with L4
ones.
Regarding locks: We build against pthreads.

> One more question, does Fiasco provide its owner gthred wrappers to the gcc?

No.


Adam


> On Fri, Jun 26, 2015 at 6:34 PM, Adam Lackorzynski
> <[email protected]> wrote:
> > On Fri Jun 26, 2015 at 22:44:07 +0800, Yuxin Ren wrote:
> >> You said Fiasco implements its own new/delete operator, could you show
> >> me where the code for those is?
> >
> > There are several placement new's, for example in thread.cpp and
> > task.cpp. Just look for "operator new" in those files.
> >
> >> In addition, does Fiasco modify the code of libstdc++, libsupc++ and libgcc?
> >
> > Fiasco, the kernel, does not use libstdc++ nor libsupc++, and it also
> > does not modify libgcc as far as it is using it.
> >
> >> I think inside those libraries, they may use locks. And we need to use
> >> the Fiasco's lock implementation, not Linux's.
> >
> > Generally, libstdc++ does not depend on Linux, it can for example also
> > use pthreads internally.
> >
> >> Another confusion comes from the local static object. In order to
> >> guarantee its constructor only run once, the compiler will insert
> >> lock around the constructor. but does the gcc know which lock
> >> implementation to use?
> >
> > This is disabled by using -fno-threadsafe-statics.
> >
> >
> >
> >
> > Adam
> > --
> > Adam                 [email protected]
> >   Lackorzynski         http://os.inf.tu-dresden.de/~adam/
> >
> > _______________________________________________
> > l4-hackers mailing list
> > [email protected]
> > http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> 
> _______________________________________________
> l4-hackers mailing list
> [email protected]
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-- 
Adam                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.