------- Comment #2 from to dot my dot trociny at gmail dot com 2009-05-19 10:06 ------- The patch works for me.
Actually, calling mutex_destroy in gomp_thread_start() before return was the first my solution and it solved my problem too. But I am not very familiar with libgomp so I was not completely sure if it was safe to release mutex then (I did not do deep investigations how this mutex is used). Releasing it in gomp_team_end(), when all other structures associated with team threads are freed, looked safer for me :-). But it looks as I shouldn't have been so paranoid. Thank you. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40174