https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119796
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to AlphaOmegaProgrammer from comment #1) > Created attachment 61108 [details] > Current implementation of locking algorithm > > This file can be found at /libatomic/config/posix/lock.c You don't need to attach the file here, it's in the gcc source tree. (In reply to AlphaOmegaProgrammer from comment #2) > Created attachment 61109 [details] > Proposed Patch > > This is my proposed patch. I've tested it and my test case no longer > deadlocks, and none of my previous tests that did not deadlock seem to be > affected. I haven't read through all of the contributing rules though and I > don't have the time or knowledge to test this thoroughly, but I don't expect > a relatively simple change like this should have any unknown impacts. This isn't a patch, it's another copy of the file (presumably with some changes). Please see https://gcc.gnu.org/contribute.html for how to contribute, which includes sending a real patch (not a copy of the modified file) to the mailing list for review, thanks