commit | a1eb8cb5dab06dd23c256d03d82ef6b0efc4b6c6 | [log] [tgz] |
---|---|---|
author | Rich Felker <dalias@aerifal.cx> | Wed Mar 30 10:32:45 2011 -0400 |
committer | Rich Felker <dalias@aerifal.cx> | Wed Mar 30 10:32:45 2011 -0400 |
tree | 460a8ef2e7cfd22d87927bb62b2a214e6eac77db | |
parent | 620a1346382f9e10b516bc168f86d499b6716769 [diff] |
avoid crash on stupid but allowable usage of pthread_mutex_unlock unlocking an unlocked mutex is not UB for robust or error-checking mutexes, so we must avoid calling __pthread_self (which might crash due to lack of thread-register initialization) until after checking that the mutex is locked.