threading: proctect with-rwlock against interrupts

This commit is contained in:
Marius Gerbershagen 2018-09-18 18:45:41 +02:00
parent c301009424
commit a34b6d0ca4

View file

@ -151,10 +151,11 @@ Valid values of argument OP are :READ or :WRITE
'mp:get-rwlock-read
'mp:get-rwlock-write)
,s-lock t)
(unwind-protect
(progn
,@body)
(,(if (eq :read op)
'mp:giveup-rwlock-read
'mp:giveup-rwlock-write)
,s-lock)))))
(mp:without-interrupts
(unwind-protect
(mp:with-restored-interrupts
,@body)
(,(if (eq :read op)
'mp:giveup-rwlock-read
'mp:giveup-rwlock-write)
,s-lock))))))