Make the flag in thread_exclusive unique

This commit is contained in:
Nobuyoshi Nakada 2021-02-23 21:26:36 +09:00
parent 1a00402987
commit 8c943e3be8
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -705,8 +705,9 @@ static st_table *conlist = NULL;
#define conlist_disabled ((st_table *)-1)
#define thread_exclusive(obj) \
for (bool first = (EnterCriticalSection(&obj##_mutex), true); \
first; first = (LeaveCriticalSection(&obj##_mutex), false))
for (bool exclusive_for_##obj = (EnterCriticalSection(&obj##_mutex), true); \
exclusive_for_##obj; \
exclusive_for_##obj = (LeaveCriticalSection(&obj##_mutex), false))
static char *uenvarea;