Skip to content

Commit 40cd3fe

Browse files
committed
ecere/sys/Mutex: (WASM) Fixed mismatched counting
- Incrementing was enabled, but not decrementing for WASM / Emscripten
1 parent cd3cc04 commit 40cd3fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ecere/src/sys/Mutex.ec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public:
137137
pthread_mutex_lock(&mutex);
138138
#endif
139139
#endif
140-
141140
#endif
142141

143142
//#ifdef _DEBUG
@@ -151,7 +150,6 @@ public:
151150
{
152151
if(this)
153152
{
154-
#if !defined(__EMSCRIPTEN__)
155153
/*
156154
if(this == globalSystem.fileMonitorMutex)
157155
printf("[%d] Releasing Mutex %x\n", (int)GetCurrentThreadID(), this);
@@ -167,6 +165,8 @@ public:
167165
_owningThread = 0;
168166
//#endif
169167
}
168+
#if !defined(__EMSCRIPTEN__)
169+
170170
#if defined(__WIN32__)
171171
#ifdef _DEBUG
172172
ReleaseMutex(mutex);

0 commit comments

Comments
 (0)