Skip to content

Commit cf6e9ce

Browse files
timwojarr2036
authored andcommitted
Revert checking return code from mutex unlocking on Windows
1 parent c25fe2b commit cf6e9ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/common/debug.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ typedef struct {
144144
} \
145145
} while (0)
146146

147+
#ifdef _WIN32
148+
# define tracing_mutex_unlock(x) do { \
149+
(x)->mtx_status = MTX_UNLOCKED; \
150+
(x)->mtx_owner = -1; \
151+
pthread_mutex_unlock(&((x)->mtx_lock)); \
152+
dbg_printf("[%i]: unlocked %s", __LINE__, # x); \
153+
} while (0)
154+
#else
147155
# define tracing_mutex_unlock(x) do { \
148156
(x)->mtx_status = MTX_UNLOCKED; \
149157
(x)->mtx_owner = -1; \
@@ -153,6 +161,7 @@ typedef struct {
153161
}; \
154162
dbg_printf("[%i]: unlocked %s", __LINE__, # x); \
155163
} while (0)
164+
#endif
156165

157166
typedef void (*dbg_func_t)(char const *fmt, ...);
158167

0 commit comments

Comments
 (0)