diff options
author | Karl Williamson <khw@cpan.org> | 2020-12-10 10:11:34 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-12 08:58:30 -0700 |
commit | 0b83dfe6dd9b0bda197566adec923f16b9a693cd (patch) | |
tree | a88559b6fd02ba22f021425905874c03c952e8f5 /thread.h | |
parent | 2cca577c06f55cb5263727c6fd6b02fe37c36c96 (diff) | |
download | perl-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.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |