problems with pthreads

bjorn rohde jensen bjensen@fastmail.fm
Tue Feb 18 11:31:00 GMT 2003


Hi guys,

  There are a few problems with the posted code.
I believe, the printf family is not actually
thread safe, so there is no telling, what is
actually printed out. Secondly, the IO functions
are buffered. In the case of stdout directed
to a terminal, it is line buffered, so nothing
is actually written, before end of line is printed,
or the buffer runs full. Closing the stream or
normal termination of the program flushes the
stream.

Yours sincerely,

Bjorn



More information about the Gcc-help mailing list