[omniORB] Significance of --enable-threads for building egcs-1.1
Sai-Lai Lo
S.Lo@orl.co.uk
27 Oct 1998 10:46:54 +0000
Shinji,
Is it possible that your machine is running out of process slots when you
have created (1024-2) threads?
I'm curious what effect the --enable-threads option has. Could you or
someone else send me privately the assembler output of my test program
with the -g option using egcs-1.1b that was compiled without
--enable-threads?
Regards,
Sai-Lai
>>>>> Shinji Suzuki writes:
> Hi all,
> I'm using RedHat 5.1 with egcs-1.1b (compiled without --enable-threads)
> on an P5/90. I don't see core dump from the test program Sai-Lai has
> posed.
> A problem I'm observing is that the following program aborts after
> creating about (1024 - 2) threads. I tried creating thread calling
> pthread library directly and it does not seem to be affected.
> Before delving into source code, I would like to hear from others
> of their experiences.
> -shinji
> #include <iostream.h>
> #include <omnithread.h>
> static int i;
> void * here(void *)
> {
> return (void *)i++;
> }
> int main(int,char **)
> {
> int i = 0;
> for(;;) {
> omni_thread * p = omni_thread::create(here, 0);
> cout << i++ << ':';
> void * r;
p-> join( &r );
> cout << (int) r << endl;
> }
> }
--
Dr. Sai-Lai Lo | Research Scientist
|
E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab
| 24a Trumpington Street
Tel: +44 223 343000 | Cambridge CB2 1QA
Fax: +44 223 313542 | ENGLAND