This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, I have sent this out in June. Could someone please review this? This patch fixes a deadlock problem in function scope static variable. The current code there uses a big mutex for locking everything and the mutex is acquired throughout the whole time a variable is being initialized. If the initalization code spawns and waits for another another thread which needs to initialize another static variable, a deadlock will result. My fix is to use a bit per object for locking. The bit is only accessed when the global mutex is acquired. The mutex is held only briefly. Thanks. -Doug
Attachment:
ChangeLog-gcc
Description: Binary data
Attachment:
diffs-2007.06.18
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |