This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCHES][RFC] Fix a deadlock bug in static variable initialization
Hi,
2007/6/8, Richard Guenther <richard.guenther@gmail.com>:
Hm, ok So I guess you can quote me another part of the patch that
explains the solution? ;)
These is no seperate explanation of the solution other than the
implementation itself, which contains comments. The main idea of the
solution is not to hold the mutex lock all the time during
intialization of a static. Instead, we use a bit to signify that. And
the access to that bit is synchronized using the global mutex. The
devil is in the details. All you need to look is in libsupc++/guard.cc
-Doug