summaryrefslogtreecommitdiff
path: root/Python/thread_nt.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-10-17 23:05:19 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2013-10-17 23:05:19 +0300
commitae48164c19d799b10981ee6d48207f971be026cd (patch)
tree9d648169bfd47390b1ad883bc4b54590daaccdb1 /Python/thread_nt.h
parenta51097fdd9d0177b4d856ac1eaa59bc32fb49cc5 (diff)
parent68fc44960e7e678d7dd31f7676df51045d6a38f9 (diff)
downloadcpython-ae48164c19d799b10981ee6d48207f971be026cd.tar.gz
Issue #19276: Fixed the wave module on 64-bit big-endian platforms.
Diffstat (limited to 'Python/thread_nt.h')
-rw-r--r--Python/thread_nt.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/thread_nt.h b/Python/thread_nt.h
index 938bf1e3fe..ab5a08168f 100644
--- a/Python/thread_nt.h
+++ b/Python/thread_nt.h
@@ -34,7 +34,7 @@ typedef NRMUTEX *PNRMUTEX;
PNRMUTEX
AllocNonRecursiveMutex()
{
- PNRMUTEX m = (PNRMUTEX)malloc(sizeof(NRMUTEX));
+ PNRMUTEX m = (PNRMUTEX)PyMem_RawMalloc(sizeof(NRMUTEX));
if (!m)
return NULL;
if (PyCOND_INIT(&m->cv))
@@ -46,7 +46,7 @@ AllocNonRecursiveMutex()
m->locked = 0;
return m;
fail:
- free(m);
+ PyMem_RawFree(m);
return NULL;
}
@@ -56,7 +56,7 @@ FreeNonRecursiveMutex(PNRMUTEX mutex)
if (mutex) {
PyCOND_FINI(&mutex->cv);
PyMUTEX_FINI(&mutex->cs);
- free(mutex);
+ PyMem_RawFree(mutex);
}
}
@@ -107,7 +107,7 @@ LeaveNonRecursiveMutex(PNRMUTEX mutex)
result = PyCOND_SIGNAL(&mutex->cv);
result &= PyMUTEX_UNLOCK(&mutex->cs);
return result;
-}
+}
#else /* if ! _PY_USE_CV_LOCKS */
@@ -130,7 +130,7 @@ FreeNonRecursiveMutex(PNRMUTEX mutex)
DWORD
EnterNonRecursiveMutex(PNRMUTEX mutex, DWORD milliseconds)
{
- return WaitForSingleObject(mutex, milliseconds);
+ return WaitForSingleObjectEx(mutex, milliseconds, FALSE);
}
BOOL