summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-12-10 10:11:34 -0700
committerKarl Williamson <khw@cpan.org>2020-12-12 08:58:30 -0700
commit0b83dfe6dd9b0bda197566adec923f16b9a693cd (patch)
treea88559b6fd02ba22f021425905874c03c952e8f5 /thread.h
parent2cca577c06f55cb5263727c6fd6b02fe37c36c96 (diff)
downloadperl-0b83dfe6dd9b0bda197566adec923f16b9a693cd.tar.gz
many-reader mutexes: Change structure element name
The old name did not encompass all the possible reasons for the mutex signal condition to be invoked
Diffstat (limited to 'thread.h')
-rw-r--r--thread.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/thread.h b/thread.h
index b34af65707..14fc1c5ac2 100644
--- a/thread.h
+++ b/thread.h
@@ -298,7 +298,7 @@
MUTEX_LOCK(mutex.lock); \
(mutex)->readers_count--; \
if ((mutex)->readers_count <= 0) { \
- COND_SIGNAL(mutex.zero_readers); \
+ COND_SIGNAL(mutex.wakeup); \
(mutex)->readers_count = 0; \
} \
MUTEX_UNLOCK(mutex.lock); \
@@ -310,7 +310,7 @@
do { \
if ((mutex)->readers_count == 0) \
break; \
- COND_WAIT(mutex.zero_readers, mutex.lock); \
+ COND_WAIT(mutex.wakeup, mutex.lock); \
} \
while (1); \
\
@@ -319,20 +319,20 @@
# define PERL_WRITE_UNLOCK(mutex) \
STMT_START { \
- COND_SIGNAL(mutex.readers_now_zero); \
+ COND_SIGNAL(mutex.wakeup); \
MUTEX_UNLOCK(mutex.lock); \
} STMT_END
# define PERL_RW_MUTEX_INIT(mutex) \
STMT_START { \
MUTEX_INIT(mutex.lock); \
- COND_INIT(mutex.zero_readers); \
+ COND_INIT(mutex.wakeup); \
(mutex)->readers_count = 0; \
} STMT_END
# define PERL_RW_MUTEX_DESTROY(mutex) \
STMT_START { \
- COND_DESTROY(mutex.zero_readers); \
+ COND_DESTROY(mutex.wakeup); \
MUTEX_DESTROY(mutex.lock); \
} STMT_END