Skip to content

Commit 903e449

Browse files
committed
Revert checking return code from mutex unlocking on Windows
1 parent e388eef commit 903e449

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/common/debug.h

Lines changed: 10 additions & 1 deletion
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; \
@@ -152,7 +160,8 @@ typedef struct {
152160
assert(0); \
153161
}; \
154162
dbg_printf("[%i]: unlocked %s", __LINE__, # x); \
155-
} while (0)
163+
} while (0)
164+
#endif
156165

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

0 commit comments

Comments
 (0)