summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-23 21:26:36 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-08 17:46:07 +0900
commit8c943e3be880eef40023e52daf43d8e0bc8ab59c (patch)
treefc1cb3b9ac7ca4e2057480f47b76d74b86e71a91 /win32/win32.c
parent1a00402987558db93f2741f3b500ceadd7b17dcd (diff)
Make the flag in thread_exclusive unique
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 027303b8cd..83443dfd8b 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -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;