Skip to content

Commit 2cca577

Browse files
committed
PERL_WRITE_UNLOCK: add missing condition signal
The mutex is locked, and any contenders are awaiting a signal, which until this commit was missing.
1 parent f976811 commit 2cca577

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

thread.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,11 @@
317317
/* Here, the mutex is locked, with no readers */ \
318318
} STMT_END
319319

320-
# define PERL_WRITE_UNLOCK(mutex) MUTEX_UNLOCK(mutex.lock)
320+
# define PERL_WRITE_UNLOCK(mutex) \
321+
STMT_START { \
322+
COND_SIGNAL(mutex.readers_now_zero); \
323+
MUTEX_UNLOCK(mutex.lock); \
324+
} STMT_END
321325

322326
# define PERL_RW_MUTEX_INIT(mutex) \
323327
STMT_START { \

0 commit comments

Comments
 (0)