This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

RE: [omniORB] Re: Exception Handling is thread safe?


On Wednesday, March 25, 1998 6:16 AM, erwin [SMTP:erwin@htsa.hva.nl] wrote:
> Pinwu Xu wrote:
> > The eg3_impl hang seems to be just what I got, as I installed
> > egcs-1.0.2 (w/o the MT-eh patch) on a 486, libc5.4.44, recompiled
> 
> I believe H.J. Lu wrote once that it is not wize to use libc5 with
> threads. Correct me if i am wrong.

I would hate to contradict H.J. Lu, but I wouldn't say that it
is not ``wise''. It can certainly be done. Real projects exist which
use libc5 with LinuxThreads (for example, the AOL multithreaded
web server 2.2). http://www.aolserver.com/server/index.html. 

Visit http://pauillac.inria.fr/~xleroy, follow the LinuxThreads link.

The thing to remember is that LinuxThreads does replace some
libc functions that are not MT-safe. It provides mutex-protected
malloc and friends, for instance; your application won't be
calling the unsafe libc5 versions.

Xavier Leroy's FAQ warns that some versions of libc5 will
not work. There is a section ``C. Issues releated to the
C library'' that you should read.

The AOLserver 2.2 download page says that it was
compiled with libc 5.3.12 (the newer 2.3 beta version
has switched to glibc2). This is kind of funny, since
the LinuxThreads FAQ recommends that you avoid
5.3.12. :)

Nevertheless, I'm quite happily using threads with libc5 on
a multi-processor x86 box.  I haven't run into any problems
so far. Which doesn't mean that problems aren't lurking in
there. My code's interaction with the library is, however,
limited to basic system calls and a bit of standard I/O.



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