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 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/
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.