Re: is there a chance for a race condition in pthread_mutex_[un]lock.c?
Ulrich Drepper <[email protected]> Wed, 17 Dec 2003 02:00:13 -0800
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Perez-Gonzalez, Inaky wrote: > While squeezing my brains on some inconsistencies on the RT-NPTL > patches, I came across this issue, and I was wondering how to > fix it. Please tell me I am wrong: If that happens, the user code is wrong. There are many situations like this which can result in inconsistencies. No mutex can be unlocked before the locking call returned. If half-way through the pthread_mutex_lock call some other thread calls pthread_mutex_unlock this is a plain error. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/4Ckt2ijCOnn/RHQRAtKnAJ4teNhY14eTaWheKZ8hODsHUW52ngCgs2wn aEmPlSV8X5JayIRJtaoW6bg= =upIG -----END PGP SIGNATURE-----