pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/05e922136a3286893bd489a8f2ecfa0dba4da368

bpo-33316: PyThread_release_lock always fails (GH-6541) · python/cpython@05e9221 · GitHub
Skip to content

Commit 05e9221

Browse files
native-apizooba
authored andcommitted
bpo-33316: PyThread_release_lock always fails (GH-6541)
Use correct interpretation of return value from APIs.
1 parent 00e9c55 commit 05e9221

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PyThread_release_lock always fails

Python/thread_nt.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ LeaveNonRecursiveMutex(PNRMUTEX mutex)
104104
if (PyMUTEX_LOCK(&mutex->cs))
105105
return FALSE;
106106
mutex->locked = 0;
107-
result = PyCOND_SIGNAL(&mutex->cv);
108-
result &= PyMUTEX_UNLOCK(&mutex->cs);
107+
/* condvar APIs return 0 on success. We need to return TRUE on success. */
108+
result = !PyCOND_SIGNAL(&mutex->cv);
109+
PyMUTEX_UNLOCK(&mutex->cs);
109110
return result;
110111
}
111112

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy