Revert 3dcc908788.
All checks were successful
The build was successful.

This commit is contained in:
2019-08-29 14:23:33 +02:00
parent 0fb44bb1ae
commit 3b9d91f186
4 changed files with 108 additions and 3 deletions

View File

@@ -273,6 +273,7 @@ PH7_PRIVATE sxi32 SyMemBackendFree(SyMemBackend *pBackend, void *pChunk) {
}
return rc;
}
#if defined(PH7_ENABLE_THREADS)
PH7_PRIVATE sxi32 SyMemBackendMakeThreadSafe(SyMemBackend *pBackend, const SyMutexMethods *pMethods) {
SyMutex *pMutex;
if(SXMEM_BACKEND_CORRUPT(pBackend) || pMethods == 0 || pMethods->xNew == 0) {
@@ -300,6 +301,7 @@ PH7_PRIVATE sxi32 SyMemBackendDisbaleMutexing(SyMemBackend *pBackend) {
pBackend->pMutex = 0;
return SXRET_OK;
}
#endif
/*
* Memory pool allocator
*/

View File

@@ -13,6 +13,7 @@
#include <stdlib.h>
#endif
#if defined(PH7_ENABLE_THREADS)
#if defined(__WINNT__)
struct SyMutex {
CRITICAL_SECTION sMutex;
@@ -219,4 +220,5 @@ static const SyMutexMethods sDummyMutexMethods = {
PH7_PRIVATE const SyMutexMethods *SyMutexExportMethods(void) {
return &sDummyMutexMethods;
}
#endif /* __WINNT__ */
#endif /* __WINNT__ */
#endif /* PH7_ENABLE_THREADS */