bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

threading question?


From: Roger Davenport
Subject: threading question?
Date: 10 Aug 2001 14:26:37 -0500

Hi,

This isn't really a bug, but I am wondering if glibc functions like
sprintf, printf, etc are all pthread locking? (when used with
LinuxThreads 0.9)  I can understand the need (for instance, printf needs
to lock on stdout) but wonder if there is a way to disable it for
programs that are smart enough to handle their own locking.

I ran a gprof on my code and noticed that sprintf was locking like a
horse, even though the target buffer was static to the thread.  I don't
know if gcc/glibc is smart enough to understand statics in threads, but
my guess is no.

Thanks,
Roger




reply via email to

[Prev in Thread] Current Thread [Next in Thread]