public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Deadlock with socket and iostream
@ 2003-05-20 16:15 davisonunicamp
  0 siblings, 0 replies; 3+ messages in thread
From: davisonunicamp @ 2003-05-20 16:15 UTC (permalink / raw)
  To: gcc-help

Hi, I have a problem with threads, sockets and iostream. In my program, I
call one thread with cin and cout. Later, I call another one trhead with an
operation with sockets(connect, write, accept and read). Finally, I call one
thread that cout calls one and one cin. Then the program stops.
I'm using the following options:
-D_RWSTD_MULTI_THREAD -D_REENTRANT -D_THREAD_SAFE.
gcc-3.2.2
libstdc++-v3
I need a help to solve this problem.

Davison.






__________________________________________________________________________
Seleção de Softwares UOL.
10 softwares escolhidos pelo UOL para você e sua família.
http://www.uol.com.br/selecao


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Deadlock with socket and iostream
@ 2003-05-21  5:33 Ajay Bansal
  0 siblings, 0 replies; 3+ messages in thread
From: Ajay Bansal @ 2003-05-21  5:33 UTC (permalink / raw)
  To: davisonunicamp, gcc-help

Can you please post the test progrem? 


-----Original Message-----
From: davisonunicamp [mailto:davisonunicamp@bol.com.br] 
Sent: Tuesday, May 20, 2003 8:25 PM
To: gcc-help@gcc.gnu.org

Hi, I have a problem with threads, sockets and iostream. In my program, I call one thread with cin and cout. Later, I call another one trhead with an operation with sockets(connect, write, accept and read). Finally, I call one thread that cout calls one and one cin. Then the program stops.  
I'm using the following options: 
-D_RWSTD_MULTI_THREAD -D_REENTRANT -D_THREAD_SAFE. 
gcc-3.2.2 
libstdc++-v3
I need a help to solve this problem. 
 
Davison. 
 
 
  
  

 
__________________________________________________________________________
Seleção de Softwares UOL.
10 softwares escolhidos pelo UOL para você e sua família.
http://www.uol.com.br/selecao



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Deadlock with socket and iostream
       [not found] <HF6XFU$I26Z1bPlXcOFs9Xm7m3d_hK_TkD9cyI9fEm9Q6pFnUGH@bol.co m.br>
@ 2003-05-20 17:14 ` Eljay Love-Jensen
  0 siblings, 0 replies; 3+ messages in thread
From: Eljay Love-Jensen @ 2003-05-20 17:14 UTC (permalink / raw)
  To: davisonunicamp, gcc-help

Hi Davison,

Is your GCC compiled with thread safety enabled?
	mkdir gccbuild
	cd gccbuild
	../gcc/configure --enable-languages=c,c++ --enable-threads

Do you need the thread enable compilation switch?
	gcc -pthread foo.cpp -o foo

(The -pthread may not be applicable on all platforms.)

--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-21  5:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-20 16:15 Deadlock with socket and iostream davisonunicamp
     [not found] <HF6XFU$I26Z1bPlXcOFs9Xm7m3d_hK_TkD9cyI9fEm9Q6pFnUGH@bol.co m.br>
2003-05-20 17:14 ` Eljay Love-Jensen
2003-05-21  5:33 Ajay Bansal

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